From 1e1cd862427cb5cab4e7b627e55cc34f7f1741b7 Mon Sep 17 00:00:00 2001 From: Kiichiro YUKAWA Date: Mon, 25 Dec 2023 15:48:46 +0900 Subject: [PATCH] Fix e2e test code (#61) * :bug: fix Signed-off-by: vankichi * :bug: fix Signed-off-by: vankichi * :bug: fix Signed-off-by: vankichi * :bug: fix Signed-off-by: vankichi * :bug: fix Signed-off-by: vankichi * fix: vald docker image tag Signed-off-by: hlts2 * feat: generate code from proto and update e2e test code Signed-off-by: hlts2 * :bug: fix example Signed-off-by: vankichi * :bug: fix example Signed-off-by: vankichi * Enabled E2E test for Typescript (#63) * feat: add ts e2e test Signed-off-by: hlts2 * fix: fails test for assertion Signed-off-by: hlts2 * feat: add step to verify example ts Signed-off-by: hlts2 * feat: add tsconfig Signed-off-by: hlts2 * fix: debug log message Signed-off-by: hlts2 * fix: delete any keyword Signed-off-by: hlts2 * fix: delete any keyword Signed-off-by: hlts2 * fix: use process exit when an error occurs Signed-off-by: hlts2 * fix: package updatge Signed-off-by: hlts2 * fix: add new package for build error Signed-off-by: hlts2 --------- Signed-off-by: hlts2 --------- Signed-off-by: vankichi Signed-off-by: hlts2 Co-authored-by: hlts2 --- .github/workflows/release.yml | 28 +- Makefile | 4 +- buf.gen.yaml | 19 +- example-ts/example.ts | 32 +- example-ts/tsconfig.json | 11 + example/example.js | 94 +- index.d.ts | 4 +- index.js | 2 +- package-lock.json | 484 +- package.json | 6 +- src/buf/validate/expression_grpc_pb.js | 1 - src/buf/validate/expression_pb.d.ts | 163 + src/buf/validate/expression_pb.js | 838 +- src/buf/validate/expression_pb.ts | 315 - src/buf/validate/priv/private_grpc_pb.js | 1 - src/buf/validate/priv/private_pb.d.ts | 77 + src/buf/validate/priv/private_pb.js | 563 +- src/buf/validate/priv/private_pb.ts | 168 - src/buf/validate/validate_grpc_pb.js | 1 - src/buf/validate/validate_pb.d.ts | 3718 +++ src/buf/validate/validate_pb.js | 15959 +++--------- src/buf/validate/validate_pb.ts | 6305 ----- src/google/api/annotations_grpc_pb.js | 1 - src/google/api/annotations_pb.js | 54 - src/google/api/http_grpc_pb.js | 1 - src/google/api/{http_pb.ts => http_pb.d.ts} | 255 +- src/google/api/http_pb.js | 1251 +- .../protobuf/{any_pb.ts => any_pb.d.ts} | 143 +- src/google/protobuf/any_pb.js | 190 + src/google/protobuf/descriptor_pb.d.ts | 2307 ++ .../{descriptor_pb.ts => descriptor_pb.js} | 2924 +-- .../{duration_pb.ts => duration_pb.d.ts} | 105 +- src/google/protobuf/duration_pb.js | 143 + .../{timestamp_pb.ts => timestamp_pb.d.ts} | 125 +- src/google/protobuf/timestamp_pb.js | 171 + src/google/rpc/status_grpc_pb.js | 1 - src/google/rpc/status_pb.d.ts | 74 + src/google/rpc/status_pb.js | 347 +- src/google/rpc/status_pb.ts | 128 - src/vald/v1/agent/core/agent_grpc_pb.js | 145 - src/vald/v1/agent/core/agent_pb.d.ts | 26 + ...pc-client.ts => agent_pb.grpc-client.d.ts} | 38 +- .../v1/agent/core/agent_pb.grpc-client.js | 106 + src/vald/v1/agent/core/agent_pb.js | 86 +- src/vald/v1/agent/core/agent_pb.ts | 37 - src/vald/v1/agent/core/index.js | 2 +- src/vald/v1/payload/index.js | 1 - src/vald/v1/payload/payload_grpc_pb.js | 1 - src/vald/v1/payload/payload_pb.d.ts | 2369 ++ src/vald/v1/payload/payload_pb.js | 20478 ++++------------ src/vald/v1/payload/payload_pb.ts | 5684 ----- src/vald/v1/vald/filter_grpc_pb.js | 328 - src/vald/v1/vald/filter_pb.d.ts | 26 + ...c-client.ts => filter_pb.grpc-client.d.ts} | 73 +- src/vald/v1/vald/filter_pb.grpc-client.js | 169 + src/vald/v1/vald/filter_pb.js | 102 +- src/vald/v1/vald/filter_pb.ts | 53 - src/vald/v1/vald/index.js | 14 +- src/vald/v1/vald/insert_grpc_pb.js | 121 - .../v1/vald/{insert_pb.ts => insert_pb.d.ts} | 15 +- ...c-client.ts => insert_pb.grpc-client.d.ts} | 28 +- src/vald/v1/vald/insert_pb.grpc-client.js | 88 + src/vald/v1/vald/insert_pb.js | 84 +- src/vald/v1/vald/object_grpc_pb.js | 144 - src/vald/v1/vald/object_pb.d.ts | 26 + ...c-client.ts => object_pb.grpc-client.d.ts} | 33 +- src/vald/v1/vald/object_pb.grpc-client.js | 97 + src/vald/v1/vald/object_pb.js | 86 +- src/vald/v1/vald/object_pb.ts | 37 - src/vald/v1/vald/remove_grpc_pb.js | 144 - src/vald/v1/vald/remove_pb.d.ts | 26 + ...c-client.ts => remove_pb.grpc-client.d.ts} | 33 +- src/vald/v1/vald/remove_pb.grpc-client.js | 97 + src/vald/v1/vald/remove_pb.js | 86 +- src/vald/v1/vald/remove_pb.ts | 37 - src/vald/v1/vald/search_grpc_pb.js | 253 - src/vald/v1/vald/search_pb.d.ts | 26 + ...c-client.ts => search_pb.grpc-client.d.ts} | 73 +- src/vald/v1/vald/search_pb.grpc-client.js | 171 + src/vald/v1/vald/search_pb.js | 95 +- src/vald/v1/vald/search_pb.ts | 46 - src/vald/v1/vald/update_grpc_pb.js | 121 - .../v1/vald/{update_pb.ts => update_pb.d.ts} | 15 +- ...c-client.ts => update_pb.grpc-client.d.ts} | 28 +- src/vald/v1/vald/update_pb.grpc-client.js | 88 + src/vald/v1/vald/update_pb.js | 84 +- src/vald/v1/vald/upsert_grpc_pb.js | 121 - .../v1/vald/{upsert_pb.ts => upsert_pb.d.ts} | 15 +- ...c-client.ts => upsert_pb.grpc-client.d.ts} | 28 +- src/vald/v1/vald/upsert_pb.grpc-client.js | 88 + src/vald/v1/vald/upsert_pb.js | 84 +- tests/e2e.test.ts | 1646 +- tsconfig.json | 11 + 93 files changed, 20347 insertions(+), 50579 deletions(-) create mode 100644 example-ts/tsconfig.json delete mode 100644 src/buf/validate/expression_grpc_pb.js create mode 100644 src/buf/validate/expression_pb.d.ts delete mode 100644 src/buf/validate/expression_pb.ts delete mode 100644 src/buf/validate/priv/private_grpc_pb.js create mode 100644 src/buf/validate/priv/private_pb.d.ts delete mode 100644 src/buf/validate/priv/private_pb.ts delete mode 100644 src/buf/validate/validate_grpc_pb.js create mode 100644 src/buf/validate/validate_pb.d.ts delete mode 100644 src/buf/validate/validate_pb.ts delete mode 100644 src/google/api/annotations_grpc_pb.js delete mode 100644 src/google/api/annotations_pb.js delete mode 100644 src/google/api/http_grpc_pb.js rename src/google/api/{http_pb.ts => http_pb.d.ts} (60%) rename src/google/protobuf/{any_pb.ts => any_pb.d.ts} (58%) create mode 100644 src/google/protobuf/any_pb.js create mode 100644 src/google/protobuf/descriptor_pb.d.ts rename src/google/protobuf/{descriptor_pb.ts => descriptor_pb.js} (50%) rename src/google/protobuf/{duration_pb.ts => duration_pb.d.ts} (58%) create mode 100644 src/google/protobuf/duration_pb.js rename src/google/protobuf/{timestamp_pb.ts => timestamp_pb.d.ts} (59%) create mode 100644 src/google/protobuf/timestamp_pb.js delete mode 100644 src/google/rpc/status_grpc_pb.js create mode 100644 src/google/rpc/status_pb.d.ts delete mode 100644 src/google/rpc/status_pb.ts delete mode 100644 src/vald/v1/agent/core/agent_grpc_pb.js create mode 100644 src/vald/v1/agent/core/agent_pb.d.ts rename src/vald/v1/agent/core/{agent_pb.grpc-client.ts => agent_pb.grpc-client.d.ts} (76%) create mode 100644 src/vald/v1/agent/core/agent_pb.grpc-client.js delete mode 100644 src/vald/v1/agent/core/agent_pb.ts delete mode 100644 src/vald/v1/payload/payload_grpc_pb.js create mode 100644 src/vald/v1/payload/payload_pb.d.ts delete mode 100644 src/vald/v1/payload/payload_pb.ts delete mode 100644 src/vald/v1/vald/filter_grpc_pb.js create mode 100644 src/vald/v1/vald/filter_pb.d.ts rename src/vald/v1/vald/{filter_pb.grpc-client.ts => filter_pb.grpc-client.d.ts} (74%) create mode 100644 src/vald/v1/vald/filter_pb.grpc-client.js delete mode 100644 src/vald/v1/vald/filter_pb.ts delete mode 100644 src/vald/v1/vald/insert_grpc_pb.js rename src/vald/v1/vald/{insert_pb.ts => insert_pb.d.ts} (53%) rename src/vald/v1/vald/{insert_pb.grpc-client.ts => insert_pb.grpc-client.d.ts} (75%) create mode 100644 src/vald/v1/vald/insert_pb.grpc-client.js delete mode 100644 src/vald/v1/vald/object_grpc_pb.js create mode 100644 src/vald/v1/vald/object_pb.d.ts rename src/vald/v1/vald/{object_pb.grpc-client.ts => object_pb.grpc-client.d.ts} (74%) create mode 100644 src/vald/v1/vald/object_pb.grpc-client.js delete mode 100644 src/vald/v1/vald/object_pb.ts delete mode 100644 src/vald/v1/vald/remove_grpc_pb.js create mode 100644 src/vald/v1/vald/remove_pb.d.ts rename src/vald/v1/vald/{remove_pb.grpc-client.ts => remove_pb.grpc-client.d.ts} (75%) create mode 100644 src/vald/v1/vald/remove_pb.grpc-client.js delete mode 100644 src/vald/v1/vald/remove_pb.ts delete mode 100644 src/vald/v1/vald/search_grpc_pb.js create mode 100644 src/vald/v1/vald/search_pb.d.ts rename src/vald/v1/vald/{search_pb.grpc-client.ts => search_pb.grpc-client.d.ts} (74%) create mode 100644 src/vald/v1/vald/search_pb.grpc-client.js delete mode 100644 src/vald/v1/vald/search_pb.ts delete mode 100644 src/vald/v1/vald/update_grpc_pb.js rename src/vald/v1/vald/{update_pb.ts => update_pb.d.ts} (53%) rename src/vald/v1/vald/{update_pb.grpc-client.ts => update_pb.grpc-client.d.ts} (75%) create mode 100644 src/vald/v1/vald/update_pb.grpc-client.js delete mode 100644 src/vald/v1/vald/upsert_grpc_pb.js rename src/vald/v1/vald/{upsert_pb.ts => upsert_pb.d.ts} (53%) rename src/vald/v1/vald/{upsert_pb.grpc-client.ts => upsert_pb.grpc-client.d.ts} (75%) create mode 100644 src/vald/v1/vald/upsert_pb.grpc-client.js create mode 100644 tsconfig.json diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index ad71e8a..5d5c675 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -32,7 +32,7 @@ jobs: helm repo add vald https://vald.vdaas.org/charts helm install \ --values ${VALUES} \ - --set defaults.image.tag=latest \ + --set defaults.image.tag=nightly \ --set agent.ngt.dimension=300 \ --set agent.ngt.auto_index_length=2 \ --set agent.minReplicas=1 \ @@ -61,6 +61,19 @@ jobs: run: | npm install npm pack + - name: verify example codes (ts) + run: | + kubectl port-forward statefulset/vald-agent-ngt 8081:8081 & + pid=$! + + version=`make vald/client/node/version/print` + npm install -g ts-node + + cd example-ts + npm install ../vald-client-node-${version}.tgz -s -f + DIM=300 ts-node example.ts + + kill $pid - name: verify example codes (js) run: | version=`make vald/client/node/version/print` @@ -71,19 +84,6 @@ jobs: DIM=300 node example.js kill $pid - # - name: verify example codes (ts) - # run: | - # kubectl port-forward statefulset/vald-agent-ngt 8081:8081 & - # pid=$! - # - # version=`make vald/client/node/version/print` - # npm install -g ts-node - # - # cd example-ts - # npm install ../vald-client-node-${version}.tgz -s -f - # DIM=300 ts-node example.ts - # - # kill $pid publish: if: startsWith( github.ref, 'refs/tags/') needs: diff --git a/Makefile b/Makefile index d2af713..70b7c34 100755 --- a/Makefile +++ b/Makefile @@ -135,7 +135,9 @@ $(NODE_ROOT)/$(SHADOW_ROOT)/%/index.js: $(NODE_ROOT)/$(SHADOW_ROOT)/% sed -e "s:$> $@; \ - echo "module.exports.$${name}_grpc = require(\"./$${name}_grpc_pb\");" >> $@; \ + if [ ! "$${name}" = "payload" ]; then \ + echo "module.exports.$${name}_grpc = require(\"./$${name}_pb.grpc-client\");" >> $@; \ + fi; \ done $(NODE_ROOT)/$(SHADOW_ROOT)/%/index.d.ts: $(NODE_ROOT)/$(SHADOW_ROOT)/% rm -rf $@ diff --git a/buf.gen.yaml b/buf.gen.yaml index 2f8a972..ecf58a8 100644 --- a/buf.gen.yaml +++ b/buf.gen.yaml @@ -2,13 +2,16 @@ version: v1 managed: enabled: true plugins: - - plugin: buf.build/protocolbuffers/js - out: src/ - opt: import_style=commonjs - - plugin: buf.build/grpc/node - out: src - opt: grpc_js,import_style=commonjs - plugin: buf.build/community/timostamm-protobuf-ts - out: src/ + out: src # https://github.com/timostamm/protobuf-ts/blob/main/MANUAL.md#the-protoc-plugin - opt: add_pb_suffix,client_grpc1,generate_dependencies,keep_enum_prefix,ts_nocheck,use_proto_field_name + opt: + - add_pb_suffix + - client_grpc1 + - generate_dependencies + - keep_enum_prefix + - ts_nocheck + - use_proto_field_name + - output_javascript + - output_legacy_commonjs + - eslint_disable diff --git a/example-ts/example.ts b/example-ts/example.ts index ca367ba..3cc6cf4 100644 --- a/example-ts/example.ts +++ b/example-ts/example.ts @@ -1,5 +1,6 @@ import * as grpc from "@grpc/grpc-js"; import { v1_vald, v1_payload } from "vald-client-node"; +import type { Insert_Request, Search_Request, Remove_Request } from "vald-client-node/src/vald/v1/payload/payload_pb"; const addr = "localhost:8081"; const DIM = process.env.DIM || 4; @@ -38,7 +39,7 @@ const main = async () => { grpc.credentials.createInsecure() ); - const insertFunc = (req: any) => { + const insertFunc = async (req: Insert_Request) => { return new Promise((resolve, reject) => { iclient.insert(req, (err, resp) => { if (err) { @@ -49,13 +50,13 @@ const main = async () => { }); }); }; - insertFunc(ireq) - .then(async (res) => { - console.log("resp: ", res); + await insertFunc(ireq) + .then((res) => { + console.log("insert resp: ", res); }) .catch((e) => { console.log("err: ", e); - return -1; + process.exit(1); }); const second = 100; @@ -79,7 +80,7 @@ const main = async () => { grpc.credentials.createInsecure() ); - const searchFunc = (req: any) => { + const searchFunc = async (req: Search_Request) => { return new Promise((resolve, reject) => { sclient.search(req, (err, resp) => { if (err) { @@ -90,13 +91,13 @@ const main = async () => { }); }); }; - searchFunc(sreq) - .then((res: any) => { - console.log("res: ", res, "\n"); + await searchFunc(sreq) + .then((res) => { + console.log("search res: ", res, "\n"); }) .catch((e) => { console.log("err: ", e); - return -1; + process.exit(1); }); // remove @@ -117,7 +118,7 @@ const main = async () => { grpc.credentials.createInsecure() ); - const removeFunc = (req: any) => { + const removeFunc = async (req: Remove_Request) => { return new Promise((resolve, reject) => { rclient.remove(req, (err, resp) => { if (err) { @@ -128,14 +129,15 @@ const main = async () => { }); }); }; - removeFunc(rreq) - .then((res: any) => { - console.log("res: ", res, "\n"); + await removeFunc(rreq) + .then((res) => { + console.log("remove res: ", res, "\n"); }) .catch((e) => { console.log("err: ", e); - return -1; + process.exit(1); }); + process.exit(0); }; main(); diff --git a/example-ts/tsconfig.json b/example-ts/tsconfig.json new file mode 100644 index 0000000..574e785 --- /dev/null +++ b/example-ts/tsconfig.json @@ -0,0 +1,11 @@ +{ + "compilerOptions": { + "target": "es2020", + "module": "commonjs", + "esModuleInterop": true, + "forceConsistentCasingInFileNames": true, + "strict": true, + "skipLibCheck": true, + "resolveJsonModule": true + } +} diff --git a/example/example.js b/example/example.js index 65b2839..17519d0 100644 --- a/example/example.js +++ b/example/example.js @@ -24,23 +24,26 @@ const main = async () => { } // insert - const ivec = new payload.Object.Vector(); - ivec.setId(ID); - ivec.setVectorList(vec); + const ivec = payload.Object_Vector.create({ + id: ID, + vector: vec, + }); - const icfg = new payload.Insert.Config(); - icfg.setSkipStrictExistCheck(false); + const icfg = payload.Insert_Config.create({ + skip_strict_exist_check: false, + }); - const ireq = new payload.Insert.Request(); - ireq.setVector(ivec); - ireq.setConfig(icfg); + const ireq = payload.Insert_Request.create({ + vector: ivec, + config: icfg, + }); const iclient = new insert.InsertClient( addr, - grpc.credentials.createInsecure() + grpc.credentials.createInsecure(), ); - const insertFunc = (req) => { + const insertFunc = async (req) => { return new Promise((resolve, reject) => { iclient.insert(req, (err, resp) => { if (err) { @@ -52,37 +55,38 @@ const main = async () => { }); }; console.log("Insert start"); - insertFunc(ireq) + await insertFunc(ireq) .then((res) => { - console.log("res: ", res); + console.log("insert res: ", res); }) .catch((e) => { - console.log("err: ", e); - return -1; + console.log("insert err: ", e); + process.exit(1); }); - // Wait for createIndex completed - const second = 120; + const second = 90; await sleep(second); // search - const scfg = new payload.Search.Config(); - scfg.setNum(10); - scfg.setMinNum(1); - scfg.setRadius(-1.0); - scfg.setEpsilon(0.01); - scfg.setTimeout(3000000000); + const scfg = payload.Search_Config.create({ + num: 10, + min_num: 1, + radius: -1, + epsilon: 0.01, + timeout: 3000000000, + }); - const sreq = new payload.Search.Request(); - sreq.setVectorList(vec); - sreq.setConfig(scfg); + const sreq = payload.Search_Request.create({ + vector: vec, + config: scfg, + }); const sclient = new search.SearchClient( addr, - grpc.credentials.createInsecure() + grpc.credentials.createInsecure(), ); - const searchFunc = (req) => { + const searchFunc = async (req) => { return new Promise((resolve, reject) => { sclient.search(req, (err, resp) => { if (err) { @@ -94,28 +98,30 @@ const main = async () => { }); }; console.log("Search start"); - searchFunc(sreq) + await searchFunc(sreq) .then((res) => { - console.log("res: ", res, "\n"); + console.log("search res: ", res); }) .catch((e) => { console.log("err: ", e); - return -1; + process.exit(1); }); - const rcfg = new payload.Remove.Config(); - rcfg.setSkipStrictExistCheck(false); - const robjId = new payload.Object.ID(); - robjId.setId(ID); - const rreq = new payload.Remove.Request(); - rreq.setId(robjId); - rreq.setConfig(rcfg); - + const rcfg = payload.Remove_Config.create({ + skip_strict_exist_check: false, + }); + const robjId = payload.Object_ID.create({ + id: ID, + }); + const rreq = payload.Remove_Request.create({ + id: robjId, + config: rcfg, + }); const rclient = new remove.RemoveClient( addr, - grpc.credentials.createInsecure() + grpc.credentials.createInsecure(), ); - const removeFunc = (req) => { + const removeFunc = async (req) => { return new Promise((resolve, reject) => { rclient.remove(req, (err, resp) => { if (err) { @@ -126,15 +132,15 @@ const main = async () => { }); }); }; - console.log("Remove start"); - removeFunc(rreq) + await removeFunc(rreq) .then((res) => { - console.log("res: ", res, "\n"); + console.log("remove res: ", res); }) .catch((e) => { console.log("err: ", e); - return -1; + process.exit(1); }); + process.exit(0); }; main(); diff --git a/index.d.ts b/index.d.ts index 1d7ea59..886bb7f 100644 --- a/index.d.ts +++ b/index.d.ts @@ -1,9 +1,9 @@ import v1_agent_core = require("./src/vald/v1/agent/core"); -import v1_payload = require("./src/vald/v1/payload"); import v1_vald = require("./src/vald/v1/vald"); +import v1_payload = require("./src/vald/v1/payload"); declare const _default: { v1_agent_core: typeof v1_agent_core, - v1_payload: typeof v1_payload, v1_vald: typeof v1_vald, + v1_payload: typeof v1_payload, }; export = _default; diff --git a/index.js b/index.js index 11e01e5..19afa58 100644 --- a/index.js +++ b/index.js @@ -1,3 +1,3 @@ module.exports.v1_agent_core = require("./src/vald/v1/agent/core"); -module.exports.v1_payload = require("./src/vald/v1/payload"); module.exports.v1_vald = require("./src/vald/v1/vald"); +module.exports.v1_payload = require("./src/vald/v1/payload"); diff --git a/package-lock.json b/package-lock.json index a2a170c..1d3ad86 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10,18 +10,16 @@ "license": "Apache-2.0", "dependencies": { "@grpc/grpc-js": "^1.9.13", - "google-protobuf": "^3.21.2" + "@protobuf-ts/runtime": "^2.9.3", + "@protobuf-ts/runtime-rpc": "^2.9.3" }, "devDependencies": { "@bufbuild/buf": "^1.28.1", "@bufbuild/protobuf": "^1.6.0", - "@protobuf-ts/plugin": "^2.9.3", "@types/jest": "^27.5.2", - "grpc-tools": "^1.12.4", "jest": "^27.5.1", "ts-jest": "^27.1.5", "ts-node": "^10.9.2", - "ts-protoc-gen": "^0.13.0", "typescript": "^4.9.5" }, "engines": { @@ -1161,99 +1159,15 @@ "@jridgewell/sourcemap-codec": "^1.4.14" } }, - "node_modules/@mapbox/node-pre-gyp": { - "version": "1.0.11", - "resolved": "https://registry.npmjs.org/@mapbox/node-pre-gyp/-/node-pre-gyp-1.0.11.tgz", - "integrity": "sha512-Yhlar6v9WQgUp/He7BdgzOz8lqMQ8sU+jkCq7Wx8Myc5YFJLbEe7lgui/V7G1qB1DJykHSGwreceSaD60Y0PUQ==", - "dev": true, - "dependencies": { - "detect-libc": "^2.0.0", - "https-proxy-agent": "^5.0.0", - "make-dir": "^3.1.0", - "node-fetch": "^2.6.7", - "nopt": "^5.0.0", - "npmlog": "^5.0.1", - "rimraf": "^3.0.2", - "semver": "^7.3.5", - "tar": "^6.1.11" - }, - "bin": { - "node-pre-gyp": "bin/node-pre-gyp" - } - }, - "node_modules/@protobuf-ts/plugin": { - "version": "2.9.3", - "resolved": "https://registry.npmjs.org/@protobuf-ts/plugin/-/plugin-2.9.3.tgz", - "integrity": "sha512-tHYACv+nnIV2eoiMxeZhrgMqGiUktzUzrhfgnROg/rr8TecPLp9v5/yqNibN+bad5k7d57aqlTuQKhFl+J4W/g==", - "dev": true, - "dependencies": { - "@protobuf-ts/plugin-framework": "^2.9.3", - "@protobuf-ts/protoc": "^2.9.3", - "@protobuf-ts/runtime": "^2.9.3", - "@protobuf-ts/runtime-rpc": "^2.9.3", - "typescript": "^3.9" - }, - "bin": { - "protoc-gen-dump": "bin/protoc-gen-dump", - "protoc-gen-ts": "bin/protoc-gen-ts" - } - }, - "node_modules/@protobuf-ts/plugin-framework": { - "version": "2.9.3", - "resolved": "https://registry.npmjs.org/@protobuf-ts/plugin-framework/-/plugin-framework-2.9.3.tgz", - "integrity": "sha512-iqdkhAu7fGPvBCVOoAEEFJ1/oaGIBoNIMgSv2WonTNJVHxv5FvvAfWFn6nG/eta34fHRZT38ZXTaYcMUkv8AiQ==", - "dev": true, - "dependencies": { - "@protobuf-ts/runtime": "^2.9.3", - "typescript": "^3.9" - } - }, - "node_modules/@protobuf-ts/plugin-framework/node_modules/typescript": { - "version": "3.9.10", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.9.10.tgz", - "integrity": "sha512-w6fIxVE/H1PkLKcCPsFqKE7Kv7QUwhU8qQY2MueZXWx5cPZdwFupLgKK3vntcK98BtNHZtAF4LA/yl2a7k8R6Q==", - "dev": true, - "bin": { - "tsc": "bin/tsc", - "tsserver": "bin/tsserver" - }, - "engines": { - "node": ">=4.2.0" - } - }, - "node_modules/@protobuf-ts/plugin/node_modules/typescript": { - "version": "3.9.10", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.9.10.tgz", - "integrity": "sha512-w6fIxVE/H1PkLKcCPsFqKE7Kv7QUwhU8qQY2MueZXWx5cPZdwFupLgKK3vntcK98BtNHZtAF4LA/yl2a7k8R6Q==", - "dev": true, - "bin": { - "tsc": "bin/tsc", - "tsserver": "bin/tsserver" - }, - "engines": { - "node": ">=4.2.0" - } - }, - "node_modules/@protobuf-ts/protoc": { - "version": "2.9.3", - "resolved": "https://registry.npmjs.org/@protobuf-ts/protoc/-/protoc-2.9.3.tgz", - "integrity": "sha512-TJ0Ycx/CIBqpB4wpKt6K05kjXj6zv36s/qpdCT/wdJBhpayOVBqLF5NpLp3WIiw1PmIxvqalB6QHKjvnLzGKLA==", - "dev": true, - "bin": { - "protoc": "protoc.js" - } - }, "node_modules/@protobuf-ts/runtime": { "version": "2.9.3", "resolved": "https://registry.npmjs.org/@protobuf-ts/runtime/-/runtime-2.9.3.tgz", - "integrity": "sha512-nivzCpg/qYD0RX2OmHOahJALb8ndjGmUhNBcTJ0BbXoqKwCSM6vYA+vegzS3rhuaPgbyC7Ec8idlnizzUfIRuw==", - "dev": true + "integrity": "sha512-nivzCpg/qYD0RX2OmHOahJALb8ndjGmUhNBcTJ0BbXoqKwCSM6vYA+vegzS3rhuaPgbyC7Ec8idlnizzUfIRuw==" }, "node_modules/@protobuf-ts/runtime-rpc": { "version": "2.9.3", "resolved": "https://registry.npmjs.org/@protobuf-ts/runtime-rpc/-/runtime-rpc-2.9.3.tgz", "integrity": "sha512-WelHpctvZeG8yhbb7tnsrLzotq9xjMCXuGuhJ8qMyEdNoBBEodbXseofAYFTebo2/PN2LzyEq3X6vwr5f8jqTA==", - "dev": true, "dependencies": { "@protobuf-ts/runtime": "^2.9.3" } @@ -1489,12 +1403,6 @@ "deprecated": "Use your platform's native atob() and btoa() methods instead", "dev": true }, - "node_modules/abbrev": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz", - "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==", - "dev": true - }, "node_modules/acorn": { "version": "8.11.2", "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.11.2.tgz", @@ -1600,25 +1508,6 @@ "node": ">= 8" } }, - "node_modules/aproba": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/aproba/-/aproba-2.0.0.tgz", - "integrity": "sha512-lYe4Gx7QT+MKGbDsA+Z+he/Wtef0BiwDOlK/XkBrdfsh9J/jPPXbX0tE9x9cl27Tmu5gg3QUbUrQYa/y+KOHPQ==", - "dev": true - }, - "node_modules/are-we-there-yet": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-2.0.0.tgz", - "integrity": "sha512-Ci/qENmwHnsYo9xKIcUJN5LeDKdJ6R1Z1j9V/J5wyq8nh/mYPEpIKJbBZXtZjG04HiK7zV/p6Vs9952MrMeUIw==", - "dev": true, - "dependencies": { - "delegates": "^1.0.0", - "readable-stream": "^3.6.0" - }, - "engines": { - "node": ">=10" - } - }, "node_modules/arg": { "version": "4.1.3", "resolved": "https://registry.npmjs.org/arg/-/arg-4.1.3.tgz", @@ -1888,15 +1777,6 @@ "node": ">=10" } }, - "node_modules/chownr": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/chownr/-/chownr-2.0.0.tgz", - "integrity": "sha512-bIomtDF5KGpdogkLd9VspvFzk9KfpyyGlS8YFVZl7TGPBHL5snIOnxeshwVgPteQ9b4Eydl+pVbIyE1DcvCWgQ==", - "dev": true, - "engines": { - "node": ">=10" - } - }, "node_modules/ci-info": { "version": "3.9.0", "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.9.0.tgz", @@ -1963,15 +1843,6 @@ "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" }, - "node_modules/color-support": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/color-support/-/color-support-1.1.3.tgz", - "integrity": "sha512-qiBjkpbMLO/HL68y+lh4q0/O1MZFj2RX6X/KmMa3+gJD3z+WwI1ZzDHysvqHGS3mP6mznPckpXmw1nI9cJjyRg==", - "dev": true, - "bin": { - "color-support": "bin.js" - } - }, "node_modules/combined-stream": { "version": "1.0.8", "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", @@ -1990,12 +1861,6 @@ "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", "dev": true }, - "node_modules/console-control-strings": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/console-control-strings/-/console-control-strings-1.1.0.tgz", - "integrity": "sha512-ty/fTekppD2fIwRvnZAVdeOiGd1c7YXEixbgJTNzqcxJWKQnjJ/V1bNEEE6hygpM3WjwHFUVK6HTjWSzV4a8sQ==", - "dev": true - }, "node_modules/convert-source-map": { "version": "1.9.0", "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.9.0.tgz", @@ -2107,21 +1972,6 @@ "node": ">=0.4.0" } }, - "node_modules/delegates": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz", - "integrity": "sha512-bd2L678uiWATM6m5Z1VzNCErI3jiGzt6HGY8OVICs40JQq/HALfbyNJmp0UDakEY4pMMaN0Ly5om/B1VI/+xfQ==", - "dev": true - }, - "node_modules/detect-libc": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.0.2.tgz", - "integrity": "sha512-UX6sGumvvqSaXgdKGUsgZWqcUyIXZ/vZTrlRT/iobiKhGL0zL4d3osHj3uqllWJK+i+sixDS/3COVEOFbupFyw==", - "dev": true, - "engines": { - "node": ">=8" - } - }, "node_modules/detect-newline": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/detect-newline/-/detect-newline-3.1.0.tgz", @@ -2373,36 +2223,6 @@ "node": ">= 6" } }, - "node_modules/fs-minipass": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-2.1.0.tgz", - "integrity": "sha512-V/JgOLFCS+R6Vcq0slCuaeWEdNC3ouDlJMNIsacH2VtALiu9mV4LPrHc5cDl8k5aw6J8jwgWWpiTo5RYhmIzvg==", - "dev": true, - "dependencies": { - "minipass": "^3.0.0" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/fs-minipass/node_modules/minipass": { - "version": "3.3.6", - "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz", - "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", - "dev": true, - "dependencies": { - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/fs-minipass/node_modules/yallist": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", - "dev": true - }, "node_modules/fs.realpath": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", @@ -2432,26 +2252,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/gauge": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/gauge/-/gauge-3.0.2.tgz", - "integrity": "sha512-+5J6MS/5XksCuXq++uFRsnUd7Ovu1XenbeuIuNRJxYWjgQbPuFhT14lAvsWfqfAmnwluf1OwMjz39HjfLPci0Q==", - "dev": true, - "dependencies": { - "aproba": "^1.0.3 || ^2.0.0", - "color-support": "^1.1.2", - "console-control-strings": "^1.0.0", - "has-unicode": "^2.0.1", - "object-assign": "^4.1.1", - "signal-exit": "^3.0.0", - "string-width": "^4.2.3", - "strip-ansi": "^6.0.1", - "wide-align": "^1.1.2" - }, - "engines": { - "node": ">=10" - } - }, "node_modules/gensync": { "version": "1.0.0-beta.2", "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz", @@ -2519,31 +2319,12 @@ "node": ">=4" } }, - "node_modules/google-protobuf": { - "version": "3.21.2", - "resolved": "https://registry.npmjs.org/google-protobuf/-/google-protobuf-3.21.2.tgz", - "integrity": "sha512-3MSOYFO5U9mPGikIYCzK0SaThypfGgS6bHqrUGXG3DPHCrb+txNqeEcns1W0lkGfk0rCyNXm7xB9rMxnCiZOoA==" - }, "node_modules/graceful-fs": { "version": "4.2.11", "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", "dev": true }, - "node_modules/grpc-tools": { - "version": "1.12.4", - "resolved": "https://registry.npmjs.org/grpc-tools/-/grpc-tools-1.12.4.tgz", - "integrity": "sha512-5+mLAJJma3BjnW/KQp6JBjUMgvu7Mu3dBvBPd1dcbNIb+qiR0817zDpgPjS7gRb+l/8EVNIa3cB02xI9JLToKg==", - "dev": true, - "hasInstallScript": true, - "dependencies": { - "@mapbox/node-pre-gyp": "^1.0.5" - }, - "bin": { - "grpc_tools_node_protoc": "bin/protoc.js", - "grpc_tools_node_protoc_plugin": "bin/protoc_plugin.js" - } - }, "node_modules/has-flag": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", @@ -2553,12 +2334,6 @@ "node": ">=8" } }, - "node_modules/has-unicode": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz", - "integrity": "sha512-8Rf9Y83NBReMnx0gFzA8JImQACstCYWUplepDa9xprwwtmgEZUF0h/i5xSA625zB/I37EtrswSST6OXxwaaIJQ==", - "dev": true - }, "node_modules/hasown": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.0.tgz", @@ -3649,30 +3424,6 @@ "yallist": "^3.0.2" } }, - "node_modules/make-dir": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz", - "integrity": "sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==", - "dev": true, - "dependencies": { - "semver": "^6.0.0" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/make-dir/node_modules/semver": { - "version": "6.3.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", - "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", - "dev": true, - "bin": { - "semver": "bin/semver.js" - } - }, "node_modules/make-error": { "version": "1.3.6", "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz", @@ -3749,58 +3500,6 @@ "node": "*" } }, - "node_modules/minipass": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/minipass/-/minipass-5.0.0.tgz", - "integrity": "sha512-3FnjYuehv9k6ovOEbyOswadCDPX1piCfhV8ncmYtHOjuPwylVWsghTLo7rabjC3Rx5xD4HDx8Wm1xnMF7S5qFQ==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/minizlib": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/minizlib/-/minizlib-2.1.2.tgz", - "integrity": "sha512-bAxsR8BVfj60DWXHE3u30oHzfl4G7khkSuPW+qvpd7jFRHm7dLxOjUk1EHACJ/hxLY8phGJ0YhYHZo7jil7Qdg==", - "dev": true, - "dependencies": { - "minipass": "^3.0.0", - "yallist": "^4.0.0" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/minizlib/node_modules/minipass": { - "version": "3.3.6", - "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz", - "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", - "dev": true, - "dependencies": { - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/minizlib/node_modules/yallist": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", - "dev": true - }, - "node_modules/mkdirp": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", - "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==", - "dev": true, - "bin": { - "mkdirp": "bin/cmd.js" - }, - "engines": { - "node": ">=10" - } - }, "node_modules/ms": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", @@ -3813,48 +3512,6 @@ "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==", "dev": true }, - "node_modules/node-fetch": { - "version": "2.7.0", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.7.0.tgz", - "integrity": "sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==", - "dev": true, - "dependencies": { - "whatwg-url": "^5.0.0" - }, - "engines": { - "node": "4.x || >=6.0.0" - }, - "peerDependencies": { - "encoding": "^0.1.0" - }, - "peerDependenciesMeta": { - "encoding": { - "optional": true - } - } - }, - "node_modules/node-fetch/node_modules/tr46": { - "version": "0.0.3", - "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", - "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==", - "dev": true - }, - "node_modules/node-fetch/node_modules/webidl-conversions": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", - "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==", - "dev": true - }, - "node_modules/node-fetch/node_modules/whatwg-url": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", - "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==", - "dev": true, - "dependencies": { - "tr46": "~0.0.3", - "webidl-conversions": "^3.0.0" - } - }, "node_modules/node-int64": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/node-int64/-/node-int64-0.4.0.tgz", @@ -3867,21 +3524,6 @@ "integrity": "sha512-y10wOWt8yZpqXmOgRo77WaHEmhYQYGNA6y421PKsKYWEK8aW+cqAphborZDhqfyKrbZEN92CN1X2KbafY2s7Yw==", "dev": true }, - "node_modules/nopt": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/nopt/-/nopt-5.0.0.tgz", - "integrity": "sha512-Tbj67rffqceeLpcRXrT7vKAN8CwfPeIBgM7E6iBkmKLV7bEMwpGgYLGv0jACUsECaa/vuxP0IjEont6umdMgtQ==", - "dev": true, - "dependencies": { - "abbrev": "1" - }, - "bin": { - "nopt": "bin/nopt.js" - }, - "engines": { - "node": ">=6" - } - }, "node_modules/normalize-path": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", @@ -3903,33 +3545,12 @@ "node": ">=8" } }, - "node_modules/npmlog": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/npmlog/-/npmlog-5.0.1.tgz", - "integrity": "sha512-AqZtDUWOMKs1G/8lwylVjrdYgqA4d9nu8hc+0gzRxlDb1I10+FHBGMXs6aiQHFdCUUlqH99MUMuLfzWDNDtfxw==", - "dev": true, - "dependencies": { - "are-we-there-yet": "^2.0.0", - "console-control-strings": "^1.1.0", - "gauge": "^3.0.0", - "set-blocking": "^2.0.0" - } - }, "node_modules/nwsapi": { "version": "2.2.7", "resolved": "https://registry.npmjs.org/nwsapi/-/nwsapi-2.2.7.tgz", "integrity": "sha512-ub5E4+FBPKwAZx0UwIQOjYWGHTEq5sPqHQNRN8Z9e4A7u3Tj1weLJsL59yH9vmvqEtBHaOmT6cYQKIZOxp35FQ==", "dev": true }, - "node_modules/object-assign": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", - "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/once": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", @@ -4175,20 +3796,6 @@ "integrity": "sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w==", "dev": true }, - "node_modules/readable-stream": { - "version": "3.6.2", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", - "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", - "dev": true, - "dependencies": { - "inherits": "^2.0.3", - "string_decoder": "^1.1.1", - "util-deprecate": "^1.0.1" - }, - "engines": { - "node": ">= 6" - } - }, "node_modules/require-directory": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", @@ -4265,26 +3872,6 @@ "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/safe-buffer": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", - "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ] - }, "node_modules/safer-buffer": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", @@ -4336,12 +3923,6 @@ "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", "dev": true }, - "node_modules/set-blocking": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", - "integrity": "sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw==", - "dev": true - }, "node_modules/shebang-command": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", @@ -4421,15 +4002,6 @@ "node": ">=10" } }, - "node_modules/string_decoder": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", - "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", - "dev": true, - "dependencies": { - "safe-buffer": "~5.2.0" - } - }, "node_modules/string-length": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/string-length/-/string-length-4.0.2.tgz", @@ -4540,29 +4112,6 @@ "integrity": "sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw==", "dev": true }, - "node_modules/tar": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/tar/-/tar-6.2.0.tgz", - "integrity": "sha512-/Wo7DcT0u5HUV486xg675HtjNd3BXZ6xDbzsCUZPt5iw8bTQ63bP0Raut3mvro9u+CUyq7YQd8Cx55fsZXxqLQ==", - "dev": true, - "dependencies": { - "chownr": "^2.0.0", - "fs-minipass": "^2.0.0", - "minipass": "^5.0.0", - "minizlib": "^2.1.1", - "mkdirp": "^1.0.3", - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/tar/node_modules/yallist": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", - "dev": true - }, "node_modules/terminal-link": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/terminal-link/-/terminal-link-2.1.1.tgz", @@ -4748,18 +4297,6 @@ "node": ">=0.4.0" } }, - "node_modules/ts-protoc-gen": { - "version": "0.13.0", - "resolved": "https://registry.npmjs.org/ts-protoc-gen/-/ts-protoc-gen-0.13.0.tgz", - "integrity": "sha512-j18X4rkDBbG/ZHUJy88WFeZP6mStGow5uREaohowlHXTu3/N7WcpyPhb7Vh6wN38ERmc/AkT9gqT98+vtlRhJA==", - "dev": true, - "dependencies": { - "google-protobuf": "^3.6.1" - }, - "bin": { - "protoc-gen-ts": "bin/protoc-gen-ts" - } - }, "node_modules/type-detect": { "version": "4.0.8", "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz", @@ -4857,12 +4394,6 @@ "requires-port": "^1.0.0" } }, - "node_modules/util-deprecate": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", - "dev": true - }, "node_modules/v8-compile-cache-lib": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz", @@ -4976,15 +4507,6 @@ "node": ">= 8" } }, - "node_modules/wide-align": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.5.tgz", - "integrity": "sha512-eDMORYaPNZ4sQIuuYPDHdQvf4gyCF9rEEV/yPxGfwPkRodwEgiMUUXTx/dex+Me0wxx53S+NgUHaP7y3MGlDmg==", - "dev": true, - "dependencies": { - "string-width": "^1.0.2 || 2 || 3 || 4" - } - }, "node_modules/wrap-ansi": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", diff --git a/package.json b/package.json index 104003e..61cee1a 100644 --- a/package.json +++ b/package.json @@ -7,13 +7,10 @@ "devDependencies": { "@bufbuild/buf": "^1.28.1", "@bufbuild/protobuf": "^1.6.0", - "@protobuf-ts/plugin": "^2.9.3", "@types/jest": "^27.5.2", - "grpc-tools": "^1.12.4", "jest": "^27.5.1", "ts-jest": "^27.1.5", "ts-node": "^10.9.2", - "ts-protoc-gen": "^0.13.0", "typescript": "^4.9.5" }, "scripts": { @@ -34,7 +31,8 @@ "homepage": "https://github.com/vdaas/vald-client-node", "dependencies": { "@grpc/grpc-js": "^1.9.13", - "google-protobuf": "^3.21.2" + "@protobuf-ts/runtime": "^2.9.3", + "@protobuf-ts/runtime-rpc": "^2.9.3" }, "engines": { "node": ">=18.16.0" diff --git a/src/buf/validate/expression_grpc_pb.js b/src/buf/validate/expression_grpc_pb.js deleted file mode 100644 index 97b3a24..0000000 --- a/src/buf/validate/expression_grpc_pb.js +++ /dev/null @@ -1 +0,0 @@ -// GENERATED CODE -- NO SERVICES IN PROTO \ No newline at end of file diff --git a/src/buf/validate/expression_pb.d.ts b/src/buf/validate/expression_pb.d.ts new file mode 100644 index 0000000..b8f8418 --- /dev/null +++ b/src/buf/validate/expression_pb.d.ts @@ -0,0 +1,163 @@ +/* eslint-disable */ +// @generated by protobuf-ts 2.9.3 with parameter add_pb_suffix,client_grpc1,generate_dependencies,keep_enum_prefix,ts_nocheck,use_proto_field_name,output_javascript,output_legacy_commonjs,eslint_disable +// @generated from protobuf file "buf/validate/expression.proto" (package "buf.validate", syntax proto3) +// tslint:disable +// @ts-nocheck +// +// Copyright 2023 Buf Technologies, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +import type { BinaryWriteOptions } from "@protobuf-ts/runtime"; +import type { IBinaryWriter } from "@protobuf-ts/runtime"; +import type { BinaryReadOptions } from "@protobuf-ts/runtime"; +import type { IBinaryReader } from "@protobuf-ts/runtime"; +import type { PartialMessage } from "@protobuf-ts/runtime"; +import { MessageType } from "@protobuf-ts/runtime"; +/** + * `Constraint` represents a validation rule written in the Common Expression + * Language (CEL) syntax. Each Constraint includes a unique identifier, an + * optional error message, and the CEL expression to evaluate. For more + * information on CEL, [see our documentation](https://github.com/bufbuild/protovalidate/blob/main/docs/cel.md). + * + * ```proto + * message Foo { + * option (buf.validate.message).cel = { + * id: "foo.bar" + * message: "bar must be greater than 0" + * expression: "this.bar > 0" + * }; + * int32 bar = 1; + * } + * ``` + * + * @generated from protobuf message buf.validate.Constraint + */ +export interface Constraint { + /** + * `id` is a string that serves as a machine-readable name for this Constraint. + * It should be unique within its scope, which could be either a message or a field. + * + * @generated from protobuf field: string id = 1; + */ + id: string; + /** + * `message` is an optional field that provides a human-readable error message + * for this Constraint when the CEL expression evaluates to false. If a + * non-empty message is provided, any strings resulting from the CEL + * expression evaluation are ignored. + * + * @generated from protobuf field: string message = 2; + */ + message: string; + /** + * `expression` is the actual CEL expression that will be evaluated for + * validation. This string must resolve to either a boolean or a string + * value. If the expression evaluates to false or a non-empty string, the + * validation is considered failed, and the message is rejected. + * + * @generated from protobuf field: string expression = 3; + */ + expression: string; +} +/** + * `Violations` is a collection of `Violation` messages. This message type is returned by + * protovalidate when a proto message fails to meet the requirements set by the `Constraint` validation rules. + * Each individual violation is represented by a `Violation` message. + * + * @generated from protobuf message buf.validate.Violations + */ +export interface Violations { + /** + * `violations` is a repeated field that contains all the `Violation` messages corresponding to the violations detected. + * + * @generated from protobuf field: repeated buf.validate.Violation violations = 1; + */ + violations: Violation[]; +} +/** + * `Violation` represents a single instance where a validation rule, expressed + * as a `Constraint`, was not met. It provides information about the field that + * caused the violation, the specific constraint that wasn't fulfilled, and a + * human-readable error message. + * + * ```json + * { + * "fieldPath": "bar", + * "constraintId": "foo.bar", + * "message": "bar must be greater than 0" + * } + * ``` + * + * @generated from protobuf message buf.validate.Violation + */ +export interface Violation { + /** + * `field_path` is a machine-readable identifier that points to the specific field that failed the validation. + * This could be a nested field, in which case the path will include all the parent fields leading to the actual field that caused the violation. + * + * @generated from protobuf field: string field_path = 1; + */ + field_path: string; + /** + * `constraint_id` is the unique identifier of the `Constraint` that was not fulfilled. + * This is the same `id` that was specified in the `Constraint` message, allowing easy tracing of which rule was violated. + * + * @generated from protobuf field: string constraint_id = 2; + */ + constraint_id: string; + /** + * `message` is a human-readable error message that describes the nature of the violation. + * This can be the default error message from the violated `Constraint`, or it can be a custom message that gives more context about the violation. + * + * @generated from protobuf field: string message = 3; + */ + message: string; + /** + * `for_key` indicates whether the violation was caused by a map key, rather than a value. + * + * @generated from protobuf field: bool for_key = 4; + */ + for_key: boolean; +} +declare class Constraint$Type extends MessageType { + constructor(); + create(value?: PartialMessage): Constraint; + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Constraint): Constraint; + internalBinaryWrite(message: Constraint, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter; +} +/** + * @generated MessageType for protobuf message buf.validate.Constraint + */ +export declare const Constraint: Constraint$Type; +declare class Violations$Type extends MessageType { + constructor(); + create(value?: PartialMessage): Violations; + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Violations): Violations; + internalBinaryWrite(message: Violations, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter; +} +/** + * @generated MessageType for protobuf message buf.validate.Violations + */ +export declare const Violations: Violations$Type; +declare class Violation$Type extends MessageType { + constructor(); + create(value?: PartialMessage): Violation; + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Violation): Violation; + internalBinaryWrite(message: Violation, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter; +} +/** + * @generated MessageType for protobuf message buf.validate.Violation + */ +export declare const Violation: Violation$Type; +export {}; diff --git a/src/buf/validate/expression_pb.js b/src/buf/validate/expression_pb.js index e7bebe5..bd315ee 100644 --- a/src/buf/validate/expression_pb.js +++ b/src/buf/validate/expression_pb.js @@ -1,660 +1,208 @@ -// source: buf/validate/expression.proto -/** - * @fileoverview - * @enhanceable - * @suppress {missingRequire} reports error on implicit type usages. - * @suppress {messageConventions} JS Compiler reports an error if a variable or - * field starts with 'MSG_' and isn't a translatable message. - * @public - */ -// GENERATED CODE -- DO NOT EDIT! /* eslint-disable */ +// @generated by protobuf-ts 2.9.3 with parameter add_pb_suffix,client_grpc1,generate_dependencies,keep_enum_prefix,ts_nocheck,use_proto_field_name,output_javascript,output_legacy_commonjs,eslint_disable +// @generated from protobuf file "buf/validate/expression.proto" (package "buf.validate", syntax proto3) +// tslint:disable // @ts-nocheck - -var jspb = require('google-protobuf'); -var goog = jspb; -var global = - (typeof globalThis !== 'undefined' && globalThis) || - (typeof window !== 'undefined' && window) || - (typeof global !== 'undefined' && global) || - (typeof self !== 'undefined' && self) || - (function () { return this; }).call(null) || - Function('return this')(); - -goog.exportSymbol('proto.buf.validate.Constraint', null, global); -goog.exportSymbol('proto.buf.validate.Violation', null, global); -goog.exportSymbol('proto.buf.validate.Violations', null, global); -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.buf.validate.Constraint = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.buf.validate.Constraint, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.buf.validate.Constraint.displayName = 'proto.buf.validate.Constraint'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.buf.validate.Violations = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.buf.validate.Violations.repeatedFields_, null); -}; -goog.inherits(proto.buf.validate.Violations, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.buf.validate.Violations.displayName = 'proto.buf.validate.Violations'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.buf.validate.Violation = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.buf.validate.Violation, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.buf.validate.Violation.displayName = 'proto.buf.validate.Violation'; -} - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.buf.validate.Constraint.prototype.toObject = function(opt_includeInstance) { - return proto.buf.validate.Constraint.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.buf.validate.Constraint} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.buf.validate.Constraint.toObject = function(includeInstance, msg) { - var f, obj = { - id: jspb.Message.getFieldWithDefault(msg, 1, ""), - message: jspb.Message.getFieldWithDefault(msg, 2, ""), - expression: jspb.Message.getFieldWithDefault(msg, 3, "") - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.buf.validate.Constraint} - */ -proto.buf.validate.Constraint.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.buf.validate.Constraint; - return proto.buf.validate.Constraint.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.buf.validate.Constraint} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.buf.validate.Constraint} - */ -proto.buf.validate.Constraint.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; +// +// Copyright 2023 Buf Technologies, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.Violation = exports.Violations = exports.Constraint = void 0; +const runtime_1 = require("@protobuf-ts/runtime"); +const runtime_2 = require("@protobuf-ts/runtime"); +const runtime_3 = require("@protobuf-ts/runtime"); +const runtime_4 = require("@protobuf-ts/runtime"); +// @generated message type with reflection information, may provide speed optimized methods +class Constraint$Type extends runtime_4.MessageType { + constructor() { + super("buf.validate.Constraint", [ + { no: 1, name: "id", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, + { no: 2, name: "message", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, + { no: 3, name: "expression", kind: "scalar", T: 9 /*ScalarType.STRING*/ } + ]); } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setId(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setMessage(value); - break; - case 3: - var value = /** @type {string} */ (reader.readString()); - msg.setExpression(value); - break; - default: - reader.skipField(); - break; + create(value) { + const message = globalThis.Object.create((this.messagePrototype)); + message.id = ""; + message.message = ""; + message.expression = ""; + if (value !== undefined) + runtime_3.reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader, length, options, target) { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* string id */ 1: + message.id = reader.string(); + break; + case /* string message */ 2: + message.message = reader.string(); + break; + case /* string expression */ 3: + message.expression = reader.string(); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? runtime_2.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message, writer, options) { + /* string id = 1; */ + if (message.id !== "") + writer.tag(1, runtime_1.WireType.LengthDelimited).string(message.id); + /* string message = 2; */ + if (message.message !== "") + writer.tag(2, runtime_1.WireType.LengthDelimited).string(message.message); + /* string expression = 3; */ + if (message.expression !== "") + writer.tag(3, runtime_1.WireType.LengthDelimited).string(message.expression); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.buf.validate.Constraint.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.buf.validate.Constraint.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.buf.validate.Constraint} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.buf.validate.Constraint.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getId(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getMessage(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } - f = message.getExpression(); - if (f.length > 0) { - writer.writeString( - 3, - f - ); - } -}; - - -/** - * optional string id = 1; - * @return {string} - */ -proto.buf.validate.Constraint.prototype.getId = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.buf.validate.Constraint} returns this - */ -proto.buf.validate.Constraint.prototype.setId = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - -/** - * optional string message = 2; - * @return {string} - */ -proto.buf.validate.Constraint.prototype.getMessage = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * @param {string} value - * @return {!proto.buf.validate.Constraint} returns this - */ -proto.buf.validate.Constraint.prototype.setMessage = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); -}; - - -/** - * optional string expression = 3; - * @return {string} - */ -proto.buf.validate.Constraint.prototype.getExpression = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); -}; - - -/** - * @param {string} value - * @return {!proto.buf.validate.Constraint} returns this - */ -proto.buf.validate.Constraint.prototype.setExpression = function(value) { - return jspb.Message.setProto3StringField(this, 3, value); -}; - - - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.buf.validate.Violations.repeatedFields_ = [1]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.buf.validate.Violations.prototype.toObject = function(opt_includeInstance) { - return proto.buf.validate.Violations.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.buf.validate.Violations} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.buf.validate.Violations.toObject = function(includeInstance, msg) { - var f, obj = { - violationsList: jspb.Message.toObjectList(msg.getViolationsList(), - proto.buf.validate.Violation.toObject, includeInstance) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; } - - /** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.buf.validate.Violations} + * @generated MessageType for protobuf message buf.validate.Constraint */ -proto.buf.validate.Violations.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.buf.validate.Violations; - return proto.buf.validate.Violations.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.buf.validate.Violations} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.buf.validate.Violations} - */ -proto.buf.validate.Violations.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; +exports.Constraint = new Constraint$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class Violations$Type extends runtime_4.MessageType { + constructor() { + super("buf.validate.Violations", [ + { no: 1, name: "violations", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => exports.Violation } + ]); } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.buf.validate.Violation; - reader.readMessage(value,proto.buf.validate.Violation.deserializeBinaryFromReader); - msg.addViolations(value); - break; - default: - reader.skipField(); - break; + create(value) { + const message = globalThis.Object.create((this.messagePrototype)); + message.violations = []; + if (value !== undefined) + runtime_3.reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader, length, options, target) { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* repeated buf.validate.Violation violations */ 1: + message.violations.push(exports.Violation.internalBinaryRead(reader, reader.uint32(), options)); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? runtime_2.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message, writer, options) { + /* repeated buf.validate.Violation violations = 1; */ + for (let i = 0; i < message.violations.length; i++) + exports.Violation.internalBinaryWrite(message.violations[i], writer.tag(1, runtime_1.WireType.LengthDelimited).fork(), options).join(); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.buf.validate.Violations.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.buf.validate.Violations.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.buf.validate.Violations} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.buf.validate.Violations.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getViolationsList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 1, - f, - proto.buf.validate.Violation.serializeBinaryToWriter - ); - } -}; - - -/** - * repeated Violation violations = 1; - * @return {!Array} - */ -proto.buf.validate.Violations.prototype.getViolationsList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.buf.validate.Violation, 1)); -}; - - -/** - * @param {!Array} value - * @return {!proto.buf.validate.Violations} returns this -*/ -proto.buf.validate.Violations.prototype.setViolationsList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 1, value); -}; - - -/** - * @param {!proto.buf.validate.Violation=} opt_value - * @param {number=} opt_index - * @return {!proto.buf.validate.Violation} - */ -proto.buf.validate.Violations.prototype.addViolations = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.buf.validate.Violation, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.buf.validate.Violations} returns this - */ -proto.buf.validate.Violations.prototype.clearViolationsList = function() { - return this.setViolationsList([]); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.buf.validate.Violation.prototype.toObject = function(opt_includeInstance) { - return proto.buf.validate.Violation.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.buf.validate.Violation} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.buf.validate.Violation.toObject = function(includeInstance, msg) { - var f, obj = { - fieldPath: jspb.Message.getFieldWithDefault(msg, 1, ""), - constraintId: jspb.Message.getFieldWithDefault(msg, 2, ""), - message: jspb.Message.getFieldWithDefault(msg, 3, ""), - forKey: jspb.Message.getBooleanFieldWithDefault(msg, 4, false) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; } - - /** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.buf.validate.Violation} - */ -proto.buf.validate.Violation.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.buf.validate.Violation; - return proto.buf.validate.Violation.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.buf.validate.Violation} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.buf.validate.Violation} - */ -proto.buf.validate.Violation.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; + * @generated MessageType for protobuf message buf.validate.Violations + */ +exports.Violations = new Violations$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class Violation$Type extends runtime_4.MessageType { + constructor() { + super("buf.validate.Violation", [ + { no: 1, name: "field_path", kind: "scalar", localName: "field_path", T: 9 /*ScalarType.STRING*/ }, + { no: 2, name: "constraint_id", kind: "scalar", localName: "constraint_id", T: 9 /*ScalarType.STRING*/ }, + { no: 3, name: "message", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, + { no: 4, name: "for_key", kind: "scalar", localName: "for_key", T: 8 /*ScalarType.BOOL*/ } + ]); } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setFieldPath(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setConstraintId(value); - break; - case 3: - var value = /** @type {string} */ (reader.readString()); - msg.setMessage(value); - break; - case 4: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setForKey(value); - break; - default: - reader.skipField(); - break; + create(value) { + const message = globalThis.Object.create((this.messagePrototype)); + message.field_path = ""; + message.constraint_id = ""; + message.message = ""; + message.for_key = false; + if (value !== undefined) + runtime_3.reflectionMergePartial(this, message, value); + return message; } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.buf.validate.Violation.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.buf.validate.Violation.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.buf.validate.Violation} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.buf.validate.Violation.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getFieldPath(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getConstraintId(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } - f = message.getMessage(); - if (f.length > 0) { - writer.writeString( - 3, - f - ); - } - f = message.getForKey(); - if (f) { - writer.writeBool( - 4, - f - ); - } -}; - - -/** - * optional string field_path = 1; - * @return {string} - */ -proto.buf.validate.Violation.prototype.getFieldPath = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.buf.validate.Violation} returns this - */ -proto.buf.validate.Violation.prototype.setFieldPath = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - -/** - * optional string constraint_id = 2; - * @return {string} - */ -proto.buf.validate.Violation.prototype.getConstraintId = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * @param {string} value - * @return {!proto.buf.validate.Violation} returns this - */ -proto.buf.validate.Violation.prototype.setConstraintId = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); -}; - - -/** - * optional string message = 3; - * @return {string} - */ -proto.buf.validate.Violation.prototype.getMessage = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); -}; - - -/** - * @param {string} value - * @return {!proto.buf.validate.Violation} returns this - */ -proto.buf.validate.Violation.prototype.setMessage = function(value) { - return jspb.Message.setProto3StringField(this, 3, value); -}; - - -/** - * optional bool for_key = 4; - * @return {boolean} - */ -proto.buf.validate.Violation.prototype.getForKey = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 4, false)); -}; - - + internalBinaryRead(reader, length, options, target) { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* string field_path */ 1: + message.field_path = reader.string(); + break; + case /* string constraint_id */ 2: + message.constraint_id = reader.string(); + break; + case /* string message */ 3: + message.message = reader.string(); + break; + case /* bool for_key */ 4: + message.for_key = reader.bool(); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? runtime_2.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message, writer, options) { + /* string field_path = 1; */ + if (message.field_path !== "") + writer.tag(1, runtime_1.WireType.LengthDelimited).string(message.field_path); + /* string constraint_id = 2; */ + if (message.constraint_id !== "") + writer.tag(2, runtime_1.WireType.LengthDelimited).string(message.constraint_id); + /* string message = 3; */ + if (message.message !== "") + writer.tag(3, runtime_1.WireType.LengthDelimited).string(message.message); + /* bool for_key = 4; */ + if (message.for_key !== false) + writer.tag(4, runtime_1.WireType.Varint).bool(message.for_key); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} /** - * @param {boolean} value - * @return {!proto.buf.validate.Violation} returns this + * @generated MessageType for protobuf message buf.validate.Violation */ -proto.buf.validate.Violation.prototype.setForKey = function(value) { - return jspb.Message.setProto3BooleanField(this, 4, value); -}; - - -goog.object.extend(exports, proto.buf.validate); +exports.Violation = new Violation$Type(); diff --git a/src/buf/validate/expression_pb.ts b/src/buf/validate/expression_pb.ts deleted file mode 100644 index 6a4bd2a..0000000 --- a/src/buf/validate/expression_pb.ts +++ /dev/null @@ -1,315 +0,0 @@ -// @generated by protobuf-ts 2.9.3 with parameter add_pb_suffix,client_grpc1,generate_dependencies,keep_enum_prefix,ts_nocheck,use_proto_field_name -// @generated from protobuf file "buf/validate/expression.proto" (package "buf.validate", syntax proto3) -// tslint:disable -// @ts-nocheck -// -// Copyright 2023 Buf Technologies, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -import type { BinaryWriteOptions } from "@protobuf-ts/runtime"; -import type { IBinaryWriter } from "@protobuf-ts/runtime"; -import { WireType } from "@protobuf-ts/runtime"; -import type { BinaryReadOptions } from "@protobuf-ts/runtime"; -import type { IBinaryReader } from "@protobuf-ts/runtime"; -import { UnknownFieldHandler } from "@protobuf-ts/runtime"; -import type { PartialMessage } from "@protobuf-ts/runtime"; -import { reflectionMergePartial } from "@protobuf-ts/runtime"; -import { MessageType } from "@protobuf-ts/runtime"; -/** - * `Constraint` represents a validation rule written in the Common Expression - * Language (CEL) syntax. Each Constraint includes a unique identifier, an - * optional error message, and the CEL expression to evaluate. For more - * information on CEL, [see our documentation](https://github.com/bufbuild/protovalidate/blob/main/docs/cel.md). - * - * ```proto - * message Foo { - * option (buf.validate.message).cel = { - * id: "foo.bar" - * message: "bar must be greater than 0" - * expression: "this.bar > 0" - * }; - * int32 bar = 1; - * } - * ``` - * - * @generated from protobuf message buf.validate.Constraint - */ -export interface Constraint { - /** - * `id` is a string that serves as a machine-readable name for this Constraint. - * It should be unique within its scope, which could be either a message or a field. - * - * @generated from protobuf field: string id = 1; - */ - id: string; - /** - * `message` is an optional field that provides a human-readable error message - * for this Constraint when the CEL expression evaluates to false. If a - * non-empty message is provided, any strings resulting from the CEL - * expression evaluation are ignored. - * - * @generated from protobuf field: string message = 2; - */ - message: string; - /** - * `expression` is the actual CEL expression that will be evaluated for - * validation. This string must resolve to either a boolean or a string - * value. If the expression evaluates to false or a non-empty string, the - * validation is considered failed, and the message is rejected. - * - * @generated from protobuf field: string expression = 3; - */ - expression: string; -} -/** - * `Violations` is a collection of `Violation` messages. This message type is returned by - * protovalidate when a proto message fails to meet the requirements set by the `Constraint` validation rules. - * Each individual violation is represented by a `Violation` message. - * - * @generated from protobuf message buf.validate.Violations - */ -export interface Violations { - /** - * `violations` is a repeated field that contains all the `Violation` messages corresponding to the violations detected. - * - * @generated from protobuf field: repeated buf.validate.Violation violations = 1; - */ - violations: Violation[]; -} -/** - * `Violation` represents a single instance where a validation rule, expressed - * as a `Constraint`, was not met. It provides information about the field that - * caused the violation, the specific constraint that wasn't fulfilled, and a - * human-readable error message. - * - * ```json - * { - * "fieldPath": "bar", - * "constraintId": "foo.bar", - * "message": "bar must be greater than 0" - * } - * ``` - * - * @generated from protobuf message buf.validate.Violation - */ -export interface Violation { - /** - * `field_path` is a machine-readable identifier that points to the specific field that failed the validation. - * This could be a nested field, in which case the path will include all the parent fields leading to the actual field that caused the violation. - * - * @generated from protobuf field: string field_path = 1; - */ - field_path: string; - /** - * `constraint_id` is the unique identifier of the `Constraint` that was not fulfilled. - * This is the same `id` that was specified in the `Constraint` message, allowing easy tracing of which rule was violated. - * - * @generated from protobuf field: string constraint_id = 2; - */ - constraint_id: string; - /** - * `message` is a human-readable error message that describes the nature of the violation. - * This can be the default error message from the violated `Constraint`, or it can be a custom message that gives more context about the violation. - * - * @generated from protobuf field: string message = 3; - */ - message: string; - /** - * `for_key` indicates whether the violation was caused by a map key, rather than a value. - * - * @generated from protobuf field: bool for_key = 4; - */ - for_key: boolean; -} -// @generated message type with reflection information, may provide speed optimized methods -class Constraint$Type extends MessageType { - constructor() { - super("buf.validate.Constraint", [ - { no: 1, name: "id", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, - { no: 2, name: "message", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, - { no: 3, name: "expression", kind: "scalar", T: 9 /*ScalarType.STRING*/ } - ]); - } - create(value?: PartialMessage): Constraint { - const message = globalThis.Object.create((this.messagePrototype!)); - message.id = ""; - message.message = ""; - message.expression = ""; - if (value !== undefined) - reflectionMergePartial(this, message, value); - return message; - } - internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Constraint): Constraint { - let message = target ?? this.create(), end = reader.pos + length; - while (reader.pos < end) { - let [fieldNo, wireType] = reader.tag(); - switch (fieldNo) { - case /* string id */ 1: - message.id = reader.string(); - break; - case /* string message */ 2: - message.message = reader.string(); - break; - case /* string expression */ 3: - message.expression = reader.string(); - break; - default: - let u = options.readUnknownField; - if (u === "throw") - throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); - let d = reader.skip(wireType); - if (u !== false) - (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); - } - } - return message; - } - internalBinaryWrite(message: Constraint, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { - /* string id = 1; */ - if (message.id !== "") - writer.tag(1, WireType.LengthDelimited).string(message.id); - /* string message = 2; */ - if (message.message !== "") - writer.tag(2, WireType.LengthDelimited).string(message.message); - /* string expression = 3; */ - if (message.expression !== "") - writer.tag(3, WireType.LengthDelimited).string(message.expression); - let u = options.writeUnknownFields; - if (u !== false) - (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); - return writer; - } -} -/** - * @generated MessageType for protobuf message buf.validate.Constraint - */ -export const Constraint = new Constraint$Type(); -// @generated message type with reflection information, may provide speed optimized methods -class Violations$Type extends MessageType { - constructor() { - super("buf.validate.Violations", [ - { no: 1, name: "violations", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => Violation } - ]); - } - create(value?: PartialMessage): Violations { - const message = globalThis.Object.create((this.messagePrototype!)); - message.violations = []; - if (value !== undefined) - reflectionMergePartial(this, message, value); - return message; - } - internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Violations): Violations { - let message = target ?? this.create(), end = reader.pos + length; - while (reader.pos < end) { - let [fieldNo, wireType] = reader.tag(); - switch (fieldNo) { - case /* repeated buf.validate.Violation violations */ 1: - message.violations.push(Violation.internalBinaryRead(reader, reader.uint32(), options)); - break; - default: - let u = options.readUnknownField; - if (u === "throw") - throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); - let d = reader.skip(wireType); - if (u !== false) - (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); - } - } - return message; - } - internalBinaryWrite(message: Violations, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { - /* repeated buf.validate.Violation violations = 1; */ - for (let i = 0; i < message.violations.length; i++) - Violation.internalBinaryWrite(message.violations[i], writer.tag(1, WireType.LengthDelimited).fork(), options).join(); - let u = options.writeUnknownFields; - if (u !== false) - (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); - return writer; - } -} -/** - * @generated MessageType for protobuf message buf.validate.Violations - */ -export const Violations = new Violations$Type(); -// @generated message type with reflection information, may provide speed optimized methods -class Violation$Type extends MessageType { - constructor() { - super("buf.validate.Violation", [ - { no: 1, name: "field_path", kind: "scalar", localName: "field_path", T: 9 /*ScalarType.STRING*/ }, - { no: 2, name: "constraint_id", kind: "scalar", localName: "constraint_id", T: 9 /*ScalarType.STRING*/ }, - { no: 3, name: "message", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, - { no: 4, name: "for_key", kind: "scalar", localName: "for_key", T: 8 /*ScalarType.BOOL*/ } - ]); - } - create(value?: PartialMessage): Violation { - const message = globalThis.Object.create((this.messagePrototype!)); - message.field_path = ""; - message.constraint_id = ""; - message.message = ""; - message.for_key = false; - if (value !== undefined) - reflectionMergePartial(this, message, value); - return message; - } - internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Violation): Violation { - let message = target ?? this.create(), end = reader.pos + length; - while (reader.pos < end) { - let [fieldNo, wireType] = reader.tag(); - switch (fieldNo) { - case /* string field_path */ 1: - message.field_path = reader.string(); - break; - case /* string constraint_id */ 2: - message.constraint_id = reader.string(); - break; - case /* string message */ 3: - message.message = reader.string(); - break; - case /* bool for_key */ 4: - message.for_key = reader.bool(); - break; - default: - let u = options.readUnknownField; - if (u === "throw") - throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); - let d = reader.skip(wireType); - if (u !== false) - (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); - } - } - return message; - } - internalBinaryWrite(message: Violation, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { - /* string field_path = 1; */ - if (message.field_path !== "") - writer.tag(1, WireType.LengthDelimited).string(message.field_path); - /* string constraint_id = 2; */ - if (message.constraint_id !== "") - writer.tag(2, WireType.LengthDelimited).string(message.constraint_id); - /* string message = 3; */ - if (message.message !== "") - writer.tag(3, WireType.LengthDelimited).string(message.message); - /* bool for_key = 4; */ - if (message.for_key !== false) - writer.tag(4, WireType.Varint).bool(message.for_key); - let u = options.writeUnknownFields; - if (u !== false) - (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); - return writer; - } -} -/** - * @generated MessageType for protobuf message buf.validate.Violation - */ -export const Violation = new Violation$Type(); diff --git a/src/buf/validate/priv/private_grpc_pb.js b/src/buf/validate/priv/private_grpc_pb.js deleted file mode 100644 index 97b3a24..0000000 --- a/src/buf/validate/priv/private_grpc_pb.js +++ /dev/null @@ -1 +0,0 @@ -// GENERATED CODE -- NO SERVICES IN PROTO \ No newline at end of file diff --git a/src/buf/validate/priv/private_pb.d.ts b/src/buf/validate/priv/private_pb.d.ts new file mode 100644 index 0000000..7c5bc1f --- /dev/null +++ b/src/buf/validate/priv/private_pb.d.ts @@ -0,0 +1,77 @@ +/* eslint-disable */ +// @generated by protobuf-ts 2.9.3 with parameter add_pb_suffix,client_grpc1,generate_dependencies,keep_enum_prefix,ts_nocheck,use_proto_field_name,output_javascript,output_legacy_commonjs,eslint_disable +// @generated from protobuf file "buf/validate/priv/private.proto" (package "buf.validate.priv", syntax proto3) +// tslint:disable +// @ts-nocheck +// +// Copyright 2023 Buf Technologies, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +import type { BinaryWriteOptions } from "@protobuf-ts/runtime"; +import type { IBinaryWriter } from "@protobuf-ts/runtime"; +import type { BinaryReadOptions } from "@protobuf-ts/runtime"; +import type { IBinaryReader } from "@protobuf-ts/runtime"; +import type { PartialMessage } from "@protobuf-ts/runtime"; +import { MessageType } from "@protobuf-ts/runtime"; +/** + * Do not use. Internal to protovalidate library + * + * @generated from protobuf message buf.validate.priv.FieldConstraints + */ +export interface FieldConstraints { + /** + * @generated from protobuf field: repeated buf.validate.priv.Constraint cel = 1; + */ + cel: Constraint[]; +} +/** + * Do not use. Internal to protovalidate library + * + * @generated from protobuf message buf.validate.priv.Constraint + */ +export interface Constraint { + /** + * @generated from protobuf field: string id = 1; + */ + id: string; + /** + * @generated from protobuf field: string message = 2; + */ + message: string; + /** + * @generated from protobuf field: string expression = 3; + */ + expression: string; +} +declare class FieldConstraints$Type extends MessageType { + constructor(); + create(value?: PartialMessage): FieldConstraints; + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: FieldConstraints): FieldConstraints; + internalBinaryWrite(message: FieldConstraints, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter; +} +/** + * @generated MessageType for protobuf message buf.validate.priv.FieldConstraints + */ +export declare const FieldConstraints: FieldConstraints$Type; +declare class Constraint$Type extends MessageType { + constructor(); + create(value?: PartialMessage): Constraint; + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Constraint): Constraint; + internalBinaryWrite(message: Constraint, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter; +} +/** + * @generated MessageType for protobuf message buf.validate.priv.Constraint + */ +export declare const Constraint: Constraint$Type; +export {}; diff --git a/src/buf/validate/priv/private_pb.js b/src/buf/validate/priv/private_pb.js index 7b09638..5d9cb4b 100644 --- a/src/buf/validate/priv/private_pb.js +++ b/src/buf/validate/priv/private_pb.js @@ -1,446 +1,137 @@ -// source: buf/validate/priv/private.proto -/** - * @fileoverview - * @enhanceable - * @suppress {missingRequire} reports error on implicit type usages. - * @suppress {messageConventions} JS Compiler reports an error if a variable or - * field starts with 'MSG_' and isn't a translatable message. - * @public - */ -// GENERATED CODE -- DO NOT EDIT! /* eslint-disable */ +// @generated by protobuf-ts 2.9.3 with parameter add_pb_suffix,client_grpc1,generate_dependencies,keep_enum_prefix,ts_nocheck,use_proto_field_name,output_javascript,output_legacy_commonjs,eslint_disable +// @generated from protobuf file "buf/validate/priv/private.proto" (package "buf.validate.priv", syntax proto3) +// tslint:disable // @ts-nocheck - -var jspb = require('google-protobuf'); -var goog = jspb; -var global = - (typeof globalThis !== 'undefined' && globalThis) || - (typeof window !== 'undefined' && window) || - (typeof global !== 'undefined' && global) || - (typeof self !== 'undefined' && self) || - (function () { return this; }).call(null) || - Function('return this')(); - -var google_protobuf_descriptor_pb = require('google-protobuf/google/protobuf/descriptor_pb.js'); -goog.object.extend(proto, google_protobuf_descriptor_pb); -goog.exportSymbol('proto.buf.validate.priv.Constraint', null, global); -goog.exportSymbol('proto.buf.validate.priv.FieldConstraints', null, global); -goog.exportSymbol('proto.buf.validate.priv.field', null, global); -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.buf.validate.priv.FieldConstraints = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.buf.validate.priv.FieldConstraints.repeatedFields_, null); -}; -goog.inherits(proto.buf.validate.priv.FieldConstraints, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.buf.validate.priv.FieldConstraints.displayName = 'proto.buf.validate.priv.FieldConstraints'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.buf.validate.priv.Constraint = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.buf.validate.priv.Constraint, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.buf.validate.priv.Constraint.displayName = 'proto.buf.validate.priv.Constraint'; -} - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.buf.validate.priv.FieldConstraints.repeatedFields_ = [1]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.buf.validate.priv.FieldConstraints.prototype.toObject = function(opt_includeInstance) { - return proto.buf.validate.priv.FieldConstraints.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.buf.validate.priv.FieldConstraints} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.buf.validate.priv.FieldConstraints.toObject = function(includeInstance, msg) { - var f, obj = { - celList: jspb.Message.toObjectList(msg.getCelList(), - proto.buf.validate.priv.Constraint.toObject, includeInstance) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.buf.validate.priv.FieldConstraints} - */ -proto.buf.validate.priv.FieldConstraints.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.buf.validate.priv.FieldConstraints; - return proto.buf.validate.priv.FieldConstraints.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.buf.validate.priv.FieldConstraints} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.buf.validate.priv.FieldConstraints} - */ -proto.buf.validate.priv.FieldConstraints.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; +// +// Copyright 2023 Buf Technologies, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.Constraint = exports.FieldConstraints = void 0; +const runtime_1 = require("@protobuf-ts/runtime"); +const runtime_2 = require("@protobuf-ts/runtime"); +const runtime_3 = require("@protobuf-ts/runtime"); +const runtime_4 = require("@protobuf-ts/runtime"); +// @generated message type with reflection information, may provide speed optimized methods +class FieldConstraints$Type extends runtime_4.MessageType { + constructor() { + super("buf.validate.priv.FieldConstraints", [ + { no: 1, name: "cel", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => exports.Constraint } + ]); } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.buf.validate.priv.Constraint; - reader.readMessage(value,proto.buf.validate.priv.Constraint.deserializeBinaryFromReader); - msg.addCel(value); - break; - default: - reader.skipField(); - break; + create(value) { + const message = globalThis.Object.create((this.messagePrototype)); + message.cel = []; + if (value !== undefined) + runtime_3.reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader, length, options, target) { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* repeated buf.validate.priv.Constraint cel */ 1: + message.cel.push(exports.Constraint.internalBinaryRead(reader, reader.uint32(), options)); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? runtime_2.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message, writer, options) { + /* repeated buf.validate.priv.Constraint cel = 1; */ + for (let i = 0; i < message.cel.length; i++) + exports.Constraint.internalBinaryWrite(message.cel[i], writer.tag(1, runtime_1.WireType.LengthDelimited).fork(), options).join(); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.buf.validate.priv.FieldConstraints.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.buf.validate.priv.FieldConstraints.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.buf.validate.priv.FieldConstraints} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.buf.validate.priv.FieldConstraints.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getCelList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 1, - f, - proto.buf.validate.priv.Constraint.serializeBinaryToWriter - ); - } -}; - - -/** - * repeated Constraint cel = 1; - * @return {!Array} - */ -proto.buf.validate.priv.FieldConstraints.prototype.getCelList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.buf.validate.priv.Constraint, 1)); -}; - - -/** - * @param {!Array} value - * @return {!proto.buf.validate.priv.FieldConstraints} returns this -*/ -proto.buf.validate.priv.FieldConstraints.prototype.setCelList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 1, value); -}; - - -/** - * @param {!proto.buf.validate.priv.Constraint=} opt_value - * @param {number=} opt_index - * @return {!proto.buf.validate.priv.Constraint} - */ -proto.buf.validate.priv.FieldConstraints.prototype.addCel = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.buf.validate.priv.Constraint, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.buf.validate.priv.FieldConstraints} returns this - */ -proto.buf.validate.priv.FieldConstraints.prototype.clearCelList = function() { - return this.setCelList([]); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.buf.validate.priv.Constraint.prototype.toObject = function(opt_includeInstance) { - return proto.buf.validate.priv.Constraint.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.buf.validate.priv.Constraint} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.buf.validate.priv.Constraint.toObject = function(includeInstance, msg) { - var f, obj = { - id: jspb.Message.getFieldWithDefault(msg, 1, ""), - message: jspb.Message.getFieldWithDefault(msg, 2, ""), - expression: jspb.Message.getFieldWithDefault(msg, 3, "") - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; } - - /** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.buf.validate.priv.Constraint} - */ -proto.buf.validate.priv.Constraint.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.buf.validate.priv.Constraint; - return proto.buf.validate.priv.Constraint.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.buf.validate.priv.Constraint} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.buf.validate.priv.Constraint} - */ -proto.buf.validate.priv.Constraint.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; + * @generated MessageType for protobuf message buf.validate.priv.FieldConstraints + */ +exports.FieldConstraints = new FieldConstraints$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class Constraint$Type extends runtime_4.MessageType { + constructor() { + super("buf.validate.priv.Constraint", [ + { no: 1, name: "id", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, + { no: 2, name: "message", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, + { no: 3, name: "expression", kind: "scalar", T: 9 /*ScalarType.STRING*/ } + ]); } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setId(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setMessage(value); - break; - case 3: - var value = /** @type {string} */ (reader.readString()); - msg.setExpression(value); - break; - default: - reader.skipField(); - break; + create(value) { + const message = globalThis.Object.create((this.messagePrototype)); + message.id = ""; + message.message = ""; + message.expression = ""; + if (value !== undefined) + runtime_3.reflectionMergePartial(this, message, value); + return message; } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.buf.validate.priv.Constraint.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.buf.validate.priv.Constraint.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.buf.validate.priv.Constraint} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.buf.validate.priv.Constraint.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getId(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getMessage(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } - f = message.getExpression(); - if (f.length > 0) { - writer.writeString( - 3, - f - ); - } -}; - - -/** - * optional string id = 1; - * @return {string} - */ -proto.buf.validate.priv.Constraint.prototype.getId = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.buf.validate.priv.Constraint} returns this - */ -proto.buf.validate.priv.Constraint.prototype.setId = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - -/** - * optional string message = 2; - * @return {string} - */ -proto.buf.validate.priv.Constraint.prototype.getMessage = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * @param {string} value - * @return {!proto.buf.validate.priv.Constraint} returns this - */ -proto.buf.validate.priv.Constraint.prototype.setMessage = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); -}; - - -/** - * optional string expression = 3; - * @return {string} - */ -proto.buf.validate.priv.Constraint.prototype.getExpression = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); -}; - - -/** - * @param {string} value - * @return {!proto.buf.validate.priv.Constraint} returns this - */ -proto.buf.validate.priv.Constraint.prototype.setExpression = function(value) { - return jspb.Message.setProto3StringField(this, 3, value); -}; - - - + internalBinaryRead(reader, length, options, target) { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* string id */ 1: + message.id = reader.string(); + break; + case /* string message */ 2: + message.message = reader.string(); + break; + case /* string expression */ 3: + message.expression = reader.string(); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? runtime_2.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message, writer, options) { + /* string id = 1; */ + if (message.id !== "") + writer.tag(1, runtime_1.WireType.LengthDelimited).string(message.id); + /* string message = 2; */ + if (message.message !== "") + writer.tag(2, runtime_1.WireType.LengthDelimited).string(message.message); + /* string expression = 3; */ + if (message.expression !== "") + writer.tag(3, runtime_1.WireType.LengthDelimited).string(message.expression); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} /** - * A tuple of {field number, class constructor} for the extension - * field named `field`. - * @type {!jspb.ExtensionFieldInfo} + * @generated MessageType for protobuf message buf.validate.priv.Constraint */ -proto.buf.validate.priv.field = new jspb.ExtensionFieldInfo( - 1160, - {field: 0}, - proto.buf.validate.priv.FieldConstraints, - /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( - proto.buf.validate.priv.FieldConstraints.toObject), - 0); - -google_protobuf_descriptor_pb.FieldOptions.extensionsBinary[1160] = new jspb.ExtensionFieldBinaryInfo( - proto.buf.validate.priv.field, - jspb.BinaryReader.prototype.readMessage, - jspb.BinaryWriter.prototype.writeMessage, - proto.buf.validate.priv.FieldConstraints.serializeBinaryToWriter, - proto.buf.validate.priv.FieldConstraints.deserializeBinaryFromReader, - false); -// This registers the extension field with the extended class, so that -// toObject() will function correctly. -google_protobuf_descriptor_pb.FieldOptions.extensions[1160] = proto.buf.validate.priv.field; - -goog.object.extend(exports, proto.buf.validate.priv); +exports.Constraint = new Constraint$Type(); diff --git a/src/buf/validate/priv/private_pb.ts b/src/buf/validate/priv/private_pb.ts deleted file mode 100644 index b6fa9da..0000000 --- a/src/buf/validate/priv/private_pb.ts +++ /dev/null @@ -1,168 +0,0 @@ -// @generated by protobuf-ts 2.9.3 with parameter add_pb_suffix,client_grpc1,generate_dependencies,keep_enum_prefix,ts_nocheck,use_proto_field_name -// @generated from protobuf file "buf/validate/priv/private.proto" (package "buf.validate.priv", syntax proto3) -// tslint:disable -// @ts-nocheck -// -// Copyright 2023 Buf Technologies, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -import type { BinaryWriteOptions } from "@protobuf-ts/runtime"; -import type { IBinaryWriter } from "@protobuf-ts/runtime"; -import { WireType } from "@protobuf-ts/runtime"; -import type { BinaryReadOptions } from "@protobuf-ts/runtime"; -import type { IBinaryReader } from "@protobuf-ts/runtime"; -import { UnknownFieldHandler } from "@protobuf-ts/runtime"; -import type { PartialMessage } from "@protobuf-ts/runtime"; -import { reflectionMergePartial } from "@protobuf-ts/runtime"; -import { MessageType } from "@protobuf-ts/runtime"; -/** - * Do not use. Internal to protovalidate library - * - * @generated from protobuf message buf.validate.priv.FieldConstraints - */ -export interface FieldConstraints { - /** - * @generated from protobuf field: repeated buf.validate.priv.Constraint cel = 1; - */ - cel: Constraint[]; -} -/** - * Do not use. Internal to protovalidate library - * - * @generated from protobuf message buf.validate.priv.Constraint - */ -export interface Constraint { - /** - * @generated from protobuf field: string id = 1; - */ - id: string; - /** - * @generated from protobuf field: string message = 2; - */ - message: string; - /** - * @generated from protobuf field: string expression = 3; - */ - expression: string; -} -// @generated message type with reflection information, may provide speed optimized methods -class FieldConstraints$Type extends MessageType { - constructor() { - super("buf.validate.priv.FieldConstraints", [ - { no: 1, name: "cel", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => Constraint } - ]); - } - create(value?: PartialMessage): FieldConstraints { - const message = globalThis.Object.create((this.messagePrototype!)); - message.cel = []; - if (value !== undefined) - reflectionMergePartial(this, message, value); - return message; - } - internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: FieldConstraints): FieldConstraints { - let message = target ?? this.create(), end = reader.pos + length; - while (reader.pos < end) { - let [fieldNo, wireType] = reader.tag(); - switch (fieldNo) { - case /* repeated buf.validate.priv.Constraint cel */ 1: - message.cel.push(Constraint.internalBinaryRead(reader, reader.uint32(), options)); - break; - default: - let u = options.readUnknownField; - if (u === "throw") - throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); - let d = reader.skip(wireType); - if (u !== false) - (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); - } - } - return message; - } - internalBinaryWrite(message: FieldConstraints, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { - /* repeated buf.validate.priv.Constraint cel = 1; */ - for (let i = 0; i < message.cel.length; i++) - Constraint.internalBinaryWrite(message.cel[i], writer.tag(1, WireType.LengthDelimited).fork(), options).join(); - let u = options.writeUnknownFields; - if (u !== false) - (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); - return writer; - } -} -/** - * @generated MessageType for protobuf message buf.validate.priv.FieldConstraints - */ -export const FieldConstraints = new FieldConstraints$Type(); -// @generated message type with reflection information, may provide speed optimized methods -class Constraint$Type extends MessageType { - constructor() { - super("buf.validate.priv.Constraint", [ - { no: 1, name: "id", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, - { no: 2, name: "message", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, - { no: 3, name: "expression", kind: "scalar", T: 9 /*ScalarType.STRING*/ } - ]); - } - create(value?: PartialMessage): Constraint { - const message = globalThis.Object.create((this.messagePrototype!)); - message.id = ""; - message.message = ""; - message.expression = ""; - if (value !== undefined) - reflectionMergePartial(this, message, value); - return message; - } - internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Constraint): Constraint { - let message = target ?? this.create(), end = reader.pos + length; - while (reader.pos < end) { - let [fieldNo, wireType] = reader.tag(); - switch (fieldNo) { - case /* string id */ 1: - message.id = reader.string(); - break; - case /* string message */ 2: - message.message = reader.string(); - break; - case /* string expression */ 3: - message.expression = reader.string(); - break; - default: - let u = options.readUnknownField; - if (u === "throw") - throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); - let d = reader.skip(wireType); - if (u !== false) - (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); - } - } - return message; - } - internalBinaryWrite(message: Constraint, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { - /* string id = 1; */ - if (message.id !== "") - writer.tag(1, WireType.LengthDelimited).string(message.id); - /* string message = 2; */ - if (message.message !== "") - writer.tag(2, WireType.LengthDelimited).string(message.message); - /* string expression = 3; */ - if (message.expression !== "") - writer.tag(3, WireType.LengthDelimited).string(message.expression); - let u = options.writeUnknownFields; - if (u !== false) - (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); - return writer; - } -} -/** - * @generated MessageType for protobuf message buf.validate.priv.Constraint - */ -export const Constraint = new Constraint$Type(); diff --git a/src/buf/validate/validate_grpc_pb.js b/src/buf/validate/validate_grpc_pb.js deleted file mode 100644 index 97b3a24..0000000 --- a/src/buf/validate/validate_grpc_pb.js +++ /dev/null @@ -1 +0,0 @@ -// GENERATED CODE -- NO SERVICES IN PROTO \ No newline at end of file diff --git a/src/buf/validate/validate_pb.d.ts b/src/buf/validate/validate_pb.d.ts new file mode 100644 index 0000000..13abebd --- /dev/null +++ b/src/buf/validate/validate_pb.d.ts @@ -0,0 +1,3718 @@ +/* eslint-disable */ +// @generated by protobuf-ts 2.9.3 with parameter add_pb_suffix,client_grpc1,generate_dependencies,keep_enum_prefix,ts_nocheck,use_proto_field_name,output_javascript,output_legacy_commonjs,eslint_disable +// @generated from protobuf file "buf/validate/validate.proto" (package "buf.validate", syntax proto3) +// tslint:disable +// @ts-nocheck +// +// Copyright 2023 Buf Technologies, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +import type { BinaryWriteOptions } from "@protobuf-ts/runtime"; +import type { IBinaryWriter } from "@protobuf-ts/runtime"; +import type { BinaryReadOptions } from "@protobuf-ts/runtime"; +import type { IBinaryReader } from "@protobuf-ts/runtime"; +import type { PartialMessage } from "@protobuf-ts/runtime"; +import { MessageType } from "@protobuf-ts/runtime"; +import { Timestamp } from "../../google/protobuf/timestamp_pb"; +import { Duration } from "../../google/protobuf/duration_pb"; +import { Constraint } from "./expression_pb"; +/** + * MessageConstraints represents validation rules that are applied to the entire message. + * It includes disabling options and a list of Constraint messages representing Common Expression Language (CEL) validation rules. + * + * @generated from protobuf message buf.validate.MessageConstraints + */ +export interface MessageConstraints { + /** + * `disabled` is a boolean flag that, when set to true, nullifies any validation rules for this message. + * This includes any fields within the message that would otherwise support validation. + * + * ```proto + * message MyMessage { + * // validation will be bypassed for this message + * option (buf.validate.message).disabled = true; + * } + * ``` + * + * @generated from protobuf field: optional bool disabled = 1; + */ + disabled?: boolean; + /** + * `cel` is a repeated field of type Constraint. Each Constraint specifies a validation rule to be applied to this message. + * These constraints are written in Common Expression Language (CEL) syntax. For more information on + * CEL, [see our documentation](https://github.com/bufbuild/protovalidate/blob/main/docs/cel.md). + * + * + * ```proto + * message MyMessage { + * // The field `foo` must be greater than 42. + * option (buf.validate.message).cel = { + * id: "my_message.value", + * message: "value must be greater than 42", + * expression: "this.foo > 42", + * }; + * optional int32 foo = 1; + * } + * ``` + * + * @generated from protobuf field: repeated buf.validate.Constraint cel = 3; + */ + cel: Constraint[]; +} +/** + * The `OneofConstraints` message type enables you to manage constraints for + * oneof fields in your protobuf messages. + * + * @generated from protobuf message buf.validate.OneofConstraints + */ +export interface OneofConstraints { + /** + * If `required` is true, exactly one field of the oneof must be present. A + * validation error is returned if no fields in the oneof are present. The + * field itself may still be a default value; further constraints + * should be placed on the fields themselves to ensure they are valid values, + * such as `min_len` or `gt`. + * + * ```proto + * message MyMessage { + * oneof value { + * // Either `a` or `b` must be set. If `a` is set, it must also be + * // non-empty; whereas if `b` is set, it can still be an empty string. + * option (buf.validate.oneof).required = true; + * string a = 1 [(buf.validate.field).string.min_len = 1]; + * string b = 2; + * } + * } + * ``` + * + * @generated from protobuf field: optional bool required = 1; + */ + required?: boolean; +} +/** + * FieldRules encapsulates the rules for each type of field. Depending on the + * field, the correct set should be used to ensure proper validations. + * + * @generated from protobuf message buf.validate.FieldConstraints + */ +export interface FieldConstraints { + /** + * `cel` is a repeated field used to represent a textual expression + * in the Common Expression Language (CEL) syntax. For more information on + * CEL, [see our documentation](https://github.com/bufbuild/protovalidate/blob/main/docs/cel.md). + * + * ```proto + * message MyMessage { + * // The field `value` must be greater than 42. + * optional int32 value = 1 [(buf.validate.field).cel = { + * id: "my_message.value", + * message: "value must be greater than 42", + * expression: "this > 42", + * }]; + * } + * ``` + * + * @generated from protobuf field: repeated buf.validate.Constraint cel = 23; + */ + cel: Constraint[]; + /** + * `skipped` is an optional boolean attribute that specifies that the + * validation rules of this field should not be evaluated. If skipped is set to + * true, any validation rules set for the field will be ignored. + * + * ```proto + * message MyMessage { + * // The field `value` must not be set. + * optional MyOtherMessage value = 1 [(buf.validate.field).skipped = true]; + * } + * ``` + * + * @generated from protobuf field: bool skipped = 24; + */ + skipped: boolean; + /** + * If `required` is true, the field must be populated. Field presence can be + * described as "serialized in the wire format," which follows the following rules: + * + * - the following "nullable" fields must be explicitly set to be considered present: + * - singular message fields (may be their empty value) + * - member fields of a oneof (may be their default value) + * - proto3 optional fields (may be their default value) + * - proto2 scalar fields + * - proto3 scalar fields must be non-zero to be considered present + * - repeated and map fields must be non-empty to be considered present + * + * ```proto + * message MyMessage { + * // The field `value` must be set to a non-null value. + * optional MyOtherMessage value = 1 [(buf.validate.field).required = true]; + * } + * ``` + * + * @generated from protobuf field: bool required = 25; + */ + required: boolean; + /** + * If `ignore_empty` is true and applied to a non-nullable field (see + * `required` for more details), validation is skipped on the field if it is + * the default or empty value. Adding `ignore_empty` to a "nullable" field is + * a noop as these unset fields already skip validation (with the exception + * of `required`). + * + * ```proto + * message MyRepeated { + * // The field `value` min_len rule is only applied if the field isn't empty. + * repeated string value = 1 [ + * (buf.validate.field).ignore_empty = true, + * (buf.validate.field).min_len = 5 + * ]; + * } + * ``` + * + * @generated from protobuf field: bool ignore_empty = 26; + */ + ignore_empty: boolean; + /** + * @generated from protobuf oneof: type + */ + type: { + oneofKind: "float"; + /** + * Scalar Field Types + * + * @generated from protobuf field: buf.validate.FloatRules float = 1; + */ + float: FloatRules; + } | { + oneofKind: "double"; + /** + * @generated from protobuf field: buf.validate.DoubleRules double = 2; + */ + double: DoubleRules; + } | { + oneofKind: "int32"; + /** + * @generated from protobuf field: buf.validate.Int32Rules int32 = 3; + */ + int32: Int32Rules; + } | { + oneofKind: "int64"; + /** + * @generated from protobuf field: buf.validate.Int64Rules int64 = 4; + */ + int64: Int64Rules; + } | { + oneofKind: "uint32"; + /** + * @generated from protobuf field: buf.validate.UInt32Rules uint32 = 5; + */ + uint32: UInt32Rules; + } | { + oneofKind: "uint64"; + /** + * @generated from protobuf field: buf.validate.UInt64Rules uint64 = 6; + */ + uint64: UInt64Rules; + } | { + oneofKind: "sint32"; + /** + * @generated from protobuf field: buf.validate.SInt32Rules sint32 = 7; + */ + sint32: SInt32Rules; + } | { + oneofKind: "sint64"; + /** + * @generated from protobuf field: buf.validate.SInt64Rules sint64 = 8; + */ + sint64: SInt64Rules; + } | { + oneofKind: "fixed32"; + /** + * @generated from protobuf field: buf.validate.Fixed32Rules fixed32 = 9; + */ + fixed32: Fixed32Rules; + } | { + oneofKind: "fixed64"; + /** + * @generated from protobuf field: buf.validate.Fixed64Rules fixed64 = 10; + */ + fixed64: Fixed64Rules; + } | { + oneofKind: "sfixed32"; + /** + * @generated from protobuf field: buf.validate.SFixed32Rules sfixed32 = 11; + */ + sfixed32: SFixed32Rules; + } | { + oneofKind: "sfixed64"; + /** + * @generated from protobuf field: buf.validate.SFixed64Rules sfixed64 = 12; + */ + sfixed64: SFixed64Rules; + } | { + oneofKind: "bool"; + /** + * @generated from protobuf field: buf.validate.BoolRules bool = 13; + */ + bool: BoolRules; + } | { + oneofKind: "string"; + /** + * @generated from protobuf field: buf.validate.StringRules string = 14; + */ + string: StringRules; + } | { + oneofKind: "bytes"; + /** + * @generated from protobuf field: buf.validate.BytesRules bytes = 15; + */ + bytes: BytesRules; + } | { + oneofKind: "enum"; + /** + * Complex Field Types + * + * @generated from protobuf field: buf.validate.EnumRules enum = 16; + */ + enum: EnumRules; + } | { + oneofKind: "repeated"; + /** + * @generated from protobuf field: buf.validate.RepeatedRules repeated = 18; + */ + repeated: RepeatedRules; + } | { + oneofKind: "map"; + /** + * @generated from protobuf field: buf.validate.MapRules map = 19; + */ + map: MapRules; + } | { + oneofKind: "any"; + /** + * Well-Known Field Types + * + * @generated from protobuf field: buf.validate.AnyRules any = 20; + */ + any: AnyRules; + } | { + oneofKind: "duration"; + /** + * @generated from protobuf field: buf.validate.DurationRules duration = 21; + */ + duration: DurationRules; + } | { + oneofKind: "timestamp"; + /** + * @generated from protobuf field: buf.validate.TimestampRules timestamp = 22; + */ + timestamp: TimestampRules; + } | { + oneofKind: undefined; + }; +} +/** + * FloatRules describes the constraints applied to `float` values. These + * rules may also be applied to the `google.protobuf.FloatValue` Well-Known-Type. + * + * @generated from protobuf message buf.validate.FloatRules + */ +export interface FloatRules { + /** + * `const` requires the field value to exactly match the specified value. If + * the field value doesn't match, an error message is generated. + * + * ```proto + * message MyFloat { + * // value must equal 42.0 + * float value = 1 [(buf.validate.field).float.const = 42.0]; + * } + * ``` + * + * @generated from protobuf field: optional float const = 1; + */ + const?: number; + /** + * @generated from protobuf oneof: less_than + */ + less_than: { + oneofKind: "lt"; + /** + * `lt` requires the field value to be less than the specified value (field < + * value). If the field value is equal to or greater than the specified value, + * an error message is generated. + * + * ```proto + * message MyFloat { + * // value must be less than 10.0 + * float value = 1 [(buf.validate.field).float.lt = 10.0]; + * } + * ``` + * + * @generated from protobuf field: float lt = 2; + */ + lt: number; + } | { + oneofKind: "lte"; + /** + * `lte` requires the field value to be less than or equal to the specified + * value (field <= value). If the field value is greater than the specified + * value, an error message is generated. + * + * ```proto + * message MyFloat { + * // value must be less than or equal to 10.0 + * float value = 1 [(buf.validate.field).float.lte = 10.0]; + * } + * ``` + * + * @generated from protobuf field: float lte = 3; + */ + lte: number; + } | { + oneofKind: undefined; + }; + /** + * @generated from protobuf oneof: greater_than + */ + greater_than: { + oneofKind: "gt"; + /** + * `gt` requires the field value to be greater than the specified value + * (exclusive). If the value of `gt` is larger than a specified `lt` or + * `lte`, the range is reversed, and the field value must be outside the + * specified range. If the field value doesn't meet the required conditions, + * an error message is generated. + * + * ```proto + * message MyFloat { + * // value must be greater than 5.0 [float.gt] + * float value = 1 [(buf.validate.field).float.gt = 5.0]; + * + * // value must be greater than 5 and less than 10.0 [float.gt_lt] + * float other_value = 2 [(buf.validate.field).float = { gt: 5.0, lt: 10.0 }]; + * + * // value must be greater than 10 or less than 5.0 [float.gt_lt_exclusive] + * float another_value = 3 [(buf.validate.field).float = { gt: 10.0, lt: 5.0 }]; + * } + * ``` + * + * @generated from protobuf field: float gt = 4; + */ + gt: number; + } | { + oneofKind: "gte"; + /** + * `gte` requires the field value to be greater than or equal to the specified + * value (exclusive). If the value of `gte` is larger than a specified `lt` + * or `lte`, the range is reversed, and the field value must be outside the + * specified range. If the field value doesn't meet the required conditions, + * an error message is generated. + * + * ```proto + * message MyFloat { + * // value must be greater than or equal to 5.0 [float.gte] + * float value = 1 [(buf.validate.field).float.gte = 5.0]; + * + * // value must be greater than or equal to 5.0 and less than 10.0 [float.gte_lt] + * float other_value = 2 [(buf.validate.field).float = { gte: 5.0, lt: 10.0 }]; + * + * // value must be greater than or equal to 10.0 or less than 5.0 [float.gte_lt_exclusive] + * float another_value = 3 [(buf.validate.field).float = { gte: 10.0, lt: 5.0 }]; + * } + * ``` + * + * @generated from protobuf field: float gte = 5; + */ + gte: number; + } | { + oneofKind: undefined; + }; + /** + * `in` requires the field value to be equal to one of the specified values. + * If the field value isn't one of the specified values, an error message + * is generated. + * + * ```proto + * message MyFloat { + * // value must be in list [1.0, 2.0, 3.0] + * repeated float value = 1 (buf.validate.field).float = { in: [1.0, 2.0, 3.0] }; + * } + * ``` + * + * @generated from protobuf field: repeated float in = 6; + */ + in: number[]; + /** + * `in` requires the field value to not be equal to any of the specified + * values. If the field value is one of the specified values, an error + * message is generated. + * + * ```proto + * message MyFloat { + * // value must not be in list [1.0, 2.0, 3.0] + * repeated float value = 1 (buf.validate.field).float = { not_in: [1.0, 2.0, 3.0] }; + * } + * ``` + * + * @generated from protobuf field: repeated float not_in = 7; + */ + not_in: number[]; + /** + * `finite` requires the field value to be finite. If the field value is + * infinite or NaN, an error message is generated. + * + * @generated from protobuf field: bool finite = 8; + */ + finite: boolean; +} +/** + * DoubleRules describes the constraints applied to `double` values. These + * rules may also be applied to the `google.protobuf.DoubleValue` Well-Known-Type. + * + * @generated from protobuf message buf.validate.DoubleRules + */ +export interface DoubleRules { + /** + * `const` requires the field value to exactly match the specified value. If + * the field value doesn't match, an error message is generated. + * + * ```proto + * message MyDouble { + * // value must equal 42.0 + * double value = 1 [(buf.validate.field).double.const = 42.0]; + * } + * ``` + * + * @generated from protobuf field: optional double const = 1; + */ + const?: number; + /** + * @generated from protobuf oneof: less_than + */ + less_than: { + oneofKind: "lt"; + /** + * `lt` requires the field value to be less than the specified value (field < + * value). If the field value is equal to or greater than the specified + * value, an error message is generated. + * + * ```proto + * message MyDouble { + * // value must be less than 10.0 + * double value = 1 [(buf.validate.field).double.lt = 10.0]; + * } + * ``` + * + * @generated from protobuf field: double lt = 2; + */ + lt: number; + } | { + oneofKind: "lte"; + /** + * `lte` requires the field value to be less than or equal to the specified value + * (field <= value). If the field value is greater than the specified value, + * an error message is generated. + * + * ```proto + * message MyDouble { + * // value must be less than or equal to 10.0 + * double value = 1 [(buf.validate.field).double.lte = 10.0]; + * } + * ``` + * + * @generated from protobuf field: double lte = 3; + */ + lte: number; + } | { + oneofKind: undefined; + }; + /** + * @generated from protobuf oneof: greater_than + */ + greater_than: { + oneofKind: "gt"; + /** + * `gt` requires the field value to be greater than the specified value + * (exclusive). If the value of `gt` is larger than a specified `lt` or `lte`, + * the range is reversed, and the field value must be outside the specified + * range. If the field value doesn't meet the required conditions, an error + * message is generated. + * + * ```proto + * message MyDouble { + * // value must be greater than 5.0 [double.gt] + * double value = 1 [(buf.validate.field).double.gt = 5.0]; + * + * // value must be greater than 5 and less than 10.0 [double.gt_lt] + * double other_value = 2 [(buf.validate.field).double = { gt: 5.0, lt: 10.0 }]; + * + * // value must be greater than 10 or less than 5.0 [double.gt_lt_exclusive] + * double another_value = 3 [(buf.validate.field).double = { gt: 10.0, lt: 5.0 }]; + * } + * ``` + * + * @generated from protobuf field: double gt = 4; + */ + gt: number; + } | { + oneofKind: "gte"; + /** + * `gte` requires the field value to be greater than or equal to the specified + * value (exclusive). If the value of `gte` is larger than a specified `lt` or + * `lte`, the range is reversed, and the field value must be outside the + * specified range. If the field value doesn't meet the required conditions, + * an error message is generated. + * + * ```proto + * message MyDouble { + * // value must be greater than or equal to 5.0 [double.gte] + * double value = 1 [(buf.validate.field).double.gte = 5.0]; + * + * // value must be greater than or equal to 5.0 and less than 10.0 [double.gte_lt] + * double other_value = 2 [(buf.validate.field).double = { gte: 5.0, lt: 10.0 }]; + * + * // value must be greater than or equal to 10.0 or less than 5.0 [double.gte_lt_exclusive] + * double another_value = 3 [(buf.validate.field).double = { gte: 10.0, lt: 5.0 }]; + * } + * ``` + * + * @generated from protobuf field: double gte = 5; + */ + gte: number; + } | { + oneofKind: undefined; + }; + /** + * `in` requires the field value to be equal to one of the specified values. + * If the field value isn't one of the specified values, an error message is + * generated. + * + * ```proto + * message MyDouble { + * // value must be in list [1.0, 2.0, 3.0] + * repeated double value = 1 (buf.validate.field).double = { in: [1.0, 2.0, 3.0] }; + * } + * ``` + * + * @generated from protobuf field: repeated double in = 6; + */ + in: number[]; + /** + * `not_in` requires the field value to not be equal to any of the specified + * values. If the field value is one of the specified values, an error + * message is generated. + * + * ```proto + * message MyDouble { + * // value must not be in list [1.0, 2.0, 3.0] + * repeated double value = 1 (buf.validate.field).double = { not_in: [1.0, 2.0, 3.0] }; + * } + * ``` + * + * @generated from protobuf field: repeated double not_in = 7; + */ + not_in: number[]; + /** + * `finite` requires the field value to be finite. If the field value is + * infinite or NaN, an error message is generated. + * + * @generated from protobuf field: bool finite = 8; + */ + finite: boolean; +} +/** + * Int32Rules describes the constraints applied to `int32` values. These + * rules may also be applied to the `google.protobuf.Int32Value` Well-Known-Type. + * + * @generated from protobuf message buf.validate.Int32Rules + */ +export interface Int32Rules { + /** + * `const` requires the field value to exactly match the specified value. If + * the field value doesn't match, an error message is generated. + * + * ```proto + * message MyInt32 { + * // value must equal 42 + * int32 value = 1 [(buf.validate.field).int32.const = 42]; + * } + * ``` + * + * @generated from protobuf field: optional int32 const = 1; + */ + const?: number; + /** + * @generated from protobuf oneof: less_than + */ + less_than: { + oneofKind: "lt"; + /** + * `lt` requires the field value to be less than the specified value (field + * < value). If the field value is equal to or greater than the specified + * value, an error message is generated. + * + * ```proto + * message MyInt32 { + * // value must be less than 10 + * int32 value = 1 [(buf.validate.field).int32.lt = 10]; + * } + * ``` + * + * @generated from protobuf field: int32 lt = 2; + */ + lt: number; + } | { + oneofKind: "lte"; + /** + * `lte` requires the field value to be less than or equal to the specified + * value (field <= value). If the field value is greater than the specified + * value, an error message is generated. + * + * ```proto + * message MyInt32 { + * // value must be less than or equal to 10 + * int32 value = 1 [(buf.validate.field).int32.lte = 10]; + * } + * ``` + * + * @generated from protobuf field: int32 lte = 3; + */ + lte: number; + } | { + oneofKind: undefined; + }; + /** + * @generated from protobuf oneof: greater_than + */ + greater_than: { + oneofKind: "gt"; + /** + * `gt` requires the field value to be greater than the specified value + * (exclusive). If the value of `gt` is larger than a specified `lt` or + * `lte`, the range is reversed, and the field value must be outside the + * specified range. If the field value doesn't meet the required conditions, + * an error message is generated. + * + * ```proto + * message MyInt32 { + * // value must be greater than 5 [int32.gt] + * int32 value = 1 [(buf.validate.field).int32.gt = 5]; + * + * // value must be greater than 5 and less than 10 [int32.gt_lt] + * int32 other_value = 2 [(buf.validate.field).int32 = { gt: 5, lt: 10 }]; + * + * // value must be greater than 10 or less than 5 [int32.gt_lt_exclusive] + * int32 another_value = 3 [(buf.validate.field).int32 = { gt: 10, lt: 5 }]; + * } + * ``` + * + * @generated from protobuf field: int32 gt = 4; + */ + gt: number; + } | { + oneofKind: "gte"; + /** + * `gte` requires the field value to be greater than or equal to the specified value + * (exclusive). If the value of `gte` is larger than a specified `lt` or + * `lte`, the range is reversed, and the field value must be outside the + * specified range. If the field value doesn't meet the required conditions, + * an error message is generated. + * + * ```proto + * message MyInt32 { + * // value must be greater than or equal to 5 [int32.gte] + * int32 value = 1 [(buf.validate.field).int32.gte = 5]; + * + * // value must be greater than or equal to 5 and less than 10 [int32.gte_lt] + * int32 other_value = 2 [(buf.validate.field).int32 = { gte: 5, lt: 10 }]; + * + * // value must be greater than or equal to 10 or less than 5 [int32.gte_lt_exclusive] + * int32 another_value = 3 [(buf.validate.field).int32 = { gte: 10, lt: 5 }]; + * } + * ``` + * + * @generated from protobuf field: int32 gte = 5; + */ + gte: number; + } | { + oneofKind: undefined; + }; + /** + * `in` requires the field value to be equal to one of the specified values. + * If the field value isn't one of the specified values, an error message is + * generated. + * + * ```proto + * message MyInt32 { + * // value must be in list [1, 2, 3] + * repeated int32 value = 1 (buf.validate.field).int32 = { in: [1, 2, 3] }; + * } + * ``` + * + * @generated from protobuf field: repeated int32 in = 6; + */ + in: number[]; + /** + * `not_in` requires the field value to not be equal to any of the specified + * values. If the field value is one of the specified values, an error message + * is generated. + * + * ```proto + * message MyInt32 { + * // value must not be in list [1, 2, 3] + * repeated int32 value = 1 (buf.validate.field).int32 = { not_in: [1, 2, 3] }; + * } + * ``` + * + * @generated from protobuf field: repeated int32 not_in = 7; + */ + not_in: number[]; +} +/** + * Int64Rules describes the constraints applied to `int64` values. These + * rules may also be applied to the `google.protobuf.Int64Value` Well-Known-Type. + * + * @generated from protobuf message buf.validate.Int64Rules + */ +export interface Int64Rules { + /** + * `const` requires the field value to exactly match the specified value. If + * the field value doesn't match, an error message is generated. + * + * ```proto + * message MyInt64 { + * // value must equal 42 + * int64 value = 1 [(buf.validate.field).int64.const = 42]; + * } + * ``` + * + * @generated from protobuf field: optional int64 const = 1; + */ + const?: bigint; + /** + * @generated from protobuf oneof: less_than + */ + less_than: { + oneofKind: "lt"; + /** + * `lt` requires the field value to be less than the specified value (field < + * value). If the field value is equal to or greater than the specified value, + * an error message is generated. + * + * ```proto + * message MyInt64 { + * // value must be less than 10 + * int64 value = 1 [(buf.validate.field).int64.lt = 10]; + * } + * ``` + * + * @generated from protobuf field: int64 lt = 2; + */ + lt: bigint; + } | { + oneofKind: "lte"; + /** + * `lte` requires the field value to be less than or equal to the specified + * value (field <= value). If the field value is greater than the specified + * value, an error message is generated. + * + * ```proto + * message MyInt64 { + * // value must be less than or equal to 10 + * int64 value = 1 [(buf.validate.field).int64.lte = 10]; + * } + * ``` + * + * @generated from protobuf field: int64 lte = 3; + */ + lte: bigint; + } | { + oneofKind: undefined; + }; + /** + * @generated from protobuf oneof: greater_than + */ + greater_than: { + oneofKind: "gt"; + /** + * `gt` requires the field value to be greater than the specified value + * (exclusive). If the value of `gt` is larger than a specified `lt` or + * `lte`, the range is reversed, and the field value must be outside the + * specified range. If the field value doesn't meet the required conditions, + * an error message is generated. + * + * ```proto + * message MyInt64 { + * // value must be greater than 5 [int64.gt] + * int64 value = 1 [(buf.validate.field).int64.gt = 5]; + * + * // value must be greater than 5 and less than 10 [int64.gt_lt] + * int64 other_value = 2 [(buf.validate.field).int64 = { gt: 5, lt: 10 }]; + * + * // value must be greater than 10 or less than 5 [int64.gt_lt_exclusive] + * int64 another_value = 3 [(buf.validate.field).int64 = { gt: 10, lt: 5 }]; + * } + * ``` + * + * @generated from protobuf field: int64 gt = 4; + */ + gt: bigint; + } | { + oneofKind: "gte"; + /** + * `gte` requires the field value to be greater than or equal to the specified + * value (exclusive). If the value of `gte` is larger than a specified `lt` + * or `lte`, the range is reversed, and the field value must be outside the + * specified range. If the field value doesn't meet the required conditions, + * an error message is generated. + * + * ```proto + * message MyInt64 { + * // value must be greater than or equal to 5 [int64.gte] + * int64 value = 1 [(buf.validate.field).int64.gte = 5]; + * + * // value must be greater than or equal to 5 and less than 10 [int64.gte_lt] + * int64 other_value = 2 [(buf.validate.field).int64 = { gte: 5, lt: 10 }]; + * + * // value must be greater than or equal to 10 or less than 5 [int64.gte_lt_exclusive] + * int64 another_value = 3 [(buf.validate.field).int64 = { gte: 10, lt: 5 }]; + * } + * ``` + * + * @generated from protobuf field: int64 gte = 5; + */ + gte: bigint; + } | { + oneofKind: undefined; + }; + /** + * `in` requires the field value to be equal to one of the specified values. + * If the field value isn't one of the specified values, an error message is + * generated. + * + * ```proto + * message MyInt64 { + * // value must be in list [1, 2, 3] + * repeated int64 value = 1 (buf.validate.field).int64 = { in: [1, 2, 3] }; + * } + * ``` + * + * @generated from protobuf field: repeated int64 in = 6; + */ + in: bigint[]; + /** + * `not_in` requires the field value to not be equal to any of the specified + * values. If the field value is one of the specified values, an error + * message is generated. + * + * ```proto + * message MyInt64 { + * // value must not be in list [1, 2, 3] + * repeated int64 value = 1 (buf.validate.field).int64 = { not_in: [1, 2, 3] }; + * } + * ``` + * + * @generated from protobuf field: repeated int64 not_in = 7; + */ + not_in: bigint[]; +} +/** + * UInt32Rules describes the constraints applied to `uint32` values. These + * rules may also be applied to the `google.protobuf.UInt32Value` Well-Known-Type. + * + * @generated from protobuf message buf.validate.UInt32Rules + */ +export interface UInt32Rules { + /** + * `const` requires the field value to exactly match the specified value. If + * the field value doesn't match, an error message is generated. + * + * ```proto + * message MyUInt32 { + * // value must equal 42 + * uint32 value = 1 [(buf.validate.field).uint32.const = 42]; + * } + * ``` + * + * @generated from protobuf field: optional uint32 const = 1; + */ + const?: number; + /** + * @generated from protobuf oneof: less_than + */ + less_than: { + oneofKind: "lt"; + /** + * `lt` requires the field value to be less than the specified value (field < + * value). If the field value is equal to or greater than the specified value, + * an error message is generated. + * + * ```proto + * message MyUInt32 { + * // value must be less than 10 + * uint32 value = 1 [(buf.validate.field).uint32.lt = 10]; + * } + * ``` + * + * @generated from protobuf field: uint32 lt = 2; + */ + lt: number; + } | { + oneofKind: "lte"; + /** + * `lte` requires the field value to be less than or equal to the specified + * value (field <= value). If the field value is greater than the specified + * value, an error message is generated. + * + * ```proto + * message MyUInt32 { + * // value must be less than or equal to 10 + * uint32 value = 1 [(buf.validate.field).uint32.lte = 10]; + * } + * ``` + * + * @generated from protobuf field: uint32 lte = 3; + */ + lte: number; + } | { + oneofKind: undefined; + }; + /** + * @generated from protobuf oneof: greater_than + */ + greater_than: { + oneofKind: "gt"; + /** + * `gt` requires the field value to be greater than the specified value + * (exclusive). If the value of `gt` is larger than a specified `lt` or + * `lte`, the range is reversed, and the field value must be outside the + * specified range. If the field value doesn't meet the required conditions, + * an error message is generated. + * + * ```proto + * message MyUInt32 { + * // value must be greater than 5 [uint32.gt] + * uint32 value = 1 [(buf.validate.field).uint32.gt = 5]; + * + * // value must be greater than 5 and less than 10 [uint32.gt_lt] + * uint32 other_value = 2 [(buf.validate.field).uint32 = { gt: 5, lt: 10 }]; + * + * // value must be greater than 10 or less than 5 [uint32.gt_lt_exclusive] + * uint32 another_value = 3 [(buf.validate.field).uint32 = { gt: 10, lt: 5 }]; + * } + * ``` + * + * @generated from protobuf field: uint32 gt = 4; + */ + gt: number; + } | { + oneofKind: "gte"; + /** + * `gte` requires the field value to be greater than or equal to the specified + * value (exclusive). If the value of `gte` is larger than a specified `lt` + * or `lte`, the range is reversed, and the field value must be outside the + * specified range. If the field value doesn't meet the required conditions, + * an error message is generated. + * + * ```proto + * message MyUInt32 { + * // value must be greater than or equal to 5 [uint32.gte] + * uint32 value = 1 [(buf.validate.field).uint32.gte = 5]; + * + * // value must be greater than or equal to 5 and less than 10 [uint32.gte_lt] + * uint32 other_value = 2 [(buf.validate.field).uint32 = { gte: 5, lt: 10 }]; + * + * // value must be greater than or equal to 10 or less than 5 [uint32.gte_lt_exclusive] + * uint32 another_value = 3 [(buf.validate.field).uint32 = { gte: 10, lt: 5 }]; + * } + * ``` + * + * @generated from protobuf field: uint32 gte = 5; + */ + gte: number; + } | { + oneofKind: undefined; + }; + /** + * `in` requires the field value to be equal to one of the specified values. + * If the field value isn't one of the specified values, an error message is + * generated. + * + * ```proto + * message MyUInt32 { + * // value must be in list [1, 2, 3] + * repeated uint32 value = 1 (buf.validate.field).uint32 = { in: [1, 2, 3] }; + * } + * ``` + * + * @generated from protobuf field: repeated uint32 in = 6; + */ + in: number[]; + /** + * `not_in` requires the field value to not be equal to any of the specified + * values. If the field value is one of the specified values, an error + * message is generated. + * + * ```proto + * message MyUInt32 { + * // value must not be in list [1, 2, 3] + * repeated uint32 value = 1 (buf.validate.field).uint32 = { not_in: [1, 2, 3] }; + * } + * ``` + * + * @generated from protobuf field: repeated uint32 not_in = 7; + */ + not_in: number[]; +} +/** + * UInt64Rules describes the constraints applied to `uint64` values. These + * rules may also be applied to the `google.protobuf.UInt64Value` Well-Known-Type. + * + * @generated from protobuf message buf.validate.UInt64Rules + */ +export interface UInt64Rules { + /** + * `const` requires the field value to exactly match the specified value. If + * the field value doesn't match, an error message is generated. + * + * ```proto + * message MyUInt64 { + * // value must equal 42 + * uint64 value = 1 [(buf.validate.field).uint64.const = 42]; + * } + * ``` + * + * @generated from protobuf field: optional uint64 const = 1; + */ + const?: bigint; + /** + * @generated from protobuf oneof: less_than + */ + less_than: { + oneofKind: "lt"; + /** + * `lt` requires the field value to be less than the specified value (field < + * value). If the field value is equal to or greater than the specified value, + * an error message is generated. + * + * ```proto + * message MyUInt64 { + * // value must be less than 10 + * uint64 value = 1 [(buf.validate.field).uint64.lt = 10]; + * } + * ``` + * + * @generated from protobuf field: uint64 lt = 2; + */ + lt: bigint; + } | { + oneofKind: "lte"; + /** + * `lte` requires the field value to be less than or equal to the specified + * value (field <= value). If the field value is greater than the specified + * value, an error message is generated. + * + * ```proto + * message MyUInt64 { + * // value must be less than or equal to 10 + * uint64 value = 1 [(buf.validate.field).uint64.lte = 10]; + * } + * ``` + * + * @generated from protobuf field: uint64 lte = 3; + */ + lte: bigint; + } | { + oneofKind: undefined; + }; + /** + * @generated from protobuf oneof: greater_than + */ + greater_than: { + oneofKind: "gt"; + /** + * `gt` requires the field value to be greater than the specified value + * (exclusive). If the value of `gt` is larger than a specified `lt` or + * `lte`, the range is reversed, and the field value must be outside the + * specified range. If the field value doesn't meet the required conditions, + * an error message is generated. + * + * ```proto + * message MyUInt64 { + * // value must be greater than 5 [uint64.gt] + * uint64 value = 1 [(buf.validate.field).uint64.gt = 5]; + * + * // value must be greater than 5 and less than 10 [uint64.gt_lt] + * uint64 other_value = 2 [(buf.validate.field).uint64 = { gt: 5, lt: 10 }]; + * + * // value must be greater than 10 or less than 5 [uint64.gt_lt_exclusive] + * uint64 another_value = 3 [(buf.validate.field).uint64 = { gt: 10, lt: 5 }]; + * } + * ``` + * + * @generated from protobuf field: uint64 gt = 4; + */ + gt: bigint; + } | { + oneofKind: "gte"; + /** + * `gte` requires the field value to be greater than or equal to the specified + * value (exclusive). If the value of `gte` is larger than a specified `lt` + * or `lte`, the range is reversed, and the field value must be outside the + * specified range. If the field value doesn't meet the required conditions, + * an error message is generated. + * + * ```proto + * message MyUInt64 { + * // value must be greater than or equal to 5 [uint64.gte] + * uint64 value = 1 [(buf.validate.field).uint64.gte = 5]; + * + * // value must be greater than or equal to 5 and less than 10 [uint64.gte_lt] + * uint64 other_value = 2 [(buf.validate.field).uint64 = { gte: 5, lt: 10 }]; + * + * // value must be greater than or equal to 10 or less than 5 [uint64.gte_lt_exclusive] + * uint64 another_value = 3 [(buf.validate.field).uint64 = { gte: 10, lt: 5 }]; + * } + * ``` + * + * @generated from protobuf field: uint64 gte = 5; + */ + gte: bigint; + } | { + oneofKind: undefined; + }; + /** + * `in` requires the field value to be equal to one of the specified values. + * If the field value isn't one of the specified values, an error message is + * generated. + * + * ```proto + * message MyUInt64 { + * // value must be in list [1, 2, 3] + * repeated uint64 value = 1 (buf.validate.field).uint64 = { in: [1, 2, 3] }; + * } + * ``` + * + * @generated from protobuf field: repeated uint64 in = 6; + */ + in: bigint[]; + /** + * `not_in` requires the field value to not be equal to any of the specified + * values. If the field value is one of the specified values, an error + * message is generated. + * + * ```proto + * message MyUInt64 { + * // value must not be in list [1, 2, 3] + * repeated uint64 value = 1 (buf.validate.field).uint64 = { not_in: [1, 2, 3] }; + * } + * ``` + * + * @generated from protobuf field: repeated uint64 not_in = 7; + */ + not_in: bigint[]; +} +/** + * SInt32Rules describes the constraints applied to `sint32` values. + * + * @generated from protobuf message buf.validate.SInt32Rules + */ +export interface SInt32Rules { + /** + * `const` requires the field value to exactly match the specified value. If + * the field value doesn't match, an error message is generated. + * + * ```proto + * message MySInt32 { + * // value must equal 42 + * sint32 value = 1 [(buf.validate.field).sint32.const = 42]; + * } + * ``` + * + * @generated from protobuf field: optional sint32 const = 1; + */ + const?: number; + /** + * @generated from protobuf oneof: less_than + */ + less_than: { + oneofKind: "lt"; + /** + * `lt` requires the field value to be less than the specified value (field + * < value). If the field value is equal to or greater than the specified + * value, an error message is generated. + * + * ```proto + * message MySInt32 { + * // value must be less than 10 + * sint32 value = 1 [(buf.validate.field).sint32.lt = 10]; + * } + * ``` + * + * @generated from protobuf field: sint32 lt = 2; + */ + lt: number; + } | { + oneofKind: "lte"; + /** + * `lte` requires the field value to be less than or equal to the specified + * value (field <= value). If the field value is greater than the specified + * value, an error message is generated. + * + * ```proto + * message MySInt32 { + * // value must be less than or equal to 10 + * sint32 value = 1 [(buf.validate.field).sint32.lte = 10]; + * } + * ``` + * + * @generated from protobuf field: sint32 lte = 3; + */ + lte: number; + } | { + oneofKind: undefined; + }; + /** + * @generated from protobuf oneof: greater_than + */ + greater_than: { + oneofKind: "gt"; + /** + * `gt` requires the field value to be greater than the specified value + * (exclusive). If the value of `gt` is larger than a specified `lt` or + * `lte`, the range is reversed, and the field value must be outside the + * specified range. If the field value doesn't meet the required conditions, + * an error message is generated. + * + * ```proto + * message MySInt32 { + * // value must be greater than 5 [sint32.gt] + * sint32 value = 1 [(buf.validate.field).sint32.gt = 5]; + * + * // value must be greater than 5 and less than 10 [sint32.gt_lt] + * sint32 other_value = 2 [(buf.validate.field).sint32 = { gt: 5, lt: 10 }]; + * + * // value must be greater than 10 or less than 5 [sint32.gt_lt_exclusive] + * sint32 another_value = 3 [(buf.validate.field).sint32 = { gt: 10, lt: 5 }]; + * } + * ``` + * + * @generated from protobuf field: sint32 gt = 4; + */ + gt: number; + } | { + oneofKind: "gte"; + /** + * `gte` requires the field value to be greater than or equal to the specified + * value (exclusive). If the value of `gte` is larger than a specified `lt` + * or `lte`, the range is reversed, and the field value must be outside the + * specified range. If the field value doesn't meet the required conditions, + * an error message is generated. + * + * ```proto + * message MySInt32 { + * // value must be greater than or equal to 5 [sint32.gte] + * sint32 value = 1 [(buf.validate.field).sint32.gte = 5]; + * + * // value must be greater than or equal to 5 and less than 10 [sint32.gte_lt] + * sint32 other_value = 2 [(buf.validate.field).sint32 = { gte: 5, lt: 10 }]; + * + * // value must be greater than or equal to 10 or less than 5 [sint32.gte_lt_exclusive] + * sint32 another_value = 3 [(buf.validate.field).sint32 = { gte: 10, lt: 5 }]; + * } + * ``` + * + * @generated from protobuf field: sint32 gte = 5; + */ + gte: number; + } | { + oneofKind: undefined; + }; + /** + * `in` requires the field value to be equal to one of the specified values. + * If the field value isn't one of the specified values, an error message is + * generated. + * + * ```proto + * message MySInt32 { + * // value must be in list [1, 2, 3] + * repeated sint32 value = 1 (buf.validate.field).sint32 = { in: [1, 2, 3] }; + * } + * ``` + * + * @generated from protobuf field: repeated sint32 in = 6; + */ + in: number[]; + /** + * `not_in` requires the field value to not be equal to any of the specified + * values. If the field value is one of the specified values, an error + * message is generated. + * + * ```proto + * message MySInt32 { + * // value must not be in list [1, 2, 3] + * repeated sint32 value = 1 (buf.validate.field).sint32 = { not_in: [1, 2, 3] }; + * } + * ``` + * + * @generated from protobuf field: repeated sint32 not_in = 7; + */ + not_in: number[]; +} +/** + * SInt64Rules describes the constraints applied to `sint64` values. + * + * @generated from protobuf message buf.validate.SInt64Rules + */ +export interface SInt64Rules { + /** + * `const` requires the field value to exactly match the specified value. If + * the field value doesn't match, an error message is generated. + * + * ```proto + * message MySInt64 { + * // value must equal 42 + * sint64 value = 1 [(buf.validate.field).sint64.const = 42]; + * } + * ``` + * + * @generated from protobuf field: optional sint64 const = 1; + */ + const?: bigint; + /** + * @generated from protobuf oneof: less_than + */ + less_than: { + oneofKind: "lt"; + /** + * `lt` requires the field value to be less than the specified value (field + * < value). If the field value is equal to or greater than the specified + * value, an error message is generated. + * + * ```proto + * message MySInt64 { + * // value must be less than 10 + * sint64 value = 1 [(buf.validate.field).sint64.lt = 10]; + * } + * ``` + * + * @generated from protobuf field: sint64 lt = 2; + */ + lt: bigint; + } | { + oneofKind: "lte"; + /** + * `lte` requires the field value to be less than or equal to the specified + * value (field <= value). If the field value is greater than the specified + * value, an error message is generated. + * + * ```proto + * message MySInt64 { + * // value must be less than or equal to 10 + * sint64 value = 1 [(buf.validate.field).sint64.lte = 10]; + * } + * ``` + * + * @generated from protobuf field: sint64 lte = 3; + */ + lte: bigint; + } | { + oneofKind: undefined; + }; + /** + * @generated from protobuf oneof: greater_than + */ + greater_than: { + oneofKind: "gt"; + /** + * `gt` requires the field value to be greater than the specified value + * (exclusive). If the value of `gt` is larger than a specified `lt` or + * `lte`, the range is reversed, and the field value must be outside the + * specified range. If the field value doesn't meet the required conditions, + * an error message is generated. + * + * ```proto + * message MySInt64 { + * // value must be greater than 5 [sint64.gt] + * sint64 value = 1 [(buf.validate.field).sint64.gt = 5]; + * + * // value must be greater than 5 and less than 10 [sint64.gt_lt] + * sint64 other_value = 2 [(buf.validate.field).sint64 = { gt: 5, lt: 10 }]; + * + * // value must be greater than 10 or less than 5 [sint64.gt_lt_exclusive] + * sint64 another_value = 3 [(buf.validate.field).sint64 = { gt: 10, lt: 5 }]; + * } + * ``` + * + * @generated from protobuf field: sint64 gt = 4; + */ + gt: bigint; + } | { + oneofKind: "gte"; + /** + * `gte` requires the field value to be greater than or equal to the specified + * value (exclusive). If the value of `gte` is larger than a specified `lt` + * or `lte`, the range is reversed, and the field value must be outside the + * specified range. If the field value doesn't meet the required conditions, + * an error message is generated. + * + * ```proto + * message MySInt64 { + * // value must be greater than or equal to 5 [sint64.gte] + * sint64 value = 1 [(buf.validate.field).sint64.gte = 5]; + * + * // value must be greater than or equal to 5 and less than 10 [sint64.gte_lt] + * sint64 other_value = 2 [(buf.validate.field).sint64 = { gte: 5, lt: 10 }]; + * + * // value must be greater than or equal to 10 or less than 5 [sint64.gte_lt_exclusive] + * sint64 another_value = 3 [(buf.validate.field).sint64 = { gte: 10, lt: 5 }]; + * } + * ``` + * + * @generated from protobuf field: sint64 gte = 5; + */ + gte: bigint; + } | { + oneofKind: undefined; + }; + /** + * `in` requires the field value to be equal to one of the specified values. + * If the field value isn't one of the specified values, an error message + * is generated. + * + * ```proto + * message MySInt64 { + * // value must be in list [1, 2, 3] + * repeated sint64 value = 1 (buf.validate.field).sint64 = { in: [1, 2, 3] }; + * } + * ``` + * + * @generated from protobuf field: repeated sint64 in = 6; + */ + in: bigint[]; + /** + * `not_in` requires the field value to not be equal to any of the specified + * values. If the field value is one of the specified values, an error + * message is generated. + * + * ```proto + * message MySInt64 { + * // value must not be in list [1, 2, 3] + * repeated sint64 value = 1 (buf.validate.field).sint64 = { not_in: [1, 2, 3] }; + * } + * ``` + * + * @generated from protobuf field: repeated sint64 not_in = 7; + */ + not_in: bigint[]; +} +/** + * Fixed32Rules describes the constraints applied to `fixed32` values. + * + * @generated from protobuf message buf.validate.Fixed32Rules + */ +export interface Fixed32Rules { + /** + * `const` requires the field value to exactly match the specified value. + * If the field value doesn't match, an error message is generated. + * + * ```proto + * message MyFixed32 { + * // value must equal 42 + * fixed32 value = 1 [(buf.validate.field).fixed32.const = 42]; + * } + * ``` + * + * @generated from protobuf field: optional fixed32 const = 1; + */ + const?: number; + /** + * @generated from protobuf oneof: less_than + */ + less_than: { + oneofKind: "lt"; + /** + * `lt` requires the field value to be less than the specified value (field < + * value). If the field value is equal to or greater than the specified value, + * an error message is generated. + * + * ```proto + * message MyFixed32 { + * // value must be less than 10 + * fixed32 value = 1 [(buf.validate.field).fixed32.lt = 10]; + * } + * ``` + * + * @generated from protobuf field: fixed32 lt = 2; + */ + lt: number; + } | { + oneofKind: "lte"; + /** + * `lte` requires the field value to be less than or equal to the specified + * value (field <= value). If the field value is greater than the specified + * value, an error message is generated. + * + * ```proto + * message MyFixed32 { + * // value must be less than or equal to 10 + * fixed32 value = 1 [(buf.validate.field).fixed32.lte = 10]; + * } + * ``` + * + * @generated from protobuf field: fixed32 lte = 3; + */ + lte: number; + } | { + oneofKind: undefined; + }; + /** + * @generated from protobuf oneof: greater_than + */ + greater_than: { + oneofKind: "gt"; + /** + * `gt` requires the field value to be greater than the specified value + * (exclusive). If the value of `gt` is larger than a specified `lt` or + * `lte`, the range is reversed, and the field value must be outside the + * specified range. If the field value doesn't meet the required conditions, + * an error message is generated. + * + * ```proto + * message MyFixed32 { + * // value must be greater than 5 [fixed32.gt] + * fixed32 value = 1 [(buf.validate.field).fixed32.gt = 5]; + * + * // value must be greater than 5 and less than 10 [fixed32.gt_lt] + * fixed32 other_value = 2 [(buf.validate.field).fixed32 = { gt: 5, lt: 10 }]; + * + * // value must be greater than 10 or less than 5 [fixed32.gt_lt_exclusive] + * fixed32 another_value = 3 [(buf.validate.field).fixed32 = { gt: 10, lt: 5 }]; + * } + * ``` + * + * @generated from protobuf field: fixed32 gt = 4; + */ + gt: number; + } | { + oneofKind: "gte"; + /** + * `gte` requires the field value to be greater than or equal to the specified + * value (exclusive). If the value of `gte` is larger than a specified `lt` + * or `lte`, the range is reversed, and the field value must be outside the + * specified range. If the field value doesn't meet the required conditions, + * an error message is generated. + * + * ```proto + * message MyFixed32 { + * // value must be greater than or equal to 5 [fixed32.gte] + * fixed32 value = 1 [(buf.validate.field).fixed32.gte = 5]; + * + * // value must be greater than or equal to 5 and less than 10 [fixed32.gte_lt] + * fixed32 other_value = 2 [(buf.validate.field).fixed32 = { gte: 5, lt: 10 }]; + * + * // value must be greater than or equal to 10 or less than 5 [fixed32.gte_lt_exclusive] + * fixed32 another_value = 3 [(buf.validate.field).fixed32 = { gte: 10, lt: 5 }]; + * } + * ``` + * + * @generated from protobuf field: fixed32 gte = 5; + */ + gte: number; + } | { + oneofKind: undefined; + }; + /** + * `in` requires the field value to be equal to one of the specified values. + * If the field value isn't one of the specified values, an error message + * is generated. + * + * ```proto + * message MyFixed32 { + * // value must be in list [1, 2, 3] + * repeated fixed32 value = 1 (buf.validate.field).fixed32 = { in: [1, 2, 3] }; + * } + * ``` + * + * @generated from protobuf field: repeated fixed32 in = 6; + */ + in: number[]; + /** + * `not_in` requires the field value to not be equal to any of the specified + * values. If the field value is one of the specified values, an error + * message is generated. + * + * ```proto + * message MyFixed32 { + * // value must not be in list [1, 2, 3] + * repeated fixed32 value = 1 (buf.validate.field).fixed32 = { not_in: [1, 2, 3] }; + * } + * ``` + * + * @generated from protobuf field: repeated fixed32 not_in = 7; + */ + not_in: number[]; +} +/** + * Fixed64Rules describes the constraints applied to `fixed64` values. + * + * @generated from protobuf message buf.validate.Fixed64Rules + */ +export interface Fixed64Rules { + /** + * `const` requires the field value to exactly match the specified value. If + * the field value doesn't match, an error message is generated. + * + * ```proto + * message MyFixed64 { + * // value must equal 42 + * fixed64 value = 1 [(buf.validate.field).fixed64.const = 42]; + * } + * ``` + * + * @generated from protobuf field: optional fixed64 const = 1; + */ + const?: bigint; + /** + * @generated from protobuf oneof: less_than + */ + less_than: { + oneofKind: "lt"; + /** + * `lt` requires the field value to be less than the specified value (field < + * value). If the field value is equal to or greater than the specified value, + * an error message is generated. + * + * ```proto + * message MyFixed64 { + * // value must be less than 10 + * fixed64 value = 1 [(buf.validate.field).fixed64.lt = 10]; + * } + * ``` + * + * @generated from protobuf field: fixed64 lt = 2; + */ + lt: bigint; + } | { + oneofKind: "lte"; + /** + * `lte` requires the field value to be less than or equal to the specified + * value (field <= value). If the field value is greater than the specified + * value, an error message is generated. + * + * ```proto + * message MyFixed64 { + * // value must be less than or equal to 10 + * fixed64 value = 1 [(buf.validate.field).fixed64.lte = 10]; + * } + * ``` + * + * @generated from protobuf field: fixed64 lte = 3; + */ + lte: bigint; + } | { + oneofKind: undefined; + }; + /** + * @generated from protobuf oneof: greater_than + */ + greater_than: { + oneofKind: "gt"; + /** + * `gt` requires the field value to be greater than the specified value + * (exclusive). If the value of `gt` is larger than a specified `lt` or + * `lte`, the range is reversed, and the field value must be outside the + * specified range. If the field value doesn't meet the required conditions, + * an error message is generated. + * + * ```proto + * message MyFixed64 { + * // value must be greater than 5 [fixed64.gt] + * fixed64 value = 1 [(buf.validate.field).fixed64.gt = 5]; + * + * // value must be greater than 5 and less than 10 [fixed64.gt_lt] + * fixed64 other_value = 2 [(buf.validate.field).fixed64 = { gt: 5, lt: 10 }]; + * + * // value must be greater than 10 or less than 5 [fixed64.gt_lt_exclusive] + * fixed64 another_value = 3 [(buf.validate.field).fixed64 = { gt: 10, lt: 5 }]; + * } + * ``` + * + * @generated from protobuf field: fixed64 gt = 4; + */ + gt: bigint; + } | { + oneofKind: "gte"; + /** + * `gte` requires the field value to be greater than or equal to the specified + * value (exclusive). If the value of `gte` is larger than a specified `lt` + * or `lte`, the range is reversed, and the field value must be outside the + * specified range. If the field value doesn't meet the required conditions, + * an error message is generated. + * + * ```proto + * message MyFixed64 { + * // value must be greater than or equal to 5 [fixed64.gte] + * fixed64 value = 1 [(buf.validate.field).fixed64.gte = 5]; + * + * // value must be greater than or equal to 5 and less than 10 [fixed64.gte_lt] + * fixed64 other_value = 2 [(buf.validate.field).fixed64 = { gte: 5, lt: 10 }]; + * + * // value must be greater than or equal to 10 or less than 5 [fixed64.gte_lt_exclusive] + * fixed64 another_value = 3 [(buf.validate.field).fixed64 = { gte: 10, lt: 5 }]; + * } + * ``` + * + * @generated from protobuf field: fixed64 gte = 5; + */ + gte: bigint; + } | { + oneofKind: undefined; + }; + /** + * `in` requires the field value to be equal to one of the specified values. + * If the field value isn't one of the specified values, an error message is + * generated. + * + * ```proto + * message MyFixed64 { + * // value must be in list [1, 2, 3] + * repeated fixed64 value = 1 (buf.validate.field).fixed64 = { in: [1, 2, 3] }; + * } + * ``` + * + * @generated from protobuf field: repeated fixed64 in = 6; + */ + in: bigint[]; + /** + * `not_in` requires the field value to not be equal to any of the specified + * values. If the field value is one of the specified values, an error + * message is generated. + * + * ```proto + * message MyFixed64 { + * // value must not be in list [1, 2, 3] + * repeated fixed64 value = 1 (buf.validate.field).fixed64 = { not_in: [1, 2, 3] }; + * } + * ``` + * + * @generated from protobuf field: repeated fixed64 not_in = 7; + */ + not_in: bigint[]; +} +/** + * SFixed32Rules describes the constraints applied to `fixed32` values. + * + * @generated from protobuf message buf.validate.SFixed32Rules + */ +export interface SFixed32Rules { + /** + * `const` requires the field value to exactly match the specified value. If + * the field value doesn't match, an error message is generated. + * + * ```proto + * message MySFixed32 { + * // value must equal 42 + * sfixed32 value = 1 [(buf.validate.field).sfixed32.const = 42]; + * } + * ``` + * + * @generated from protobuf field: optional sfixed32 const = 1; + */ + const?: number; + /** + * @generated from protobuf oneof: less_than + */ + less_than: { + oneofKind: "lt"; + /** + * `lt` requires the field value to be less than the specified value (field < + * value). If the field value is equal to or greater than the specified value, + * an error message is generated. + * + * ```proto + * message MySFixed32 { + * // value must be less than 10 + * sfixed32 value = 1 [(buf.validate.field).sfixed32.lt = 10]; + * } + * ``` + * + * @generated from protobuf field: sfixed32 lt = 2; + */ + lt: number; + } | { + oneofKind: "lte"; + /** + * `lte` requires the field value to be less than or equal to the specified + * value (field <= value). If the field value is greater than the specified + * value, an error message is generated. + * + * ```proto + * message MySFixed32 { + * // value must be less than or equal to 10 + * sfixed32 value = 1 [(buf.validate.field).sfixed32.lte = 10]; + * } + * ``` + * + * @generated from protobuf field: sfixed32 lte = 3; + */ + lte: number; + } | { + oneofKind: undefined; + }; + /** + * @generated from protobuf oneof: greater_than + */ + greater_than: { + oneofKind: "gt"; + /** + * `gt` requires the field value to be greater than the specified value + * (exclusive). If the value of `gt` is larger than a specified `lt` or + * `lte`, the range is reversed, and the field value must be outside the + * specified range. If the field value doesn't meet the required conditions, + * an error message is generated. + * + * ```proto + * message MySFixed32 { + * // value must be greater than 5 [sfixed32.gt] + * sfixed32 value = 1 [(buf.validate.field).sfixed32.gt = 5]; + * + * // value must be greater than 5 and less than 10 [sfixed32.gt_lt] + * sfixed32 other_value = 2 [(buf.validate.field).sfixed32 = { gt: 5, lt: 10 }]; + * + * // value must be greater than 10 or less than 5 [sfixed32.gt_lt_exclusive] + * sfixed32 another_value = 3 [(buf.validate.field).sfixed32 = { gt: 10, lt: 5 }]; + * } + * ``` + * + * @generated from protobuf field: sfixed32 gt = 4; + */ + gt: number; + } | { + oneofKind: "gte"; + /** + * `gte` requires the field value to be greater than or equal to the specified + * value (exclusive). If the value of `gte` is larger than a specified `lt` + * or `lte`, the range is reversed, and the field value must be outside the + * specified range. If the field value doesn't meet the required conditions, + * an error message is generated. + * + * ```proto + * message MySFixed32 { + * // value must be greater than or equal to 5 [sfixed32.gte] + * sfixed32 value = 1 [(buf.validate.field).sfixed32.gte = 5]; + * + * // value must be greater than or equal to 5 and less than 10 [sfixed32.gte_lt] + * sfixed32 other_value = 2 [(buf.validate.field).sfixed32 = { gte: 5, lt: 10 }]; + * + * // value must be greater than or equal to 10 or less than 5 [sfixed32.gte_lt_exclusive] + * sfixed32 another_value = 3 [(buf.validate.field).sfixed32 = { gte: 10, lt: 5 }]; + * } + * ``` + * + * @generated from protobuf field: sfixed32 gte = 5; + */ + gte: number; + } | { + oneofKind: undefined; + }; + /** + * `in` requires the field value to be equal to one of the specified values. + * If the field value isn't one of the specified values, an error message is + * generated. + * + * ```proto + * message MySFixed32 { + * // value must be in list [1, 2, 3] + * repeated sfixed32 value = 1 (buf.validate.field).sfixed32 = { in: [1, 2, 3] }; + * } + * ``` + * + * @generated from protobuf field: repeated sfixed32 in = 6; + */ + in: number[]; + /** + * `not_in` requires the field value to not be equal to any of the specified + * values. If the field value is one of the specified values, an error + * message is generated. + * + * ```proto + * message MySFixed32 { + * // value must not be in list [1, 2, 3] + * repeated sfixed32 value = 1 (buf.validate.field).sfixed32 = { not_in: [1, 2, 3] }; + * } + * ``` + * + * @generated from protobuf field: repeated sfixed32 not_in = 7; + */ + not_in: number[]; +} +/** + * SFixed64Rules describes the constraints applied to `fixed64` values. + * + * @generated from protobuf message buf.validate.SFixed64Rules + */ +export interface SFixed64Rules { + /** + * `const` requires the field value to exactly match the specified value. If + * the field value doesn't match, an error message is generated. + * + * ```proto + * message MySFixed64 { + * // value must equal 42 + * sfixed64 value = 1 [(buf.validate.field).sfixed64.const = 42]; + * } + * ``` + * + * @generated from protobuf field: optional sfixed64 const = 1; + */ + const?: bigint; + /** + * @generated from protobuf oneof: less_than + */ + less_than: { + oneofKind: "lt"; + /** + * `lt` requires the field value to be less than the specified value (field < + * value). If the field value is equal to or greater than the specified value, + * an error message is generated. + * + * ```proto + * message MySFixed64 { + * // value must be less than 10 + * sfixed64 value = 1 [(buf.validate.field).sfixed64.lt = 10]; + * } + * ``` + * + * @generated from protobuf field: sfixed64 lt = 2; + */ + lt: bigint; + } | { + oneofKind: "lte"; + /** + * `lte` requires the field value to be less than or equal to the specified + * value (field <= value). If the field value is greater than the specified + * value, an error message is generated. + * + * ```proto + * message MySFixed64 { + * // value must be less than or equal to 10 + * sfixed64 value = 1 [(buf.validate.field).sfixed64.lte = 10]; + * } + * ``` + * + * @generated from protobuf field: sfixed64 lte = 3; + */ + lte: bigint; + } | { + oneofKind: undefined; + }; + /** + * @generated from protobuf oneof: greater_than + */ + greater_than: { + oneofKind: "gt"; + /** + * `gt` requires the field value to be greater than the specified value + * (exclusive). If the value of `gt` is larger than a specified `lt` or + * `lte`, the range is reversed, and the field value must be outside the + * specified range. If the field value doesn't meet the required conditions, + * an error message is generated. + * + * ```proto + * message MySFixed64 { + * // value must be greater than 5 [sfixed64.gt] + * sfixed64 value = 1 [(buf.validate.field).sfixed64.gt = 5]; + * + * // value must be greater than 5 and less than 10 [sfixed64.gt_lt] + * sfixed64 other_value = 2 [(buf.validate.field).sfixed64 = { gt: 5, lt: 10 }]; + * + * // value must be greater than 10 or less than 5 [sfixed64.gt_lt_exclusive] + * sfixed64 another_value = 3 [(buf.validate.field).sfixed64 = { gt: 10, lt: 5 }]; + * } + * ``` + * + * @generated from protobuf field: sfixed64 gt = 4; + */ + gt: bigint; + } | { + oneofKind: "gte"; + /** + * `gte` requires the field value to be greater than or equal to the specified + * value (exclusive). If the value of `gte` is larger than a specified `lt` + * or `lte`, the range is reversed, and the field value must be outside the + * specified range. If the field value doesn't meet the required conditions, + * an error message is generated. + * + * ```proto + * message MySFixed64 { + * // value must be greater than or equal to 5 [sfixed64.gte] + * sfixed64 value = 1 [(buf.validate.field).sfixed64.gte = 5]; + * + * // value must be greater than or equal to 5 and less than 10 [sfixed64.gte_lt] + * sfixed64 other_value = 2 [(buf.validate.field).sfixed64 = { gte: 5, lt: 10 }]; + * + * // value must be greater than or equal to 10 or less than 5 [sfixed64.gte_lt_exclusive] + * sfixed64 another_value = 3 [(buf.validate.field).sfixed64 = { gte: 10, lt: 5 }]; + * } + * ``` + * + * @generated from protobuf field: sfixed64 gte = 5; + */ + gte: bigint; + } | { + oneofKind: undefined; + }; + /** + * `in` requires the field value to be equal to one of the specified values. + * If the field value isn't one of the specified values, an error message is + * generated. + * + * ```proto + * message MySFixed64 { + * // value must be in list [1, 2, 3] + * repeated sfixed64 value = 1 (buf.validate.field).sfixed64 = { in: [1, 2, 3] }; + * } + * ``` + * + * @generated from protobuf field: repeated sfixed64 in = 6; + */ + in: bigint[]; + /** + * `not_in` requires the field value to not be equal to any of the specified + * values. If the field value is one of the specified values, an error + * message is generated. + * + * ```proto + * message MySFixed64 { + * // value must not be in list [1, 2, 3] + * repeated sfixed64 value = 1 (buf.validate.field).sfixed64 = { not_in: [1, 2, 3] }; + * } + * ``` + * + * @generated from protobuf field: repeated sfixed64 not_in = 7; + */ + not_in: bigint[]; +} +/** + * BoolRules describes the constraints applied to `bool` values. These rules + * may also be applied to the `google.protobuf.BoolValue` Well-Known-Type. + * + * @generated from protobuf message buf.validate.BoolRules + */ +export interface BoolRules { + /** + * `const` requires the field value to exactly match the specified boolean value. + * If the field value doesn't match, an error message is generated. + * + * ```proto + * message MyBool { + * // value must equal true + * bool value = 1 [(buf.validate.field).bool.const = true]; + * } + * ``` + * + * @generated from protobuf field: optional bool const = 1; + */ + const?: boolean; +} +/** + * StringRules describes the constraints applied to `string` values These + * rules may also be applied to the `google.protobuf.StringValue` Well-Known-Type. + * + * @generated from protobuf message buf.validate.StringRules + */ +export interface StringRules { + /** + * `const` requires the field value to exactly match the specified value. If + * the field value doesn't match, an error message is generated. + * + * ```proto + * message MyString { + * // value must equal `hello` + * string value = 1 [(buf.validate.field).string.const = "hello"]; + * } + * ``` + * + * @generated from protobuf field: optional string const = 1; + */ + const?: string; + /** + * `len` dictates that the field value must have the specified + * number of characters (Unicode code points), which may differ from the number + * of bytes in the string. If the field value does not meet the specified + * length, an error message will be generated. + * + * ```proto + * message MyString { + * // value length must be 5 characters + * string value = 1 [(buf.validate.field).string.len = 5]; + * } + * ``` + * + * @generated from protobuf field: optional uint64 len = 19; + */ + len?: bigint; + /** + * `min_len` specifies that the field value must have at least the specified + * number of characters (Unicode code points), which may differ from the number + * of bytes in the string. If the field value contains fewer characters, an error + * message will be generated. + * + * ```proto + * message MyString { + * // value length must be at least 3 characters + * string value = 1 [(buf.validate.field).string.min_len = 3]; + * } + * ``` + * + * @generated from protobuf field: optional uint64 min_len = 2; + */ + min_len?: bigint; + /** + * `max_len` specifies that the field value must have no more than the specified + * number of characters (Unicode code points), which may differ from the + * number of bytes in the string. If the field value contains more characters, + * an error message will be generated. + * + * ```proto + * message MyString { + * // value length must be at most 10 characters + * string value = 1 [(buf.validate.field).string.max_len = 10]; + * } + * ``` + * + * @generated from protobuf field: optional uint64 max_len = 3; + */ + max_len?: bigint; + /** + * `len_bytes` dictates that the field value must have the specified number of + * bytes. If the field value does not match the specified length in bytes, + * an error message will be generated. + * + * ```proto + * message MyString { + * // value length must be 6 bytes + * string value = 1 [(buf.validate.field).string.len_bytes = 6]; + * } + * ``` + * + * @generated from protobuf field: optional uint64 len_bytes = 20; + */ + len_bytes?: bigint; + /** + * `min_bytes` specifies that the field value must have at least the specified + * number of bytes. If the field value contains fewer bytes, an error message + * will be generated. + * + * ```proto + * message MyString { + * // value length must be at least 4 bytes + * string value = 1 [(buf.validate.field).string.min_bytes = 4]; + * } + * + * ``` + * + * @generated from protobuf field: optional uint64 min_bytes = 4; + */ + min_bytes?: bigint; + /** + * `max_bytes` specifies that the field value must have no more than the + * specified number of bytes. If the field value contains more bytes, an + * error message will be generated. + * + * ```proto + * message MyString { + * // value length must be at most 8 bytes + * string value = 1 [(buf.validate.field).string.max_bytes = 8]; + * } + * ``` + * + * @generated from protobuf field: optional uint64 max_bytes = 5; + */ + max_bytes?: bigint; + /** + * `pattern` specifies that the field value must match the specified + * regular expression (RE2 syntax), with the expression provided without any + * delimiters. If the field value doesn't match the regular expression, an + * error message will be generated. + * + * ```proto + * message MyString { + * // value does not match regex pattern `^[a-zA-Z]//$` + * string value = 1 [(buf.validate.field).string.pattern = "^[a-zA-Z]//$"]; + * } + * ``` + * + * @generated from protobuf field: optional string pattern = 6; + */ + pattern?: string; + /** + * `prefix` specifies that the field value must have the + * specified substring at the beginning of the string. If the field value + * doesn't start with the specified prefix, an error message will be + * generated. + * + * ```proto + * message MyString { + * // value does not have prefix `pre` + * string value = 1 [(buf.validate.field).string.prefix = "pre"]; + * } + * ``` + * + * @generated from protobuf field: optional string prefix = 7; + */ + prefix?: string; + /** + * `suffix` specifies that the field value must have the + * specified substring at the end of the string. If the field value doesn't + * end with the specified suffix, an error message will be generated. + * + * ```proto + * message MyString { + * // value does not have suffix `post` + * string value = 1 [(buf.validate.field).string.suffix = "post"]; + * } + * ``` + * + * @generated from protobuf field: optional string suffix = 8; + */ + suffix?: string; + /** + * `contains` specifies that the field value must have the + * specified substring anywhere in the string. If the field value doesn't + * contain the specified substring, an error message will be generated. + * + * ```proto + * message MyString { + * // value does not contain substring `inside`. + * string value = 1 [(buf.validate.field).string.contains = "inside"]; + * } + * ``` + * + * @generated from protobuf field: optional string contains = 9; + */ + contains?: string; + /** + * `not_contains` specifies that the field value must not have the + * specified substring anywhere in the string. If the field value contains + * the specified substring, an error message will be generated. + * + * ```proto + * message MyString { + * // value contains substring `inside`. + * string value = 1 [(buf.validate.field).string.not_contains = "inside"]; + * } + * ``` + * + * @generated from protobuf field: optional string not_contains = 23; + */ + not_contains?: string; + /** + * `in` specifies that the field value must be equal to one of the specified + * values. If the field value isn't one of the specified values, an error + * message will be generated. + * + * ```proto + * message MyString { + * // value must be in list ["apple", "banana"] + * repeated string value = 1 [(buf.validate.field).string.in = "apple", (buf.validate.field).string.in = "banana"]; + * } + * ``` + * + * @generated from protobuf field: repeated string in = 10; + */ + in: string[]; + /** + * `not_in` specifies that the field value cannot be equal to any + * of the specified values. If the field value is one of the specified values, + * an error message will be generated. + * ```proto + * message MyString { + * // value must not be in list ["orange", "grape"] + * repeated string value = 1 [(buf.validate.field).string.not_in = "orange", (buf.validate.field).string.not_in = "grape"]; + * } + * ``` + * + * @generated from protobuf field: repeated string not_in = 11; + */ + not_in: string[]; + /** + * @generated from protobuf oneof: well_known + */ + well_known: { + oneofKind: "email"; + /** + * `email` specifies that the field value must be a valid email address + * (addr-spec only) as defined by [RFC 5322](https://tools.ietf.org/html/rfc5322#section-3.4.1). + * If the field value isn't a valid email address, an error message will be generated. + * + * ```proto + * message MyString { + * // value must be a valid email address + * string value = 1 [(buf.validate.field).string.email = true]; + * } + * ``` + * + * @generated from protobuf field: bool email = 12; + */ + email: boolean; + } | { + oneofKind: "hostname"; + /** + * `hostname` specifies that the field value must be a valid + * hostname as defined by [RFC 1034](https://tools.ietf.org/html/rfc1034#section-3.5). This constraint doesn't support + * internationalized domain names (IDNs). If the field value isn't a + * valid hostname, an error message will be generated. + * + * ```proto + * message MyString { + * // value must be a valid hostname + * string value = 1 [(buf.validate.field).string.hostname = true]; + * } + * ``` + * + * @generated from protobuf field: bool hostname = 13; + */ + hostname: boolean; + } | { + oneofKind: "ip"; + /** + * `ip` specifies that the field value must be a valid IP + * (v4 or v6) address, without surrounding square brackets for IPv6 addresses. + * If the field value isn't a valid IP address, an error message will be + * generated. + * + * ```proto + * message MyString { + * // value must be a valid IP address + * string value = 1 [(buf.validate.field).string.ip = true]; + * } + * ``` + * + * @generated from protobuf field: bool ip = 14; + */ + ip: boolean; + } | { + oneofKind: "ipv4"; + /** + * `ipv4` specifies that the field value must be a valid IPv4 + * address. If the field value isn't a valid IPv4 address, an error message + * will be generated. + * + * ```proto + * message MyString { + * // value must be a valid IPv4 address + * string value = 1 [(buf.validate.field).string.ipv4 = true]; + * } + * ``` + * + * @generated from protobuf field: bool ipv4 = 15; + */ + ipv4: boolean; + } | { + oneofKind: "ipv6"; + /** + * `ipv6` specifies that the field value must be a valid + * IPv6 address, without surrounding square brackets. If the field value is + * not a valid IPv6 address, an error message will be generated. + * + * ```proto + * message MyString { + * // value must be a valid IPv6 address + * string value = 1 [(buf.validate.field).string.ipv6 = true]; + * } + * ``` + * + * @generated from protobuf field: bool ipv6 = 16; + */ + ipv6: boolean; + } | { + oneofKind: "uri"; + /** + * `uri` specifies that the field value must be a valid, + * absolute URI as defined by [RFC 3986](https://tools.ietf.org/html/rfc3986#section-3). If the field value isn't a valid, + * absolute URI, an error message will be generated. + * + * ```proto + * message MyString { + * // value must be a valid URI + * string value = 1 [(buf.validate.field).string.uri = true]; + * } + * ``` + * + * @generated from protobuf field: bool uri = 17; + */ + uri: boolean; + } | { + oneofKind: "uri_ref"; + /** + * `uri_ref` specifies that the field value must be a valid URI + * as defined by [RFC 3986](https://tools.ietf.org/html/rfc3986#section-3) and may be either relative or absolute. If the + * field value isn't a valid URI, an error message will be generated. + * + * ```proto + * message MyString { + * // value must be a valid URI + * string value = 1 [(buf.validate.field).string.uri_ref = true]; + * } + * ``` + * + * @generated from protobuf field: bool uri_ref = 18; + */ + uri_ref: boolean; + } | { + oneofKind: "address"; + /** + * `address` specifies that the field value must be either a valid hostname + * as defined by [RFC 1034](https://tools.ietf.org/html/rfc1034#section-3.5) + * (which doesn't support internationalized domain names or IDNs) or a valid + * IP (v4 or v6). If the field value isn't a valid hostname or IP, an error + * message will be generated. + * + * ```proto + * message MyString { + * // value must be a valid hostname, or ip address + * string value = 1 [(buf.validate.field).string.address = true]; + * } + * ``` + * + * @generated from protobuf field: bool address = 21; + */ + address: boolean; + } | { + oneofKind: "uuid"; + /** + * `uuid` specifies that the field value must be a valid UUID as defined by + * [RFC 4122](https://tools.ietf.org/html/rfc4122#section-4.1.2). If the + * field value isn't a valid UUID, an error message will be generated. + * + * ```proto + * message MyString { + * // value must be a valid UUID + * string value = 1 [(buf.validate.field).string.uuid = true]; + * } + * ``` + * + * @generated from protobuf field: bool uuid = 22; + */ + uuid: boolean; + } | { + oneofKind: "ip_with_prefixlen"; + /** + * `ip_with_prefixlen` specifies that the field value must be a valid IP (v4 or v6) + * address with prefix length. If the field value isn't a valid IP with prefix + * length, an error message will be generated. + * + * + * ```proto + * message MyString { + * // value must be a valid IP with prefix length + * string value = 1 [(buf.validate.field).string.ip_with_prefixlen = true]; + * } + * ``` + * + * @generated from protobuf field: bool ip_with_prefixlen = 26; + */ + ip_with_prefixlen: boolean; + } | { + oneofKind: "ipv4_with_prefixlen"; + /** + * `ipv4_with_prefixlen` specifies that the field value must be a valid + * IPv4 address with prefix. + * If the field value isn't a valid IPv4 address with prefix length, + * an error message will be generated. + * + * ```proto + * message MyString { + * // value must be a valid IPv4 address with prefix lentgh + * string value = 1 [(buf.validate.field).string.ipv4_with_prefixlen = true]; + * } + * ``` + * + * @generated from protobuf field: bool ipv4_with_prefixlen = 27; + */ + ipv4_with_prefixlen: boolean; + } | { + oneofKind: "ipv6_with_prefixlen"; + /** + * `ipv6_with_prefixlen` specifies that the field value must be a valid + * IPv6 address with prefix length. + * If the field value is not a valid IPv6 address with prefix length, + * an error message will be generated. + * + * ```proto + * message MyString { + * // value must be a valid IPv6 address prefix length + * string value = 1 [(buf.validate.field).string.ipv6_with_prefixlen = true]; + * } + * ``` + * + * @generated from protobuf field: bool ipv6_with_prefixlen = 28; + */ + ipv6_with_prefixlen: boolean; + } | { + oneofKind: "ip_prefix"; + /** + * `ip_prefix` specifies that the field value must be a valid IP (v4 or v6) prefix. + * If the field value isn't a valid IP prefix, an error message will be + * generated. The prefix must have all zeros for the masked bits of the prefix (e.g., + * `127.0.0.0/16`, not `127.0.0.1/16`). + * + * ```proto + * message MyString { + * // value must be a valid IP prefix + * string value = 1 [(buf.validate.field).string.ip_prefix = true]; + * } + * ``` + * + * @generated from protobuf field: bool ip_prefix = 29; + */ + ip_prefix: boolean; + } | { + oneofKind: "ipv4_prefix"; + /** + * `ipv4_prefix` specifies that the field value must be a valid IPv4 + * prefix. If the field value isn't a valid IPv4 prefix, an error message + * will be generated. The prefix must have all zeros for the masked bits of + * the prefix (e.g., `127.0.0.0/16`, not `127.0.0.1/16`). + * + * ```proto + * message MyString { + * // value must be a valid IPv4 prefix + * string value = 1 [(buf.validate.field).string.ipv4_prefix = true]; + * } + * ``` + * + * @generated from protobuf field: bool ipv4_prefix = 30; + */ + ipv4_prefix: boolean; + } | { + oneofKind: "ipv6_prefix"; + /** + * `ipv6_prefix` specifies that the field value must be a valid IPv6 prefix. + * If the field value is not a valid IPv6 prefix, an error message will be + * generated. The prefix must have all zeros for the masked bits of the prefix + * (e.g., `2001:db8::/48`, not `2001:db8::1/48`). + * + * ```proto + * message MyString { + * // value must be a valid IPv6 prefix + * string value = 1 [(buf.validate.field).string.ipv6_prefix = true]; + * } + * ``` + * + * @generated from protobuf field: bool ipv6_prefix = 31; + */ + ipv6_prefix: boolean; + } | { + oneofKind: "well_known_regex"; + /** + * `well_known_regex` specifies a common well-known pattern + * defined as a regex. If the field value doesn't match the well-known + * regex, an error message will be generated. + * + * ```proto + * message MyString { + * // value must be a valid HTTP header value + * string value = 1 [(buf.validate.field).string.well_known_regex = 2]; + * } + * ``` + * + * #### KnownRegex + * + * `well_known_regex` contains some well-known patterns. + * + * | Name | Number | Description | + * |-------------------------------|--------|-------------------------------------------| + * | KNOWN_REGEX_UNSPECIFIED | 0 | | + * | KNOWN_REGEX_HTTP_HEADER_NAME | 1 | HTTP header name as defined by [RFC 7230](https://tools.ietf.org/html/rfc7230#section-3.2) | + * | KNOWN_REGEX_HTTP_HEADER_VALUE | 2 | HTTP header value as defined by [RFC 7230](https://tools.ietf.org/html/rfc7230#section-3.2.4) | + * + * @generated from protobuf field: buf.validate.KnownRegex well_known_regex = 24; + */ + well_known_regex: KnownRegex; + } | { + oneofKind: undefined; + }; + /** + * This applies to regexes `HTTP_HEADER_NAME` and `HTTP_HEADER_VALUE` to + * enable strict header validation. By default, this is true, and HTTP header + * validations are [RFC-compliant](https://tools.ietf.org/html/rfc7230#section-3). Setting to false will enable looser + * validations that only disallow `\r\n\0` characters, which can be used to + * bypass header matching rules. + * + * ```proto + * message MyString { + * // The field `value` must have be a valid HTTP headers, but not enforced with strict rules. + * string value = 1 [(buf.validate.field).string.strict = false]; + * } + * ``` + * + * @generated from protobuf field: optional bool strict = 25; + */ + strict?: boolean; +} +/** + * BytesRules describe the constraints applied to `bytes` values. These rules + * may also be applied to the `google.protobuf.BytesValue` Well-Known-Type. + * + * @generated from protobuf message buf.validate.BytesRules + */ +export interface BytesRules { + /** + * `const` requires the field value to exactly match the specified bytes + * value. If the field value doesn't match, an error message is generated. + * + * ```proto + * message MyBytes { + * // value must be "\x01\x02\x03\x04" + * bytes value = 1 [(buf.validate.field).bytes.const = "\x01\x02\x03\x04"]; + * } + * ``` + * + * @generated from protobuf field: optional bytes const = 1; + */ + const?: Uint8Array; + /** + * `len` requires the field value to have the specified length in bytes. + * If the field value doesn't match, an error message is generated. + * + * ```proto + * message MyBytes { + * // value length must be 4 bytes. + * optional bytes value = 1 [(buf.validate.field).bytes.len = 4]; + * } + * ``` + * + * @generated from protobuf field: optional uint64 len = 13; + */ + len?: bigint; + /** + * `min_len` requires the field value to have at least the specified minimum + * length in bytes. + * If the field value doesn't meet the requirement, an error message is generated. + * + * ```proto + * message MyBytes { + * // value length must be at least 2 bytes. + * optional bytes value = 1 [(buf.validate.field).bytes.min_len = 2]; + * } + * ``` + * + * @generated from protobuf field: optional uint64 min_len = 2; + */ + min_len?: bigint; + /** + * `max_len` requires the field value to have at most the specified maximum + * length in bytes. + * If the field value exceeds the requirement, an error message is generated. + * + * ```proto + * message MyBytes { + * // value must be at most 6 bytes. + * optional bytes value = 1 [(buf.validate.field).bytes.max_len = 6]; + * } + * ``` + * + * @generated from protobuf field: optional uint64 max_len = 3; + */ + max_len?: bigint; + /** + * `pattern` requires the field value to match the specified regular + * expression ([RE2 syntax](https://github.com/google/re2/wiki/Syntax)). + * The value of the field must be valid UTF-8 or validation will fail with a + * runtime error. + * If the field value doesn't match the pattern, an error message is generated. + * + * ```proto + * message MyBytes { + * // value must match regex pattern "^[a-zA-Z0-9]+$". + * optional bytes value = 1 [(buf.validate.field).bytes.pattern = "^[a-zA-Z0-9]+$"]; + * } + * ``` + * + * @generated from protobuf field: optional string pattern = 4; + */ + pattern?: string; + /** + * `prefix` requires the field value to have the specified bytes at the + * beginning of the string. + * If the field value doesn't meet the requirement, an error message is generated. + * + * ```proto + * message MyBytes { + * // value does not have prefix \x01\x02 + * optional bytes value = 1 [(buf.validate.field).bytes.prefix = "\x01\x02"]; + * } + * ``` + * + * @generated from protobuf field: optional bytes prefix = 5; + */ + prefix?: Uint8Array; + /** + * `suffix` requires the field value to have the specified bytes at the end + * of the string. + * If the field value doesn't meet the requirement, an error message is generated. + * + * ```proto + * message MyBytes { + * // value does not have suffix \x03\x04 + * optional bytes value = 1 [(buf.validate.field).bytes.suffix = "\x03\x04"]; + * } + * ``` + * + * @generated from protobuf field: optional bytes suffix = 6; + */ + suffix?: Uint8Array; + /** + * `contains` requires the field value to have the specified bytes anywhere in + * the string. + * If the field value doesn't meet the requirement, an error message is generated. + * + * ```protobuf + * message MyBytes { + * // value does not contain \x02\x03 + * optional bytes value = 1 [(buf.validate.field).bytes.contains = "\x02\x03"]; + * } + * ``` + * + * @generated from protobuf field: optional bytes contains = 7; + */ + contains?: Uint8Array; + /** + * `in` requires the field value to be equal to one of the specified + * values. If the field value doesn't match any of the specified values, an + * error message is generated. + * + * ```protobuf + * message MyBytes { + * // value must in ["\x01\x02", "\x02\x03", "\x03\x04"] + * optional bytes value = 1 [(buf.validate.field).bytes.in = {"\x01\x02", "\x02\x03", "\x03\x04"}]; + * } + * ``` + * + * @generated from protobuf field: repeated bytes in = 8; + */ + in: Uint8Array[]; + /** + * `not_in` requires the field value to be not equal to any of the specified + * values. + * If the field value matches any of the specified values, an error message is + * generated. + * + * ```proto + * message MyBytes { + * // value must not in ["\x01\x02", "\x02\x03", "\x03\x04"] + * optional bytes value = 1 [(buf.validate.field).bytes.not_in = {"\x01\x02", "\x02\x03", "\x03\x04"}]; + * } + * ``` + * + * @generated from protobuf field: repeated bytes not_in = 9; + */ + not_in: Uint8Array[]; + /** + * @generated from protobuf oneof: well_known + */ + well_known: { + oneofKind: "ip"; + /** + * `ip` ensures that the field `value` is a valid IP address (v4 or v6) in byte format. + * If the field value doesn't meet this constraint, an error message is generated. + * + * ```proto + * message MyBytes { + * // value must be a valid IP address + * optional bytes value = 1 [(buf.validate.field).bytes.ip = true]; + * } + * ``` + * + * @generated from protobuf field: bool ip = 10; + */ + ip: boolean; + } | { + oneofKind: "ipv4"; + /** + * `ipv4` ensures that the field `value` is a valid IPv4 address in byte format. + * If the field value doesn't meet this constraint, an error message is generated. + * + * ```proto + * message MyBytes { + * // value must be a valid IPv4 address + * optional bytes value = 1 [(buf.validate.field).bytes.ipv4 = true]; + * } + * ``` + * + * @generated from protobuf field: bool ipv4 = 11; + */ + ipv4: boolean; + } | { + oneofKind: "ipv6"; + /** + * `ipv6` ensures that the field `value` is a valid IPv6 address in byte format. + * If the field value doesn't meet this constraint, an error message is generated. + * ```proto + * message MyBytes { + * // value must be a valid IPv6 address + * optional bytes value = 1 [(buf.validate.field).bytes.ipv6 = true]; + * } + * ``` + * + * @generated from protobuf field: bool ipv6 = 12; + */ + ipv6: boolean; + } | { + oneofKind: undefined; + }; +} +/** + * EnumRules describe the constraints applied to `enum` values. + * + * @generated from protobuf message buf.validate.EnumRules + */ +export interface EnumRules { + /** + * `const` requires the field value to exactly match the specified enum value. + * If the field value doesn't match, an error message is generated. + * + * ```proto + * enum MyEnum { + * MY_ENUM_UNSPECIFIED = 0; + * MY_ENUM_VALUE1 = 1; + * MY_ENUM_VALUE2 = 2; + * } + * + * message MyMessage { + * // The field `value` must be exactly MY_ENUM_VALUE1. + * MyEnum value = 1 [(buf.validate.field).enum.const = 1]; + * } + * ``` + * + * @generated from protobuf field: optional int32 const = 1; + */ + const?: number; + /** + * `defined_only` requires the field value to be one of the defined values for + * this enum, failing on any undefined value. + * + * ```proto + * enum MyEnum { + * MY_ENUM_UNSPECIFIED = 0; + * MY_ENUM_VALUE1 = 1; + * MY_ENUM_VALUE2 = 2; + * } + * + * message MyMessage { + * // The field `value` must be a defined value of MyEnum. + * MyEnum value = 1 [(buf.validate.field).enum.defined_only = true]; + * } + * ``` + * + * @generated from protobuf field: optional bool defined_only = 2; + */ + defined_only?: boolean; + /** + * `in` requires the field value to be equal to one of the + * specified enum values. If the field value doesn't match any of the + * specified values, an error message is generated. + * + * ```proto + * enum MyEnum { + * MY_ENUM_UNSPECIFIED = 0; + * MY_ENUM_VALUE1 = 1; + * MY_ENUM_VALUE2 = 2; + * } + * + * message MyMessage { + * // The field `value` must be equal to one of the specified values. + * MyEnum value = 1 [(buf.validate.field).enum.in = {1, 2}]; + * } + * ``` + * + * @generated from protobuf field: repeated int32 in = 3; + */ + in: number[]; + /** + * `not_in` requires the field value to be not equal to any of the + * specified enum values. If the field value matches one of the specified + * values, an error message is generated. + * + * ```proto + * enum MyEnum { + * MY_ENUM_UNSPECIFIED = 0; + * MY_ENUM_VALUE1 = 1; + * MY_ENUM_VALUE2 = 2; + * } + * + * message MyMessage { + * // The field `value` must not be equal to any of the specified values. + * MyEnum value = 1 [(buf.validate.field).enum.not_in = {1, 2}]; + * } + * ``` + * + * @generated from protobuf field: repeated int32 not_in = 4; + */ + not_in: number[]; +} +/** + * RepeatedRules describe the constraints applied to `repeated` values. + * + * @generated from protobuf message buf.validate.RepeatedRules + */ +export interface RepeatedRules { + /** + * `min_items` requires that this field must contain at least the specified + * minimum number of items. + * + * Note that `min_items = 1` is equivalent to setting a field as `required`. + * + * ```proto + * message MyRepeated { + * // value must contain at least 2 items + * repeated string value = 1 [(buf.validate.field).repeated.min_items = 2]; + * } + * ``` + * + * @generated from protobuf field: optional uint64 min_items = 1; + */ + min_items?: bigint; + /** + * `max_items` denotes that this field must not exceed a + * certain number of items as the upper limit. If the field contains more + * items than specified, an error message will be generated, requiring the + * field to maintain no more than the specified number of items. + * + * ```proto + * message MyRepeated { + * // value must contain no more than 3 item(s) + * repeated string value = 1 [(buf.validate.field).repeated.max_items = 3]; + * } + * ``` + * + * @generated from protobuf field: optional uint64 max_items = 2; + */ + max_items?: bigint; + /** + * `unique` indicates that all elements in this field must + * be unique. This constraint is strictly applicable to scalar and enum + * types, with message types not being supported. + * + * ```proto + * message MyRepeated { + * // repeated value must contain unique items + * repeated string value = 1 [(buf.validate.field).repeated.unique = true]; + * } + * ``` + * + * @generated from protobuf field: optional bool unique = 3; + */ + unique?: boolean; + /** + * `items` details the constraints to be applied to each item + * in the field. Even for repeated message fields, validation is executed + * against each item unless skip is explicitly specified. + * + * ```proto + * message MyRepeated { + * // The items in the field `value` must follow the specified constraints. + * repeated string value = 1 [(buf.validate.field).repeated.items = { + * string: { + * min_len: 3 + * max_len: 10 + * } + * }]; + * } + * ``` + * + * @generated from protobuf field: optional buf.validate.FieldConstraints items = 4; + */ + items?: FieldConstraints; +} +/** + * MapRules describe the constraints applied to `map` values. + * + * @generated from protobuf message buf.validate.MapRules + */ +export interface MapRules { + /** + * Specifies the minimum number of key-value pairs allowed. If the field has + * fewer key-value pairs than specified, an error message is generated. + * + * ```proto + * message MyMap { + * // The field `value` must have at least 2 key-value pairs. + * map value = 1 [(buf.validate.field).map.min_pairs = 2]; + * } + * ``` + * + * @generated from protobuf field: optional uint64 min_pairs = 1; + */ + min_pairs?: bigint; + /** + * Specifies the maximum number of key-value pairs allowed. If the field has + * more key-value pairs than specified, an error message is generated. + * + * ```proto + * message MyMap { + * // The field `value` must have at most 3 key-value pairs. + * map value = 1 [(buf.validate.field).map.max_pairs = 3]; + * } + * ``` + * + * @generated from protobuf field: optional uint64 max_pairs = 2; + */ + max_pairs?: bigint; + /** + * Specifies the constraints to be applied to each key in the field. + * + * ```proto + * message MyMap { + * // The keys in the field `value` must follow the specified constraints. + * map value = 1 [(buf.validate.field).map.keys = { + * string: { + * min_len: 3 + * max_len: 10 + * } + * }]; + * } + * ``` + * + * @generated from protobuf field: optional buf.validate.FieldConstraints keys = 4; + */ + keys?: FieldConstraints; + /** + * Specifies the constraints to be applied to the value of each key in the + * field. Message values will still have their validations evaluated unless + * skip is specified here. + * + * ```proto + * message MyMap { + * // The values in the field `value` must follow the specified constraints. + * map value = 1 [(buf.validate.field).map.values = { + * string: { + * min_len: 5 + * max_len: 20 + * } + * }]; + * } + * ``` + * + * @generated from protobuf field: optional buf.validate.FieldConstraints values = 5; + */ + values?: FieldConstraints; +} +/** + * AnyRules describe constraints applied exclusively to the `google.protobuf.Any` well-known type. + * + * @generated from protobuf message buf.validate.AnyRules + */ +export interface AnyRules { + /** + * `in` requires the field's `type_url` to be equal to one of the + * specified values. If it doesn't match any of the specified values, an error + * message is generated. + * + * ```proto + * message MyAny { + * // The `value` field must have a `type_url` equal to one of the specified values. + * google.protobuf.Any value = 1 [(buf.validate.field).any.in = ["type.googleapis.com/MyType1", "type.googleapis.com/MyType2"]]; + * } + * ``` + * + * @generated from protobuf field: repeated string in = 2; + */ + in: string[]; + /** + * requires the field's type_url to be not equal to any of the specified values. If it matches any of the specified values, an error message is generated. + * + * ```proto + * message MyAny { + * // The field `value` must not have a `type_url` equal to any of the specified values. + * google.protobuf.Any value = 1 [(buf.validate.field).any.not_in = ["type.googleapis.com/ForbiddenType1", "type.googleapis.com/ForbiddenType2"]]; + * } + * ``` + * + * @generated from protobuf field: repeated string not_in = 3; + */ + not_in: string[]; +} +/** + * DurationRules describe the constraints applied exclusively to the `google.protobuf.Duration` well-known type. + * + * @generated from protobuf message buf.validate.DurationRules + */ +export interface DurationRules { + /** + * `const` dictates that the field must match the specified value of the `google.protobuf.Duration` type exactly. + * If the field's value deviates from the specified value, an error message + * will be generated. + * + * ```proto + * message MyDuration { + * // value must equal 5s + * google.protobuf.Duration value = 1 [(buf.validate.field).duration.const = "5s"]; + * } + * ``` + * + * @generated from protobuf field: optional google.protobuf.Duration const = 2; + */ + const?: Duration; + /** + * @generated from protobuf oneof: less_than + */ + less_than: { + oneofKind: "lt"; + /** + * `lt` stipulates that the field must be less than the specified value of the `google.protobuf.Duration` type, + * exclusive. If the field's value is greater than or equal to the specified + * value, an error message will be generated. + * + * ```proto + * message MyDuration { + * // value must be less than 5s + * google.protobuf.Duration value = 1 [(buf.validate.field).duration.lt = "5s"]; + * } + * ``` + * + * @generated from protobuf field: google.protobuf.Duration lt = 3; + */ + lt: Duration; + } | { + oneofKind: "lte"; + /** + * `lte` indicates that the field must be less than or equal to the specified + * value of the `google.protobuf.Duration` type, inclusive. If the field's value is greater than the specified value, + * an error message will be generated. + * + * ```proto + * message MyDuration { + * // value must be less than or equal to 10s + * google.protobuf.Duration value = 1 [(buf.validate.field).duration.lte = "10s"]; + * } + * ``` + * + * @generated from protobuf field: google.protobuf.Duration lte = 4; + */ + lte: Duration; + } | { + oneofKind: undefined; + }; + /** + * @generated from protobuf oneof: greater_than + */ + greater_than: { + oneofKind: "gt"; + /** + * `gt` requires the duration field value to be greater than the specified + * value (exclusive). If the value of `gt` is larger than a specified `lt` + * or `lte`, the range is reversed, and the field value must be outside the + * specified range. If the field value doesn't meet the required conditions, + * an error message is generated. + * + * ```proto + * message MyDuration { + * // duration must be greater than 5s [duration.gt] + * google.protobuf.Duration value = 1 [(buf.validate.field).duration.gt = { seconds: 5 }]; + * + * // duration must be greater than 5s and less than 10s [duration.gt_lt] + * google.protobuf.Duration another_value = 2 [(buf.validate.field).duration = { gt: { seconds: 5 }, lt: { seconds: 10 } }]; + * + * // duration must be greater than 10s or less than 5s [duration.gt_lt_exclusive] + * google.protobuf.Duration other_value = 3 [(buf.validate.field).duration = { gt: { seconds: 10 }, lt: { seconds: 5 } }]; + * } + * ``` + * + * @generated from protobuf field: google.protobuf.Duration gt = 5; + */ + gt: Duration; + } | { + oneofKind: "gte"; + /** + * `gte` requires the duration field value to be greater than or equal to the + * specified value (exclusive). If the value of `gte` is larger than a + * specified `lt` or `lte`, the range is reversed, and the field value must + * be outside the specified range. If the field value doesn't meet the + * required conditions, an error message is generated. + * + * ```proto + * message MyDuration { + * // duration must be greater than or equal to 5s [duration.gte] + * google.protobuf.Duration value = 1 [(buf.validate.field).duration.gte = { seconds: 5 }]; + * + * // duration must be greater than or equal to 5s and less than 10s [duration.gte_lt] + * google.protobuf.Duration another_value = 2 [(buf.validate.field).duration = { gte: { seconds: 5 }, lt: { seconds: 10 } }]; + * + * // duration must be greater than or equal to 10s or less than 5s [duration.gte_lt_exclusive] + * google.protobuf.Duration other_value = 3 [(buf.validate.field).duration = { gte: { seconds: 10 }, lt: { seconds: 5 } }]; + * } + * ``` + * + * @generated from protobuf field: google.protobuf.Duration gte = 6; + */ + gte: Duration; + } | { + oneofKind: undefined; + }; + /** + * `in` asserts that the field must be equal to one of the specified values of the `google.protobuf.Duration` type. + * If the field's value doesn't correspond to any of the specified values, + * an error message will be generated. + * + * ```proto + * message MyDuration { + * // value must be in list [1s, 2s, 3s] + * google.protobuf.Duration value = 1 [(buf.validate.field).duration.in = ["1s", "2s", "3s"]]; + * } + * ``` + * + * @generated from protobuf field: repeated google.protobuf.Duration in = 7; + */ + in: Duration[]; + /** + * `not_in` denotes that the field must not be equal to + * any of the specified values of the `google.protobuf.Duration` type. + * If the field's value matches any of these values, an error message will be + * generated. + * + * ```proto + * message MyDuration { + * // value must not be in list [1s, 2s, 3s] + * google.protobuf.Duration value = 1 [(buf.validate.field).duration.not_in = ["1s", "2s", "3s"]]; + * } + * ``` + * + * @generated from protobuf field: repeated google.protobuf.Duration not_in = 8; + */ + not_in: Duration[]; +} +/** + * TimestampRules describe the constraints applied exclusively to the `google.protobuf.Timestamp` well-known type. + * + * @generated from protobuf message buf.validate.TimestampRules + */ +export interface TimestampRules { + /** + * `const` dictates that this field, of the `google.protobuf.Timestamp` type, must exactly match the specified value. If the field value doesn't correspond to the specified timestamp, an error message will be generated. + * + * ```proto + * message MyTimestamp { + * // value must equal 2023-05-03T10:00:00Z + * google.protobuf.Timestamp created_at = 1 [(buf.validate.field).timestamp.const = {seconds: 1727998800}]; + * } + * ``` + * + * @generated from protobuf field: optional google.protobuf.Timestamp const = 2; + */ + const?: Timestamp; + /** + * @generated from protobuf oneof: less_than + */ + less_than: { + oneofKind: "lt"; + /** + * requires the duration field value to be less than the specified value (field < value). If the field value doesn't meet the required conditions, an error message is generated. + * + * ```proto + * message MyDuration { + * // duration must be less than 'P3D' [duration.lt] + * google.protobuf.Duration value = 1 [(buf.validate.field).duration.lt = { seconds: 259200 }]; + * } + * ``` + * + * @generated from protobuf field: google.protobuf.Timestamp lt = 3; + */ + lt: Timestamp; + } | { + oneofKind: "lte"; + /** + * requires the timestamp field value to be less than or equal to the specified value (field <= value). If the field value doesn't meet the required conditions, an error message is generated. + * + * ```proto + * message MyTimestamp { + * // timestamp must be less than or equal to '2023-05-14T00:00:00Z' [timestamp.lte] + * google.protobuf.Timestamp value = 1 [(buf.validate.field).timestamp.lte = { seconds: 1678867200 }]; + * } + * ``` + * + * @generated from protobuf field: google.protobuf.Timestamp lte = 4; + */ + lte: Timestamp; + } | { + oneofKind: "lt_now"; + /** + * `lt_now` specifies that this field, of the `google.protobuf.Timestamp` type, must be less than the current time. `lt_now` can only be used with the `within` rule. + * + * ```proto + * message MyTimestamp { + * // value must be less than now + * google.protobuf.Timestamp created_at = 1 [(buf.validate.field).timestamp.lt_now = true]; + * } + * ``` + * + * @generated from protobuf field: bool lt_now = 7; + */ + lt_now: boolean; + } | { + oneofKind: undefined; + }; + /** + * @generated from protobuf oneof: greater_than + */ + greater_than: { + oneofKind: "gt"; + /** + * `gt` requires the timestamp field value to be greater than the specified + * value (exclusive). If the value of `gt` is larger than a specified `lt` + * or `lte`, the range is reversed, and the field value must be outside the + * specified range. If the field value doesn't meet the required conditions, + * an error message is generated. + * + * ```proto + * message MyTimestamp { + * // timestamp must be greater than '2023-01-01T00:00:00Z' [timestamp.gt] + * google.protobuf.Timestamp value = 1 [(buf.validate.field).timestamp.gt = { seconds: 1672444800 }]; + * + * // timestamp must be greater than '2023-01-01T00:00:00Z' and less than '2023-01-02T00:00:00Z' [timestamp.gt_lt] + * google.protobuf.Timestamp another_value = 2 [(buf.validate.field).timestamp = { gt: { seconds: 1672444800 }, lt: { seconds: 1672531200 } }]; + * + * // timestamp must be greater than '2023-01-02T00:00:00Z' or less than '2023-01-01T00:00:00Z' [timestamp.gt_lt_exclusive] + * google.protobuf.Timestamp other_value = 3 [(buf.validate.field).timestamp = { gt: { seconds: 1672531200 }, lt: { seconds: 1672444800 } }]; + * } + * ``` + * + * @generated from protobuf field: google.protobuf.Timestamp gt = 5; + */ + gt: Timestamp; + } | { + oneofKind: "gte"; + /** + * `gte` requires the timestamp field value to be greater than or equal to the + * specified value (exclusive). If the value of `gte` is larger than a + * specified `lt` or `lte`, the range is reversed, and the field value + * must be outside the specified range. If the field value doesn't meet + * the required conditions, an error message is generated. + * + * ```proto + * message MyTimestamp { + * // timestamp must be greater than or equal to '2023-01-01T00:00:00Z' [timestamp.gte] + * google.protobuf.Timestamp value = 1 [(buf.validate.field).timestamp.gte = { seconds: 1672444800 }]; + * + * // timestamp must be greater than or equal to '2023-01-01T00:00:00Z' and less than '2023-01-02T00:00:00Z' [timestamp.gte_lt] + * google.protobuf.Timestamp another_value = 2 [(buf.validate.field).timestamp = { gte: { seconds: 1672444800 }, lt: { seconds: 1672531200 } }]; + * + * // timestamp must be greater than or equal to '2023-01-02T00:00:00Z' or less than '2023-01-01T00:00:00Z' [timestamp.gte_lt_exclusive] + * google.protobuf.Timestamp other_value = 3 [(buf.validate.field).timestamp = { gte: { seconds: 1672531200 }, lt: { seconds: 1672444800 } }]; + * } + * ``` + * + * @generated from protobuf field: google.protobuf.Timestamp gte = 6; + */ + gte: Timestamp; + } | { + oneofKind: "gt_now"; + /** + * `gt_now` specifies that this field, of the `google.protobuf.Timestamp` type, must be greater than the current time. `gt_now` can only be used with the `within` rule. + * + * ```proto + * message MyTimestamp { + * // value must be greater than now + * google.protobuf.Timestamp created_at = 1 [(buf.validate.field).timestamp.gt_now = true]; + * } + * ``` + * + * @generated from protobuf field: bool gt_now = 8; + */ + gt_now: boolean; + } | { + oneofKind: undefined; + }; + /** + * `within` specifies that this field, of the `google.protobuf.Timestamp` type, must be within the specified duration of the current time. If the field value isn't within the duration, an error message is generated. + * + * ```proto + * message MyTimestamp { + * // value must be within 1 hour of now + * google.protobuf.Timestamp created_at = 1 [(buf.validate.field).timestamp.within = {seconds: 3600}]; + * } + * ``` + * + * @generated from protobuf field: optional google.protobuf.Duration within = 9; + */ + within?: Duration; +} +/** + * WellKnownRegex contain some well-known patterns. + * + * @generated from protobuf enum buf.validate.KnownRegex + */ +export declare enum KnownRegex { + /** + * @generated from protobuf enum value: KNOWN_REGEX_UNSPECIFIED = 0; + */ + KNOWN_REGEX_UNSPECIFIED = 0, + /** + * HTTP header name as defined by [RFC 7230](https://tools.ietf.org/html/rfc7230#section-3.2). + * + * @generated from protobuf enum value: KNOWN_REGEX_HTTP_HEADER_NAME = 1; + */ + KNOWN_REGEX_HTTP_HEADER_NAME = 1, + /** + * HTTP header value as defined by [RFC 7230](https://tools.ietf.org/html/rfc7230#section-3.2.4). + * + * @generated from protobuf enum value: KNOWN_REGEX_HTTP_HEADER_VALUE = 2; + */ + KNOWN_REGEX_HTTP_HEADER_VALUE = 2 +} +declare class MessageConstraints$Type extends MessageType { + constructor(); + create(value?: PartialMessage): MessageConstraints; + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: MessageConstraints): MessageConstraints; + internalBinaryWrite(message: MessageConstraints, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter; +} +/** + * @generated MessageType for protobuf message buf.validate.MessageConstraints + */ +export declare const MessageConstraints: MessageConstraints$Type; +declare class OneofConstraints$Type extends MessageType { + constructor(); + create(value?: PartialMessage): OneofConstraints; + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: OneofConstraints): OneofConstraints; + internalBinaryWrite(message: OneofConstraints, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter; +} +/** + * @generated MessageType for protobuf message buf.validate.OneofConstraints + */ +export declare const OneofConstraints: OneofConstraints$Type; +declare class FieldConstraints$Type extends MessageType { + constructor(); + create(value?: PartialMessage): FieldConstraints; + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: FieldConstraints): FieldConstraints; + internalBinaryWrite(message: FieldConstraints, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter; +} +/** + * @generated MessageType for protobuf message buf.validate.FieldConstraints + */ +export declare const FieldConstraints: FieldConstraints$Type; +declare class FloatRules$Type extends MessageType { + constructor(); + create(value?: PartialMessage): FloatRules; + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: FloatRules): FloatRules; + internalBinaryWrite(message: FloatRules, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter; +} +/** + * @generated MessageType for protobuf message buf.validate.FloatRules + */ +export declare const FloatRules: FloatRules$Type; +declare class DoubleRules$Type extends MessageType { + constructor(); + create(value?: PartialMessage): DoubleRules; + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: DoubleRules): DoubleRules; + internalBinaryWrite(message: DoubleRules, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter; +} +/** + * @generated MessageType for protobuf message buf.validate.DoubleRules + */ +export declare const DoubleRules: DoubleRules$Type; +declare class Int32Rules$Type extends MessageType { + constructor(); + create(value?: PartialMessage): Int32Rules; + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Int32Rules): Int32Rules; + internalBinaryWrite(message: Int32Rules, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter; +} +/** + * @generated MessageType for protobuf message buf.validate.Int32Rules + */ +export declare const Int32Rules: Int32Rules$Type; +declare class Int64Rules$Type extends MessageType { + constructor(); + create(value?: PartialMessage): Int64Rules; + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Int64Rules): Int64Rules; + internalBinaryWrite(message: Int64Rules, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter; +} +/** + * @generated MessageType for protobuf message buf.validate.Int64Rules + */ +export declare const Int64Rules: Int64Rules$Type; +declare class UInt32Rules$Type extends MessageType { + constructor(); + create(value?: PartialMessage): UInt32Rules; + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: UInt32Rules): UInt32Rules; + internalBinaryWrite(message: UInt32Rules, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter; +} +/** + * @generated MessageType for protobuf message buf.validate.UInt32Rules + */ +export declare const UInt32Rules: UInt32Rules$Type; +declare class UInt64Rules$Type extends MessageType { + constructor(); + create(value?: PartialMessage): UInt64Rules; + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: UInt64Rules): UInt64Rules; + internalBinaryWrite(message: UInt64Rules, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter; +} +/** + * @generated MessageType for protobuf message buf.validate.UInt64Rules + */ +export declare const UInt64Rules: UInt64Rules$Type; +declare class SInt32Rules$Type extends MessageType { + constructor(); + create(value?: PartialMessage): SInt32Rules; + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: SInt32Rules): SInt32Rules; + internalBinaryWrite(message: SInt32Rules, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter; +} +/** + * @generated MessageType for protobuf message buf.validate.SInt32Rules + */ +export declare const SInt32Rules: SInt32Rules$Type; +declare class SInt64Rules$Type extends MessageType { + constructor(); + create(value?: PartialMessage): SInt64Rules; + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: SInt64Rules): SInt64Rules; + internalBinaryWrite(message: SInt64Rules, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter; +} +/** + * @generated MessageType for protobuf message buf.validate.SInt64Rules + */ +export declare const SInt64Rules: SInt64Rules$Type; +declare class Fixed32Rules$Type extends MessageType { + constructor(); + create(value?: PartialMessage): Fixed32Rules; + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Fixed32Rules): Fixed32Rules; + internalBinaryWrite(message: Fixed32Rules, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter; +} +/** + * @generated MessageType for protobuf message buf.validate.Fixed32Rules + */ +export declare const Fixed32Rules: Fixed32Rules$Type; +declare class Fixed64Rules$Type extends MessageType { + constructor(); + create(value?: PartialMessage): Fixed64Rules; + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Fixed64Rules): Fixed64Rules; + internalBinaryWrite(message: Fixed64Rules, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter; +} +/** + * @generated MessageType for protobuf message buf.validate.Fixed64Rules + */ +export declare const Fixed64Rules: Fixed64Rules$Type; +declare class SFixed32Rules$Type extends MessageType { + constructor(); + create(value?: PartialMessage): SFixed32Rules; + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: SFixed32Rules): SFixed32Rules; + internalBinaryWrite(message: SFixed32Rules, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter; +} +/** + * @generated MessageType for protobuf message buf.validate.SFixed32Rules + */ +export declare const SFixed32Rules: SFixed32Rules$Type; +declare class SFixed64Rules$Type extends MessageType { + constructor(); + create(value?: PartialMessage): SFixed64Rules; + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: SFixed64Rules): SFixed64Rules; + internalBinaryWrite(message: SFixed64Rules, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter; +} +/** + * @generated MessageType for protobuf message buf.validate.SFixed64Rules + */ +export declare const SFixed64Rules: SFixed64Rules$Type; +declare class BoolRules$Type extends MessageType { + constructor(); + create(value?: PartialMessage): BoolRules; + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: BoolRules): BoolRules; + internalBinaryWrite(message: BoolRules, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter; +} +/** + * @generated MessageType for protobuf message buf.validate.BoolRules + */ +export declare const BoolRules: BoolRules$Type; +declare class StringRules$Type extends MessageType { + constructor(); + create(value?: PartialMessage): StringRules; + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: StringRules): StringRules; + internalBinaryWrite(message: StringRules, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter; +} +/** + * @generated MessageType for protobuf message buf.validate.StringRules + */ +export declare const StringRules: StringRules$Type; +declare class BytesRules$Type extends MessageType { + constructor(); + create(value?: PartialMessage): BytesRules; + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: BytesRules): BytesRules; + internalBinaryWrite(message: BytesRules, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter; +} +/** + * @generated MessageType for protobuf message buf.validate.BytesRules + */ +export declare const BytesRules: BytesRules$Type; +declare class EnumRules$Type extends MessageType { + constructor(); + create(value?: PartialMessage): EnumRules; + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: EnumRules): EnumRules; + internalBinaryWrite(message: EnumRules, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter; +} +/** + * @generated MessageType for protobuf message buf.validate.EnumRules + */ +export declare const EnumRules: EnumRules$Type; +declare class RepeatedRules$Type extends MessageType { + constructor(); + create(value?: PartialMessage): RepeatedRules; + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: RepeatedRules): RepeatedRules; + internalBinaryWrite(message: RepeatedRules, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter; +} +/** + * @generated MessageType for protobuf message buf.validate.RepeatedRules + */ +export declare const RepeatedRules: RepeatedRules$Type; +declare class MapRules$Type extends MessageType { + constructor(); + create(value?: PartialMessage): MapRules; + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: MapRules): MapRules; + internalBinaryWrite(message: MapRules, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter; +} +/** + * @generated MessageType for protobuf message buf.validate.MapRules + */ +export declare const MapRules: MapRules$Type; +declare class AnyRules$Type extends MessageType { + constructor(); + create(value?: PartialMessage): AnyRules; + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: AnyRules): AnyRules; + internalBinaryWrite(message: AnyRules, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter; +} +/** + * @generated MessageType for protobuf message buf.validate.AnyRules + */ +export declare const AnyRules: AnyRules$Type; +declare class DurationRules$Type extends MessageType { + constructor(); + create(value?: PartialMessage): DurationRules; + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: DurationRules): DurationRules; + internalBinaryWrite(message: DurationRules, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter; +} +/** + * @generated MessageType for protobuf message buf.validate.DurationRules + */ +export declare const DurationRules: DurationRules$Type; +declare class TimestampRules$Type extends MessageType { + constructor(); + create(value?: PartialMessage): TimestampRules; + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: TimestampRules): TimestampRules; + internalBinaryWrite(message: TimestampRules, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter; +} +/** + * @generated MessageType for protobuf message buf.validate.TimestampRules + */ +export declare const TimestampRules: TimestampRules$Type; +export {}; diff --git a/src/buf/validate/validate_pb.js b/src/buf/validate/validate_pb.js index 50b446d..a03f439 100644 --- a/src/buf/validate/validate_pb.js +++ b/src/buf/validate/validate_pb.js @@ -1,13203 +1,2880 @@ -// source: buf/validate/validate.proto -/** - * @fileoverview - * @enhanceable - * @suppress {missingRequire} reports error on implicit type usages. - * @suppress {messageConventions} JS Compiler reports an error if a variable or - * field starts with 'MSG_' and isn't a translatable message. - * @public - */ -// GENERATED CODE -- DO NOT EDIT! /* eslint-disable */ +// @generated by protobuf-ts 2.9.3 with parameter add_pb_suffix,client_grpc1,generate_dependencies,keep_enum_prefix,ts_nocheck,use_proto_field_name,output_javascript,output_legacy_commonjs,eslint_disable +// @generated from protobuf file "buf/validate/validate.proto" (package "buf.validate", syntax proto3) +// tslint:disable // @ts-nocheck - -var jspb = require('google-protobuf'); -var goog = jspb; -var global = - (typeof globalThis !== 'undefined' && globalThis) || - (typeof window !== 'undefined' && window) || - (typeof global !== 'undefined' && global) || - (typeof self !== 'undefined' && self) || - (function () { return this; }).call(null) || - Function('return this')(); - -var buf_validate_expression_pb = require('../../buf/validate/expression_pb.js'); -goog.object.extend(proto, buf_validate_expression_pb); -var buf_validate_priv_private_pb = require('../../buf/validate/priv/private_pb.js'); -goog.object.extend(proto, buf_validate_priv_private_pb); -var google_protobuf_descriptor_pb = require('google-protobuf/google/protobuf/descriptor_pb.js'); -goog.object.extend(proto, google_protobuf_descriptor_pb); -var google_protobuf_duration_pb = require('google-protobuf/google/protobuf/duration_pb.js'); -goog.object.extend(proto, google_protobuf_duration_pb); -var google_protobuf_timestamp_pb = require('google-protobuf/google/protobuf/timestamp_pb.js'); -goog.object.extend(proto, google_protobuf_timestamp_pb); -goog.exportSymbol('proto.buf.validate.AnyRules', null, global); -goog.exportSymbol('proto.buf.validate.BoolRules', null, global); -goog.exportSymbol('proto.buf.validate.BytesRules', null, global); -goog.exportSymbol('proto.buf.validate.BytesRules.WellKnownCase', null, global); -goog.exportSymbol('proto.buf.validate.DoubleRules', null, global); -goog.exportSymbol('proto.buf.validate.DoubleRules.GreaterThanCase', null, global); -goog.exportSymbol('proto.buf.validate.DoubleRules.LessThanCase', null, global); -goog.exportSymbol('proto.buf.validate.DurationRules', null, global); -goog.exportSymbol('proto.buf.validate.DurationRules.GreaterThanCase', null, global); -goog.exportSymbol('proto.buf.validate.DurationRules.LessThanCase', null, global); -goog.exportSymbol('proto.buf.validate.EnumRules', null, global); -goog.exportSymbol('proto.buf.validate.FieldConstraints', null, global); -goog.exportSymbol('proto.buf.validate.FieldConstraints.TypeCase', null, global); -goog.exportSymbol('proto.buf.validate.Fixed32Rules', null, global); -goog.exportSymbol('proto.buf.validate.Fixed32Rules.GreaterThanCase', null, global); -goog.exportSymbol('proto.buf.validate.Fixed32Rules.LessThanCase', null, global); -goog.exportSymbol('proto.buf.validate.Fixed64Rules', null, global); -goog.exportSymbol('proto.buf.validate.Fixed64Rules.GreaterThanCase', null, global); -goog.exportSymbol('proto.buf.validate.Fixed64Rules.LessThanCase', null, global); -goog.exportSymbol('proto.buf.validate.FloatRules', null, global); -goog.exportSymbol('proto.buf.validate.FloatRules.GreaterThanCase', null, global); -goog.exportSymbol('proto.buf.validate.FloatRules.LessThanCase', null, global); -goog.exportSymbol('proto.buf.validate.Int32Rules', null, global); -goog.exportSymbol('proto.buf.validate.Int32Rules.GreaterThanCase', null, global); -goog.exportSymbol('proto.buf.validate.Int32Rules.LessThanCase', null, global); -goog.exportSymbol('proto.buf.validate.Int64Rules', null, global); -goog.exportSymbol('proto.buf.validate.Int64Rules.GreaterThanCase', null, global); -goog.exportSymbol('proto.buf.validate.Int64Rules.LessThanCase', null, global); -goog.exportSymbol('proto.buf.validate.KnownRegex', null, global); -goog.exportSymbol('proto.buf.validate.MapRules', null, global); -goog.exportSymbol('proto.buf.validate.MessageConstraints', null, global); -goog.exportSymbol('proto.buf.validate.OneofConstraints', null, global); -goog.exportSymbol('proto.buf.validate.RepeatedRules', null, global); -goog.exportSymbol('proto.buf.validate.SFixed32Rules', null, global); -goog.exportSymbol('proto.buf.validate.SFixed32Rules.GreaterThanCase', null, global); -goog.exportSymbol('proto.buf.validate.SFixed32Rules.LessThanCase', null, global); -goog.exportSymbol('proto.buf.validate.SFixed64Rules', null, global); -goog.exportSymbol('proto.buf.validate.SFixed64Rules.GreaterThanCase', null, global); -goog.exportSymbol('proto.buf.validate.SFixed64Rules.LessThanCase', null, global); -goog.exportSymbol('proto.buf.validate.SInt32Rules', null, global); -goog.exportSymbol('proto.buf.validate.SInt32Rules.GreaterThanCase', null, global); -goog.exportSymbol('proto.buf.validate.SInt32Rules.LessThanCase', null, global); -goog.exportSymbol('proto.buf.validate.SInt64Rules', null, global); -goog.exportSymbol('proto.buf.validate.SInt64Rules.GreaterThanCase', null, global); -goog.exportSymbol('proto.buf.validate.SInt64Rules.LessThanCase', null, global); -goog.exportSymbol('proto.buf.validate.StringRules', null, global); -goog.exportSymbol('proto.buf.validate.StringRules.WellKnownCase', null, global); -goog.exportSymbol('proto.buf.validate.TimestampRules', null, global); -goog.exportSymbol('proto.buf.validate.TimestampRules.GreaterThanCase', null, global); -goog.exportSymbol('proto.buf.validate.TimestampRules.LessThanCase', null, global); -goog.exportSymbol('proto.buf.validate.UInt32Rules', null, global); -goog.exportSymbol('proto.buf.validate.UInt32Rules.GreaterThanCase', null, global); -goog.exportSymbol('proto.buf.validate.UInt32Rules.LessThanCase', null, global); -goog.exportSymbol('proto.buf.validate.UInt64Rules', null, global); -goog.exportSymbol('proto.buf.validate.UInt64Rules.GreaterThanCase', null, global); -goog.exportSymbol('proto.buf.validate.UInt64Rules.LessThanCase', null, global); -goog.exportSymbol('proto.buf.validate.field', null, global); -goog.exportSymbol('proto.buf.validate.message', null, global); -goog.exportSymbol('proto.buf.validate.oneof', null, global); -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.buf.validate.MessageConstraints = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.buf.validate.MessageConstraints.repeatedFields_, null); -}; -goog.inherits(proto.buf.validate.MessageConstraints, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.buf.validate.MessageConstraints.displayName = 'proto.buf.validate.MessageConstraints'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.buf.validate.OneofConstraints = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.buf.validate.OneofConstraints, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.buf.validate.OneofConstraints.displayName = 'proto.buf.validate.OneofConstraints'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.buf.validate.FieldConstraints = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.buf.validate.FieldConstraints.repeatedFields_, proto.buf.validate.FieldConstraints.oneofGroups_); -}; -goog.inherits(proto.buf.validate.FieldConstraints, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.buf.validate.FieldConstraints.displayName = 'proto.buf.validate.FieldConstraints'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.buf.validate.FloatRules = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.buf.validate.FloatRules.repeatedFields_, proto.buf.validate.FloatRules.oneofGroups_); -}; -goog.inherits(proto.buf.validate.FloatRules, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.buf.validate.FloatRules.displayName = 'proto.buf.validate.FloatRules'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.buf.validate.DoubleRules = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.buf.validate.DoubleRules.repeatedFields_, proto.buf.validate.DoubleRules.oneofGroups_); -}; -goog.inherits(proto.buf.validate.DoubleRules, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.buf.validate.DoubleRules.displayName = 'proto.buf.validate.DoubleRules'; +// +// Copyright 2023 Buf Technologies, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.TimestampRules = exports.DurationRules = exports.AnyRules = exports.MapRules = exports.RepeatedRules = exports.EnumRules = exports.BytesRules = exports.StringRules = exports.BoolRules = exports.SFixed64Rules = exports.SFixed32Rules = exports.Fixed64Rules = exports.Fixed32Rules = exports.SInt64Rules = exports.SInt32Rules = exports.UInt64Rules = exports.UInt32Rules = exports.Int64Rules = exports.Int32Rules = exports.DoubleRules = exports.FloatRules = exports.FieldConstraints = exports.OneofConstraints = exports.MessageConstraints = exports.KnownRegex = void 0; +const runtime_1 = require("@protobuf-ts/runtime"); +const runtime_2 = require("@protobuf-ts/runtime"); +const runtime_3 = require("@protobuf-ts/runtime"); +const runtime_4 = require("@protobuf-ts/runtime"); +const timestamp_pb_1 = require("../../google/protobuf/timestamp_pb"); +const duration_pb_1 = require("../../google/protobuf/duration_pb"); +const expression_pb_1 = require("./expression_pb"); +/** + * WellKnownRegex contain some well-known patterns. + * + * @generated from protobuf enum buf.validate.KnownRegex + */ +var KnownRegex; +(function (KnownRegex) { + /** + * @generated from protobuf enum value: KNOWN_REGEX_UNSPECIFIED = 0; + */ + KnownRegex[KnownRegex["KNOWN_REGEX_UNSPECIFIED"] = 0] = "KNOWN_REGEX_UNSPECIFIED"; + /** + * HTTP header name as defined by [RFC 7230](https://tools.ietf.org/html/rfc7230#section-3.2). + * + * @generated from protobuf enum value: KNOWN_REGEX_HTTP_HEADER_NAME = 1; + */ + KnownRegex[KnownRegex["KNOWN_REGEX_HTTP_HEADER_NAME"] = 1] = "KNOWN_REGEX_HTTP_HEADER_NAME"; + /** + * HTTP header value as defined by [RFC 7230](https://tools.ietf.org/html/rfc7230#section-3.2.4). + * + * @generated from protobuf enum value: KNOWN_REGEX_HTTP_HEADER_VALUE = 2; + */ + KnownRegex[KnownRegex["KNOWN_REGEX_HTTP_HEADER_VALUE"] = 2] = "KNOWN_REGEX_HTTP_HEADER_VALUE"; +})(KnownRegex = exports.KnownRegex || (exports.KnownRegex = {})); +// @generated message type with reflection information, may provide speed optimized methods +class MessageConstraints$Type extends runtime_4.MessageType { + constructor() { + super("buf.validate.MessageConstraints", [ + { no: 1, name: "disabled", kind: "scalar", opt: true, T: 8 /*ScalarType.BOOL*/ }, + { no: 3, name: "cel", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => expression_pb_1.Constraint } + ]); + } + create(value) { + const message = globalThis.Object.create((this.messagePrototype)); + message.cel = []; + if (value !== undefined) + runtime_3.reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader, length, options, target) { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* optional bool disabled */ 1: + message.disabled = reader.bool(); + break; + case /* repeated buf.validate.Constraint cel */ 3: + message.cel.push(expression_pb_1.Constraint.internalBinaryRead(reader, reader.uint32(), options)); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? runtime_2.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message, writer, options) { + /* optional bool disabled = 1; */ + if (message.disabled !== undefined) + writer.tag(1, runtime_1.WireType.Varint).bool(message.disabled); + /* repeated buf.validate.Constraint cel = 3; */ + for (let i = 0; i < message.cel.length; i++) + expression_pb_1.Constraint.internalBinaryWrite(message.cel[i], writer.tag(3, runtime_1.WireType.LengthDelimited).fork(), options).join(); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } } /** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor + * @generated MessageType for protobuf message buf.validate.MessageConstraints */ -proto.buf.validate.Int32Rules = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.buf.validate.Int32Rules.repeatedFields_, proto.buf.validate.Int32Rules.oneofGroups_); -}; -goog.inherits(proto.buf.validate.Int32Rules, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.buf.validate.Int32Rules.displayName = 'proto.buf.validate.Int32Rules'; +exports.MessageConstraints = new MessageConstraints$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class OneofConstraints$Type extends runtime_4.MessageType { + constructor() { + super("buf.validate.OneofConstraints", [ + { no: 1, name: "required", kind: "scalar", opt: true, T: 8 /*ScalarType.BOOL*/ } + ]); + } + create(value) { + const message = globalThis.Object.create((this.messagePrototype)); + if (value !== undefined) + runtime_3.reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader, length, options, target) { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* optional bool required */ 1: + message.required = reader.bool(); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? runtime_2.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message, writer, options) { + /* optional bool required = 1; */ + if (message.required !== undefined) + writer.tag(1, runtime_1.WireType.Varint).bool(message.required); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } } /** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.buf.validate.Int64Rules = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.buf.validate.Int64Rules.repeatedFields_, proto.buf.validate.Int64Rules.oneofGroups_); -}; -goog.inherits(proto.buf.validate.Int64Rules, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.buf.validate.Int64Rules.displayName = 'proto.buf.validate.Int64Rules'; + * @generated MessageType for protobuf message buf.validate.OneofConstraints + */ +exports.OneofConstraints = new OneofConstraints$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class FieldConstraints$Type extends runtime_4.MessageType { + constructor() { + super("buf.validate.FieldConstraints", [ + { no: 23, name: "cel", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => expression_pb_1.Constraint }, + { no: 24, name: "skipped", kind: "scalar", T: 8 /*ScalarType.BOOL*/ }, + { no: 25, name: "required", kind: "scalar", T: 8 /*ScalarType.BOOL*/ }, + { no: 26, name: "ignore_empty", kind: "scalar", localName: "ignore_empty", T: 8 /*ScalarType.BOOL*/ }, + { no: 1, name: "float", kind: "message", oneof: "type", T: () => exports.FloatRules }, + { no: 2, name: "double", kind: "message", oneof: "type", T: () => exports.DoubleRules }, + { no: 3, name: "int32", kind: "message", oneof: "type", T: () => exports.Int32Rules }, + { no: 4, name: "int64", kind: "message", oneof: "type", T: () => exports.Int64Rules }, + { no: 5, name: "uint32", kind: "message", oneof: "type", T: () => exports.UInt32Rules }, + { no: 6, name: "uint64", kind: "message", oneof: "type", T: () => exports.UInt64Rules }, + { no: 7, name: "sint32", kind: "message", oneof: "type", T: () => exports.SInt32Rules }, + { no: 8, name: "sint64", kind: "message", oneof: "type", T: () => exports.SInt64Rules }, + { no: 9, name: "fixed32", kind: "message", oneof: "type", T: () => exports.Fixed32Rules }, + { no: 10, name: "fixed64", kind: "message", oneof: "type", T: () => exports.Fixed64Rules }, + { no: 11, name: "sfixed32", kind: "message", oneof: "type", T: () => exports.SFixed32Rules }, + { no: 12, name: "sfixed64", kind: "message", oneof: "type", T: () => exports.SFixed64Rules }, + { no: 13, name: "bool", kind: "message", oneof: "type", T: () => exports.BoolRules }, + { no: 14, name: "string", kind: "message", oneof: "type", T: () => exports.StringRules }, + { no: 15, name: "bytes", kind: "message", oneof: "type", T: () => exports.BytesRules }, + { no: 16, name: "enum", kind: "message", oneof: "type", T: () => exports.EnumRules }, + { no: 18, name: "repeated", kind: "message", oneof: "type", T: () => exports.RepeatedRules }, + { no: 19, name: "map", kind: "message", oneof: "type", T: () => exports.MapRules }, + { no: 20, name: "any", kind: "message", oneof: "type", T: () => exports.AnyRules }, + { no: 21, name: "duration", kind: "message", oneof: "type", T: () => exports.DurationRules }, + { no: 22, name: "timestamp", kind: "message", oneof: "type", T: () => exports.TimestampRules } + ]); + } + create(value) { + const message = globalThis.Object.create((this.messagePrototype)); + message.cel = []; + message.skipped = false; + message.required = false; + message.ignore_empty = false; + message.type = { oneofKind: undefined }; + if (value !== undefined) + runtime_3.reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader, length, options, target) { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* repeated buf.validate.Constraint cel */ 23: + message.cel.push(expression_pb_1.Constraint.internalBinaryRead(reader, reader.uint32(), options)); + break; + case /* bool skipped */ 24: + message.skipped = reader.bool(); + break; + case /* bool required */ 25: + message.required = reader.bool(); + break; + case /* bool ignore_empty */ 26: + message.ignore_empty = reader.bool(); + break; + case /* buf.validate.FloatRules float */ 1: + message.type = { + oneofKind: "float", + float: exports.FloatRules.internalBinaryRead(reader, reader.uint32(), options, message.type.float) + }; + break; + case /* buf.validate.DoubleRules double */ 2: + message.type = { + oneofKind: "double", + double: exports.DoubleRules.internalBinaryRead(reader, reader.uint32(), options, message.type.double) + }; + break; + case /* buf.validate.Int32Rules int32 */ 3: + message.type = { + oneofKind: "int32", + int32: exports.Int32Rules.internalBinaryRead(reader, reader.uint32(), options, message.type.int32) + }; + break; + case /* buf.validate.Int64Rules int64 */ 4: + message.type = { + oneofKind: "int64", + int64: exports.Int64Rules.internalBinaryRead(reader, reader.uint32(), options, message.type.int64) + }; + break; + case /* buf.validate.UInt32Rules uint32 */ 5: + message.type = { + oneofKind: "uint32", + uint32: exports.UInt32Rules.internalBinaryRead(reader, reader.uint32(), options, message.type.uint32) + }; + break; + case /* buf.validate.UInt64Rules uint64 */ 6: + message.type = { + oneofKind: "uint64", + uint64: exports.UInt64Rules.internalBinaryRead(reader, reader.uint32(), options, message.type.uint64) + }; + break; + case /* buf.validate.SInt32Rules sint32 */ 7: + message.type = { + oneofKind: "sint32", + sint32: exports.SInt32Rules.internalBinaryRead(reader, reader.uint32(), options, message.type.sint32) + }; + break; + case /* buf.validate.SInt64Rules sint64 */ 8: + message.type = { + oneofKind: "sint64", + sint64: exports.SInt64Rules.internalBinaryRead(reader, reader.uint32(), options, message.type.sint64) + }; + break; + case /* buf.validate.Fixed32Rules fixed32 */ 9: + message.type = { + oneofKind: "fixed32", + fixed32: exports.Fixed32Rules.internalBinaryRead(reader, reader.uint32(), options, message.type.fixed32) + }; + break; + case /* buf.validate.Fixed64Rules fixed64 */ 10: + message.type = { + oneofKind: "fixed64", + fixed64: exports.Fixed64Rules.internalBinaryRead(reader, reader.uint32(), options, message.type.fixed64) + }; + break; + case /* buf.validate.SFixed32Rules sfixed32 */ 11: + message.type = { + oneofKind: "sfixed32", + sfixed32: exports.SFixed32Rules.internalBinaryRead(reader, reader.uint32(), options, message.type.sfixed32) + }; + break; + case /* buf.validate.SFixed64Rules sfixed64 */ 12: + message.type = { + oneofKind: "sfixed64", + sfixed64: exports.SFixed64Rules.internalBinaryRead(reader, reader.uint32(), options, message.type.sfixed64) + }; + break; + case /* buf.validate.BoolRules bool */ 13: + message.type = { + oneofKind: "bool", + bool: exports.BoolRules.internalBinaryRead(reader, reader.uint32(), options, message.type.bool) + }; + break; + case /* buf.validate.StringRules string */ 14: + message.type = { + oneofKind: "string", + string: exports.StringRules.internalBinaryRead(reader, reader.uint32(), options, message.type.string) + }; + break; + case /* buf.validate.BytesRules bytes */ 15: + message.type = { + oneofKind: "bytes", + bytes: exports.BytesRules.internalBinaryRead(reader, reader.uint32(), options, message.type.bytes) + }; + break; + case /* buf.validate.EnumRules enum */ 16: + message.type = { + oneofKind: "enum", + enum: exports.EnumRules.internalBinaryRead(reader, reader.uint32(), options, message.type.enum) + }; + break; + case /* buf.validate.RepeatedRules repeated */ 18: + message.type = { + oneofKind: "repeated", + repeated: exports.RepeatedRules.internalBinaryRead(reader, reader.uint32(), options, message.type.repeated) + }; + break; + case /* buf.validate.MapRules map */ 19: + message.type = { + oneofKind: "map", + map: exports.MapRules.internalBinaryRead(reader, reader.uint32(), options, message.type.map) + }; + break; + case /* buf.validate.AnyRules any */ 20: + message.type = { + oneofKind: "any", + any: exports.AnyRules.internalBinaryRead(reader, reader.uint32(), options, message.type.any) + }; + break; + case /* buf.validate.DurationRules duration */ 21: + message.type = { + oneofKind: "duration", + duration: exports.DurationRules.internalBinaryRead(reader, reader.uint32(), options, message.type.duration) + }; + break; + case /* buf.validate.TimestampRules timestamp */ 22: + message.type = { + oneofKind: "timestamp", + timestamp: exports.TimestampRules.internalBinaryRead(reader, reader.uint32(), options, message.type.timestamp) + }; + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? runtime_2.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message, writer, options) { + /* repeated buf.validate.Constraint cel = 23; */ + for (let i = 0; i < message.cel.length; i++) + expression_pb_1.Constraint.internalBinaryWrite(message.cel[i], writer.tag(23, runtime_1.WireType.LengthDelimited).fork(), options).join(); + /* bool skipped = 24; */ + if (message.skipped !== false) + writer.tag(24, runtime_1.WireType.Varint).bool(message.skipped); + /* bool required = 25; */ + if (message.required !== false) + writer.tag(25, runtime_1.WireType.Varint).bool(message.required); + /* bool ignore_empty = 26; */ + if (message.ignore_empty !== false) + writer.tag(26, runtime_1.WireType.Varint).bool(message.ignore_empty); + /* buf.validate.FloatRules float = 1; */ + if (message.type.oneofKind === "float") + exports.FloatRules.internalBinaryWrite(message.type.float, writer.tag(1, runtime_1.WireType.LengthDelimited).fork(), options).join(); + /* buf.validate.DoubleRules double = 2; */ + if (message.type.oneofKind === "double") + exports.DoubleRules.internalBinaryWrite(message.type.double, writer.tag(2, runtime_1.WireType.LengthDelimited).fork(), options).join(); + /* buf.validate.Int32Rules int32 = 3; */ + if (message.type.oneofKind === "int32") + exports.Int32Rules.internalBinaryWrite(message.type.int32, writer.tag(3, runtime_1.WireType.LengthDelimited).fork(), options).join(); + /* buf.validate.Int64Rules int64 = 4; */ + if (message.type.oneofKind === "int64") + exports.Int64Rules.internalBinaryWrite(message.type.int64, writer.tag(4, runtime_1.WireType.LengthDelimited).fork(), options).join(); + /* buf.validate.UInt32Rules uint32 = 5; */ + if (message.type.oneofKind === "uint32") + exports.UInt32Rules.internalBinaryWrite(message.type.uint32, writer.tag(5, runtime_1.WireType.LengthDelimited).fork(), options).join(); + /* buf.validate.UInt64Rules uint64 = 6; */ + if (message.type.oneofKind === "uint64") + exports.UInt64Rules.internalBinaryWrite(message.type.uint64, writer.tag(6, runtime_1.WireType.LengthDelimited).fork(), options).join(); + /* buf.validate.SInt32Rules sint32 = 7; */ + if (message.type.oneofKind === "sint32") + exports.SInt32Rules.internalBinaryWrite(message.type.sint32, writer.tag(7, runtime_1.WireType.LengthDelimited).fork(), options).join(); + /* buf.validate.SInt64Rules sint64 = 8; */ + if (message.type.oneofKind === "sint64") + exports.SInt64Rules.internalBinaryWrite(message.type.sint64, writer.tag(8, runtime_1.WireType.LengthDelimited).fork(), options).join(); + /* buf.validate.Fixed32Rules fixed32 = 9; */ + if (message.type.oneofKind === "fixed32") + exports.Fixed32Rules.internalBinaryWrite(message.type.fixed32, writer.tag(9, runtime_1.WireType.LengthDelimited).fork(), options).join(); + /* buf.validate.Fixed64Rules fixed64 = 10; */ + if (message.type.oneofKind === "fixed64") + exports.Fixed64Rules.internalBinaryWrite(message.type.fixed64, writer.tag(10, runtime_1.WireType.LengthDelimited).fork(), options).join(); + /* buf.validate.SFixed32Rules sfixed32 = 11; */ + if (message.type.oneofKind === "sfixed32") + exports.SFixed32Rules.internalBinaryWrite(message.type.sfixed32, writer.tag(11, runtime_1.WireType.LengthDelimited).fork(), options).join(); + /* buf.validate.SFixed64Rules sfixed64 = 12; */ + if (message.type.oneofKind === "sfixed64") + exports.SFixed64Rules.internalBinaryWrite(message.type.sfixed64, writer.tag(12, runtime_1.WireType.LengthDelimited).fork(), options).join(); + /* buf.validate.BoolRules bool = 13; */ + if (message.type.oneofKind === "bool") + exports.BoolRules.internalBinaryWrite(message.type.bool, writer.tag(13, runtime_1.WireType.LengthDelimited).fork(), options).join(); + /* buf.validate.StringRules string = 14; */ + if (message.type.oneofKind === "string") + exports.StringRules.internalBinaryWrite(message.type.string, writer.tag(14, runtime_1.WireType.LengthDelimited).fork(), options).join(); + /* buf.validate.BytesRules bytes = 15; */ + if (message.type.oneofKind === "bytes") + exports.BytesRules.internalBinaryWrite(message.type.bytes, writer.tag(15, runtime_1.WireType.LengthDelimited).fork(), options).join(); + /* buf.validate.EnumRules enum = 16; */ + if (message.type.oneofKind === "enum") + exports.EnumRules.internalBinaryWrite(message.type.enum, writer.tag(16, runtime_1.WireType.LengthDelimited).fork(), options).join(); + /* buf.validate.RepeatedRules repeated = 18; */ + if (message.type.oneofKind === "repeated") + exports.RepeatedRules.internalBinaryWrite(message.type.repeated, writer.tag(18, runtime_1.WireType.LengthDelimited).fork(), options).join(); + /* buf.validate.MapRules map = 19; */ + if (message.type.oneofKind === "map") + exports.MapRules.internalBinaryWrite(message.type.map, writer.tag(19, runtime_1.WireType.LengthDelimited).fork(), options).join(); + /* buf.validate.AnyRules any = 20; */ + if (message.type.oneofKind === "any") + exports.AnyRules.internalBinaryWrite(message.type.any, writer.tag(20, runtime_1.WireType.LengthDelimited).fork(), options).join(); + /* buf.validate.DurationRules duration = 21; */ + if (message.type.oneofKind === "duration") + exports.DurationRules.internalBinaryWrite(message.type.duration, writer.tag(21, runtime_1.WireType.LengthDelimited).fork(), options).join(); + /* buf.validate.TimestampRules timestamp = 22; */ + if (message.type.oneofKind === "timestamp") + exports.TimestampRules.internalBinaryWrite(message.type.timestamp, writer.tag(22, runtime_1.WireType.LengthDelimited).fork(), options).join(); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } } /** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.buf.validate.UInt32Rules = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.buf.validate.UInt32Rules.repeatedFields_, proto.buf.validate.UInt32Rules.oneofGroups_); -}; -goog.inherits(proto.buf.validate.UInt32Rules, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.buf.validate.UInt32Rules.displayName = 'proto.buf.validate.UInt32Rules'; + * @generated MessageType for protobuf message buf.validate.FieldConstraints + */ +exports.FieldConstraints = new FieldConstraints$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class FloatRules$Type extends runtime_4.MessageType { + constructor() { + super("buf.validate.FloatRules", [ + { no: 1, name: "const", kind: "scalar", opt: true, T: 2 /*ScalarType.FLOAT*/, options: { "buf.validate.priv.field": { cel: [{ id: "float.const", expression: "this != rules.const ? 'value must equal %s'.format([rules.const]) : ''" }] } } }, + { no: 2, name: "lt", kind: "scalar", oneof: "less_than", T: 2 /*ScalarType.FLOAT*/, options: { "buf.validate.priv.field": { cel: [{ id: "float.lt", expression: "!has(rules.gte) && !has(rules.gt) && (this.isNan() || this >= rules.lt)? 'value must be less than %s'.format([rules.lt]) : ''" }] } } }, + { no: 3, name: "lte", kind: "scalar", oneof: "less_than", T: 2 /*ScalarType.FLOAT*/, options: { "buf.validate.priv.field": { cel: [{ id: "float.lte", expression: "!has(rules.gte) && !has(rules.gt) && (this.isNan() || this > rules.lte)? 'value must be less than or equal to %s'.format([rules.lte]) : ''" }] } } }, + { no: 4, name: "gt", kind: "scalar", oneof: "greater_than", T: 2 /*ScalarType.FLOAT*/, options: { "buf.validate.priv.field": { cel: [{ id: "float.gt", expression: "!has(rules.lt) && !has(rules.lte) && (this.isNan() || this <= rules.gt)? 'value must be greater than %s'.format([rules.gt]) : ''" }, { id: "float.gt_lt", expression: "has(rules.lt) && rules.lt >= rules.gt && (this.isNan() || this >= rules.lt || this <= rules.gt)? 'value must be greater than %s and less than %s'.format([rules.gt, rules.lt]) : ''" }, { id: "float.gt_lt_exclusive", expression: "has(rules.lt) && rules.lt < rules.gt && (this.isNan() || (rules.lt <= this && this <= rules.gt))? 'value must be greater than %s or less than %s'.format([rules.gt, rules.lt]) : ''" }, { id: "float.gt_lte", expression: "has(rules.lte) && rules.lte >= rules.gt && (this.isNan() || this > rules.lte || this <= rules.gt)? 'value must be greater than %s and less than or equal to %s'.format([rules.gt, rules.lte]) : ''" }, { id: "float.gt_lte_exclusive", expression: "has(rules.lte) && rules.lte < rules.gt && (this.isNan() || (rules.lte < this && this <= rules.gt))? 'value must be greater than %s or less than or equal to %s'.format([rules.gt, rules.lte]) : ''" }] } } }, + { no: 5, name: "gte", kind: "scalar", oneof: "greater_than", T: 2 /*ScalarType.FLOAT*/, options: { "buf.validate.priv.field": { cel: [{ id: "float.gte", expression: "!has(rules.lt) && !has(rules.lte) && (this.isNan() || this < rules.gte)? 'value must be greater than or equal to %s'.format([rules.gte]) : ''" }, { id: "float.gte_lt", expression: "has(rules.lt) && rules.lt >= rules.gte && (this.isNan() || this >= rules.lt || this < rules.gte)? 'value must be greater than or equal to %s and less than %s'.format([rules.gte, rules.lt]) : ''" }, { id: "float.gte_lt_exclusive", expression: "has(rules.lt) && rules.lt < rules.gte && (this.isNan() || (rules.lt <= this && this < rules.gte))? 'value must be greater than or equal to %s or less than %s'.format([rules.gte, rules.lt]) : ''" }, { id: "float.gte_lte", expression: "has(rules.lte) && rules.lte >= rules.gte && (this.isNan() || this > rules.lte || this < rules.gte)? 'value must be greater than or equal to %s and less than or equal to %s'.format([rules.gte, rules.lte]) : ''" }, { id: "float.gte_lte_exclusive", expression: "has(rules.lte) && rules.lte < rules.gte && (this.isNan() || (rules.lte < this && this < rules.gte))? 'value must be greater than or equal to %s or less than or equal to %s'.format([rules.gte, rules.lte]) : ''" }] } } }, + { no: 6, name: "in", kind: "scalar", repeat: 1 /*RepeatType.PACKED*/, T: 2 /*ScalarType.FLOAT*/, options: { "buf.validate.priv.field": { cel: [{ id: "float.in", expression: "!(this in dyn(rules)['in']) ? 'value must be in list %s'.format([dyn(rules)['in']]) : ''" }] } } }, + { no: 7, name: "not_in", kind: "scalar", localName: "not_in", repeat: 1 /*RepeatType.PACKED*/, T: 2 /*ScalarType.FLOAT*/, options: { "buf.validate.priv.field": { cel: [{ id: "float.not_in", expression: "this in rules.not_in ? 'value must not be in list %s'.format([rules.not_in]) : ''" }] } } }, + { no: 8, name: "finite", kind: "scalar", T: 8 /*ScalarType.BOOL*/, options: { "buf.validate.priv.field": { cel: [{ id: "float.finite", expression: "this.isNan() || this.isInf() ? 'value must be finite' : ''" }] } } } + ]); + } + create(value) { + const message = globalThis.Object.create((this.messagePrototype)); + message.less_than = { oneofKind: undefined }; + message.greater_than = { oneofKind: undefined }; + message.in = []; + message.not_in = []; + message.finite = false; + if (value !== undefined) + runtime_3.reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader, length, options, target) { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* optional float const */ 1: + message.const = reader.float(); + break; + case /* float lt */ 2: + message.less_than = { + oneofKind: "lt", + lt: reader.float() + }; + break; + case /* float lte */ 3: + message.less_than = { + oneofKind: "lte", + lte: reader.float() + }; + break; + case /* float gt */ 4: + message.greater_than = { + oneofKind: "gt", + gt: reader.float() + }; + break; + case /* float gte */ 5: + message.greater_than = { + oneofKind: "gte", + gte: reader.float() + }; + break; + case /* repeated float in */ 6: + if (wireType === runtime_1.WireType.LengthDelimited) + for (let e = reader.int32() + reader.pos; reader.pos < e;) + message.in.push(reader.float()); + else + message.in.push(reader.float()); + break; + case /* repeated float not_in */ 7: + if (wireType === runtime_1.WireType.LengthDelimited) + for (let e = reader.int32() + reader.pos; reader.pos < e;) + message.not_in.push(reader.float()); + else + message.not_in.push(reader.float()); + break; + case /* bool finite */ 8: + message.finite = reader.bool(); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? runtime_2.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message, writer, options) { + /* optional float const = 1; */ + if (message.const !== undefined) + writer.tag(1, runtime_1.WireType.Bit32).float(message.const); + /* float lt = 2; */ + if (message.less_than.oneofKind === "lt") + writer.tag(2, runtime_1.WireType.Bit32).float(message.less_than.lt); + /* float lte = 3; */ + if (message.less_than.oneofKind === "lte") + writer.tag(3, runtime_1.WireType.Bit32).float(message.less_than.lte); + /* float gt = 4; */ + if (message.greater_than.oneofKind === "gt") + writer.tag(4, runtime_1.WireType.Bit32).float(message.greater_than.gt); + /* float gte = 5; */ + if (message.greater_than.oneofKind === "gte") + writer.tag(5, runtime_1.WireType.Bit32).float(message.greater_than.gte); + /* repeated float in = 6; */ + if (message.in.length) { + writer.tag(6, runtime_1.WireType.LengthDelimited).fork(); + for (let i = 0; i < message.in.length; i++) + writer.float(message.in[i]); + writer.join(); + } + /* repeated float not_in = 7; */ + if (message.not_in.length) { + writer.tag(7, runtime_1.WireType.LengthDelimited).fork(); + for (let i = 0; i < message.not_in.length; i++) + writer.float(message.not_in[i]); + writer.join(); + } + /* bool finite = 8; */ + if (message.finite !== false) + writer.tag(8, runtime_1.WireType.Varint).bool(message.finite); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } } /** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.buf.validate.UInt64Rules = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.buf.validate.UInt64Rules.repeatedFields_, proto.buf.validate.UInt64Rules.oneofGroups_); -}; -goog.inherits(proto.buf.validate.UInt64Rules, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.buf.validate.UInt64Rules.displayName = 'proto.buf.validate.UInt64Rules'; + * @generated MessageType for protobuf message buf.validate.FloatRules + */ +exports.FloatRules = new FloatRules$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class DoubleRules$Type extends runtime_4.MessageType { + constructor() { + super("buf.validate.DoubleRules", [ + { no: 1, name: "const", kind: "scalar", opt: true, T: 1 /*ScalarType.DOUBLE*/, options: { "buf.validate.priv.field": { cel: [{ id: "double.const", expression: "this != rules.const ? 'value must equal %s'.format([rules.const]) : ''" }] } } }, + { no: 2, name: "lt", kind: "scalar", oneof: "less_than", T: 1 /*ScalarType.DOUBLE*/, options: { "buf.validate.priv.field": { cel: [{ id: "double.lt", expression: "!has(rules.gte) && !has(rules.gt) && (this.isNan() || this >= rules.lt)? 'value must be less than %s'.format([rules.lt]) : ''" }] } } }, + { no: 3, name: "lte", kind: "scalar", oneof: "less_than", T: 1 /*ScalarType.DOUBLE*/, options: { "buf.validate.priv.field": { cel: [{ id: "double.lte", expression: "!has(rules.gte) && !has(rules.gt) && (this.isNan() || this > rules.lte)? 'value must be less than or equal to %s'.format([rules.lte]) : ''" }] } } }, + { no: 4, name: "gt", kind: "scalar", oneof: "greater_than", T: 1 /*ScalarType.DOUBLE*/, options: { "buf.validate.priv.field": { cel: [{ id: "double.gt", expression: "!has(rules.lt) && !has(rules.lte) && (this.isNan() || this <= rules.gt)? 'value must be greater than %s'.format([rules.gt]) : ''" }, { id: "double.gt_lt", expression: "has(rules.lt) && rules.lt >= rules.gt && (this.isNan() || this >= rules.lt || this <= rules.gt)? 'value must be greater than %s and less than %s'.format([rules.gt, rules.lt]) : ''" }, { id: "double.gt_lt_exclusive", expression: "has(rules.lt) && rules.lt < rules.gt && (this.isNan() || (rules.lt <= this && this <= rules.gt))? 'value must be greater than %s or less than %s'.format([rules.gt, rules.lt]) : ''" }, { id: "double.gt_lte", expression: "has(rules.lte) && rules.lte >= rules.gt && (this.isNan() || this > rules.lte || this <= rules.gt)? 'value must be greater than %s and less than or equal to %s'.format([rules.gt, rules.lte]) : ''" }, { id: "double.gt_lte_exclusive", expression: "has(rules.lte) && rules.lte < rules.gt && (this.isNan() || (rules.lte < this && this <= rules.gt))? 'value must be greater than %s or less than or equal to %s'.format([rules.gt, rules.lte]) : ''" }] } } }, + { no: 5, name: "gte", kind: "scalar", oneof: "greater_than", T: 1 /*ScalarType.DOUBLE*/, options: { "buf.validate.priv.field": { cel: [{ id: "double.gte", expression: "!has(rules.lt) && !has(rules.lte) && (this.isNan() || this < rules.gte)? 'value must be greater than or equal to %s'.format([rules.gte]) : ''" }, { id: "double.gte_lt", expression: "has(rules.lt) && rules.lt >= rules.gte && (this.isNan() || this >= rules.lt || this < rules.gte)? 'value must be greater than or equal to %s and less than %s'.format([rules.gte, rules.lt]) : ''" }, { id: "double.gte_lt_exclusive", expression: "has(rules.lt) && rules.lt < rules.gte && (this.isNan() || (rules.lt <= this && this < rules.gte))? 'value must be greater than or equal to %s or less than %s'.format([rules.gte, rules.lt]) : ''" }, { id: "double.gte_lte", expression: "has(rules.lte) && rules.lte >= rules.gte && (this.isNan() || this > rules.lte || this < rules.gte)? 'value must be greater than or equal to %s and less than or equal to %s'.format([rules.gte, rules.lte]) : ''" }, { id: "double.gte_lte_exclusive", expression: "has(rules.lte) && rules.lte < rules.gte && (this.isNan() || (rules.lte < this && this < rules.gte))? 'value must be greater than or equal to %s or less than or equal to %s'.format([rules.gte, rules.lte]) : ''" }] } } }, + { no: 6, name: "in", kind: "scalar", repeat: 1 /*RepeatType.PACKED*/, T: 1 /*ScalarType.DOUBLE*/, options: { "buf.validate.priv.field": { cel: [{ id: "double.in", expression: "!(this in dyn(rules)['in']) ? 'value must be in list %s'.format([dyn(rules)['in']]) : ''" }] } } }, + { no: 7, name: "not_in", kind: "scalar", localName: "not_in", repeat: 1 /*RepeatType.PACKED*/, T: 1 /*ScalarType.DOUBLE*/, options: { "buf.validate.priv.field": { cel: [{ id: "double.not_in", expression: "this in rules.not_in ? 'value must not be in list %s'.format([rules.not_in]) : ''" }] } } }, + { no: 8, name: "finite", kind: "scalar", T: 8 /*ScalarType.BOOL*/, options: { "buf.validate.priv.field": { cel: [{ id: "double.finite", expression: "this.isNan() || this.isInf() ? 'value must be finite' : ''" }] } } } + ]); + } + create(value) { + const message = globalThis.Object.create((this.messagePrototype)); + message.less_than = { oneofKind: undefined }; + message.greater_than = { oneofKind: undefined }; + message.in = []; + message.not_in = []; + message.finite = false; + if (value !== undefined) + runtime_3.reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader, length, options, target) { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* optional double const */ 1: + message.const = reader.double(); + break; + case /* double lt */ 2: + message.less_than = { + oneofKind: "lt", + lt: reader.double() + }; + break; + case /* double lte */ 3: + message.less_than = { + oneofKind: "lte", + lte: reader.double() + }; + break; + case /* double gt */ 4: + message.greater_than = { + oneofKind: "gt", + gt: reader.double() + }; + break; + case /* double gte */ 5: + message.greater_than = { + oneofKind: "gte", + gte: reader.double() + }; + break; + case /* repeated double in */ 6: + if (wireType === runtime_1.WireType.LengthDelimited) + for (let e = reader.int32() + reader.pos; reader.pos < e;) + message.in.push(reader.double()); + else + message.in.push(reader.double()); + break; + case /* repeated double not_in */ 7: + if (wireType === runtime_1.WireType.LengthDelimited) + for (let e = reader.int32() + reader.pos; reader.pos < e;) + message.not_in.push(reader.double()); + else + message.not_in.push(reader.double()); + break; + case /* bool finite */ 8: + message.finite = reader.bool(); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? runtime_2.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message, writer, options) { + /* optional double const = 1; */ + if (message.const !== undefined) + writer.tag(1, runtime_1.WireType.Bit64).double(message.const); + /* double lt = 2; */ + if (message.less_than.oneofKind === "lt") + writer.tag(2, runtime_1.WireType.Bit64).double(message.less_than.lt); + /* double lte = 3; */ + if (message.less_than.oneofKind === "lte") + writer.tag(3, runtime_1.WireType.Bit64).double(message.less_than.lte); + /* double gt = 4; */ + if (message.greater_than.oneofKind === "gt") + writer.tag(4, runtime_1.WireType.Bit64).double(message.greater_than.gt); + /* double gte = 5; */ + if (message.greater_than.oneofKind === "gte") + writer.tag(5, runtime_1.WireType.Bit64).double(message.greater_than.gte); + /* repeated double in = 6; */ + if (message.in.length) { + writer.tag(6, runtime_1.WireType.LengthDelimited).fork(); + for (let i = 0; i < message.in.length; i++) + writer.double(message.in[i]); + writer.join(); + } + /* repeated double not_in = 7; */ + if (message.not_in.length) { + writer.tag(7, runtime_1.WireType.LengthDelimited).fork(); + for (let i = 0; i < message.not_in.length; i++) + writer.double(message.not_in[i]); + writer.join(); + } + /* bool finite = 8; */ + if (message.finite !== false) + writer.tag(8, runtime_1.WireType.Varint).bool(message.finite); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } } /** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.buf.validate.SInt32Rules = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.buf.validate.SInt32Rules.repeatedFields_, proto.buf.validate.SInt32Rules.oneofGroups_); -}; -goog.inherits(proto.buf.validate.SInt32Rules, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.buf.validate.SInt32Rules.displayName = 'proto.buf.validate.SInt32Rules'; + * @generated MessageType for protobuf message buf.validate.DoubleRules + */ +exports.DoubleRules = new DoubleRules$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class Int32Rules$Type extends runtime_4.MessageType { + constructor() { + super("buf.validate.Int32Rules", [ + { no: 1, name: "const", kind: "scalar", opt: true, T: 5 /*ScalarType.INT32*/, options: { "buf.validate.priv.field": { cel: [{ id: "int32.const", expression: "this != rules.const ? 'value must equal %s'.format([rules.const]) : ''" }] } } }, + { no: 2, name: "lt", kind: "scalar", oneof: "less_than", T: 5 /*ScalarType.INT32*/, options: { "buf.validate.priv.field": { cel: [{ id: "int32.lt", expression: "!has(rules.gte) && !has(rules.gt) && this >= rules.lt? 'value must be less than %s'.format([rules.lt]) : ''" }] } } }, + { no: 3, name: "lte", kind: "scalar", oneof: "less_than", T: 5 /*ScalarType.INT32*/, options: { "buf.validate.priv.field": { cel: [{ id: "int32.lte", expression: "!has(rules.gte) && !has(rules.gt) && this > rules.lte? 'value must be less than or equal to %s'.format([rules.lte]) : ''" }] } } }, + { no: 4, name: "gt", kind: "scalar", oneof: "greater_than", T: 5 /*ScalarType.INT32*/, options: { "buf.validate.priv.field": { cel: [{ id: "int32.gt", expression: "!has(rules.lt) && !has(rules.lte) && this <= rules.gt? 'value must be greater than %s'.format([rules.gt]) : ''" }, { id: "int32.gt_lt", expression: "has(rules.lt) && rules.lt >= rules.gt && (this >= rules.lt || this <= rules.gt)? 'value must be greater than %s and less than %s'.format([rules.gt, rules.lt]) : ''" }, { id: "int32.gt_lt_exclusive", expression: "has(rules.lt) && rules.lt < rules.gt && (rules.lt <= this && this <= rules.gt)? 'value must be greater than %s or less than %s'.format([rules.gt, rules.lt]) : ''" }, { id: "int32.gt_lte", expression: "has(rules.lte) && rules.lte >= rules.gt && (this > rules.lte || this <= rules.gt)? 'value must be greater than %s and less than or equal to %s'.format([rules.gt, rules.lte]) : ''" }, { id: "int32.gt_lte_exclusive", expression: "has(rules.lte) && rules.lte < rules.gt && (rules.lte < this && this <= rules.gt)? 'value must be greater than %s or less than or equal to %s'.format([rules.gt, rules.lte]) : ''" }] } } }, + { no: 5, name: "gte", kind: "scalar", oneof: "greater_than", T: 5 /*ScalarType.INT32*/, options: { "buf.validate.priv.field": { cel: [{ id: "int32.gte", expression: "!has(rules.lt) && !has(rules.lte) && this < rules.gte? 'value must be greater than or equal to %s'.format([rules.gte]) : ''" }, { id: "int32.gte_lt", expression: "has(rules.lt) && rules.lt >= rules.gte && (this >= rules.lt || this < rules.gte)? 'value must be greater than or equal to %s and less than %s'.format([rules.gte, rules.lt]) : ''" }, { id: "int32.gte_lt_exclusive", expression: "has(rules.lt) && rules.lt < rules.gte && (rules.lt <= this && this < rules.gte)? 'value must be greater than or equal to %s or less than %s'.format([rules.gte, rules.lt]) : ''" }, { id: "int32.gte_lte", expression: "has(rules.lte) && rules.lte >= rules.gte && (this > rules.lte || this < rules.gte)? 'value must be greater than or equal to %s and less than or equal to %s'.format([rules.gte, rules.lte]) : ''" }, { id: "int32.gte_lte_exclusive", expression: "has(rules.lte) && rules.lte < rules.gte && (rules.lte < this && this < rules.gte)? 'value must be greater than or equal to %s or less than or equal to %s'.format([rules.gte, rules.lte]) : ''" }] } } }, + { no: 6, name: "in", kind: "scalar", repeat: 1 /*RepeatType.PACKED*/, T: 5 /*ScalarType.INT32*/, options: { "buf.validate.priv.field": { cel: [{ id: "int32.in", expression: "!(this in dyn(rules)['in']) ? 'value must be in list %s'.format([dyn(rules)['in']]) : ''" }] } } }, + { no: 7, name: "not_in", kind: "scalar", localName: "not_in", repeat: 1 /*RepeatType.PACKED*/, T: 5 /*ScalarType.INT32*/, options: { "buf.validate.priv.field": { cel: [{ id: "int32.not_in", expression: "this in rules.not_in ? 'value must not be in list %s'.format([rules.not_in]) : ''" }] } } } + ]); + } + create(value) { + const message = globalThis.Object.create((this.messagePrototype)); + message.less_than = { oneofKind: undefined }; + message.greater_than = { oneofKind: undefined }; + message.in = []; + message.not_in = []; + if (value !== undefined) + runtime_3.reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader, length, options, target) { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* optional int32 const */ 1: + message.const = reader.int32(); + break; + case /* int32 lt */ 2: + message.less_than = { + oneofKind: "lt", + lt: reader.int32() + }; + break; + case /* int32 lte */ 3: + message.less_than = { + oneofKind: "lte", + lte: reader.int32() + }; + break; + case /* int32 gt */ 4: + message.greater_than = { + oneofKind: "gt", + gt: reader.int32() + }; + break; + case /* int32 gte */ 5: + message.greater_than = { + oneofKind: "gte", + gte: reader.int32() + }; + break; + case /* repeated int32 in */ 6: + if (wireType === runtime_1.WireType.LengthDelimited) + for (let e = reader.int32() + reader.pos; reader.pos < e;) + message.in.push(reader.int32()); + else + message.in.push(reader.int32()); + break; + case /* repeated int32 not_in */ 7: + if (wireType === runtime_1.WireType.LengthDelimited) + for (let e = reader.int32() + reader.pos; reader.pos < e;) + message.not_in.push(reader.int32()); + else + message.not_in.push(reader.int32()); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? runtime_2.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message, writer, options) { + /* optional int32 const = 1; */ + if (message.const !== undefined) + writer.tag(1, runtime_1.WireType.Varint).int32(message.const); + /* int32 lt = 2; */ + if (message.less_than.oneofKind === "lt") + writer.tag(2, runtime_1.WireType.Varint).int32(message.less_than.lt); + /* int32 lte = 3; */ + if (message.less_than.oneofKind === "lte") + writer.tag(3, runtime_1.WireType.Varint).int32(message.less_than.lte); + /* int32 gt = 4; */ + if (message.greater_than.oneofKind === "gt") + writer.tag(4, runtime_1.WireType.Varint).int32(message.greater_than.gt); + /* int32 gte = 5; */ + if (message.greater_than.oneofKind === "gte") + writer.tag(5, runtime_1.WireType.Varint).int32(message.greater_than.gte); + /* repeated int32 in = 6; */ + if (message.in.length) { + writer.tag(6, runtime_1.WireType.LengthDelimited).fork(); + for (let i = 0; i < message.in.length; i++) + writer.int32(message.in[i]); + writer.join(); + } + /* repeated int32 not_in = 7; */ + if (message.not_in.length) { + writer.tag(7, runtime_1.WireType.LengthDelimited).fork(); + for (let i = 0; i < message.not_in.length; i++) + writer.int32(message.not_in[i]); + writer.join(); + } + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } } /** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.buf.validate.SInt64Rules = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.buf.validate.SInt64Rules.repeatedFields_, proto.buf.validate.SInt64Rules.oneofGroups_); -}; -goog.inherits(proto.buf.validate.SInt64Rules, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.buf.validate.SInt64Rules.displayName = 'proto.buf.validate.SInt64Rules'; + * @generated MessageType for protobuf message buf.validate.Int32Rules + */ +exports.Int32Rules = new Int32Rules$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class Int64Rules$Type extends runtime_4.MessageType { + constructor() { + super("buf.validate.Int64Rules", [ + { no: 1, name: "const", kind: "scalar", opt: true, T: 3 /*ScalarType.INT64*/, L: 0 /*LongType.BIGINT*/, options: { "buf.validate.priv.field": { cel: [{ id: "int64.const", expression: "this != rules.const ? 'value must equal %s'.format([rules.const]) : ''" }] } } }, + { no: 2, name: "lt", kind: "scalar", oneof: "less_than", T: 3 /*ScalarType.INT64*/, L: 0 /*LongType.BIGINT*/, options: { "buf.validate.priv.field": { cel: [{ id: "int64.lt", expression: "!has(rules.gte) && !has(rules.gt) && this >= rules.lt? 'value must be less than %s'.format([rules.lt]) : ''" }] } } }, + { no: 3, name: "lte", kind: "scalar", oneof: "less_than", T: 3 /*ScalarType.INT64*/, L: 0 /*LongType.BIGINT*/, options: { "buf.validate.priv.field": { cel: [{ id: "int64.lte", expression: "!has(rules.gte) && !has(rules.gt) && this > rules.lte? 'value must be less than or equal to %s'.format([rules.lte]) : ''" }] } } }, + { no: 4, name: "gt", kind: "scalar", oneof: "greater_than", T: 3 /*ScalarType.INT64*/, L: 0 /*LongType.BIGINT*/, options: { "buf.validate.priv.field": { cel: [{ id: "int64.gt", expression: "!has(rules.lt) && !has(rules.lte) && this <= rules.gt? 'value must be greater than %s'.format([rules.gt]) : ''" }, { id: "int64.gt_lt", expression: "has(rules.lt) && rules.lt >= rules.gt && (this >= rules.lt || this <= rules.gt)? 'value must be greater than %s and less than %s'.format([rules.gt, rules.lt]) : ''" }, { id: "int64.gt_lt_exclusive", expression: "has(rules.lt) && rules.lt < rules.gt && (rules.lt <= this && this <= rules.gt)? 'value must be greater than %s or less than %s'.format([rules.gt, rules.lt]) : ''" }, { id: "int64.gt_lte", expression: "has(rules.lte) && rules.lte >= rules.gt && (this > rules.lte || this <= rules.gt)? 'value must be greater than %s and less than or equal to %s'.format([rules.gt, rules.lte]) : ''" }, { id: "int64.gt_lte_exclusive", expression: "has(rules.lte) && rules.lte < rules.gt && (rules.lte < this && this <= rules.gt)? 'value must be greater than %s or less than or equal to %s'.format([rules.gt, rules.lte]) : ''" }] } } }, + { no: 5, name: "gte", kind: "scalar", oneof: "greater_than", T: 3 /*ScalarType.INT64*/, L: 0 /*LongType.BIGINT*/, options: { "buf.validate.priv.field": { cel: [{ id: "int64.gte", expression: "!has(rules.lt) && !has(rules.lte) && this < rules.gte? 'value must be greater than or equal to %s'.format([rules.gte]) : ''" }, { id: "int64.gte_lt", expression: "has(rules.lt) && rules.lt >= rules.gte && (this >= rules.lt || this < rules.gte)? 'value must be greater than or equal to %s and less than %s'.format([rules.gte, rules.lt]) : ''" }, { id: "int64.gte_lt_exclusive", expression: "has(rules.lt) && rules.lt < rules.gte && (rules.lt <= this && this < rules.gte)? 'value must be greater than or equal to %s or less than %s'.format([rules.gte, rules.lt]) : ''" }, { id: "int64.gte_lte", expression: "has(rules.lte) && rules.lte >= rules.gte && (this > rules.lte || this < rules.gte)? 'value must be greater than or equal to %s and less than or equal to %s'.format([rules.gte, rules.lte]) : ''" }, { id: "int64.gte_lte_exclusive", expression: "has(rules.lte) && rules.lte < rules.gte && (rules.lte < this && this < rules.gte)? 'value must be greater than or equal to %s or less than or equal to %s'.format([rules.gte, rules.lte]) : ''" }] } } }, + { no: 6, name: "in", kind: "scalar", repeat: 1 /*RepeatType.PACKED*/, T: 3 /*ScalarType.INT64*/, L: 0 /*LongType.BIGINT*/, options: { "buf.validate.priv.field": { cel: [{ id: "int64.in", expression: "!(this in dyn(rules)['in']) ? 'value must be in list %s'.format([dyn(rules)['in']]) : ''" }] } } }, + { no: 7, name: "not_in", kind: "scalar", localName: "not_in", repeat: 1 /*RepeatType.PACKED*/, T: 3 /*ScalarType.INT64*/, L: 0 /*LongType.BIGINT*/, options: { "buf.validate.priv.field": { cel: [{ id: "int64.not_in", expression: "this in rules.not_in ? 'value must not be in list %s'.format([rules.not_in]) : ''" }] } } } + ]); + } + create(value) { + const message = globalThis.Object.create((this.messagePrototype)); + message.less_than = { oneofKind: undefined }; + message.greater_than = { oneofKind: undefined }; + message.in = []; + message.not_in = []; + if (value !== undefined) + runtime_3.reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader, length, options, target) { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* optional int64 const */ 1: + message.const = reader.int64().toBigInt(); + break; + case /* int64 lt */ 2: + message.less_than = { + oneofKind: "lt", + lt: reader.int64().toBigInt() + }; + break; + case /* int64 lte */ 3: + message.less_than = { + oneofKind: "lte", + lte: reader.int64().toBigInt() + }; + break; + case /* int64 gt */ 4: + message.greater_than = { + oneofKind: "gt", + gt: reader.int64().toBigInt() + }; + break; + case /* int64 gte */ 5: + message.greater_than = { + oneofKind: "gte", + gte: reader.int64().toBigInt() + }; + break; + case /* repeated int64 in */ 6: + if (wireType === runtime_1.WireType.LengthDelimited) + for (let e = reader.int32() + reader.pos; reader.pos < e;) + message.in.push(reader.int64().toBigInt()); + else + message.in.push(reader.int64().toBigInt()); + break; + case /* repeated int64 not_in */ 7: + if (wireType === runtime_1.WireType.LengthDelimited) + for (let e = reader.int32() + reader.pos; reader.pos < e;) + message.not_in.push(reader.int64().toBigInt()); + else + message.not_in.push(reader.int64().toBigInt()); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? runtime_2.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message, writer, options) { + /* optional int64 const = 1; */ + if (message.const !== undefined) + writer.tag(1, runtime_1.WireType.Varint).int64(message.const); + /* int64 lt = 2; */ + if (message.less_than.oneofKind === "lt") + writer.tag(2, runtime_1.WireType.Varint).int64(message.less_than.lt); + /* int64 lte = 3; */ + if (message.less_than.oneofKind === "lte") + writer.tag(3, runtime_1.WireType.Varint).int64(message.less_than.lte); + /* int64 gt = 4; */ + if (message.greater_than.oneofKind === "gt") + writer.tag(4, runtime_1.WireType.Varint).int64(message.greater_than.gt); + /* int64 gte = 5; */ + if (message.greater_than.oneofKind === "gte") + writer.tag(5, runtime_1.WireType.Varint).int64(message.greater_than.gte); + /* repeated int64 in = 6; */ + if (message.in.length) { + writer.tag(6, runtime_1.WireType.LengthDelimited).fork(); + for (let i = 0; i < message.in.length; i++) + writer.int64(message.in[i]); + writer.join(); + } + /* repeated int64 not_in = 7; */ + if (message.not_in.length) { + writer.tag(7, runtime_1.WireType.LengthDelimited).fork(); + for (let i = 0; i < message.not_in.length; i++) + writer.int64(message.not_in[i]); + writer.join(); + } + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } } /** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.buf.validate.Fixed32Rules = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.buf.validate.Fixed32Rules.repeatedFields_, proto.buf.validate.Fixed32Rules.oneofGroups_); -}; -goog.inherits(proto.buf.validate.Fixed32Rules, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.buf.validate.Fixed32Rules.displayName = 'proto.buf.validate.Fixed32Rules'; + * @generated MessageType for protobuf message buf.validate.Int64Rules + */ +exports.Int64Rules = new Int64Rules$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class UInt32Rules$Type extends runtime_4.MessageType { + constructor() { + super("buf.validate.UInt32Rules", [ + { no: 1, name: "const", kind: "scalar", opt: true, T: 13 /*ScalarType.UINT32*/, options: { "buf.validate.priv.field": { cel: [{ id: "uint32.const", expression: "this != rules.const ? 'value must equal %s'.format([rules.const]) : ''" }] } } }, + { no: 2, name: "lt", kind: "scalar", oneof: "less_than", T: 13 /*ScalarType.UINT32*/, options: { "buf.validate.priv.field": { cel: [{ id: "uint32.lt", expression: "!has(rules.gte) && !has(rules.gt) && this >= rules.lt? 'value must be less than %s'.format([rules.lt]) : ''" }] } } }, + { no: 3, name: "lte", kind: "scalar", oneof: "less_than", T: 13 /*ScalarType.UINT32*/, options: { "buf.validate.priv.field": { cel: [{ id: "uint32.lte", expression: "!has(rules.gte) && !has(rules.gt) && this > rules.lte? 'value must be less than or equal to %s'.format([rules.lte]) : ''" }] } } }, + { no: 4, name: "gt", kind: "scalar", oneof: "greater_than", T: 13 /*ScalarType.UINT32*/, options: { "buf.validate.priv.field": { cel: [{ id: "uint32.gt", expression: "!has(rules.lt) && !has(rules.lte) && this <= rules.gt? 'value must be greater than %s'.format([rules.gt]) : ''" }, { id: "uint32.gt_lt", expression: "has(rules.lt) && rules.lt >= rules.gt && (this >= rules.lt || this <= rules.gt)? 'value must be greater than %s and less than %s'.format([rules.gt, rules.lt]) : ''" }, { id: "uint32.gt_lt_exclusive", expression: "has(rules.lt) && rules.lt < rules.gt && (rules.lt <= this && this <= rules.gt)? 'value must be greater than %s or less than %s'.format([rules.gt, rules.lt]) : ''" }, { id: "uint32.gt_lte", expression: "has(rules.lte) && rules.lte >= rules.gt && (this > rules.lte || this <= rules.gt)? 'value must be greater than %s and less than or equal to %s'.format([rules.gt, rules.lte]) : ''" }, { id: "uint32.gt_lte_exclusive", expression: "has(rules.lte) && rules.lte < rules.gt && (rules.lte < this && this <= rules.gt)? 'value must be greater than %s or less than or equal to %s'.format([rules.gt, rules.lte]) : ''" }] } } }, + { no: 5, name: "gte", kind: "scalar", oneof: "greater_than", T: 13 /*ScalarType.UINT32*/, options: { "buf.validate.priv.field": { cel: [{ id: "uint32.gte", expression: "!has(rules.lt) && !has(rules.lte) && this < rules.gte? 'value must be greater than or equal to %s'.format([rules.gte]) : ''" }, { id: "uint32.gte_lt", expression: "has(rules.lt) && rules.lt >= rules.gte && (this >= rules.lt || this < rules.gte)? 'value must be greater than or equal to %s and less than %s'.format([rules.gte, rules.lt]) : ''" }, { id: "uint32.gte_lt_exclusive", expression: "has(rules.lt) && rules.lt < rules.gte && (rules.lt <= this && this < rules.gte)? 'value must be greater than or equal to %s or less than %s'.format([rules.gte, rules.lt]) : ''" }, { id: "uint32.gte_lte", expression: "has(rules.lte) && rules.lte >= rules.gte && (this > rules.lte || this < rules.gte)? 'value must be greater than or equal to %s and less than or equal to %s'.format([rules.gte, rules.lte]) : ''" }, { id: "uint32.gte_lte_exclusive", expression: "has(rules.lte) && rules.lte < rules.gte && (rules.lte < this && this < rules.gte)? 'value must be greater than or equal to %s or less than or equal to %s'.format([rules.gte, rules.lte]) : ''" }] } } }, + { no: 6, name: "in", kind: "scalar", repeat: 1 /*RepeatType.PACKED*/, T: 13 /*ScalarType.UINT32*/, options: { "buf.validate.priv.field": { cel: [{ id: "uint32.in", expression: "!(this in dyn(rules)['in']) ? 'value must be in list %s'.format([dyn(rules)['in']]) : ''" }] } } }, + { no: 7, name: "not_in", kind: "scalar", localName: "not_in", repeat: 1 /*RepeatType.PACKED*/, T: 13 /*ScalarType.UINT32*/, options: { "buf.validate.priv.field": { cel: [{ id: "uint32.not_in", expression: "this in rules.not_in ? 'value must not be in list %s'.format([rules.not_in]) : ''" }] } } } + ]); + } + create(value) { + const message = globalThis.Object.create((this.messagePrototype)); + message.less_than = { oneofKind: undefined }; + message.greater_than = { oneofKind: undefined }; + message.in = []; + message.not_in = []; + if (value !== undefined) + runtime_3.reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader, length, options, target) { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* optional uint32 const */ 1: + message.const = reader.uint32(); + break; + case /* uint32 lt */ 2: + message.less_than = { + oneofKind: "lt", + lt: reader.uint32() + }; + break; + case /* uint32 lte */ 3: + message.less_than = { + oneofKind: "lte", + lte: reader.uint32() + }; + break; + case /* uint32 gt */ 4: + message.greater_than = { + oneofKind: "gt", + gt: reader.uint32() + }; + break; + case /* uint32 gte */ 5: + message.greater_than = { + oneofKind: "gte", + gte: reader.uint32() + }; + break; + case /* repeated uint32 in */ 6: + if (wireType === runtime_1.WireType.LengthDelimited) + for (let e = reader.int32() + reader.pos; reader.pos < e;) + message.in.push(reader.uint32()); + else + message.in.push(reader.uint32()); + break; + case /* repeated uint32 not_in */ 7: + if (wireType === runtime_1.WireType.LengthDelimited) + for (let e = reader.int32() + reader.pos; reader.pos < e;) + message.not_in.push(reader.uint32()); + else + message.not_in.push(reader.uint32()); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? runtime_2.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message, writer, options) { + /* optional uint32 const = 1; */ + if (message.const !== undefined) + writer.tag(1, runtime_1.WireType.Varint).uint32(message.const); + /* uint32 lt = 2; */ + if (message.less_than.oneofKind === "lt") + writer.tag(2, runtime_1.WireType.Varint).uint32(message.less_than.lt); + /* uint32 lte = 3; */ + if (message.less_than.oneofKind === "lte") + writer.tag(3, runtime_1.WireType.Varint).uint32(message.less_than.lte); + /* uint32 gt = 4; */ + if (message.greater_than.oneofKind === "gt") + writer.tag(4, runtime_1.WireType.Varint).uint32(message.greater_than.gt); + /* uint32 gte = 5; */ + if (message.greater_than.oneofKind === "gte") + writer.tag(5, runtime_1.WireType.Varint).uint32(message.greater_than.gte); + /* repeated uint32 in = 6; */ + if (message.in.length) { + writer.tag(6, runtime_1.WireType.LengthDelimited).fork(); + for (let i = 0; i < message.in.length; i++) + writer.uint32(message.in[i]); + writer.join(); + } + /* repeated uint32 not_in = 7; */ + if (message.not_in.length) { + writer.tag(7, runtime_1.WireType.LengthDelimited).fork(); + for (let i = 0; i < message.not_in.length; i++) + writer.uint32(message.not_in[i]); + writer.join(); + } + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } } /** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.buf.validate.Fixed64Rules = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.buf.validate.Fixed64Rules.repeatedFields_, proto.buf.validate.Fixed64Rules.oneofGroups_); -}; -goog.inherits(proto.buf.validate.Fixed64Rules, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.buf.validate.Fixed64Rules.displayName = 'proto.buf.validate.Fixed64Rules'; + * @generated MessageType for protobuf message buf.validate.UInt32Rules + */ +exports.UInt32Rules = new UInt32Rules$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class UInt64Rules$Type extends runtime_4.MessageType { + constructor() { + super("buf.validate.UInt64Rules", [ + { no: 1, name: "const", kind: "scalar", opt: true, T: 4 /*ScalarType.UINT64*/, L: 0 /*LongType.BIGINT*/, options: { "buf.validate.priv.field": { cel: [{ id: "uint64.const", expression: "this != rules.const ? 'value must equal %s'.format([rules.const]) : ''" }] } } }, + { no: 2, name: "lt", kind: "scalar", oneof: "less_than", T: 4 /*ScalarType.UINT64*/, L: 0 /*LongType.BIGINT*/, options: { "buf.validate.priv.field": { cel: [{ id: "uint64.lt", expression: "!has(rules.gte) && !has(rules.gt) && this >= rules.lt? 'value must be less than %s'.format([rules.lt]) : ''" }] } } }, + { no: 3, name: "lte", kind: "scalar", oneof: "less_than", T: 4 /*ScalarType.UINT64*/, L: 0 /*LongType.BIGINT*/, options: { "buf.validate.priv.field": { cel: [{ id: "uint64.lte", expression: "!has(rules.gte) && !has(rules.gt) && this > rules.lte? 'value must be less than or equal to %s'.format([rules.lte]) : ''" }] } } }, + { no: 4, name: "gt", kind: "scalar", oneof: "greater_than", T: 4 /*ScalarType.UINT64*/, L: 0 /*LongType.BIGINT*/, options: { "buf.validate.priv.field": { cel: [{ id: "uint64.gt", expression: "!has(rules.lt) && !has(rules.lte) && this <= rules.gt? 'value must be greater than %s'.format([rules.gt]) : ''" }, { id: "uint64.gt_lt", expression: "has(rules.lt) && rules.lt >= rules.gt && (this >= rules.lt || this <= rules.gt)? 'value must be greater than %s and less than %s'.format([rules.gt, rules.lt]) : ''" }, { id: "uint64.gt_lt_exclusive", expression: "has(rules.lt) && rules.lt < rules.gt && (rules.lt <= this && this <= rules.gt)? 'value must be greater than %s or less than %s'.format([rules.gt, rules.lt]) : ''" }, { id: "uint64.gt_lte", expression: "has(rules.lte) && rules.lte >= rules.gt && (this > rules.lte || this <= rules.gt)? 'value must be greater than %s and less than or equal to %s'.format([rules.gt, rules.lte]) : ''" }, { id: "uint64.gt_lte_exclusive", expression: "has(rules.lte) && rules.lte < rules.gt && (rules.lte < this && this <= rules.gt)? 'value must be greater than %s or less than or equal to %s'.format([rules.gt, rules.lte]) : ''" }] } } }, + { no: 5, name: "gte", kind: "scalar", oneof: "greater_than", T: 4 /*ScalarType.UINT64*/, L: 0 /*LongType.BIGINT*/, options: { "buf.validate.priv.field": { cel: [{ id: "uint64.gte", expression: "!has(rules.lt) && !has(rules.lte) && this < rules.gte? 'value must be greater than or equal to %s'.format([rules.gte]) : ''" }, { id: "uint64.gte_lt", expression: "has(rules.lt) && rules.lt >= rules.gte && (this >= rules.lt || this < rules.gte)? 'value must be greater than or equal to %s and less than %s'.format([rules.gte, rules.lt]) : ''" }, { id: "uint64.gte_lt_exclusive", expression: "has(rules.lt) && rules.lt < rules.gte && (rules.lt <= this && this < rules.gte)? 'value must be greater than or equal to %s or less than %s'.format([rules.gte, rules.lt]) : ''" }, { id: "uint64.gte_lte", expression: "has(rules.lte) && rules.lte >= rules.gte && (this > rules.lte || this < rules.gte)? 'value must be greater than or equal to %s and less than or equal to %s'.format([rules.gte, rules.lte]) : ''" }, { id: "uint64.gte_lte_exclusive", expression: "has(rules.lte) && rules.lte < rules.gte && (rules.lte < this && this < rules.gte)? 'value must be greater than or equal to %s or less than or equal to %s'.format([rules.gte, rules.lte]) : ''" }] } } }, + { no: 6, name: "in", kind: "scalar", repeat: 1 /*RepeatType.PACKED*/, T: 4 /*ScalarType.UINT64*/, L: 0 /*LongType.BIGINT*/, options: { "buf.validate.priv.field": { cel: [{ id: "uint64.in", expression: "!(this in dyn(rules)['in']) ? 'value must be in list %s'.format([dyn(rules)['in']]) : ''" }] } } }, + { no: 7, name: "not_in", kind: "scalar", localName: "not_in", repeat: 1 /*RepeatType.PACKED*/, T: 4 /*ScalarType.UINT64*/, L: 0 /*LongType.BIGINT*/, options: { "buf.validate.priv.field": { cel: [{ id: "uint64.not_in", expression: "this in rules.not_in ? 'value must not be in list %s'.format([rules.not_in]) : ''" }] } } } + ]); + } + create(value) { + const message = globalThis.Object.create((this.messagePrototype)); + message.less_than = { oneofKind: undefined }; + message.greater_than = { oneofKind: undefined }; + message.in = []; + message.not_in = []; + if (value !== undefined) + runtime_3.reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader, length, options, target) { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* optional uint64 const */ 1: + message.const = reader.uint64().toBigInt(); + break; + case /* uint64 lt */ 2: + message.less_than = { + oneofKind: "lt", + lt: reader.uint64().toBigInt() + }; + break; + case /* uint64 lte */ 3: + message.less_than = { + oneofKind: "lte", + lte: reader.uint64().toBigInt() + }; + break; + case /* uint64 gt */ 4: + message.greater_than = { + oneofKind: "gt", + gt: reader.uint64().toBigInt() + }; + break; + case /* uint64 gte */ 5: + message.greater_than = { + oneofKind: "gte", + gte: reader.uint64().toBigInt() + }; + break; + case /* repeated uint64 in */ 6: + if (wireType === runtime_1.WireType.LengthDelimited) + for (let e = reader.int32() + reader.pos; reader.pos < e;) + message.in.push(reader.uint64().toBigInt()); + else + message.in.push(reader.uint64().toBigInt()); + break; + case /* repeated uint64 not_in */ 7: + if (wireType === runtime_1.WireType.LengthDelimited) + for (let e = reader.int32() + reader.pos; reader.pos < e;) + message.not_in.push(reader.uint64().toBigInt()); + else + message.not_in.push(reader.uint64().toBigInt()); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? runtime_2.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message, writer, options) { + /* optional uint64 const = 1; */ + if (message.const !== undefined) + writer.tag(1, runtime_1.WireType.Varint).uint64(message.const); + /* uint64 lt = 2; */ + if (message.less_than.oneofKind === "lt") + writer.tag(2, runtime_1.WireType.Varint).uint64(message.less_than.lt); + /* uint64 lte = 3; */ + if (message.less_than.oneofKind === "lte") + writer.tag(3, runtime_1.WireType.Varint).uint64(message.less_than.lte); + /* uint64 gt = 4; */ + if (message.greater_than.oneofKind === "gt") + writer.tag(4, runtime_1.WireType.Varint).uint64(message.greater_than.gt); + /* uint64 gte = 5; */ + if (message.greater_than.oneofKind === "gte") + writer.tag(5, runtime_1.WireType.Varint).uint64(message.greater_than.gte); + /* repeated uint64 in = 6; */ + if (message.in.length) { + writer.tag(6, runtime_1.WireType.LengthDelimited).fork(); + for (let i = 0; i < message.in.length; i++) + writer.uint64(message.in[i]); + writer.join(); + } + /* repeated uint64 not_in = 7; */ + if (message.not_in.length) { + writer.tag(7, runtime_1.WireType.LengthDelimited).fork(); + for (let i = 0; i < message.not_in.length; i++) + writer.uint64(message.not_in[i]); + writer.join(); + } + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } } /** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.buf.validate.SFixed32Rules = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.buf.validate.SFixed32Rules.repeatedFields_, proto.buf.validate.SFixed32Rules.oneofGroups_); -}; -goog.inherits(proto.buf.validate.SFixed32Rules, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.buf.validate.SFixed32Rules.displayName = 'proto.buf.validate.SFixed32Rules'; + * @generated MessageType for protobuf message buf.validate.UInt64Rules + */ +exports.UInt64Rules = new UInt64Rules$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class SInt32Rules$Type extends runtime_4.MessageType { + constructor() { + super("buf.validate.SInt32Rules", [ + { no: 1, name: "const", kind: "scalar", opt: true, T: 17 /*ScalarType.SINT32*/, options: { "buf.validate.priv.field": { cel: [{ id: "sint32.const", expression: "this != rules.const ? 'value must equal %s'.format([rules.const]) : ''" }] } } }, + { no: 2, name: "lt", kind: "scalar", oneof: "less_than", T: 17 /*ScalarType.SINT32*/, options: { "buf.validate.priv.field": { cel: [{ id: "sint32.lt", expression: "!has(rules.gte) && !has(rules.gt) && this >= rules.lt? 'value must be less than %s'.format([rules.lt]) : ''" }] } } }, + { no: 3, name: "lte", kind: "scalar", oneof: "less_than", T: 17 /*ScalarType.SINT32*/, options: { "buf.validate.priv.field": { cel: [{ id: "sint32.lte", expression: "!has(rules.gte) && !has(rules.gt) && this > rules.lte? 'value must be less than or equal to %s'.format([rules.lte]) : ''" }] } } }, + { no: 4, name: "gt", kind: "scalar", oneof: "greater_than", T: 17 /*ScalarType.SINT32*/, options: { "buf.validate.priv.field": { cel: [{ id: "sint32.gt", expression: "!has(rules.lt) && !has(rules.lte) && this <= rules.gt? 'value must be greater than %s'.format([rules.gt]) : ''" }, { id: "sint32.gt_lt", expression: "has(rules.lt) && rules.lt >= rules.gt && (this >= rules.lt || this <= rules.gt)? 'value must be greater than %s and less than %s'.format([rules.gt, rules.lt]) : ''" }, { id: "sint32.gt_lt_exclusive", expression: "has(rules.lt) && rules.lt < rules.gt && (rules.lt <= this && this <= rules.gt)? 'value must be greater than %s or less than %s'.format([rules.gt, rules.lt]) : ''" }, { id: "sint32.gt_lte", expression: "has(rules.lte) && rules.lte >= rules.gt && (this > rules.lte || this <= rules.gt)? 'value must be greater than %s and less than or equal to %s'.format([rules.gt, rules.lte]) : ''" }, { id: "sint32.gt_lte_exclusive", expression: "has(rules.lte) && rules.lte < rules.gt && (rules.lte < this && this <= rules.gt)? 'value must be greater than %s or less than or equal to %s'.format([rules.gt, rules.lte]) : ''" }] } } }, + { no: 5, name: "gte", kind: "scalar", oneof: "greater_than", T: 17 /*ScalarType.SINT32*/, options: { "buf.validate.priv.field": { cel: [{ id: "sint32.gte", expression: "!has(rules.lt) && !has(rules.lte) && this < rules.gte? 'value must be greater than or equal to %s'.format([rules.gte]) : ''" }, { id: "sint32.gte_lt", expression: "has(rules.lt) && rules.lt >= rules.gte && (this >= rules.lt || this < rules.gte)? 'value must be greater than or equal to %s and less than %s'.format([rules.gte, rules.lt]) : ''" }, { id: "sint32.gte_lt_exclusive", expression: "has(rules.lt) && rules.lt < rules.gte && (rules.lt <= this && this < rules.gte)? 'value must be greater than or equal to %s or less than %s'.format([rules.gte, rules.lt]) : ''" }, { id: "sint32.gte_lte", expression: "has(rules.lte) && rules.lte >= rules.gte && (this > rules.lte || this < rules.gte)? 'value must be greater than or equal to %s and less than or equal to %s'.format([rules.gte, rules.lte]) : ''" }, { id: "sint32.gte_lte_exclusive", expression: "has(rules.lte) && rules.lte < rules.gte && (rules.lte < this && this < rules.gte)? 'value must be greater than or equal to %s or less than or equal to %s'.format([rules.gte, rules.lte]) : ''" }] } } }, + { no: 6, name: "in", kind: "scalar", repeat: 1 /*RepeatType.PACKED*/, T: 17 /*ScalarType.SINT32*/, options: { "buf.validate.priv.field": { cel: [{ id: "sint32.in", expression: "!(this in dyn(rules)['in']) ? 'value must be in list %s'.format([dyn(rules)['in']]) : ''" }] } } }, + { no: 7, name: "not_in", kind: "scalar", localName: "not_in", repeat: 1 /*RepeatType.PACKED*/, T: 17 /*ScalarType.SINT32*/, options: { "buf.validate.priv.field": { cel: [{ id: "sint32.not_in", expression: "this in rules.not_in ? 'value must not be in list %s'.format([rules.not_in]) : ''" }] } } } + ]); + } + create(value) { + const message = globalThis.Object.create((this.messagePrototype)); + message.less_than = { oneofKind: undefined }; + message.greater_than = { oneofKind: undefined }; + message.in = []; + message.not_in = []; + if (value !== undefined) + runtime_3.reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader, length, options, target) { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* optional sint32 const */ 1: + message.const = reader.sint32(); + break; + case /* sint32 lt */ 2: + message.less_than = { + oneofKind: "lt", + lt: reader.sint32() + }; + break; + case /* sint32 lte */ 3: + message.less_than = { + oneofKind: "lte", + lte: reader.sint32() + }; + break; + case /* sint32 gt */ 4: + message.greater_than = { + oneofKind: "gt", + gt: reader.sint32() + }; + break; + case /* sint32 gte */ 5: + message.greater_than = { + oneofKind: "gte", + gte: reader.sint32() + }; + break; + case /* repeated sint32 in */ 6: + if (wireType === runtime_1.WireType.LengthDelimited) + for (let e = reader.int32() + reader.pos; reader.pos < e;) + message.in.push(reader.sint32()); + else + message.in.push(reader.sint32()); + break; + case /* repeated sint32 not_in */ 7: + if (wireType === runtime_1.WireType.LengthDelimited) + for (let e = reader.int32() + reader.pos; reader.pos < e;) + message.not_in.push(reader.sint32()); + else + message.not_in.push(reader.sint32()); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? runtime_2.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message, writer, options) { + /* optional sint32 const = 1; */ + if (message.const !== undefined) + writer.tag(1, runtime_1.WireType.Varint).sint32(message.const); + /* sint32 lt = 2; */ + if (message.less_than.oneofKind === "lt") + writer.tag(2, runtime_1.WireType.Varint).sint32(message.less_than.lt); + /* sint32 lte = 3; */ + if (message.less_than.oneofKind === "lte") + writer.tag(3, runtime_1.WireType.Varint).sint32(message.less_than.lte); + /* sint32 gt = 4; */ + if (message.greater_than.oneofKind === "gt") + writer.tag(4, runtime_1.WireType.Varint).sint32(message.greater_than.gt); + /* sint32 gte = 5; */ + if (message.greater_than.oneofKind === "gte") + writer.tag(5, runtime_1.WireType.Varint).sint32(message.greater_than.gte); + /* repeated sint32 in = 6; */ + if (message.in.length) { + writer.tag(6, runtime_1.WireType.LengthDelimited).fork(); + for (let i = 0; i < message.in.length; i++) + writer.sint32(message.in[i]); + writer.join(); + } + /* repeated sint32 not_in = 7; */ + if (message.not_in.length) { + writer.tag(7, runtime_1.WireType.LengthDelimited).fork(); + for (let i = 0; i < message.not_in.length; i++) + writer.sint32(message.not_in[i]); + writer.join(); + } + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } } /** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.buf.validate.SFixed64Rules = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.buf.validate.SFixed64Rules.repeatedFields_, proto.buf.validate.SFixed64Rules.oneofGroups_); -}; -goog.inherits(proto.buf.validate.SFixed64Rules, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.buf.validate.SFixed64Rules.displayName = 'proto.buf.validate.SFixed64Rules'; + * @generated MessageType for protobuf message buf.validate.SInt32Rules + */ +exports.SInt32Rules = new SInt32Rules$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class SInt64Rules$Type extends runtime_4.MessageType { + constructor() { + super("buf.validate.SInt64Rules", [ + { no: 1, name: "const", kind: "scalar", opt: true, T: 18 /*ScalarType.SINT64*/, L: 0 /*LongType.BIGINT*/, options: { "buf.validate.priv.field": { cel: [{ id: "sint64.const", expression: "this != rules.const ? 'value must equal %s'.format([rules.const]) : ''" }] } } }, + { no: 2, name: "lt", kind: "scalar", oneof: "less_than", T: 18 /*ScalarType.SINT64*/, L: 0 /*LongType.BIGINT*/, options: { "buf.validate.priv.field": { cel: [{ id: "sint64.lt", expression: "!has(rules.gte) && !has(rules.gt) && this >= rules.lt? 'value must be less than %s'.format([rules.lt]) : ''" }] } } }, + { no: 3, name: "lte", kind: "scalar", oneof: "less_than", T: 18 /*ScalarType.SINT64*/, L: 0 /*LongType.BIGINT*/, options: { "buf.validate.priv.field": { cel: [{ id: "sint64.lte", expression: "!has(rules.gte) && !has(rules.gt) && this > rules.lte? 'value must be less than or equal to %s'.format([rules.lte]) : ''" }] } } }, + { no: 4, name: "gt", kind: "scalar", oneof: "greater_than", T: 18 /*ScalarType.SINT64*/, L: 0 /*LongType.BIGINT*/, options: { "buf.validate.priv.field": { cel: [{ id: "sint64.gt", expression: "!has(rules.lt) && !has(rules.lte) && this <= rules.gt? 'value must be greater than %s'.format([rules.gt]) : ''" }, { id: "sint64.gt_lt", expression: "has(rules.lt) && rules.lt >= rules.gt && (this >= rules.lt || this <= rules.gt)? 'value must be greater than %s and less than %s'.format([rules.gt, rules.lt]) : ''" }, { id: "sint64.gt_lt_exclusive", expression: "has(rules.lt) && rules.lt < rules.gt && (rules.lt <= this && this <= rules.gt)? 'value must be greater than %s or less than %s'.format([rules.gt, rules.lt]) : ''" }, { id: "sint64.gt_lte", expression: "has(rules.lte) && rules.lte >= rules.gt && (this > rules.lte || this <= rules.gt)? 'value must be greater than %s and less than or equal to %s'.format([rules.gt, rules.lte]) : ''" }, { id: "sint64.gt_lte_exclusive", expression: "has(rules.lte) && rules.lte < rules.gt && (rules.lte < this && this <= rules.gt)? 'value must be greater than %s or less than or equal to %s'.format([rules.gt, rules.lte]) : ''" }] } } }, + { no: 5, name: "gte", kind: "scalar", oneof: "greater_than", T: 18 /*ScalarType.SINT64*/, L: 0 /*LongType.BIGINT*/, options: { "buf.validate.priv.field": { cel: [{ id: "sint64.gte", expression: "!has(rules.lt) && !has(rules.lte) && this < rules.gte? 'value must be greater than or equal to %s'.format([rules.gte]) : ''" }, { id: "sint64.gte_lt", expression: "has(rules.lt) && rules.lt >= rules.gte && (this >= rules.lt || this < rules.gte)? 'value must be greater than or equal to %s and less than %s'.format([rules.gte, rules.lt]) : ''" }, { id: "sint64.gte_lt_exclusive", expression: "has(rules.lt) && rules.lt < rules.gte && (rules.lt <= this && this < rules.gte)? 'value must be greater than or equal to %s or less than %s'.format([rules.gte, rules.lt]) : ''" }, { id: "sint64.gte_lte", expression: "has(rules.lte) && rules.lte >= rules.gte && (this > rules.lte || this < rules.gte)? 'value must be greater than or equal to %s and less than or equal to %s'.format([rules.gte, rules.lte]) : ''" }, { id: "sint64.gte_lte_exclusive", expression: "has(rules.lte) && rules.lte < rules.gte && (rules.lte < this && this < rules.gte)? 'value must be greater than or equal to %s or less than or equal to %s'.format([rules.gte, rules.lte]) : ''" }] } } }, + { no: 6, name: "in", kind: "scalar", repeat: 1 /*RepeatType.PACKED*/, T: 18 /*ScalarType.SINT64*/, L: 0 /*LongType.BIGINT*/, options: { "buf.validate.priv.field": { cel: [{ id: "sint64.in", expression: "!(this in dyn(rules)['in']) ? 'value must be in list %s'.format([dyn(rules)['in']]) : ''" }] } } }, + { no: 7, name: "not_in", kind: "scalar", localName: "not_in", repeat: 1 /*RepeatType.PACKED*/, T: 18 /*ScalarType.SINT64*/, L: 0 /*LongType.BIGINT*/, options: { "buf.validate.priv.field": { cel: [{ id: "sint64.not_in", expression: "this in rules.not_in ? 'value must not be in list %s'.format([rules.not_in]) : ''" }] } } } + ]); + } + create(value) { + const message = globalThis.Object.create((this.messagePrototype)); + message.less_than = { oneofKind: undefined }; + message.greater_than = { oneofKind: undefined }; + message.in = []; + message.not_in = []; + if (value !== undefined) + runtime_3.reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader, length, options, target) { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* optional sint64 const */ 1: + message.const = reader.sint64().toBigInt(); + break; + case /* sint64 lt */ 2: + message.less_than = { + oneofKind: "lt", + lt: reader.sint64().toBigInt() + }; + break; + case /* sint64 lte */ 3: + message.less_than = { + oneofKind: "lte", + lte: reader.sint64().toBigInt() + }; + break; + case /* sint64 gt */ 4: + message.greater_than = { + oneofKind: "gt", + gt: reader.sint64().toBigInt() + }; + break; + case /* sint64 gte */ 5: + message.greater_than = { + oneofKind: "gte", + gte: reader.sint64().toBigInt() + }; + break; + case /* repeated sint64 in */ 6: + if (wireType === runtime_1.WireType.LengthDelimited) + for (let e = reader.int32() + reader.pos; reader.pos < e;) + message.in.push(reader.sint64().toBigInt()); + else + message.in.push(reader.sint64().toBigInt()); + break; + case /* repeated sint64 not_in */ 7: + if (wireType === runtime_1.WireType.LengthDelimited) + for (let e = reader.int32() + reader.pos; reader.pos < e;) + message.not_in.push(reader.sint64().toBigInt()); + else + message.not_in.push(reader.sint64().toBigInt()); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? runtime_2.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message, writer, options) { + /* optional sint64 const = 1; */ + if (message.const !== undefined) + writer.tag(1, runtime_1.WireType.Varint).sint64(message.const); + /* sint64 lt = 2; */ + if (message.less_than.oneofKind === "lt") + writer.tag(2, runtime_1.WireType.Varint).sint64(message.less_than.lt); + /* sint64 lte = 3; */ + if (message.less_than.oneofKind === "lte") + writer.tag(3, runtime_1.WireType.Varint).sint64(message.less_than.lte); + /* sint64 gt = 4; */ + if (message.greater_than.oneofKind === "gt") + writer.tag(4, runtime_1.WireType.Varint).sint64(message.greater_than.gt); + /* sint64 gte = 5; */ + if (message.greater_than.oneofKind === "gte") + writer.tag(5, runtime_1.WireType.Varint).sint64(message.greater_than.gte); + /* repeated sint64 in = 6; */ + if (message.in.length) { + writer.tag(6, runtime_1.WireType.LengthDelimited).fork(); + for (let i = 0; i < message.in.length; i++) + writer.sint64(message.in[i]); + writer.join(); + } + /* repeated sint64 not_in = 7; */ + if (message.not_in.length) { + writer.tag(7, runtime_1.WireType.LengthDelimited).fork(); + for (let i = 0; i < message.not_in.length; i++) + writer.sint64(message.not_in[i]); + writer.join(); + } + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } } /** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.buf.validate.BoolRules = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.buf.validate.BoolRules, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.buf.validate.BoolRules.displayName = 'proto.buf.validate.BoolRules'; + * @generated MessageType for protobuf message buf.validate.SInt64Rules + */ +exports.SInt64Rules = new SInt64Rules$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class Fixed32Rules$Type extends runtime_4.MessageType { + constructor() { + super("buf.validate.Fixed32Rules", [ + { no: 1, name: "const", kind: "scalar", opt: true, T: 7 /*ScalarType.FIXED32*/, options: { "buf.validate.priv.field": { cel: [{ id: "fixed32.const", expression: "this != rules.const ? 'value must equal %s'.format([rules.const]) : ''" }] } } }, + { no: 2, name: "lt", kind: "scalar", oneof: "less_than", T: 7 /*ScalarType.FIXED32*/, options: { "buf.validate.priv.field": { cel: [{ id: "fixed32.lt", expression: "!has(rules.gte) && !has(rules.gt) && this >= rules.lt? 'value must be less than %s'.format([rules.lt]) : ''" }] } } }, + { no: 3, name: "lte", kind: "scalar", oneof: "less_than", T: 7 /*ScalarType.FIXED32*/, options: { "buf.validate.priv.field": { cel: [{ id: "fixed32.lte", expression: "!has(rules.gte) && !has(rules.gt) && this > rules.lte? 'value must be less than or equal to %s'.format([rules.lte]) : ''" }] } } }, + { no: 4, name: "gt", kind: "scalar", oneof: "greater_than", T: 7 /*ScalarType.FIXED32*/, options: { "buf.validate.priv.field": { cel: [{ id: "fixed32.gt", expression: "!has(rules.lt) && !has(rules.lte) && this <= rules.gt? 'value must be greater than %s'.format([rules.gt]) : ''" }, { id: "fixed32.gt_lt", expression: "has(rules.lt) && rules.lt >= rules.gt && (this >= rules.lt || this <= rules.gt)? 'value must be greater than %s and less than %s'.format([rules.gt, rules.lt]) : ''" }, { id: "fixed32.gt_lt_exclusive", expression: "has(rules.lt) && rules.lt < rules.gt && (rules.lt <= this && this <= rules.gt)? 'value must be greater than %s or less than %s'.format([rules.gt, rules.lt]) : ''" }, { id: "fixed32.gt_lte", expression: "has(rules.lte) && rules.lte >= rules.gt && (this > rules.lte || this <= rules.gt)? 'value must be greater than %s and less than or equal to %s'.format([rules.gt, rules.lte]) : ''" }, { id: "fixed32.gt_lte_exclusive", expression: "has(rules.lte) && rules.lte < rules.gt && (rules.lte < this && this <= rules.gt)? 'value must be greater than %s or less than or equal to %s'.format([rules.gt, rules.lte]) : ''" }] } } }, + { no: 5, name: "gte", kind: "scalar", oneof: "greater_than", T: 7 /*ScalarType.FIXED32*/, options: { "buf.validate.priv.field": { cel: [{ id: "fixed32.gte", expression: "!has(rules.lt) && !has(rules.lte) && this < rules.gte? 'value must be greater than or equal to %s'.format([rules.gte]) : ''" }, { id: "fixed32.gte_lt", expression: "has(rules.lt) && rules.lt >= rules.gte && (this >= rules.lt || this < rules.gte)? 'value must be greater than or equal to %s and less than %s'.format([rules.gte, rules.lt]) : ''" }, { id: "fixed32.gte_lt_exclusive", expression: "has(rules.lt) && rules.lt < rules.gte && (rules.lt <= this && this < rules.gte)? 'value must be greater than or equal to %s or less than %s'.format([rules.gte, rules.lt]) : ''" }, { id: "fixed32.gte_lte", expression: "has(rules.lte) && rules.lte >= rules.gte && (this > rules.lte || this < rules.gte)? 'value must be greater than or equal to %s and less than or equal to %s'.format([rules.gte, rules.lte]) : ''" }, { id: "fixed32.gte_lte_exclusive", expression: "has(rules.lte) && rules.lte < rules.gte && (rules.lte < this && this < rules.gte)? 'value must be greater than or equal to %s or less than or equal to %s'.format([rules.gte, rules.lte]) : ''" }] } } }, + { no: 6, name: "in", kind: "scalar", repeat: 1 /*RepeatType.PACKED*/, T: 7 /*ScalarType.FIXED32*/, options: { "buf.validate.priv.field": { cel: [{ id: "fixed32.in", expression: "!(this in dyn(rules)['in']) ? 'value must be in list %s'.format([dyn(rules)['in']]) : ''" }] } } }, + { no: 7, name: "not_in", kind: "scalar", localName: "not_in", repeat: 1 /*RepeatType.PACKED*/, T: 7 /*ScalarType.FIXED32*/, options: { "buf.validate.priv.field": { cel: [{ id: "fixed32.not_in", expression: "this in rules.not_in ? 'value must not be in list %s'.format([rules.not_in]) : ''" }] } } } + ]); + } + create(value) { + const message = globalThis.Object.create((this.messagePrototype)); + message.less_than = { oneofKind: undefined }; + message.greater_than = { oneofKind: undefined }; + message.in = []; + message.not_in = []; + if (value !== undefined) + runtime_3.reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader, length, options, target) { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* optional fixed32 const */ 1: + message.const = reader.fixed32(); + break; + case /* fixed32 lt */ 2: + message.less_than = { + oneofKind: "lt", + lt: reader.fixed32() + }; + break; + case /* fixed32 lte */ 3: + message.less_than = { + oneofKind: "lte", + lte: reader.fixed32() + }; + break; + case /* fixed32 gt */ 4: + message.greater_than = { + oneofKind: "gt", + gt: reader.fixed32() + }; + break; + case /* fixed32 gte */ 5: + message.greater_than = { + oneofKind: "gte", + gte: reader.fixed32() + }; + break; + case /* repeated fixed32 in */ 6: + if (wireType === runtime_1.WireType.LengthDelimited) + for (let e = reader.int32() + reader.pos; reader.pos < e;) + message.in.push(reader.fixed32()); + else + message.in.push(reader.fixed32()); + break; + case /* repeated fixed32 not_in */ 7: + if (wireType === runtime_1.WireType.LengthDelimited) + for (let e = reader.int32() + reader.pos; reader.pos < e;) + message.not_in.push(reader.fixed32()); + else + message.not_in.push(reader.fixed32()); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? runtime_2.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message, writer, options) { + /* optional fixed32 const = 1; */ + if (message.const !== undefined) + writer.tag(1, runtime_1.WireType.Bit32).fixed32(message.const); + /* fixed32 lt = 2; */ + if (message.less_than.oneofKind === "lt") + writer.tag(2, runtime_1.WireType.Bit32).fixed32(message.less_than.lt); + /* fixed32 lte = 3; */ + if (message.less_than.oneofKind === "lte") + writer.tag(3, runtime_1.WireType.Bit32).fixed32(message.less_than.lte); + /* fixed32 gt = 4; */ + if (message.greater_than.oneofKind === "gt") + writer.tag(4, runtime_1.WireType.Bit32).fixed32(message.greater_than.gt); + /* fixed32 gte = 5; */ + if (message.greater_than.oneofKind === "gte") + writer.tag(5, runtime_1.WireType.Bit32).fixed32(message.greater_than.gte); + /* repeated fixed32 in = 6; */ + if (message.in.length) { + writer.tag(6, runtime_1.WireType.LengthDelimited).fork(); + for (let i = 0; i < message.in.length; i++) + writer.fixed32(message.in[i]); + writer.join(); + } + /* repeated fixed32 not_in = 7; */ + if (message.not_in.length) { + writer.tag(7, runtime_1.WireType.LengthDelimited).fork(); + for (let i = 0; i < message.not_in.length; i++) + writer.fixed32(message.not_in[i]); + writer.join(); + } + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } } /** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.buf.validate.StringRules = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.buf.validate.StringRules.repeatedFields_, proto.buf.validate.StringRules.oneofGroups_); -}; -goog.inherits(proto.buf.validate.StringRules, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.buf.validate.StringRules.displayName = 'proto.buf.validate.StringRules'; + * @generated MessageType for protobuf message buf.validate.Fixed32Rules + */ +exports.Fixed32Rules = new Fixed32Rules$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class Fixed64Rules$Type extends runtime_4.MessageType { + constructor() { + super("buf.validate.Fixed64Rules", [ + { no: 1, name: "const", kind: "scalar", opt: true, T: 6 /*ScalarType.FIXED64*/, L: 0 /*LongType.BIGINT*/, options: { "buf.validate.priv.field": { cel: [{ id: "fixed64.const", expression: "this != rules.const ? 'value must equal %s'.format([rules.const]) : ''" }] } } }, + { no: 2, name: "lt", kind: "scalar", oneof: "less_than", T: 6 /*ScalarType.FIXED64*/, L: 0 /*LongType.BIGINT*/, options: { "buf.validate.priv.field": { cel: [{ id: "fixed64.lt", expression: "!has(rules.gte) && !has(rules.gt) && this >= rules.lt? 'value must be less than %s'.format([rules.lt]) : ''" }] } } }, + { no: 3, name: "lte", kind: "scalar", oneof: "less_than", T: 6 /*ScalarType.FIXED64*/, L: 0 /*LongType.BIGINT*/, options: { "buf.validate.priv.field": { cel: [{ id: "fixed64.lte", expression: "!has(rules.gte) && !has(rules.gt) && this > rules.lte? 'value must be less than or equal to %s'.format([rules.lte]) : ''" }] } } }, + { no: 4, name: "gt", kind: "scalar", oneof: "greater_than", T: 6 /*ScalarType.FIXED64*/, L: 0 /*LongType.BIGINT*/, options: { "buf.validate.priv.field": { cel: [{ id: "fixed64.gt", expression: "!has(rules.lt) && !has(rules.lte) && this <= rules.gt? 'value must be greater than %s'.format([rules.gt]) : ''" }, { id: "fixed64.gt_lt", expression: "has(rules.lt) && rules.lt >= rules.gt && (this >= rules.lt || this <= rules.gt)? 'value must be greater than %s and less than %s'.format([rules.gt, rules.lt]) : ''" }, { id: "fixed64.gt_lt_exclusive", expression: "has(rules.lt) && rules.lt < rules.gt && (rules.lt <= this && this <= rules.gt)? 'value must be greater than %s or less than %s'.format([rules.gt, rules.lt]) : ''" }, { id: "fixed64.gt_lte", expression: "has(rules.lte) && rules.lte >= rules.gt && (this > rules.lte || this <= rules.gt)? 'value must be greater than %s and less than or equal to %s'.format([rules.gt, rules.lte]) : ''" }, { id: "fixed64.gt_lte_exclusive", expression: "has(rules.lte) && rules.lte < rules.gt && (rules.lte < this && this <= rules.gt)? 'value must be greater than %s or less than or equal to %s'.format([rules.gt, rules.lte]) : ''" }] } } }, + { no: 5, name: "gte", kind: "scalar", oneof: "greater_than", T: 6 /*ScalarType.FIXED64*/, L: 0 /*LongType.BIGINT*/, options: { "buf.validate.priv.field": { cel: [{ id: "fixed64.gte", expression: "!has(rules.lt) && !has(rules.lte) && this < rules.gte? 'value must be greater than or equal to %s'.format([rules.gte]) : ''" }, { id: "fixed64.gte_lt", expression: "has(rules.lt) && rules.lt >= rules.gte && (this >= rules.lt || this < rules.gte)? 'value must be greater than or equal to %s and less than %s'.format([rules.gte, rules.lt]) : ''" }, { id: "fixed64.gte_lt_exclusive", expression: "has(rules.lt) && rules.lt < rules.gte && (rules.lt <= this && this < rules.gte)? 'value must be greater than or equal to %s or less than %s'.format([rules.gte, rules.lt]) : ''" }, { id: "fixed64.gte_lte", expression: "has(rules.lte) && rules.lte >= rules.gte && (this > rules.lte || this < rules.gte)? 'value must be greater than or equal to %s and less than or equal to %s'.format([rules.gte, rules.lte]) : ''" }, { id: "fixed64.gte_lte_exclusive", expression: "has(rules.lte) && rules.lte < rules.gte && (rules.lte < this && this < rules.gte)? 'value must be greater than or equal to %s or less than or equal to %s'.format([rules.gte, rules.lte]) : ''" }] } } }, + { no: 6, name: "in", kind: "scalar", repeat: 1 /*RepeatType.PACKED*/, T: 6 /*ScalarType.FIXED64*/, L: 0 /*LongType.BIGINT*/, options: { "buf.validate.priv.field": { cel: [{ id: "fixed64.in", expression: "!(this in dyn(rules)['in']) ? 'value must be in list %s'.format([dyn(rules)['in']]) : ''" }] } } }, + { no: 7, name: "not_in", kind: "scalar", localName: "not_in", repeat: 1 /*RepeatType.PACKED*/, T: 6 /*ScalarType.FIXED64*/, L: 0 /*LongType.BIGINT*/, options: { "buf.validate.priv.field": { cel: [{ id: "fixed64.not_in", expression: "this in rules.not_in ? 'value must not be in list %s'.format([rules.not_in]) : ''" }] } } } + ]); + } + create(value) { + const message = globalThis.Object.create((this.messagePrototype)); + message.less_than = { oneofKind: undefined }; + message.greater_than = { oneofKind: undefined }; + message.in = []; + message.not_in = []; + if (value !== undefined) + runtime_3.reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader, length, options, target) { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* optional fixed64 const */ 1: + message.const = reader.fixed64().toBigInt(); + break; + case /* fixed64 lt */ 2: + message.less_than = { + oneofKind: "lt", + lt: reader.fixed64().toBigInt() + }; + break; + case /* fixed64 lte */ 3: + message.less_than = { + oneofKind: "lte", + lte: reader.fixed64().toBigInt() + }; + break; + case /* fixed64 gt */ 4: + message.greater_than = { + oneofKind: "gt", + gt: reader.fixed64().toBigInt() + }; + break; + case /* fixed64 gte */ 5: + message.greater_than = { + oneofKind: "gte", + gte: reader.fixed64().toBigInt() + }; + break; + case /* repeated fixed64 in */ 6: + if (wireType === runtime_1.WireType.LengthDelimited) + for (let e = reader.int32() + reader.pos; reader.pos < e;) + message.in.push(reader.fixed64().toBigInt()); + else + message.in.push(reader.fixed64().toBigInt()); + break; + case /* repeated fixed64 not_in */ 7: + if (wireType === runtime_1.WireType.LengthDelimited) + for (let e = reader.int32() + reader.pos; reader.pos < e;) + message.not_in.push(reader.fixed64().toBigInt()); + else + message.not_in.push(reader.fixed64().toBigInt()); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? runtime_2.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message, writer, options) { + /* optional fixed64 const = 1; */ + if (message.const !== undefined) + writer.tag(1, runtime_1.WireType.Bit64).fixed64(message.const); + /* fixed64 lt = 2; */ + if (message.less_than.oneofKind === "lt") + writer.tag(2, runtime_1.WireType.Bit64).fixed64(message.less_than.lt); + /* fixed64 lte = 3; */ + if (message.less_than.oneofKind === "lte") + writer.tag(3, runtime_1.WireType.Bit64).fixed64(message.less_than.lte); + /* fixed64 gt = 4; */ + if (message.greater_than.oneofKind === "gt") + writer.tag(4, runtime_1.WireType.Bit64).fixed64(message.greater_than.gt); + /* fixed64 gte = 5; */ + if (message.greater_than.oneofKind === "gte") + writer.tag(5, runtime_1.WireType.Bit64).fixed64(message.greater_than.gte); + /* repeated fixed64 in = 6; */ + if (message.in.length) { + writer.tag(6, runtime_1.WireType.LengthDelimited).fork(); + for (let i = 0; i < message.in.length; i++) + writer.fixed64(message.in[i]); + writer.join(); + } + /* repeated fixed64 not_in = 7; */ + if (message.not_in.length) { + writer.tag(7, runtime_1.WireType.LengthDelimited).fork(); + for (let i = 0; i < message.not_in.length; i++) + writer.fixed64(message.not_in[i]); + writer.join(); + } + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } } /** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.buf.validate.BytesRules = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.buf.validate.BytesRules.repeatedFields_, proto.buf.validate.BytesRules.oneofGroups_); -}; -goog.inherits(proto.buf.validate.BytesRules, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.buf.validate.BytesRules.displayName = 'proto.buf.validate.BytesRules'; + * @generated MessageType for protobuf message buf.validate.Fixed64Rules + */ +exports.Fixed64Rules = new Fixed64Rules$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class SFixed32Rules$Type extends runtime_4.MessageType { + constructor() { + super("buf.validate.SFixed32Rules", [ + { no: 1, name: "const", kind: "scalar", opt: true, T: 15 /*ScalarType.SFIXED32*/, options: { "buf.validate.priv.field": { cel: [{ id: "sfixed32.const", expression: "this != rules.const ? 'value must equal %s'.format([rules.const]) : ''" }] } } }, + { no: 2, name: "lt", kind: "scalar", oneof: "less_than", T: 15 /*ScalarType.SFIXED32*/, options: { "buf.validate.priv.field": { cel: [{ id: "sfixed32.lt", expression: "!has(rules.gte) && !has(rules.gt) && this >= rules.lt? 'value must be less than %s'.format([rules.lt]) : ''" }] } } }, + { no: 3, name: "lte", kind: "scalar", oneof: "less_than", T: 15 /*ScalarType.SFIXED32*/, options: { "buf.validate.priv.field": { cel: [{ id: "sfixed32.lte", expression: "!has(rules.gte) && !has(rules.gt) && this > rules.lte? 'value must be less than or equal to %s'.format([rules.lte]) : ''" }] } } }, + { no: 4, name: "gt", kind: "scalar", oneof: "greater_than", T: 15 /*ScalarType.SFIXED32*/, options: { "buf.validate.priv.field": { cel: [{ id: "sfixed32.gt", expression: "!has(rules.lt) && !has(rules.lte) && this <= rules.gt? 'value must be greater than %s'.format([rules.gt]) : ''" }, { id: "sfixed32.gt_lt", expression: "has(rules.lt) && rules.lt >= rules.gt && (this >= rules.lt || this <= rules.gt)? 'value must be greater than %s and less than %s'.format([rules.gt, rules.lt]) : ''" }, { id: "sfixed32.gt_lt_exclusive", expression: "has(rules.lt) && rules.lt < rules.gt && (rules.lt <= this && this <= rules.gt)? 'value must be greater than %s or less than %s'.format([rules.gt, rules.lt]) : ''" }, { id: "sfixed32.gt_lte", expression: "has(rules.lte) && rules.lte >= rules.gt && (this > rules.lte || this <= rules.gt)? 'value must be greater than %s and less than or equal to %s'.format([rules.gt, rules.lte]) : ''" }, { id: "sfixed32.gt_lte_exclusive", expression: "has(rules.lte) && rules.lte < rules.gt && (rules.lte < this && this <= rules.gt)? 'value must be greater than %s or less than or equal to %s'.format([rules.gt, rules.lte]) : ''" }] } } }, + { no: 5, name: "gte", kind: "scalar", oneof: "greater_than", T: 15 /*ScalarType.SFIXED32*/, options: { "buf.validate.priv.field": { cel: [{ id: "sfixed32.gte", expression: "!has(rules.lt) && !has(rules.lte) && this < rules.gte? 'value must be greater than or equal to %s'.format([rules.gte]) : ''" }, { id: "sfixed32.gte_lt", expression: "has(rules.lt) && rules.lt >= rules.gte && (this >= rules.lt || this < rules.gte)? 'value must be greater than or equal to %s and less than %s'.format([rules.gte, rules.lt]) : ''" }, { id: "sfixed32.gte_lt_exclusive", expression: "has(rules.lt) && rules.lt < rules.gte && (rules.lt <= this && this < rules.gte)? 'value must be greater than or equal to %s or less than %s'.format([rules.gte, rules.lt]) : ''" }, { id: "sfixed32.gte_lte", expression: "has(rules.lte) && rules.lte >= rules.gte && (this > rules.lte || this < rules.gte)? 'value must be greater than or equal to %s and less than or equal to %s'.format([rules.gte, rules.lte]) : ''" }, { id: "sfixed32.gte_lte_exclusive", expression: "has(rules.lte) && rules.lte < rules.gte && (rules.lte < this && this < rules.gte)? 'value must be greater than or equal to %s or less than or equal to %s'.format([rules.gte, rules.lte]) : ''" }] } } }, + { no: 6, name: "in", kind: "scalar", repeat: 1 /*RepeatType.PACKED*/, T: 15 /*ScalarType.SFIXED32*/, options: { "buf.validate.priv.field": { cel: [{ id: "sfixed32.in", expression: "!(this in dyn(rules)['in']) ? 'value must be in list %s'.format([dyn(rules)['in']]) : ''" }] } } }, + { no: 7, name: "not_in", kind: "scalar", localName: "not_in", repeat: 1 /*RepeatType.PACKED*/, T: 15 /*ScalarType.SFIXED32*/, options: { "buf.validate.priv.field": { cel: [{ id: "sfixed32.not_in", expression: "this in rules.not_in ? 'value must not be in list %s'.format([rules.not_in]) : ''" }] } } } + ]); + } + create(value) { + const message = globalThis.Object.create((this.messagePrototype)); + message.less_than = { oneofKind: undefined }; + message.greater_than = { oneofKind: undefined }; + message.in = []; + message.not_in = []; + if (value !== undefined) + runtime_3.reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader, length, options, target) { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* optional sfixed32 const */ 1: + message.const = reader.sfixed32(); + break; + case /* sfixed32 lt */ 2: + message.less_than = { + oneofKind: "lt", + lt: reader.sfixed32() + }; + break; + case /* sfixed32 lte */ 3: + message.less_than = { + oneofKind: "lte", + lte: reader.sfixed32() + }; + break; + case /* sfixed32 gt */ 4: + message.greater_than = { + oneofKind: "gt", + gt: reader.sfixed32() + }; + break; + case /* sfixed32 gte */ 5: + message.greater_than = { + oneofKind: "gte", + gte: reader.sfixed32() + }; + break; + case /* repeated sfixed32 in */ 6: + if (wireType === runtime_1.WireType.LengthDelimited) + for (let e = reader.int32() + reader.pos; reader.pos < e;) + message.in.push(reader.sfixed32()); + else + message.in.push(reader.sfixed32()); + break; + case /* repeated sfixed32 not_in */ 7: + if (wireType === runtime_1.WireType.LengthDelimited) + for (let e = reader.int32() + reader.pos; reader.pos < e;) + message.not_in.push(reader.sfixed32()); + else + message.not_in.push(reader.sfixed32()); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? runtime_2.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message, writer, options) { + /* optional sfixed32 const = 1; */ + if (message.const !== undefined) + writer.tag(1, runtime_1.WireType.Bit32).sfixed32(message.const); + /* sfixed32 lt = 2; */ + if (message.less_than.oneofKind === "lt") + writer.tag(2, runtime_1.WireType.Bit32).sfixed32(message.less_than.lt); + /* sfixed32 lte = 3; */ + if (message.less_than.oneofKind === "lte") + writer.tag(3, runtime_1.WireType.Bit32).sfixed32(message.less_than.lte); + /* sfixed32 gt = 4; */ + if (message.greater_than.oneofKind === "gt") + writer.tag(4, runtime_1.WireType.Bit32).sfixed32(message.greater_than.gt); + /* sfixed32 gte = 5; */ + if (message.greater_than.oneofKind === "gte") + writer.tag(5, runtime_1.WireType.Bit32).sfixed32(message.greater_than.gte); + /* repeated sfixed32 in = 6; */ + if (message.in.length) { + writer.tag(6, runtime_1.WireType.LengthDelimited).fork(); + for (let i = 0; i < message.in.length; i++) + writer.sfixed32(message.in[i]); + writer.join(); + } + /* repeated sfixed32 not_in = 7; */ + if (message.not_in.length) { + writer.tag(7, runtime_1.WireType.LengthDelimited).fork(); + for (let i = 0; i < message.not_in.length; i++) + writer.sfixed32(message.not_in[i]); + writer.join(); + } + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } } /** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.buf.validate.EnumRules = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.buf.validate.EnumRules.repeatedFields_, null); -}; -goog.inherits(proto.buf.validate.EnumRules, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.buf.validate.EnumRules.displayName = 'proto.buf.validate.EnumRules'; + * @generated MessageType for protobuf message buf.validate.SFixed32Rules + */ +exports.SFixed32Rules = new SFixed32Rules$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class SFixed64Rules$Type extends runtime_4.MessageType { + constructor() { + super("buf.validate.SFixed64Rules", [ + { no: 1, name: "const", kind: "scalar", opt: true, T: 16 /*ScalarType.SFIXED64*/, L: 0 /*LongType.BIGINT*/, options: { "buf.validate.priv.field": { cel: [{ id: "sfixed64.const", expression: "this != rules.const ? 'value must equal %s'.format([rules.const]) : ''" }] } } }, + { no: 2, name: "lt", kind: "scalar", oneof: "less_than", T: 16 /*ScalarType.SFIXED64*/, L: 0 /*LongType.BIGINT*/, options: { "buf.validate.priv.field": { cel: [{ id: "sfixed64.lt", expression: "!has(rules.gte) && !has(rules.gt) && this >= rules.lt? 'value must be less than %s'.format([rules.lt]) : ''" }] } } }, + { no: 3, name: "lte", kind: "scalar", oneof: "less_than", T: 16 /*ScalarType.SFIXED64*/, L: 0 /*LongType.BIGINT*/, options: { "buf.validate.priv.field": { cel: [{ id: "sfixed64.lte", expression: "!has(rules.gte) && !has(rules.gt) && this > rules.lte? 'value must be less than or equal to %s'.format([rules.lte]) : ''" }] } } }, + { no: 4, name: "gt", kind: "scalar", oneof: "greater_than", T: 16 /*ScalarType.SFIXED64*/, L: 0 /*LongType.BIGINT*/, options: { "buf.validate.priv.field": { cel: [{ id: "sfixed64.gt", expression: "!has(rules.lt) && !has(rules.lte) && this <= rules.gt? 'value must be greater than %s'.format([rules.gt]) : ''" }, { id: "sfixed64.gt_lt", expression: "has(rules.lt) && rules.lt >= rules.gt && (this >= rules.lt || this <= rules.gt)? 'value must be greater than %s and less than %s'.format([rules.gt, rules.lt]) : ''" }, { id: "sfixed64.gt_lt_exclusive", expression: "has(rules.lt) && rules.lt < rules.gt && (rules.lt <= this && this <= rules.gt)? 'value must be greater than %s or less than %s'.format([rules.gt, rules.lt]) : ''" }, { id: "sfixed64.gt_lte", expression: "has(rules.lte) && rules.lte >= rules.gt && (this > rules.lte || this <= rules.gt)? 'value must be greater than %s and less than or equal to %s'.format([rules.gt, rules.lte]) : ''" }, { id: "sfixed64.gt_lte_exclusive", expression: "has(rules.lte) && rules.lte < rules.gt && (rules.lte < this && this <= rules.gt)? 'value must be greater than %s or less than or equal to %s'.format([rules.gt, rules.lte]) : ''" }] } } }, + { no: 5, name: "gte", kind: "scalar", oneof: "greater_than", T: 16 /*ScalarType.SFIXED64*/, L: 0 /*LongType.BIGINT*/, options: { "buf.validate.priv.field": { cel: [{ id: "sfixed64.gte", expression: "!has(rules.lt) && !has(rules.lte) && this < rules.gte? 'value must be greater than or equal to %s'.format([rules.gte]) : ''" }, { id: "sfixed64.gte_lt", expression: "has(rules.lt) && rules.lt >= rules.gte && (this >= rules.lt || this < rules.gte)? 'value must be greater than or equal to %s and less than %s'.format([rules.gte, rules.lt]) : ''" }, { id: "sfixed64.gte_lt_exclusive", expression: "has(rules.lt) && rules.lt < rules.gte && (rules.lt <= this && this < rules.gte)? 'value must be greater than or equal to %s or less than %s'.format([rules.gte, rules.lt]) : ''" }, { id: "sfixed64.gte_lte", expression: "has(rules.lte) && rules.lte >= rules.gte && (this > rules.lte || this < rules.gte)? 'value must be greater than or equal to %s and less than or equal to %s'.format([rules.gte, rules.lte]) : ''" }, { id: "sfixed64.gte_lte_exclusive", expression: "has(rules.lte) && rules.lte < rules.gte && (rules.lte < this && this < rules.gte)? 'value must be greater than or equal to %s or less than or equal to %s'.format([rules.gte, rules.lte]) : ''" }] } } }, + { no: 6, name: "in", kind: "scalar", repeat: 1 /*RepeatType.PACKED*/, T: 16 /*ScalarType.SFIXED64*/, L: 0 /*LongType.BIGINT*/, options: { "buf.validate.priv.field": { cel: [{ id: "sfixed64.in", expression: "!(this in dyn(rules)['in']) ? 'value must be in list %s'.format([dyn(rules)['in']]) : ''" }] } } }, + { no: 7, name: "not_in", kind: "scalar", localName: "not_in", repeat: 1 /*RepeatType.PACKED*/, T: 16 /*ScalarType.SFIXED64*/, L: 0 /*LongType.BIGINT*/, options: { "buf.validate.priv.field": { cel: [{ id: "sfixed64.not_in", expression: "this in rules.not_in ? 'value must not be in list %s'.format([rules.not_in]) : ''" }] } } } + ]); + } + create(value) { + const message = globalThis.Object.create((this.messagePrototype)); + message.less_than = { oneofKind: undefined }; + message.greater_than = { oneofKind: undefined }; + message.in = []; + message.not_in = []; + if (value !== undefined) + runtime_3.reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader, length, options, target) { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* optional sfixed64 const */ 1: + message.const = reader.sfixed64().toBigInt(); + break; + case /* sfixed64 lt */ 2: + message.less_than = { + oneofKind: "lt", + lt: reader.sfixed64().toBigInt() + }; + break; + case /* sfixed64 lte */ 3: + message.less_than = { + oneofKind: "lte", + lte: reader.sfixed64().toBigInt() + }; + break; + case /* sfixed64 gt */ 4: + message.greater_than = { + oneofKind: "gt", + gt: reader.sfixed64().toBigInt() + }; + break; + case /* sfixed64 gte */ 5: + message.greater_than = { + oneofKind: "gte", + gte: reader.sfixed64().toBigInt() + }; + break; + case /* repeated sfixed64 in */ 6: + if (wireType === runtime_1.WireType.LengthDelimited) + for (let e = reader.int32() + reader.pos; reader.pos < e;) + message.in.push(reader.sfixed64().toBigInt()); + else + message.in.push(reader.sfixed64().toBigInt()); + break; + case /* repeated sfixed64 not_in */ 7: + if (wireType === runtime_1.WireType.LengthDelimited) + for (let e = reader.int32() + reader.pos; reader.pos < e;) + message.not_in.push(reader.sfixed64().toBigInt()); + else + message.not_in.push(reader.sfixed64().toBigInt()); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? runtime_2.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message, writer, options) { + /* optional sfixed64 const = 1; */ + if (message.const !== undefined) + writer.tag(1, runtime_1.WireType.Bit64).sfixed64(message.const); + /* sfixed64 lt = 2; */ + if (message.less_than.oneofKind === "lt") + writer.tag(2, runtime_1.WireType.Bit64).sfixed64(message.less_than.lt); + /* sfixed64 lte = 3; */ + if (message.less_than.oneofKind === "lte") + writer.tag(3, runtime_1.WireType.Bit64).sfixed64(message.less_than.lte); + /* sfixed64 gt = 4; */ + if (message.greater_than.oneofKind === "gt") + writer.tag(4, runtime_1.WireType.Bit64).sfixed64(message.greater_than.gt); + /* sfixed64 gte = 5; */ + if (message.greater_than.oneofKind === "gte") + writer.tag(5, runtime_1.WireType.Bit64).sfixed64(message.greater_than.gte); + /* repeated sfixed64 in = 6; */ + if (message.in.length) { + writer.tag(6, runtime_1.WireType.LengthDelimited).fork(); + for (let i = 0; i < message.in.length; i++) + writer.sfixed64(message.in[i]); + writer.join(); + } + /* repeated sfixed64 not_in = 7; */ + if (message.not_in.length) { + writer.tag(7, runtime_1.WireType.LengthDelimited).fork(); + for (let i = 0; i < message.not_in.length; i++) + writer.sfixed64(message.not_in[i]); + writer.join(); + } + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } } /** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor + * @generated MessageType for protobuf message buf.validate.SFixed64Rules */ -proto.buf.validate.RepeatedRules = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.buf.validate.RepeatedRules, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.buf.validate.RepeatedRules.displayName = 'proto.buf.validate.RepeatedRules'; +exports.SFixed64Rules = new SFixed64Rules$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class BoolRules$Type extends runtime_4.MessageType { + constructor() { + super("buf.validate.BoolRules", [ + { no: 1, name: "const", kind: "scalar", opt: true, T: 8 /*ScalarType.BOOL*/, options: { "buf.validate.priv.field": { cel: [{ id: "bool.const", expression: "this != rules.const ? 'value must equal %s'.format([rules.const]) : ''" }] } } } + ]); + } + create(value) { + const message = globalThis.Object.create((this.messagePrototype)); + if (value !== undefined) + runtime_3.reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader, length, options, target) { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* optional bool const */ 1: + message.const = reader.bool(); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? runtime_2.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message, writer, options) { + /* optional bool const = 1; */ + if (message.const !== undefined) + writer.tag(1, runtime_1.WireType.Varint).bool(message.const); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } } /** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.buf.validate.MapRules = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.buf.validate.MapRules, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.buf.validate.MapRules.displayName = 'proto.buf.validate.MapRules'; + * @generated MessageType for protobuf message buf.validate.BoolRules + */ +exports.BoolRules = new BoolRules$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class StringRules$Type extends runtime_4.MessageType { + constructor() { + super("buf.validate.StringRules", [ + { no: 1, name: "const", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "buf.validate.priv.field": { cel: [{ id: "string.const", expression: "this != rules.const ? 'value must equal `%s`'.format([rules.const]) : ''" }] } } }, + { no: 19, name: "len", kind: "scalar", opt: true, T: 4 /*ScalarType.UINT64*/, L: 0 /*LongType.BIGINT*/, options: { "buf.validate.priv.field": { cel: [{ id: "string.len", expression: "uint(this.size()) != rules.len ? 'value length must be %s characters'.format([rules.len]) : ''" }] } } }, + { no: 2, name: "min_len", kind: "scalar", localName: "min_len", opt: true, T: 4 /*ScalarType.UINT64*/, L: 0 /*LongType.BIGINT*/, options: { "buf.validate.priv.field": { cel: [{ id: "string.min_len", expression: "uint(this.size()) < rules.min_len ? 'value length must be at least %s characters'.format([rules.min_len]) : ''" }] } } }, + { no: 3, name: "max_len", kind: "scalar", localName: "max_len", opt: true, T: 4 /*ScalarType.UINT64*/, L: 0 /*LongType.BIGINT*/, options: { "buf.validate.priv.field": { cel: [{ id: "string.max_len", expression: "uint(this.size()) > rules.max_len ? 'value length must be at most %s characters'.format([rules.max_len]) : ''" }] } } }, + { no: 20, name: "len_bytes", kind: "scalar", localName: "len_bytes", opt: true, T: 4 /*ScalarType.UINT64*/, L: 0 /*LongType.BIGINT*/, options: { "buf.validate.priv.field": { cel: [{ id: "string.len_bytes", expression: "uint(bytes(this).size()) != rules.len_bytes ? 'value length must be %s bytes'.format([rules.len_bytes]) : ''" }] } } }, + { no: 4, name: "min_bytes", kind: "scalar", localName: "min_bytes", opt: true, T: 4 /*ScalarType.UINT64*/, L: 0 /*LongType.BIGINT*/, options: { "buf.validate.priv.field": { cel: [{ id: "string.min_bytes", expression: "uint(bytes(this).size()) < rules.min_bytes ? 'value length must be at least %s bytes'.format([rules.min_bytes]) : ''" }] } } }, + { no: 5, name: "max_bytes", kind: "scalar", localName: "max_bytes", opt: true, T: 4 /*ScalarType.UINT64*/, L: 0 /*LongType.BIGINT*/, options: { "buf.validate.priv.field": { cel: [{ id: "string.max_bytes", expression: "uint(bytes(this).size()) > rules.max_bytes ? 'value length must be at most %s bytes'.format([rules.max_bytes]) : ''" }] } } }, + { no: 6, name: "pattern", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "buf.validate.priv.field": { cel: [{ id: "string.pattern", expression: "!this.matches(rules.pattern) ? 'value does not match regex pattern `%s`'.format([rules.pattern]) : ''" }] } } }, + { no: 7, name: "prefix", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "buf.validate.priv.field": { cel: [{ id: "string.prefix", expression: "!this.startsWith(rules.prefix) ? 'value does not have prefix `%s`'.format([rules.prefix]) : ''" }] } } }, + { no: 8, name: "suffix", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "buf.validate.priv.field": { cel: [{ id: "string.suffix", expression: "!this.endsWith(rules.suffix) ? 'value does not have suffix `%s`'.format([rules.suffix]) : ''" }] } } }, + { no: 9, name: "contains", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "buf.validate.priv.field": { cel: [{ id: "string.contains", expression: "!this.contains(rules.contains) ? 'value does not contain substring `%s`'.format([rules.contains]) : ''" }] } } }, + { no: 23, name: "not_contains", kind: "scalar", localName: "not_contains", opt: true, T: 9 /*ScalarType.STRING*/, options: { "buf.validate.priv.field": { cel: [{ id: "string.not_contains", expression: "this.contains(rules.not_contains) ? 'value contains substring `%s`'.format([rules.not_contains]) : ''" }] } } }, + { no: 10, name: "in", kind: "scalar", repeat: 2 /*RepeatType.UNPACKED*/, T: 9 /*ScalarType.STRING*/, options: { "buf.validate.priv.field": { cel: [{ id: "string.in", expression: "!(this in dyn(rules)['in']) ? 'value must be in list %s'.format([dyn(rules)['in']]) : ''" }] } } }, + { no: 11, name: "not_in", kind: "scalar", localName: "not_in", repeat: 2 /*RepeatType.UNPACKED*/, T: 9 /*ScalarType.STRING*/, options: { "buf.validate.priv.field": { cel: [{ id: "string.not_in", expression: "this in rules.not_in ? 'value must not be in list %s'.format([rules.not_in]) : ''" }] } } }, + { no: 12, name: "email", kind: "scalar", oneof: "well_known", T: 8 /*ScalarType.BOOL*/, options: { "buf.validate.priv.field": { cel: [{ id: "string.email", message: "value must be a valid email address", expression: "this.isEmail()" }] } } }, + { no: 13, name: "hostname", kind: "scalar", oneof: "well_known", T: 8 /*ScalarType.BOOL*/, options: { "buf.validate.priv.field": { cel: [{ id: "string.hostname", message: "value must be a valid hostname", expression: "this.isHostname()" }] } } }, + { no: 14, name: "ip", kind: "scalar", oneof: "well_known", T: 8 /*ScalarType.BOOL*/, options: { "buf.validate.priv.field": { cel: [{ id: "string.ip", message: "value must be a valid IP address", expression: "this.isIp()" }] } } }, + { no: 15, name: "ipv4", kind: "scalar", oneof: "well_known", T: 8 /*ScalarType.BOOL*/, options: { "buf.validate.priv.field": { cel: [{ id: "string.ipv4", message: "value must be a valid IPv4 address", expression: "this.isIp(4)" }] } } }, + { no: 16, name: "ipv6", kind: "scalar", oneof: "well_known", T: 8 /*ScalarType.BOOL*/, options: { "buf.validate.priv.field": { cel: [{ id: "string.ipv6", message: "value must be a valid IPv6 address", expression: "this.isIp(6)" }] } } }, + { no: 17, name: "uri", kind: "scalar", oneof: "well_known", T: 8 /*ScalarType.BOOL*/, options: { "buf.validate.priv.field": { cel: [{ id: "string.uri", message: "value must be a valid URI", expression: "this.isUri()" }] } } }, + { no: 18, name: "uri_ref", kind: "scalar", localName: "uri_ref", oneof: "well_known", T: 8 /*ScalarType.BOOL*/, options: { "buf.validate.priv.field": { cel: [{ id: "string.uri_ref", message: "value must be a valid URI", expression: "this.isUriRef()" }] } } }, + { no: 21, name: "address", kind: "scalar", oneof: "well_known", T: 8 /*ScalarType.BOOL*/, options: { "buf.validate.priv.field": { cel: [{ id: "string.address", message: "value must be a valid hostname, or ip address", expression: "this.isHostname() || this.isIp()" }] } } }, + { no: 22, name: "uuid", kind: "scalar", oneof: "well_known", T: 8 /*ScalarType.BOOL*/, options: { "buf.validate.priv.field": { cel: [{ id: "string.uuid", expression: "!this.matches('^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$') ? 'value must be a valid UUID' : ''" }] } } }, + { no: 26, name: "ip_with_prefixlen", kind: "scalar", localName: "ip_with_prefixlen", oneof: "well_known", T: 8 /*ScalarType.BOOL*/, options: { "buf.validate.priv.field": { cel: [{ id: "string.ip_with_prefixlen", message: "value must be a valid IP prefix", expression: "this.isIpPrefix()" }] } } }, + { no: 27, name: "ipv4_with_prefixlen", kind: "scalar", localName: "ipv4_with_prefixlen", oneof: "well_known", T: 8 /*ScalarType.BOOL*/, options: { "buf.validate.priv.field": { cel: [{ id: "string.ipv4_with_prefixlen", message: "value must be a valid IPv4 address with prefix length", expression: "this.isIpPrefix(4)" }] } } }, + { no: 28, name: "ipv6_with_prefixlen", kind: "scalar", localName: "ipv6_with_prefixlen", oneof: "well_known", T: 8 /*ScalarType.BOOL*/, options: { "buf.validate.priv.field": { cel: [{ id: "string.ipv6_with_prefixlen", message: "value must be a valid IPv6 address with prefix length", expression: "this.isIpPrefix(6)" }] } } }, + { no: 29, name: "ip_prefix", kind: "scalar", localName: "ip_prefix", oneof: "well_known", T: 8 /*ScalarType.BOOL*/, options: { "buf.validate.priv.field": { cel: [{ id: "string.ip_prefix", message: "value must be a valid IP prefix", expression: "this.isIpPrefix(true)" }] } } }, + { no: 30, name: "ipv4_prefix", kind: "scalar", localName: "ipv4_prefix", oneof: "well_known", T: 8 /*ScalarType.BOOL*/, options: { "buf.validate.priv.field": { cel: [{ id: "string.ipv4_prefix", message: "value must be a valid IPv4 prefix", expression: "this.isIpPrefix(4, true)" }] } } }, + { no: 31, name: "ipv6_prefix", kind: "scalar", localName: "ipv6_prefix", oneof: "well_known", T: 8 /*ScalarType.BOOL*/, options: { "buf.validate.priv.field": { cel: [{ id: "string.ipv6_prefix", message: "value must be a valid IPv6 prefix", expression: "this.isIpPrefix(6, true)" }] } } }, + { no: 24, name: "well_known_regex", kind: "enum", localName: "well_known_regex", oneof: "well_known", T: () => ["buf.validate.KnownRegex", KnownRegex], options: { "buf.validate.priv.field": { cel: [{ id: "string.well_known_regex.header_name", expression: "rules.well_known_regex == 1 && !this.matches(!has(rules.strict) || rules.strict ?'^:?[0-9a-zA-Z!#$%&\\'*+-.^_|~\\x60]+$' :'^[^\\u0000\\u000A\\u000D]+$') ? 'value must be a valid HTTP header name' : ''" }, { id: "string.well_known_regex.header_value", expression: "rules.well_known_regex == 2 && !this.matches(!has(rules.strict) || rules.strict ?'^[^\\u0000-\\u0008\\u000A-\\u001F\\u007F]*$' :'^[^\\u0000\\u000A\\u000D]*$') ? 'value must be a valid HTTP header value' : ''" }] } } }, + { no: 25, name: "strict", kind: "scalar", opt: true, T: 8 /*ScalarType.BOOL*/ } + ]); + } + create(value) { + const message = globalThis.Object.create((this.messagePrototype)); + message.in = []; + message.not_in = []; + message.well_known = { oneofKind: undefined }; + if (value !== undefined) + runtime_3.reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader, length, options, target) { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* optional string const */ 1: + message.const = reader.string(); + break; + case /* optional uint64 len */ 19: + message.len = reader.uint64().toBigInt(); + break; + case /* optional uint64 min_len */ 2: + message.min_len = reader.uint64().toBigInt(); + break; + case /* optional uint64 max_len */ 3: + message.max_len = reader.uint64().toBigInt(); + break; + case /* optional uint64 len_bytes */ 20: + message.len_bytes = reader.uint64().toBigInt(); + break; + case /* optional uint64 min_bytes */ 4: + message.min_bytes = reader.uint64().toBigInt(); + break; + case /* optional uint64 max_bytes */ 5: + message.max_bytes = reader.uint64().toBigInt(); + break; + case /* optional string pattern */ 6: + message.pattern = reader.string(); + break; + case /* optional string prefix */ 7: + message.prefix = reader.string(); + break; + case /* optional string suffix */ 8: + message.suffix = reader.string(); + break; + case /* optional string contains */ 9: + message.contains = reader.string(); + break; + case /* optional string not_contains */ 23: + message.not_contains = reader.string(); + break; + case /* repeated string in */ 10: + message.in.push(reader.string()); + break; + case /* repeated string not_in */ 11: + message.not_in.push(reader.string()); + break; + case /* bool email */ 12: + message.well_known = { + oneofKind: "email", + email: reader.bool() + }; + break; + case /* bool hostname */ 13: + message.well_known = { + oneofKind: "hostname", + hostname: reader.bool() + }; + break; + case /* bool ip */ 14: + message.well_known = { + oneofKind: "ip", + ip: reader.bool() + }; + break; + case /* bool ipv4 */ 15: + message.well_known = { + oneofKind: "ipv4", + ipv4: reader.bool() + }; + break; + case /* bool ipv6 */ 16: + message.well_known = { + oneofKind: "ipv6", + ipv6: reader.bool() + }; + break; + case /* bool uri */ 17: + message.well_known = { + oneofKind: "uri", + uri: reader.bool() + }; + break; + case /* bool uri_ref */ 18: + message.well_known = { + oneofKind: "uri_ref", + uri_ref: reader.bool() + }; + break; + case /* bool address */ 21: + message.well_known = { + oneofKind: "address", + address: reader.bool() + }; + break; + case /* bool uuid */ 22: + message.well_known = { + oneofKind: "uuid", + uuid: reader.bool() + }; + break; + case /* bool ip_with_prefixlen */ 26: + message.well_known = { + oneofKind: "ip_with_prefixlen", + ip_with_prefixlen: reader.bool() + }; + break; + case /* bool ipv4_with_prefixlen */ 27: + message.well_known = { + oneofKind: "ipv4_with_prefixlen", + ipv4_with_prefixlen: reader.bool() + }; + break; + case /* bool ipv6_with_prefixlen */ 28: + message.well_known = { + oneofKind: "ipv6_with_prefixlen", + ipv6_with_prefixlen: reader.bool() + }; + break; + case /* bool ip_prefix */ 29: + message.well_known = { + oneofKind: "ip_prefix", + ip_prefix: reader.bool() + }; + break; + case /* bool ipv4_prefix */ 30: + message.well_known = { + oneofKind: "ipv4_prefix", + ipv4_prefix: reader.bool() + }; + break; + case /* bool ipv6_prefix */ 31: + message.well_known = { + oneofKind: "ipv6_prefix", + ipv6_prefix: reader.bool() + }; + break; + case /* buf.validate.KnownRegex well_known_regex */ 24: + message.well_known = { + oneofKind: "well_known_regex", + well_known_regex: reader.int32() + }; + break; + case /* optional bool strict */ 25: + message.strict = reader.bool(); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? runtime_2.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message, writer, options) { + /* optional string const = 1; */ + if (message.const !== undefined) + writer.tag(1, runtime_1.WireType.LengthDelimited).string(message.const); + /* optional uint64 len = 19; */ + if (message.len !== undefined) + writer.tag(19, runtime_1.WireType.Varint).uint64(message.len); + /* optional uint64 min_len = 2; */ + if (message.min_len !== undefined) + writer.tag(2, runtime_1.WireType.Varint).uint64(message.min_len); + /* optional uint64 max_len = 3; */ + if (message.max_len !== undefined) + writer.tag(3, runtime_1.WireType.Varint).uint64(message.max_len); + /* optional uint64 len_bytes = 20; */ + if (message.len_bytes !== undefined) + writer.tag(20, runtime_1.WireType.Varint).uint64(message.len_bytes); + /* optional uint64 min_bytes = 4; */ + if (message.min_bytes !== undefined) + writer.tag(4, runtime_1.WireType.Varint).uint64(message.min_bytes); + /* optional uint64 max_bytes = 5; */ + if (message.max_bytes !== undefined) + writer.tag(5, runtime_1.WireType.Varint).uint64(message.max_bytes); + /* optional string pattern = 6; */ + if (message.pattern !== undefined) + writer.tag(6, runtime_1.WireType.LengthDelimited).string(message.pattern); + /* optional string prefix = 7; */ + if (message.prefix !== undefined) + writer.tag(7, runtime_1.WireType.LengthDelimited).string(message.prefix); + /* optional string suffix = 8; */ + if (message.suffix !== undefined) + writer.tag(8, runtime_1.WireType.LengthDelimited).string(message.suffix); + /* optional string contains = 9; */ + if (message.contains !== undefined) + writer.tag(9, runtime_1.WireType.LengthDelimited).string(message.contains); + /* optional string not_contains = 23; */ + if (message.not_contains !== undefined) + writer.tag(23, runtime_1.WireType.LengthDelimited).string(message.not_contains); + /* repeated string in = 10; */ + for (let i = 0; i < message.in.length; i++) + writer.tag(10, runtime_1.WireType.LengthDelimited).string(message.in[i]); + /* repeated string not_in = 11; */ + for (let i = 0; i < message.not_in.length; i++) + writer.tag(11, runtime_1.WireType.LengthDelimited).string(message.not_in[i]); + /* bool email = 12; */ + if (message.well_known.oneofKind === "email") + writer.tag(12, runtime_1.WireType.Varint).bool(message.well_known.email); + /* bool hostname = 13; */ + if (message.well_known.oneofKind === "hostname") + writer.tag(13, runtime_1.WireType.Varint).bool(message.well_known.hostname); + /* bool ip = 14; */ + if (message.well_known.oneofKind === "ip") + writer.tag(14, runtime_1.WireType.Varint).bool(message.well_known.ip); + /* bool ipv4 = 15; */ + if (message.well_known.oneofKind === "ipv4") + writer.tag(15, runtime_1.WireType.Varint).bool(message.well_known.ipv4); + /* bool ipv6 = 16; */ + if (message.well_known.oneofKind === "ipv6") + writer.tag(16, runtime_1.WireType.Varint).bool(message.well_known.ipv6); + /* bool uri = 17; */ + if (message.well_known.oneofKind === "uri") + writer.tag(17, runtime_1.WireType.Varint).bool(message.well_known.uri); + /* bool uri_ref = 18; */ + if (message.well_known.oneofKind === "uri_ref") + writer.tag(18, runtime_1.WireType.Varint).bool(message.well_known.uri_ref); + /* bool address = 21; */ + if (message.well_known.oneofKind === "address") + writer.tag(21, runtime_1.WireType.Varint).bool(message.well_known.address); + /* bool uuid = 22; */ + if (message.well_known.oneofKind === "uuid") + writer.tag(22, runtime_1.WireType.Varint).bool(message.well_known.uuid); + /* bool ip_with_prefixlen = 26; */ + if (message.well_known.oneofKind === "ip_with_prefixlen") + writer.tag(26, runtime_1.WireType.Varint).bool(message.well_known.ip_with_prefixlen); + /* bool ipv4_with_prefixlen = 27; */ + if (message.well_known.oneofKind === "ipv4_with_prefixlen") + writer.tag(27, runtime_1.WireType.Varint).bool(message.well_known.ipv4_with_prefixlen); + /* bool ipv6_with_prefixlen = 28; */ + if (message.well_known.oneofKind === "ipv6_with_prefixlen") + writer.tag(28, runtime_1.WireType.Varint).bool(message.well_known.ipv6_with_prefixlen); + /* bool ip_prefix = 29; */ + if (message.well_known.oneofKind === "ip_prefix") + writer.tag(29, runtime_1.WireType.Varint).bool(message.well_known.ip_prefix); + /* bool ipv4_prefix = 30; */ + if (message.well_known.oneofKind === "ipv4_prefix") + writer.tag(30, runtime_1.WireType.Varint).bool(message.well_known.ipv4_prefix); + /* bool ipv6_prefix = 31; */ + if (message.well_known.oneofKind === "ipv6_prefix") + writer.tag(31, runtime_1.WireType.Varint).bool(message.well_known.ipv6_prefix); + /* buf.validate.KnownRegex well_known_regex = 24; */ + if (message.well_known.oneofKind === "well_known_regex") + writer.tag(24, runtime_1.WireType.Varint).int32(message.well_known.well_known_regex); + /* optional bool strict = 25; */ + if (message.strict !== undefined) + writer.tag(25, runtime_1.WireType.Varint).bool(message.strict); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } } /** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.buf.validate.AnyRules = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.buf.validate.AnyRules.repeatedFields_, null); -}; -goog.inherits(proto.buf.validate.AnyRules, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.buf.validate.AnyRules.displayName = 'proto.buf.validate.AnyRules'; + * @generated MessageType for protobuf message buf.validate.StringRules + */ +exports.StringRules = new StringRules$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class BytesRules$Type extends runtime_4.MessageType { + constructor() { + super("buf.validate.BytesRules", [ + { no: 1, name: "const", kind: "scalar", opt: true, T: 12 /*ScalarType.BYTES*/, options: { "buf.validate.priv.field": { cel: [{ id: "bytes.const", expression: "this != rules.const ? 'value must be %x'.format([rules.const]) : ''" }] } } }, + { no: 13, name: "len", kind: "scalar", opt: true, T: 4 /*ScalarType.UINT64*/, L: 0 /*LongType.BIGINT*/, options: { "buf.validate.priv.field": { cel: [{ id: "bytes.len", expression: "uint(this.size()) != rules.len ? 'value length must be %s bytes'.format([rules.len]) : ''" }] } } }, + { no: 2, name: "min_len", kind: "scalar", localName: "min_len", opt: true, T: 4 /*ScalarType.UINT64*/, L: 0 /*LongType.BIGINT*/, options: { "buf.validate.priv.field": { cel: [{ id: "bytes.min_len", expression: "uint(this.size()) < rules.min_len ? 'value length must be at least %s bytes'.format([rules.min_len]) : ''" }] } } }, + { no: 3, name: "max_len", kind: "scalar", localName: "max_len", opt: true, T: 4 /*ScalarType.UINT64*/, L: 0 /*LongType.BIGINT*/, options: { "buf.validate.priv.field": { cel: [{ id: "bytes.max_len", expression: "uint(this.size()) > rules.max_len ? 'value must be at most %s bytes'.format([rules.max_len]) : ''" }] } } }, + { no: 4, name: "pattern", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "buf.validate.priv.field": { cel: [{ id: "bytes.pattern", expression: "!string(this).matches(rules.pattern) ? 'value must match regex pattern `%s`'.format([rules.pattern]) : ''" }] } } }, + { no: 5, name: "prefix", kind: "scalar", opt: true, T: 12 /*ScalarType.BYTES*/, options: { "buf.validate.priv.field": { cel: [{ id: "bytes.prefix", expression: "!this.startsWith(rules.prefix) ? 'value does not have prefix %x'.format([rules.prefix]) : ''" }] } } }, + { no: 6, name: "suffix", kind: "scalar", opt: true, T: 12 /*ScalarType.BYTES*/, options: { "buf.validate.priv.field": { cel: [{ id: "bytes.suffix", expression: "!this.endsWith(rules.suffix) ? 'value does not have suffix %x'.format([rules.suffix]) : ''" }] } } }, + { no: 7, name: "contains", kind: "scalar", opt: true, T: 12 /*ScalarType.BYTES*/, options: { "buf.validate.priv.field": { cel: [{ id: "bytes.contains", expression: "!this.contains(rules.contains) ? 'value does not contain %x'.format([rules.contains]) : ''" }] } } }, + { no: 8, name: "in", kind: "scalar", repeat: 2 /*RepeatType.UNPACKED*/, T: 12 /*ScalarType.BYTES*/, options: { "buf.validate.priv.field": { cel: [{ id: "bytes.in", expression: "dyn(rules)['in'].size() > 0 && !(this in dyn(rules)['in']) ? 'value must be in list %s'.format([dyn(rules)['in']]) : ''" }] } } }, + { no: 9, name: "not_in", kind: "scalar", localName: "not_in", repeat: 2 /*RepeatType.UNPACKED*/, T: 12 /*ScalarType.BYTES*/, options: { "buf.validate.priv.field": { cel: [{ id: "bytes.not_in", expression: "this in rules.not_in ? 'value must not be in list %s'.format([rules.not_in]) : ''" }] } } }, + { no: 10, name: "ip", kind: "scalar", oneof: "well_known", T: 8 /*ScalarType.BOOL*/, options: { "buf.validate.priv.field": { cel: [{ id: "bytes.ip", expression: "this.size() != 4 && this.size() != 16 ? 'value must be a valid IP address' : ''" }] } } }, + { no: 11, name: "ipv4", kind: "scalar", oneof: "well_known", T: 8 /*ScalarType.BOOL*/, options: { "buf.validate.priv.field": { cel: [{ id: "bytes.ipv4", expression: "this.size() != 4 ? 'value must be a valid IPv4 address' : ''" }] } } }, + { no: 12, name: "ipv6", kind: "scalar", oneof: "well_known", T: 8 /*ScalarType.BOOL*/, options: { "buf.validate.priv.field": { cel: [{ id: "bytes.ipv6", expression: "this.size() != 16 ? 'value must be a valid IPv6 address' : ''" }] } } } + ]); + } + create(value) { + const message = globalThis.Object.create((this.messagePrototype)); + message.in = []; + message.not_in = []; + message.well_known = { oneofKind: undefined }; + if (value !== undefined) + runtime_3.reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader, length, options, target) { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* optional bytes const */ 1: + message.const = reader.bytes(); + break; + case /* optional uint64 len */ 13: + message.len = reader.uint64().toBigInt(); + break; + case /* optional uint64 min_len */ 2: + message.min_len = reader.uint64().toBigInt(); + break; + case /* optional uint64 max_len */ 3: + message.max_len = reader.uint64().toBigInt(); + break; + case /* optional string pattern */ 4: + message.pattern = reader.string(); + break; + case /* optional bytes prefix */ 5: + message.prefix = reader.bytes(); + break; + case /* optional bytes suffix */ 6: + message.suffix = reader.bytes(); + break; + case /* optional bytes contains */ 7: + message.contains = reader.bytes(); + break; + case /* repeated bytes in */ 8: + message.in.push(reader.bytes()); + break; + case /* repeated bytes not_in */ 9: + message.not_in.push(reader.bytes()); + break; + case /* bool ip */ 10: + message.well_known = { + oneofKind: "ip", + ip: reader.bool() + }; + break; + case /* bool ipv4 */ 11: + message.well_known = { + oneofKind: "ipv4", + ipv4: reader.bool() + }; + break; + case /* bool ipv6 */ 12: + message.well_known = { + oneofKind: "ipv6", + ipv6: reader.bool() + }; + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? runtime_2.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message, writer, options) { + /* optional bytes const = 1; */ + if (message.const !== undefined) + writer.tag(1, runtime_1.WireType.LengthDelimited).bytes(message.const); + /* optional uint64 len = 13; */ + if (message.len !== undefined) + writer.tag(13, runtime_1.WireType.Varint).uint64(message.len); + /* optional uint64 min_len = 2; */ + if (message.min_len !== undefined) + writer.tag(2, runtime_1.WireType.Varint).uint64(message.min_len); + /* optional uint64 max_len = 3; */ + if (message.max_len !== undefined) + writer.tag(3, runtime_1.WireType.Varint).uint64(message.max_len); + /* optional string pattern = 4; */ + if (message.pattern !== undefined) + writer.tag(4, runtime_1.WireType.LengthDelimited).string(message.pattern); + /* optional bytes prefix = 5; */ + if (message.prefix !== undefined) + writer.tag(5, runtime_1.WireType.LengthDelimited).bytes(message.prefix); + /* optional bytes suffix = 6; */ + if (message.suffix !== undefined) + writer.tag(6, runtime_1.WireType.LengthDelimited).bytes(message.suffix); + /* optional bytes contains = 7; */ + if (message.contains !== undefined) + writer.tag(7, runtime_1.WireType.LengthDelimited).bytes(message.contains); + /* repeated bytes in = 8; */ + for (let i = 0; i < message.in.length; i++) + writer.tag(8, runtime_1.WireType.LengthDelimited).bytes(message.in[i]); + /* repeated bytes not_in = 9; */ + for (let i = 0; i < message.not_in.length; i++) + writer.tag(9, runtime_1.WireType.LengthDelimited).bytes(message.not_in[i]); + /* bool ip = 10; */ + if (message.well_known.oneofKind === "ip") + writer.tag(10, runtime_1.WireType.Varint).bool(message.well_known.ip); + /* bool ipv4 = 11; */ + if (message.well_known.oneofKind === "ipv4") + writer.tag(11, runtime_1.WireType.Varint).bool(message.well_known.ipv4); + /* bool ipv6 = 12; */ + if (message.well_known.oneofKind === "ipv6") + writer.tag(12, runtime_1.WireType.Varint).bool(message.well_known.ipv6); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } } /** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.buf.validate.DurationRules = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.buf.validate.DurationRules.repeatedFields_, proto.buf.validate.DurationRules.oneofGroups_); -}; -goog.inherits(proto.buf.validate.DurationRules, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.buf.validate.DurationRules.displayName = 'proto.buf.validate.DurationRules'; + * @generated MessageType for protobuf message buf.validate.BytesRules + */ +exports.BytesRules = new BytesRules$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class EnumRules$Type extends runtime_4.MessageType { + constructor() { + super("buf.validate.EnumRules", [ + { no: 1, name: "const", kind: "scalar", opt: true, T: 5 /*ScalarType.INT32*/, options: { "buf.validate.priv.field": { cel: [{ id: "enum.const", expression: "this != rules.const ? 'value must equal %s'.format([rules.const]) : ''" }] } } }, + { no: 2, name: "defined_only", kind: "scalar", localName: "defined_only", opt: true, T: 8 /*ScalarType.BOOL*/ }, + { no: 3, name: "in", kind: "scalar", repeat: 1 /*RepeatType.PACKED*/, T: 5 /*ScalarType.INT32*/, options: { "buf.validate.priv.field": { cel: [{ id: "enum.in", expression: "!(this in dyn(rules)['in']) ? 'value must be in list %s'.format([dyn(rules)['in']]) : ''" }] } } }, + { no: 4, name: "not_in", kind: "scalar", localName: "not_in", repeat: 1 /*RepeatType.PACKED*/, T: 5 /*ScalarType.INT32*/, options: { "buf.validate.priv.field": { cel: [{ id: "enum.not_in", expression: "this in rules.not_in ? 'value must not be in list %s'.format([rules.not_in]) : ''" }] } } } + ]); + } + create(value) { + const message = globalThis.Object.create((this.messagePrototype)); + message.in = []; + message.not_in = []; + if (value !== undefined) + runtime_3.reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader, length, options, target) { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* optional int32 const */ 1: + message.const = reader.int32(); + break; + case /* optional bool defined_only */ 2: + message.defined_only = reader.bool(); + break; + case /* repeated int32 in */ 3: + if (wireType === runtime_1.WireType.LengthDelimited) + for (let e = reader.int32() + reader.pos; reader.pos < e;) + message.in.push(reader.int32()); + else + message.in.push(reader.int32()); + break; + case /* repeated int32 not_in */ 4: + if (wireType === runtime_1.WireType.LengthDelimited) + for (let e = reader.int32() + reader.pos; reader.pos < e;) + message.not_in.push(reader.int32()); + else + message.not_in.push(reader.int32()); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? runtime_2.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message, writer, options) { + /* optional int32 const = 1; */ + if (message.const !== undefined) + writer.tag(1, runtime_1.WireType.Varint).int32(message.const); + /* optional bool defined_only = 2; */ + if (message.defined_only !== undefined) + writer.tag(2, runtime_1.WireType.Varint).bool(message.defined_only); + /* repeated int32 in = 3; */ + if (message.in.length) { + writer.tag(3, runtime_1.WireType.LengthDelimited).fork(); + for (let i = 0; i < message.in.length; i++) + writer.int32(message.in[i]); + writer.join(); + } + /* repeated int32 not_in = 4; */ + if (message.not_in.length) { + writer.tag(4, runtime_1.WireType.LengthDelimited).fork(); + for (let i = 0; i < message.not_in.length; i++) + writer.int32(message.not_in[i]); + writer.join(); + } + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } } /** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.buf.validate.TimestampRules = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, proto.buf.validate.TimestampRules.oneofGroups_); -}; -goog.inherits(proto.buf.validate.TimestampRules, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.buf.validate.TimestampRules.displayName = 'proto.buf.validate.TimestampRules'; + * @generated MessageType for protobuf message buf.validate.EnumRules + */ +exports.EnumRules = new EnumRules$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class RepeatedRules$Type extends runtime_4.MessageType { + constructor() { + super("buf.validate.RepeatedRules", [ + { no: 1, name: "min_items", kind: "scalar", localName: "min_items", opt: true, T: 4 /*ScalarType.UINT64*/, L: 0 /*LongType.BIGINT*/, options: { "buf.validate.priv.field": { cel: [{ id: "repeated.min_items", expression: "uint(this.size()) < rules.min_items ? 'value must contain at least %d item(s)'.format([rules.min_items]) : ''" }] } } }, + { no: 2, name: "max_items", kind: "scalar", localName: "max_items", opt: true, T: 4 /*ScalarType.UINT64*/, L: 0 /*LongType.BIGINT*/, options: { "buf.validate.priv.field": { cel: [{ id: "repeated.max_items", expression: "uint(this.size()) > rules.max_items ? 'value must contain no more than %s item(s)'.format([rules.max_items]) : ''" }] } } }, + { no: 3, name: "unique", kind: "scalar", opt: true, T: 8 /*ScalarType.BOOL*/, options: { "buf.validate.priv.field": { cel: [{ id: "repeated.unique", message: "repeated value must contain unique items", expression: "this.unique()" }] } } }, + { no: 4, name: "items", kind: "message", T: () => exports.FieldConstraints } + ]); + } + create(value) { + const message = globalThis.Object.create((this.messagePrototype)); + if (value !== undefined) + runtime_3.reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader, length, options, target) { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* optional uint64 min_items */ 1: + message.min_items = reader.uint64().toBigInt(); + break; + case /* optional uint64 max_items */ 2: + message.max_items = reader.uint64().toBigInt(); + break; + case /* optional bool unique */ 3: + message.unique = reader.bool(); + break; + case /* optional buf.validate.FieldConstraints items */ 4: + message.items = exports.FieldConstraints.internalBinaryRead(reader, reader.uint32(), options, message.items); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? runtime_2.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message, writer, options) { + /* optional uint64 min_items = 1; */ + if (message.min_items !== undefined) + writer.tag(1, runtime_1.WireType.Varint).uint64(message.min_items); + /* optional uint64 max_items = 2; */ + if (message.max_items !== undefined) + writer.tag(2, runtime_1.WireType.Varint).uint64(message.max_items); + /* optional bool unique = 3; */ + if (message.unique !== undefined) + writer.tag(3, runtime_1.WireType.Varint).bool(message.unique); + /* optional buf.validate.FieldConstraints items = 4; */ + if (message.items) + exports.FieldConstraints.internalBinaryWrite(message.items, writer.tag(4, runtime_1.WireType.LengthDelimited).fork(), options).join(); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } } - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.buf.validate.MessageConstraints.repeatedFields_ = [3]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.buf.validate.MessageConstraints.prototype.toObject = function(opt_includeInstance) { - return proto.buf.validate.MessageConstraints.toObject(opt_includeInstance, this); -}; - - /** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.buf.validate.MessageConstraints} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.buf.validate.MessageConstraints.toObject = function(includeInstance, msg) { - var f, obj = { - disabled: jspb.Message.getBooleanFieldWithDefault(msg, 1, false), - celList: jspb.Message.toObjectList(msg.getCelList(), - buf_validate_expression_pb.Constraint.toObject, includeInstance) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; + * @generated MessageType for protobuf message buf.validate.RepeatedRules + */ +exports.RepeatedRules = new RepeatedRules$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class MapRules$Type extends runtime_4.MessageType { + constructor() { + super("buf.validate.MapRules", [ + { no: 1, name: "min_pairs", kind: "scalar", localName: "min_pairs", opt: true, T: 4 /*ScalarType.UINT64*/, L: 0 /*LongType.BIGINT*/, options: { "buf.validate.priv.field": { cel: [{ id: "map.min_pairs", expression: "uint(this.size()) < rules.min_pairs ? 'map must be at least %d entries'.format([rules.min_pairs]) : ''" }] } } }, + { no: 2, name: "max_pairs", kind: "scalar", localName: "max_pairs", opt: true, T: 4 /*ScalarType.UINT64*/, L: 0 /*LongType.BIGINT*/, options: { "buf.validate.priv.field": { cel: [{ id: "map.max_pairs", expression: "uint(this.size()) > rules.max_pairs ? 'map must be at most %d entries'.format([rules.max_pairs]) : ''" }] } } }, + { no: 4, name: "keys", kind: "message", T: () => exports.FieldConstraints }, + { no: 5, name: "values", kind: "message", T: () => exports.FieldConstraints } + ]); + } + create(value) { + const message = globalThis.Object.create((this.messagePrototype)); + if (value !== undefined) + runtime_3.reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader, length, options, target) { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* optional uint64 min_pairs */ 1: + message.min_pairs = reader.uint64().toBigInt(); + break; + case /* optional uint64 max_pairs */ 2: + message.max_pairs = reader.uint64().toBigInt(); + break; + case /* optional buf.validate.FieldConstraints keys */ 4: + message.keys = exports.FieldConstraints.internalBinaryRead(reader, reader.uint32(), options, message.keys); + break; + case /* optional buf.validate.FieldConstraints values */ 5: + message.values = exports.FieldConstraints.internalBinaryRead(reader, reader.uint32(), options, message.values); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? runtime_2.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message, writer, options) { + /* optional uint64 min_pairs = 1; */ + if (message.min_pairs !== undefined) + writer.tag(1, runtime_1.WireType.Varint).uint64(message.min_pairs); + /* optional uint64 max_pairs = 2; */ + if (message.max_pairs !== undefined) + writer.tag(2, runtime_1.WireType.Varint).uint64(message.max_pairs); + /* optional buf.validate.FieldConstraints keys = 4; */ + if (message.keys) + exports.FieldConstraints.internalBinaryWrite(message.keys, writer.tag(4, runtime_1.WireType.LengthDelimited).fork(), options).join(); + /* optional buf.validate.FieldConstraints values = 5; */ + if (message.values) + exports.FieldConstraints.internalBinaryWrite(message.values, writer.tag(5, runtime_1.WireType.LengthDelimited).fork(), options).join(); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } } - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.buf.validate.MessageConstraints} - */ -proto.buf.validate.MessageConstraints.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.buf.validate.MessageConstraints; - return proto.buf.validate.MessageConstraints.deserializeBinaryFromReader(msg, reader); -}; - - /** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.buf.validate.MessageConstraints} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.buf.validate.MessageConstraints} + * @generated MessageType for protobuf message buf.validate.MapRules */ -proto.buf.validate.MessageConstraints.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; +exports.MapRules = new MapRules$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class AnyRules$Type extends runtime_4.MessageType { + constructor() { + super("buf.validate.AnyRules", [ + { no: 2, name: "in", kind: "scalar", repeat: 2 /*RepeatType.UNPACKED*/, T: 9 /*ScalarType.STRING*/ }, + { no: 3, name: "not_in", kind: "scalar", localName: "not_in", repeat: 2 /*RepeatType.UNPACKED*/, T: 9 /*ScalarType.STRING*/ } + ]); } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setDisabled(value); - break; - case 3: - var value = new buf_validate_expression_pb.Constraint; - reader.readMessage(value,buf_validate_expression_pb.Constraint.deserializeBinaryFromReader); - msg.addCel(value); - break; - default: - reader.skipField(); - break; + create(value) { + const message = globalThis.Object.create((this.messagePrototype)); + message.in = []; + message.not_in = []; + if (value !== undefined) + runtime_3.reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader, length, options, target) { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* repeated string in */ 2: + message.in.push(reader.string()); + break; + case /* repeated string not_in */ 3: + message.not_in.push(reader.string()); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? runtime_2.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message, writer, options) { + /* repeated string in = 2; */ + for (let i = 0; i < message.in.length; i++) + writer.tag(2, runtime_1.WireType.LengthDelimited).string(message.in[i]); + /* repeated string not_in = 3; */ + for (let i = 0; i < message.not_in.length; i++) + writer.tag(3, runtime_1.WireType.LengthDelimited).string(message.not_in[i]); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.buf.validate.MessageConstraints.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.buf.validate.MessageConstraints.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.buf.validate.MessageConstraints} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.buf.validate.MessageConstraints.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = /** @type {boolean} */ (jspb.Message.getField(message, 1)); - if (f != null) { - writer.writeBool( - 1, - f - ); - } - f = message.getCelList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 3, - f, - buf_validate_expression_pb.Constraint.serializeBinaryToWriter - ); - } -}; - - -/** - * optional bool disabled = 1; - * @return {boolean} - */ -proto.buf.validate.MessageConstraints.prototype.getDisabled = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 1, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.buf.validate.MessageConstraints} returns this - */ -proto.buf.validate.MessageConstraints.prototype.setDisabled = function(value) { - return jspb.Message.setField(this, 1, value); -}; - - -/** - * Clears the field making it undefined. - * @return {!proto.buf.validate.MessageConstraints} returns this - */ -proto.buf.validate.MessageConstraints.prototype.clearDisabled = function() { - return jspb.Message.setField(this, 1, undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.buf.validate.MessageConstraints.prototype.hasDisabled = function() { - return jspb.Message.getField(this, 1) != null; -}; - - -/** - * repeated Constraint cel = 3; - * @return {!Array} - */ -proto.buf.validate.MessageConstraints.prototype.getCelList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, buf_validate_expression_pb.Constraint, 3)); -}; - - -/** - * @param {!Array} value - * @return {!proto.buf.validate.MessageConstraints} returns this -*/ -proto.buf.validate.MessageConstraints.prototype.setCelList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 3, value); -}; - - -/** - * @param {!proto.buf.validate.Constraint=} opt_value - * @param {number=} opt_index - * @return {!proto.buf.validate.Constraint} - */ -proto.buf.validate.MessageConstraints.prototype.addCel = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 3, opt_value, proto.buf.validate.Constraint, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.buf.validate.MessageConstraints} returns this - */ -proto.buf.validate.MessageConstraints.prototype.clearCelList = function() { - return this.setCelList([]); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.buf.validate.OneofConstraints.prototype.toObject = function(opt_includeInstance) { - return proto.buf.validate.OneofConstraints.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.buf.validate.OneofConstraints} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.buf.validate.OneofConstraints.toObject = function(includeInstance, msg) { - var f, obj = { - required: jspb.Message.getBooleanFieldWithDefault(msg, 1, false) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; } - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.buf.validate.OneofConstraints} - */ -proto.buf.validate.OneofConstraints.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.buf.validate.OneofConstraints; - return proto.buf.validate.OneofConstraints.deserializeBinaryFromReader(msg, reader); -}; - - /** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.buf.validate.OneofConstraints} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.buf.validate.OneofConstraints} - */ -proto.buf.validate.OneofConstraints.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; + * @generated MessageType for protobuf message buf.validate.AnyRules + */ +exports.AnyRules = new AnyRules$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class DurationRules$Type extends runtime_4.MessageType { + constructor() { + super("buf.validate.DurationRules", [ + { no: 2, name: "const", kind: "message", T: () => duration_pb_1.Duration, options: { "buf.validate.priv.field": { cel: [{ id: "duration.const", expression: "this != rules.const ? 'value must equal %s'.format([rules.const]) : ''" }] } } }, + { no: 3, name: "lt", kind: "message", oneof: "less_than", T: () => duration_pb_1.Duration, options: { "buf.validate.priv.field": { cel: [{ id: "duration.lt", expression: "!has(rules.gte) && !has(rules.gt) && this >= rules.lt? 'value must be less than %s'.format([rules.lt]) : ''" }] } } }, + { no: 4, name: "lte", kind: "message", oneof: "less_than", T: () => duration_pb_1.Duration, options: { "buf.validate.priv.field": { cel: [{ id: "duration.lte", expression: "!has(rules.gte) && !has(rules.gt) && this > rules.lte? 'value must be less than or equal to %s'.format([rules.lte]) : ''" }] } } }, + { no: 5, name: "gt", kind: "message", oneof: "greater_than", T: () => duration_pb_1.Duration, options: { "buf.validate.priv.field": { cel: [{ id: "duration.gt", expression: "!has(rules.lt) && !has(rules.lte) && this <= rules.gt? 'value must be greater than %s'.format([rules.gt]) : ''" }, { id: "duration.gt_lt", expression: "has(rules.lt) && rules.lt >= rules.gt && (this >= rules.lt || this <= rules.gt)? 'value must be greater than %s and less than %s'.format([rules.gt, rules.lt]) : ''" }, { id: "duration.gt_lt_exclusive", expression: "has(rules.lt) && rules.lt < rules.gt && (rules.lt <= this && this <= rules.gt)? 'value must be greater than %s or less than %s'.format([rules.gt, rules.lt]) : ''" }, { id: "duration.gt_lte", expression: "has(rules.lte) && rules.lte >= rules.gt && (this > rules.lte || this <= rules.gt)? 'value must be greater than %s and less than or equal to %s'.format([rules.gt, rules.lte]) : ''" }, { id: "duration.gt_lte_exclusive", expression: "has(rules.lte) && rules.lte < rules.gt && (rules.lte < this && this <= rules.gt)? 'value must be greater than %s or less than or equal to %s'.format([rules.gt, rules.lte]) : ''" }] } } }, + { no: 6, name: "gte", kind: "message", oneof: "greater_than", T: () => duration_pb_1.Duration, options: { "buf.validate.priv.field": { cel: [{ id: "duration.gte", expression: "!has(rules.lt) && !has(rules.lte) && this < rules.gte? 'value must be greater than or equal to %s'.format([rules.gte]) : ''" }, { id: "duration.gte_lt", expression: "has(rules.lt) && rules.lt >= rules.gte && (this >= rules.lt || this < rules.gte)? 'value must be greater than or equal to %s and less than %s'.format([rules.gte, rules.lt]) : ''" }, { id: "duration.gte_lt_exclusive", expression: "has(rules.lt) && rules.lt < rules.gte && (rules.lt <= this && this < rules.gte)? 'value must be greater than or equal to %s or less than %s'.format([rules.gte, rules.lt]) : ''" }, { id: "duration.gte_lte", expression: "has(rules.lte) && rules.lte >= rules.gte && (this > rules.lte || this < rules.gte)? 'value must be greater than or equal to %s and less than or equal to %s'.format([rules.gte, rules.lte]) : ''" }, { id: "duration.gte_lte_exclusive", expression: "has(rules.lte) && rules.lte < rules.gte && (rules.lte < this && this < rules.gte)? 'value must be greater than or equal to %s or less than or equal to %s'.format([rules.gte, rules.lte]) : ''" }] } } }, + { no: 7, name: "in", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => duration_pb_1.Duration, options: { "buf.validate.priv.field": { cel: [{ id: "duration.in", expression: "!(this in dyn(rules)['in']) ? 'value must be in list %s'.format([dyn(rules)['in']]) : ''" }] } } }, + { no: 8, name: "not_in", kind: "message", localName: "not_in", repeat: 1 /*RepeatType.PACKED*/, T: () => duration_pb_1.Duration, options: { "buf.validate.priv.field": { cel: [{ id: "duration.not_in", expression: "this in rules.not_in ? 'value must not be in list %s'.format([rules.not_in]) : ''" }] } } } + ]); } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setRequired(value); - break; - default: - reader.skipField(); - break; + create(value) { + const message = globalThis.Object.create((this.messagePrototype)); + message.less_than = { oneofKind: undefined }; + message.greater_than = { oneofKind: undefined }; + message.in = []; + message.not_in = []; + if (value !== undefined) + runtime_3.reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader, length, options, target) { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* optional google.protobuf.Duration const */ 2: + message.const = duration_pb_1.Duration.internalBinaryRead(reader, reader.uint32(), options, message.const); + break; + case /* google.protobuf.Duration lt */ 3: + message.less_than = { + oneofKind: "lt", + lt: duration_pb_1.Duration.internalBinaryRead(reader, reader.uint32(), options, message.less_than.lt) + }; + break; + case /* google.protobuf.Duration lte */ 4: + message.less_than = { + oneofKind: "lte", + lte: duration_pb_1.Duration.internalBinaryRead(reader, reader.uint32(), options, message.less_than.lte) + }; + break; + case /* google.protobuf.Duration gt */ 5: + message.greater_than = { + oneofKind: "gt", + gt: duration_pb_1.Duration.internalBinaryRead(reader, reader.uint32(), options, message.greater_than.gt) + }; + break; + case /* google.protobuf.Duration gte */ 6: + message.greater_than = { + oneofKind: "gte", + gte: duration_pb_1.Duration.internalBinaryRead(reader, reader.uint32(), options, message.greater_than.gte) + }; + break; + case /* repeated google.protobuf.Duration in */ 7: + message.in.push(duration_pb_1.Duration.internalBinaryRead(reader, reader.uint32(), options)); + break; + case /* repeated google.protobuf.Duration not_in */ 8: + message.not_in.push(duration_pb_1.Duration.internalBinaryRead(reader, reader.uint32(), options)); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? runtime_2.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message, writer, options) { + /* optional google.protobuf.Duration const = 2; */ + if (message.const) + duration_pb_1.Duration.internalBinaryWrite(message.const, writer.tag(2, runtime_1.WireType.LengthDelimited).fork(), options).join(); + /* google.protobuf.Duration lt = 3; */ + if (message.less_than.oneofKind === "lt") + duration_pb_1.Duration.internalBinaryWrite(message.less_than.lt, writer.tag(3, runtime_1.WireType.LengthDelimited).fork(), options).join(); + /* google.protobuf.Duration lte = 4; */ + if (message.less_than.oneofKind === "lte") + duration_pb_1.Duration.internalBinaryWrite(message.less_than.lte, writer.tag(4, runtime_1.WireType.LengthDelimited).fork(), options).join(); + /* google.protobuf.Duration gt = 5; */ + if (message.greater_than.oneofKind === "gt") + duration_pb_1.Duration.internalBinaryWrite(message.greater_than.gt, writer.tag(5, runtime_1.WireType.LengthDelimited).fork(), options).join(); + /* google.protobuf.Duration gte = 6; */ + if (message.greater_than.oneofKind === "gte") + duration_pb_1.Duration.internalBinaryWrite(message.greater_than.gte, writer.tag(6, runtime_1.WireType.LengthDelimited).fork(), options).join(); + /* repeated google.protobuf.Duration in = 7; */ + for (let i = 0; i < message.in.length; i++) + duration_pb_1.Duration.internalBinaryWrite(message.in[i], writer.tag(7, runtime_1.WireType.LengthDelimited).fork(), options).join(); + /* repeated google.protobuf.Duration not_in = 8; */ + for (let i = 0; i < message.not_in.length; i++) + duration_pb_1.Duration.internalBinaryWrite(message.not_in[i], writer.tag(8, runtime_1.WireType.LengthDelimited).fork(), options).join(); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.buf.validate.OneofConstraints.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.buf.validate.OneofConstraints.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.buf.validate.OneofConstraints} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.buf.validate.OneofConstraints.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = /** @type {boolean} */ (jspb.Message.getField(message, 1)); - if (f != null) { - writer.writeBool( - 1, - f - ); - } -}; - - -/** - * optional bool required = 1; - * @return {boolean} - */ -proto.buf.validate.OneofConstraints.prototype.getRequired = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 1, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.buf.validate.OneofConstraints} returns this - */ -proto.buf.validate.OneofConstraints.prototype.setRequired = function(value) { - return jspb.Message.setField(this, 1, value); -}; - - -/** - * Clears the field making it undefined. - * @return {!proto.buf.validate.OneofConstraints} returns this - */ -proto.buf.validate.OneofConstraints.prototype.clearRequired = function() { - return jspb.Message.setField(this, 1, undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.buf.validate.OneofConstraints.prototype.hasRequired = function() { - return jspb.Message.getField(this, 1) != null; -}; - - - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.buf.validate.FieldConstraints.repeatedFields_ = [23]; - -/** - * Oneof group definitions for this message. Each group defines the field - * numbers belonging to that group. When of these fields' value is set, all - * other fields in the group are cleared. During deserialization, if multiple - * fields are encountered for a group, only the last value seen will be kept. - * @private {!Array>} - * @const - */ -proto.buf.validate.FieldConstraints.oneofGroups_ = [[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,18,19,20,21,22]]; - -/** - * @enum {number} - */ -proto.buf.validate.FieldConstraints.TypeCase = { - TYPE_NOT_SET: 0, - FLOAT: 1, - DOUBLE: 2, - INT32: 3, - INT64: 4, - UINT32: 5, - UINT64: 6, - SINT32: 7, - SINT64: 8, - FIXED32: 9, - FIXED64: 10, - SFIXED32: 11, - SFIXED64: 12, - BOOL: 13, - STRING: 14, - BYTES: 15, - ENUM: 16, - REPEATED: 18, - MAP: 19, - ANY: 20, - DURATION: 21, - TIMESTAMP: 22 -}; - -/** - * @return {proto.buf.validate.FieldConstraints.TypeCase} - */ -proto.buf.validate.FieldConstraints.prototype.getTypeCase = function() { - return /** @type {proto.buf.validate.FieldConstraints.TypeCase} */(jspb.Message.computeOneofCase(this, proto.buf.validate.FieldConstraints.oneofGroups_[0])); -}; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.buf.validate.FieldConstraints.prototype.toObject = function(opt_includeInstance) { - return proto.buf.validate.FieldConstraints.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.buf.validate.FieldConstraints} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.buf.validate.FieldConstraints.toObject = function(includeInstance, msg) { - var f, obj = { - celList: jspb.Message.toObjectList(msg.getCelList(), - buf_validate_expression_pb.Constraint.toObject, includeInstance), - skipped: jspb.Message.getBooleanFieldWithDefault(msg, 24, false), - required: jspb.Message.getBooleanFieldWithDefault(msg, 25, false), - ignoreEmpty: jspb.Message.getBooleanFieldWithDefault(msg, 26, false), - pb_float: (f = msg.getFloat()) && proto.buf.validate.FloatRules.toObject(includeInstance, f), - pb_double: (f = msg.getDouble()) && proto.buf.validate.DoubleRules.toObject(includeInstance, f), - int32: (f = msg.getInt32()) && proto.buf.validate.Int32Rules.toObject(includeInstance, f), - int64: (f = msg.getInt64()) && proto.buf.validate.Int64Rules.toObject(includeInstance, f), - uint32: (f = msg.getUint32()) && proto.buf.validate.UInt32Rules.toObject(includeInstance, f), - uint64: (f = msg.getUint64()) && proto.buf.validate.UInt64Rules.toObject(includeInstance, f), - sint32: (f = msg.getSint32()) && proto.buf.validate.SInt32Rules.toObject(includeInstance, f), - sint64: (f = msg.getSint64()) && proto.buf.validate.SInt64Rules.toObject(includeInstance, f), - fixed32: (f = msg.getFixed32()) && proto.buf.validate.Fixed32Rules.toObject(includeInstance, f), - fixed64: (f = msg.getFixed64()) && proto.buf.validate.Fixed64Rules.toObject(includeInstance, f), - sfixed32: (f = msg.getSfixed32()) && proto.buf.validate.SFixed32Rules.toObject(includeInstance, f), - sfixed64: (f = msg.getSfixed64()) && proto.buf.validate.SFixed64Rules.toObject(includeInstance, f), - bool: (f = msg.getBool()) && proto.buf.validate.BoolRules.toObject(includeInstance, f), - string: (f = msg.getString()) && proto.buf.validate.StringRules.toObject(includeInstance, f), - bytes: (f = msg.getBytes()) && proto.buf.validate.BytesRules.toObject(includeInstance, f), - pb_enum: (f = msg.getEnum()) && proto.buf.validate.EnumRules.toObject(includeInstance, f), - repeated: (f = msg.getRepeated()) && proto.buf.validate.RepeatedRules.toObject(includeInstance, f), - map: (f = msg.getMap()) && proto.buf.validate.MapRules.toObject(includeInstance, f), - any: (f = msg.getAny()) && proto.buf.validate.AnyRules.toObject(includeInstance, f), - duration: (f = msg.getDuration()) && proto.buf.validate.DurationRules.toObject(includeInstance, f), - timestamp: (f = msg.getTimestamp()) && proto.buf.validate.TimestampRules.toObject(includeInstance, f) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; } - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.buf.validate.FieldConstraints} - */ -proto.buf.validate.FieldConstraints.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.buf.validate.FieldConstraints; - return proto.buf.validate.FieldConstraints.deserializeBinaryFromReader(msg, reader); -}; - - /** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.buf.validate.FieldConstraints} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.buf.validate.FieldConstraints} - */ -proto.buf.validate.FieldConstraints.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; + * @generated MessageType for protobuf message buf.validate.DurationRules + */ +exports.DurationRules = new DurationRules$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class TimestampRules$Type extends runtime_4.MessageType { + constructor() { + super("buf.validate.TimestampRules", [ + { no: 2, name: "const", kind: "message", T: () => timestamp_pb_1.Timestamp, options: { "buf.validate.priv.field": { cel: [{ id: "timestamp.const", expression: "this != rules.const ? 'value must equal %s'.format([rules.const]) : ''" }] } } }, + { no: 3, name: "lt", kind: "message", oneof: "less_than", T: () => timestamp_pb_1.Timestamp, options: { "buf.validate.priv.field": { cel: [{ id: "timestamp.lt", expression: "!has(rules.gte) && !has(rules.gt) && this >= rules.lt? 'value must be less than %s'.format([rules.lt]) : ''" }] } } }, + { no: 4, name: "lte", kind: "message", oneof: "less_than", T: () => timestamp_pb_1.Timestamp, options: { "buf.validate.priv.field": { cel: [{ id: "timestamp.lte", expression: "!has(rules.gte) && !has(rules.gt) && this > rules.lte? 'value must be less than or equal to %s'.format([rules.lte]) : ''" }] } } }, + { no: 7, name: "lt_now", kind: "scalar", localName: "lt_now", oneof: "less_than", T: 8 /*ScalarType.BOOL*/, options: { "buf.validate.priv.field": { cel: [{ id: "timestamp.lt_now", expression: "this > now ? 'value must be less than now' : ''" }] } } }, + { no: 5, name: "gt", kind: "message", oneof: "greater_than", T: () => timestamp_pb_1.Timestamp, options: { "buf.validate.priv.field": { cel: [{ id: "timestamp.gt", expression: "!has(rules.lt) && !has(rules.lte) && this <= rules.gt? 'value must be greater than %s'.format([rules.gt]) : ''" }, { id: "timestamp.gt_lt", expression: "has(rules.lt) && rules.lt >= rules.gt && (this >= rules.lt || this <= rules.gt)? 'value must be greater than %s and less than %s'.format([rules.gt, rules.lt]) : ''" }, { id: "timestamp.gt_lt_exclusive", expression: "has(rules.lt) && rules.lt < rules.gt && (rules.lt <= this && this <= rules.gt)? 'value must be greater than %s or less than %s'.format([rules.gt, rules.lt]) : ''" }, { id: "timestamp.gt_lte", expression: "has(rules.lte) && rules.lte >= rules.gt && (this > rules.lte || this <= rules.gt)? 'value must be greater than %s and less than or equal to %s'.format([rules.gt, rules.lte]) : ''" }, { id: "timestamp.gt_lte_exclusive", expression: "has(rules.lte) && rules.lte < rules.gt && (rules.lte < this && this <= rules.gt)? 'value must be greater than %s or less than or equal to %s'.format([rules.gt, rules.lte]) : ''" }] } } }, + { no: 6, name: "gte", kind: "message", oneof: "greater_than", T: () => timestamp_pb_1.Timestamp, options: { "buf.validate.priv.field": { cel: [{ id: "timestamp.gte", expression: "!has(rules.lt) && !has(rules.lte) && this < rules.gte? 'value must be greater than or equal to %s'.format([rules.gte]) : ''" }, { id: "timestamp.gte_lt", expression: "has(rules.lt) && rules.lt >= rules.gte && (this >= rules.lt || this < rules.gte)? 'value must be greater than or equal to %s and less than %s'.format([rules.gte, rules.lt]) : ''" }, { id: "timestamp.gte_lt_exclusive", expression: "has(rules.lt) && rules.lt < rules.gte && (rules.lt <= this && this < rules.gte)? 'value must be greater than or equal to %s or less than %s'.format([rules.gte, rules.lt]) : ''" }, { id: "timestamp.gte_lte", expression: "has(rules.lte) && rules.lte >= rules.gte && (this > rules.lte || this < rules.gte)? 'value must be greater than or equal to %s and less than or equal to %s'.format([rules.gte, rules.lte]) : ''" }, { id: "timestamp.gte_lte_exclusive", expression: "has(rules.lte) && rules.lte < rules.gte && (rules.lte < this && this < rules.gte)? 'value must be greater than or equal to %s or less than or equal to %s'.format([rules.gte, rules.lte]) : ''" }] } } }, + { no: 8, name: "gt_now", kind: "scalar", localName: "gt_now", oneof: "greater_than", T: 8 /*ScalarType.BOOL*/, options: { "buf.validate.priv.field": { cel: [{ id: "timestamp.gt_now", expression: "this < now ? 'value must be greater than now' : ''" }] } } }, + { no: 9, name: "within", kind: "message", T: () => duration_pb_1.Duration, options: { "buf.validate.priv.field": { cel: [{ id: "timestamp.within", expression: "this < now-rules.within || this > now+rules.within ? 'value must be within %s of now'.format([rules.within]) : ''" }] } } } + ]); } - var field = reader.getFieldNumber(); - switch (field) { - case 23: - var value = new buf_validate_expression_pb.Constraint; - reader.readMessage(value,buf_validate_expression_pb.Constraint.deserializeBinaryFromReader); - msg.addCel(value); - break; - case 24: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setSkipped(value); - break; - case 25: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setRequired(value); - break; - case 26: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setIgnoreEmpty(value); - break; - case 1: - var value = new proto.buf.validate.FloatRules; - reader.readMessage(value,proto.buf.validate.FloatRules.deserializeBinaryFromReader); - msg.setFloat(value); - break; - case 2: - var value = new proto.buf.validate.DoubleRules; - reader.readMessage(value,proto.buf.validate.DoubleRules.deserializeBinaryFromReader); - msg.setDouble(value); - break; - case 3: - var value = new proto.buf.validate.Int32Rules; - reader.readMessage(value,proto.buf.validate.Int32Rules.deserializeBinaryFromReader); - msg.setInt32(value); - break; - case 4: - var value = new proto.buf.validate.Int64Rules; - reader.readMessage(value,proto.buf.validate.Int64Rules.deserializeBinaryFromReader); - msg.setInt64(value); - break; - case 5: - var value = new proto.buf.validate.UInt32Rules; - reader.readMessage(value,proto.buf.validate.UInt32Rules.deserializeBinaryFromReader); - msg.setUint32(value); - break; - case 6: - var value = new proto.buf.validate.UInt64Rules; - reader.readMessage(value,proto.buf.validate.UInt64Rules.deserializeBinaryFromReader); - msg.setUint64(value); - break; - case 7: - var value = new proto.buf.validate.SInt32Rules; - reader.readMessage(value,proto.buf.validate.SInt32Rules.deserializeBinaryFromReader); - msg.setSint32(value); - break; - case 8: - var value = new proto.buf.validate.SInt64Rules; - reader.readMessage(value,proto.buf.validate.SInt64Rules.deserializeBinaryFromReader); - msg.setSint64(value); - break; - case 9: - var value = new proto.buf.validate.Fixed32Rules; - reader.readMessage(value,proto.buf.validate.Fixed32Rules.deserializeBinaryFromReader); - msg.setFixed32(value); - break; - case 10: - var value = new proto.buf.validate.Fixed64Rules; - reader.readMessage(value,proto.buf.validate.Fixed64Rules.deserializeBinaryFromReader); - msg.setFixed64(value); - break; - case 11: - var value = new proto.buf.validate.SFixed32Rules; - reader.readMessage(value,proto.buf.validate.SFixed32Rules.deserializeBinaryFromReader); - msg.setSfixed32(value); - break; - case 12: - var value = new proto.buf.validate.SFixed64Rules; - reader.readMessage(value,proto.buf.validate.SFixed64Rules.deserializeBinaryFromReader); - msg.setSfixed64(value); - break; - case 13: - var value = new proto.buf.validate.BoolRules; - reader.readMessage(value,proto.buf.validate.BoolRules.deserializeBinaryFromReader); - msg.setBool(value); - break; - case 14: - var value = new proto.buf.validate.StringRules; - reader.readMessage(value,proto.buf.validate.StringRules.deserializeBinaryFromReader); - msg.setString(value); - break; - case 15: - var value = new proto.buf.validate.BytesRules; - reader.readMessage(value,proto.buf.validate.BytesRules.deserializeBinaryFromReader); - msg.setBytes(value); - break; - case 16: - var value = new proto.buf.validate.EnumRules; - reader.readMessage(value,proto.buf.validate.EnumRules.deserializeBinaryFromReader); - msg.setEnum(value); - break; - case 18: - var value = new proto.buf.validate.RepeatedRules; - reader.readMessage(value,proto.buf.validate.RepeatedRules.deserializeBinaryFromReader); - msg.setRepeated(value); - break; - case 19: - var value = new proto.buf.validate.MapRules; - reader.readMessage(value,proto.buf.validate.MapRules.deserializeBinaryFromReader); - msg.setMap(value); - break; - case 20: - var value = new proto.buf.validate.AnyRules; - reader.readMessage(value,proto.buf.validate.AnyRules.deserializeBinaryFromReader); - msg.setAny(value); - break; - case 21: - var value = new proto.buf.validate.DurationRules; - reader.readMessage(value,proto.buf.validate.DurationRules.deserializeBinaryFromReader); - msg.setDuration(value); - break; - case 22: - var value = new proto.buf.validate.TimestampRules; - reader.readMessage(value,proto.buf.validate.TimestampRules.deserializeBinaryFromReader); - msg.setTimestamp(value); - break; - default: - reader.skipField(); - break; + create(value) { + const message = globalThis.Object.create((this.messagePrototype)); + message.less_than = { oneofKind: undefined }; + message.greater_than = { oneofKind: undefined }; + if (value !== undefined) + runtime_3.reflectionMergePartial(this, message, value); + return message; } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.buf.validate.FieldConstraints.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.buf.validate.FieldConstraints.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.buf.validate.FieldConstraints} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.buf.validate.FieldConstraints.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getCelList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 23, - f, - buf_validate_expression_pb.Constraint.serializeBinaryToWriter - ); - } - f = message.getSkipped(); - if (f) { - writer.writeBool( - 24, - f - ); - } - f = message.getRequired(); - if (f) { - writer.writeBool( - 25, - f - ); - } - f = message.getIgnoreEmpty(); - if (f) { - writer.writeBool( - 26, - f - ); - } - f = message.getFloat(); - if (f != null) { - writer.writeMessage( - 1, - f, - proto.buf.validate.FloatRules.serializeBinaryToWriter - ); - } - f = message.getDouble(); - if (f != null) { - writer.writeMessage( - 2, - f, - proto.buf.validate.DoubleRules.serializeBinaryToWriter - ); - } - f = message.getInt32(); - if (f != null) { - writer.writeMessage( - 3, - f, - proto.buf.validate.Int32Rules.serializeBinaryToWriter - ); - } - f = message.getInt64(); - if (f != null) { - writer.writeMessage( - 4, - f, - proto.buf.validate.Int64Rules.serializeBinaryToWriter - ); - } - f = message.getUint32(); - if (f != null) { - writer.writeMessage( - 5, - f, - proto.buf.validate.UInt32Rules.serializeBinaryToWriter - ); - } - f = message.getUint64(); - if (f != null) { - writer.writeMessage( - 6, - f, - proto.buf.validate.UInt64Rules.serializeBinaryToWriter - ); - } - f = message.getSint32(); - if (f != null) { - writer.writeMessage( - 7, - f, - proto.buf.validate.SInt32Rules.serializeBinaryToWriter - ); - } - f = message.getSint64(); - if (f != null) { - writer.writeMessage( - 8, - f, - proto.buf.validate.SInt64Rules.serializeBinaryToWriter - ); - } - f = message.getFixed32(); - if (f != null) { - writer.writeMessage( - 9, - f, - proto.buf.validate.Fixed32Rules.serializeBinaryToWriter - ); - } - f = message.getFixed64(); - if (f != null) { - writer.writeMessage( - 10, - f, - proto.buf.validate.Fixed64Rules.serializeBinaryToWriter - ); - } - f = message.getSfixed32(); - if (f != null) { - writer.writeMessage( - 11, - f, - proto.buf.validate.SFixed32Rules.serializeBinaryToWriter - ); - } - f = message.getSfixed64(); - if (f != null) { - writer.writeMessage( - 12, - f, - proto.buf.validate.SFixed64Rules.serializeBinaryToWriter - ); - } - f = message.getBool(); - if (f != null) { - writer.writeMessage( - 13, - f, - proto.buf.validate.BoolRules.serializeBinaryToWriter - ); - } - f = message.getString(); - if (f != null) { - writer.writeMessage( - 14, - f, - proto.buf.validate.StringRules.serializeBinaryToWriter - ); - } - f = message.getBytes(); - if (f != null) { - writer.writeMessage( - 15, - f, - proto.buf.validate.BytesRules.serializeBinaryToWriter - ); - } - f = message.getEnum(); - if (f != null) { - writer.writeMessage( - 16, - f, - proto.buf.validate.EnumRules.serializeBinaryToWriter - ); - } - f = message.getRepeated(); - if (f != null) { - writer.writeMessage( - 18, - f, - proto.buf.validate.RepeatedRules.serializeBinaryToWriter - ); - } - f = message.getMap(); - if (f != null) { - writer.writeMessage( - 19, - f, - proto.buf.validate.MapRules.serializeBinaryToWriter - ); - } - f = message.getAny(); - if (f != null) { - writer.writeMessage( - 20, - f, - proto.buf.validate.AnyRules.serializeBinaryToWriter - ); - } - f = message.getDuration(); - if (f != null) { - writer.writeMessage( - 21, - f, - proto.buf.validate.DurationRules.serializeBinaryToWriter - ); - } - f = message.getTimestamp(); - if (f != null) { - writer.writeMessage( - 22, - f, - proto.buf.validate.TimestampRules.serializeBinaryToWriter - ); - } -}; - - -/** - * repeated Constraint cel = 23; - * @return {!Array} - */ -proto.buf.validate.FieldConstraints.prototype.getCelList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, buf_validate_expression_pb.Constraint, 23)); -}; - - -/** - * @param {!Array} value - * @return {!proto.buf.validate.FieldConstraints} returns this -*/ -proto.buf.validate.FieldConstraints.prototype.setCelList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 23, value); -}; - - -/** - * @param {!proto.buf.validate.Constraint=} opt_value - * @param {number=} opt_index - * @return {!proto.buf.validate.Constraint} - */ -proto.buf.validate.FieldConstraints.prototype.addCel = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 23, opt_value, proto.buf.validate.Constraint, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.buf.validate.FieldConstraints} returns this - */ -proto.buf.validate.FieldConstraints.prototype.clearCelList = function() { - return this.setCelList([]); -}; - - -/** - * optional bool skipped = 24; - * @return {boolean} - */ -proto.buf.validate.FieldConstraints.prototype.getSkipped = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 24, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.buf.validate.FieldConstraints} returns this - */ -proto.buf.validate.FieldConstraints.prototype.setSkipped = function(value) { - return jspb.Message.setProto3BooleanField(this, 24, value); -}; - - -/** - * optional bool required = 25; - * @return {boolean} - */ -proto.buf.validate.FieldConstraints.prototype.getRequired = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 25, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.buf.validate.FieldConstraints} returns this - */ -proto.buf.validate.FieldConstraints.prototype.setRequired = function(value) { - return jspb.Message.setProto3BooleanField(this, 25, value); -}; - - -/** - * optional bool ignore_empty = 26; - * @return {boolean} - */ -proto.buf.validate.FieldConstraints.prototype.getIgnoreEmpty = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 26, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.buf.validate.FieldConstraints} returns this - */ -proto.buf.validate.FieldConstraints.prototype.setIgnoreEmpty = function(value) { - return jspb.Message.setProto3BooleanField(this, 26, value); -}; - - -/** - * optional FloatRules float = 1; - * @return {?proto.buf.validate.FloatRules} - */ -proto.buf.validate.FieldConstraints.prototype.getFloat = function() { - return /** @type{?proto.buf.validate.FloatRules} */ ( - jspb.Message.getWrapperField(this, proto.buf.validate.FloatRules, 1)); -}; - - -/** - * @param {?proto.buf.validate.FloatRules|undefined} value - * @return {!proto.buf.validate.FieldConstraints} returns this -*/ -proto.buf.validate.FieldConstraints.prototype.setFloat = function(value) { - return jspb.Message.setOneofWrapperField(this, 1, proto.buf.validate.FieldConstraints.oneofGroups_[0], value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.buf.validate.FieldConstraints} returns this - */ -proto.buf.validate.FieldConstraints.prototype.clearFloat = function() { - return this.setFloat(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.buf.validate.FieldConstraints.prototype.hasFloat = function() { - return jspb.Message.getField(this, 1) != null; -}; - - -/** - * optional DoubleRules double = 2; - * @return {?proto.buf.validate.DoubleRules} - */ -proto.buf.validate.FieldConstraints.prototype.getDouble = function() { - return /** @type{?proto.buf.validate.DoubleRules} */ ( - jspb.Message.getWrapperField(this, proto.buf.validate.DoubleRules, 2)); -}; - - -/** - * @param {?proto.buf.validate.DoubleRules|undefined} value - * @return {!proto.buf.validate.FieldConstraints} returns this -*/ -proto.buf.validate.FieldConstraints.prototype.setDouble = function(value) { - return jspb.Message.setOneofWrapperField(this, 2, proto.buf.validate.FieldConstraints.oneofGroups_[0], value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.buf.validate.FieldConstraints} returns this - */ -proto.buf.validate.FieldConstraints.prototype.clearDouble = function() { - return this.setDouble(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.buf.validate.FieldConstraints.prototype.hasDouble = function() { - return jspb.Message.getField(this, 2) != null; -}; - - -/** - * optional Int32Rules int32 = 3; - * @return {?proto.buf.validate.Int32Rules} - */ -proto.buf.validate.FieldConstraints.prototype.getInt32 = function() { - return /** @type{?proto.buf.validate.Int32Rules} */ ( - jspb.Message.getWrapperField(this, proto.buf.validate.Int32Rules, 3)); -}; - - -/** - * @param {?proto.buf.validate.Int32Rules|undefined} value - * @return {!proto.buf.validate.FieldConstraints} returns this -*/ -proto.buf.validate.FieldConstraints.prototype.setInt32 = function(value) { - return jspb.Message.setOneofWrapperField(this, 3, proto.buf.validate.FieldConstraints.oneofGroups_[0], value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.buf.validate.FieldConstraints} returns this - */ -proto.buf.validate.FieldConstraints.prototype.clearInt32 = function() { - return this.setInt32(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.buf.validate.FieldConstraints.prototype.hasInt32 = function() { - return jspb.Message.getField(this, 3) != null; -}; - - -/** - * optional Int64Rules int64 = 4; - * @return {?proto.buf.validate.Int64Rules} - */ -proto.buf.validate.FieldConstraints.prototype.getInt64 = function() { - return /** @type{?proto.buf.validate.Int64Rules} */ ( - jspb.Message.getWrapperField(this, proto.buf.validate.Int64Rules, 4)); -}; - - -/** - * @param {?proto.buf.validate.Int64Rules|undefined} value - * @return {!proto.buf.validate.FieldConstraints} returns this -*/ -proto.buf.validate.FieldConstraints.prototype.setInt64 = function(value) { - return jspb.Message.setOneofWrapperField(this, 4, proto.buf.validate.FieldConstraints.oneofGroups_[0], value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.buf.validate.FieldConstraints} returns this - */ -proto.buf.validate.FieldConstraints.prototype.clearInt64 = function() { - return this.setInt64(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.buf.validate.FieldConstraints.prototype.hasInt64 = function() { - return jspb.Message.getField(this, 4) != null; -}; - - -/** - * optional UInt32Rules uint32 = 5; - * @return {?proto.buf.validate.UInt32Rules} - */ -proto.buf.validate.FieldConstraints.prototype.getUint32 = function() { - return /** @type{?proto.buf.validate.UInt32Rules} */ ( - jspb.Message.getWrapperField(this, proto.buf.validate.UInt32Rules, 5)); -}; - - -/** - * @param {?proto.buf.validate.UInt32Rules|undefined} value - * @return {!proto.buf.validate.FieldConstraints} returns this -*/ -proto.buf.validate.FieldConstraints.prototype.setUint32 = function(value) { - return jspb.Message.setOneofWrapperField(this, 5, proto.buf.validate.FieldConstraints.oneofGroups_[0], value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.buf.validate.FieldConstraints} returns this - */ -proto.buf.validate.FieldConstraints.prototype.clearUint32 = function() { - return this.setUint32(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.buf.validate.FieldConstraints.prototype.hasUint32 = function() { - return jspb.Message.getField(this, 5) != null; -}; - - -/** - * optional UInt64Rules uint64 = 6; - * @return {?proto.buf.validate.UInt64Rules} - */ -proto.buf.validate.FieldConstraints.prototype.getUint64 = function() { - return /** @type{?proto.buf.validate.UInt64Rules} */ ( - jspb.Message.getWrapperField(this, proto.buf.validate.UInt64Rules, 6)); -}; - - -/** - * @param {?proto.buf.validate.UInt64Rules|undefined} value - * @return {!proto.buf.validate.FieldConstraints} returns this -*/ -proto.buf.validate.FieldConstraints.prototype.setUint64 = function(value) { - return jspb.Message.setOneofWrapperField(this, 6, proto.buf.validate.FieldConstraints.oneofGroups_[0], value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.buf.validate.FieldConstraints} returns this - */ -proto.buf.validate.FieldConstraints.prototype.clearUint64 = function() { - return this.setUint64(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.buf.validate.FieldConstraints.prototype.hasUint64 = function() { - return jspb.Message.getField(this, 6) != null; -}; - - -/** - * optional SInt32Rules sint32 = 7; - * @return {?proto.buf.validate.SInt32Rules} - */ -proto.buf.validate.FieldConstraints.prototype.getSint32 = function() { - return /** @type{?proto.buf.validate.SInt32Rules} */ ( - jspb.Message.getWrapperField(this, proto.buf.validate.SInt32Rules, 7)); -}; - - -/** - * @param {?proto.buf.validate.SInt32Rules|undefined} value - * @return {!proto.buf.validate.FieldConstraints} returns this -*/ -proto.buf.validate.FieldConstraints.prototype.setSint32 = function(value) { - return jspb.Message.setOneofWrapperField(this, 7, proto.buf.validate.FieldConstraints.oneofGroups_[0], value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.buf.validate.FieldConstraints} returns this - */ -proto.buf.validate.FieldConstraints.prototype.clearSint32 = function() { - return this.setSint32(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.buf.validate.FieldConstraints.prototype.hasSint32 = function() { - return jspb.Message.getField(this, 7) != null; -}; - - -/** - * optional SInt64Rules sint64 = 8; - * @return {?proto.buf.validate.SInt64Rules} - */ -proto.buf.validate.FieldConstraints.prototype.getSint64 = function() { - return /** @type{?proto.buf.validate.SInt64Rules} */ ( - jspb.Message.getWrapperField(this, proto.buf.validate.SInt64Rules, 8)); -}; - - -/** - * @param {?proto.buf.validate.SInt64Rules|undefined} value - * @return {!proto.buf.validate.FieldConstraints} returns this -*/ -proto.buf.validate.FieldConstraints.prototype.setSint64 = function(value) { - return jspb.Message.setOneofWrapperField(this, 8, proto.buf.validate.FieldConstraints.oneofGroups_[0], value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.buf.validate.FieldConstraints} returns this - */ -proto.buf.validate.FieldConstraints.prototype.clearSint64 = function() { - return this.setSint64(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.buf.validate.FieldConstraints.prototype.hasSint64 = function() { - return jspb.Message.getField(this, 8) != null; -}; - - -/** - * optional Fixed32Rules fixed32 = 9; - * @return {?proto.buf.validate.Fixed32Rules} - */ -proto.buf.validate.FieldConstraints.prototype.getFixed32 = function() { - return /** @type{?proto.buf.validate.Fixed32Rules} */ ( - jspb.Message.getWrapperField(this, proto.buf.validate.Fixed32Rules, 9)); -}; - - -/** - * @param {?proto.buf.validate.Fixed32Rules|undefined} value - * @return {!proto.buf.validate.FieldConstraints} returns this -*/ -proto.buf.validate.FieldConstraints.prototype.setFixed32 = function(value) { - return jspb.Message.setOneofWrapperField(this, 9, proto.buf.validate.FieldConstraints.oneofGroups_[0], value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.buf.validate.FieldConstraints} returns this - */ -proto.buf.validate.FieldConstraints.prototype.clearFixed32 = function() { - return this.setFixed32(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.buf.validate.FieldConstraints.prototype.hasFixed32 = function() { - return jspb.Message.getField(this, 9) != null; -}; - - -/** - * optional Fixed64Rules fixed64 = 10; - * @return {?proto.buf.validate.Fixed64Rules} - */ -proto.buf.validate.FieldConstraints.prototype.getFixed64 = function() { - return /** @type{?proto.buf.validate.Fixed64Rules} */ ( - jspb.Message.getWrapperField(this, proto.buf.validate.Fixed64Rules, 10)); -}; - - -/** - * @param {?proto.buf.validate.Fixed64Rules|undefined} value - * @return {!proto.buf.validate.FieldConstraints} returns this -*/ -proto.buf.validate.FieldConstraints.prototype.setFixed64 = function(value) { - return jspb.Message.setOneofWrapperField(this, 10, proto.buf.validate.FieldConstraints.oneofGroups_[0], value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.buf.validate.FieldConstraints} returns this - */ -proto.buf.validate.FieldConstraints.prototype.clearFixed64 = function() { - return this.setFixed64(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.buf.validate.FieldConstraints.prototype.hasFixed64 = function() { - return jspb.Message.getField(this, 10) != null; -}; - - -/** - * optional SFixed32Rules sfixed32 = 11; - * @return {?proto.buf.validate.SFixed32Rules} - */ -proto.buf.validate.FieldConstraints.prototype.getSfixed32 = function() { - return /** @type{?proto.buf.validate.SFixed32Rules} */ ( - jspb.Message.getWrapperField(this, proto.buf.validate.SFixed32Rules, 11)); -}; - - -/** - * @param {?proto.buf.validate.SFixed32Rules|undefined} value - * @return {!proto.buf.validate.FieldConstraints} returns this -*/ -proto.buf.validate.FieldConstraints.prototype.setSfixed32 = function(value) { - return jspb.Message.setOneofWrapperField(this, 11, proto.buf.validate.FieldConstraints.oneofGroups_[0], value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.buf.validate.FieldConstraints} returns this - */ -proto.buf.validate.FieldConstraints.prototype.clearSfixed32 = function() { - return this.setSfixed32(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.buf.validate.FieldConstraints.prototype.hasSfixed32 = function() { - return jspb.Message.getField(this, 11) != null; -}; - - -/** - * optional SFixed64Rules sfixed64 = 12; - * @return {?proto.buf.validate.SFixed64Rules} - */ -proto.buf.validate.FieldConstraints.prototype.getSfixed64 = function() { - return /** @type{?proto.buf.validate.SFixed64Rules} */ ( - jspb.Message.getWrapperField(this, proto.buf.validate.SFixed64Rules, 12)); -}; - - -/** - * @param {?proto.buf.validate.SFixed64Rules|undefined} value - * @return {!proto.buf.validate.FieldConstraints} returns this -*/ -proto.buf.validate.FieldConstraints.prototype.setSfixed64 = function(value) { - return jspb.Message.setOneofWrapperField(this, 12, proto.buf.validate.FieldConstraints.oneofGroups_[0], value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.buf.validate.FieldConstraints} returns this - */ -proto.buf.validate.FieldConstraints.prototype.clearSfixed64 = function() { - return this.setSfixed64(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.buf.validate.FieldConstraints.prototype.hasSfixed64 = function() { - return jspb.Message.getField(this, 12) != null; -}; - - -/** - * optional BoolRules bool = 13; - * @return {?proto.buf.validate.BoolRules} - */ -proto.buf.validate.FieldConstraints.prototype.getBool = function() { - return /** @type{?proto.buf.validate.BoolRules} */ ( - jspb.Message.getWrapperField(this, proto.buf.validate.BoolRules, 13)); -}; - - -/** - * @param {?proto.buf.validate.BoolRules|undefined} value - * @return {!proto.buf.validate.FieldConstraints} returns this -*/ -proto.buf.validate.FieldConstraints.prototype.setBool = function(value) { - return jspb.Message.setOneofWrapperField(this, 13, proto.buf.validate.FieldConstraints.oneofGroups_[0], value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.buf.validate.FieldConstraints} returns this - */ -proto.buf.validate.FieldConstraints.prototype.clearBool = function() { - return this.setBool(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.buf.validate.FieldConstraints.prototype.hasBool = function() { - return jspb.Message.getField(this, 13) != null; -}; - - -/** - * optional StringRules string = 14; - * @return {?proto.buf.validate.StringRules} - */ -proto.buf.validate.FieldConstraints.prototype.getString = function() { - return /** @type{?proto.buf.validate.StringRules} */ ( - jspb.Message.getWrapperField(this, proto.buf.validate.StringRules, 14)); -}; - - -/** - * @param {?proto.buf.validate.StringRules|undefined} value - * @return {!proto.buf.validate.FieldConstraints} returns this -*/ -proto.buf.validate.FieldConstraints.prototype.setString = function(value) { - return jspb.Message.setOneofWrapperField(this, 14, proto.buf.validate.FieldConstraints.oneofGroups_[0], value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.buf.validate.FieldConstraints} returns this - */ -proto.buf.validate.FieldConstraints.prototype.clearString = function() { - return this.setString(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.buf.validate.FieldConstraints.prototype.hasString = function() { - return jspb.Message.getField(this, 14) != null; -}; - - -/** - * optional BytesRules bytes = 15; - * @return {?proto.buf.validate.BytesRules} - */ -proto.buf.validate.FieldConstraints.prototype.getBytes = function() { - return /** @type{?proto.buf.validate.BytesRules} */ ( - jspb.Message.getWrapperField(this, proto.buf.validate.BytesRules, 15)); -}; - - -/** - * @param {?proto.buf.validate.BytesRules|undefined} value - * @return {!proto.buf.validate.FieldConstraints} returns this -*/ -proto.buf.validate.FieldConstraints.prototype.setBytes = function(value) { - return jspb.Message.setOneofWrapperField(this, 15, proto.buf.validate.FieldConstraints.oneofGroups_[0], value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.buf.validate.FieldConstraints} returns this - */ -proto.buf.validate.FieldConstraints.prototype.clearBytes = function() { - return this.setBytes(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.buf.validate.FieldConstraints.prototype.hasBytes = function() { - return jspb.Message.getField(this, 15) != null; -}; - - -/** - * optional EnumRules enum = 16; - * @return {?proto.buf.validate.EnumRules} - */ -proto.buf.validate.FieldConstraints.prototype.getEnum = function() { - return /** @type{?proto.buf.validate.EnumRules} */ ( - jspb.Message.getWrapperField(this, proto.buf.validate.EnumRules, 16)); -}; - - -/** - * @param {?proto.buf.validate.EnumRules|undefined} value - * @return {!proto.buf.validate.FieldConstraints} returns this -*/ -proto.buf.validate.FieldConstraints.prototype.setEnum = function(value) { - return jspb.Message.setOneofWrapperField(this, 16, proto.buf.validate.FieldConstraints.oneofGroups_[0], value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.buf.validate.FieldConstraints} returns this - */ -proto.buf.validate.FieldConstraints.prototype.clearEnum = function() { - return this.setEnum(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.buf.validate.FieldConstraints.prototype.hasEnum = function() { - return jspb.Message.getField(this, 16) != null; -}; - - -/** - * optional RepeatedRules repeated = 18; - * @return {?proto.buf.validate.RepeatedRules} - */ -proto.buf.validate.FieldConstraints.prototype.getRepeated = function() { - return /** @type{?proto.buf.validate.RepeatedRules} */ ( - jspb.Message.getWrapperField(this, proto.buf.validate.RepeatedRules, 18)); -}; - - -/** - * @param {?proto.buf.validate.RepeatedRules|undefined} value - * @return {!proto.buf.validate.FieldConstraints} returns this -*/ -proto.buf.validate.FieldConstraints.prototype.setRepeated = function(value) { - return jspb.Message.setOneofWrapperField(this, 18, proto.buf.validate.FieldConstraints.oneofGroups_[0], value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.buf.validate.FieldConstraints} returns this - */ -proto.buf.validate.FieldConstraints.prototype.clearRepeated = function() { - return this.setRepeated(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.buf.validate.FieldConstraints.prototype.hasRepeated = function() { - return jspb.Message.getField(this, 18) != null; -}; - - -/** - * optional MapRules map = 19; - * @return {?proto.buf.validate.MapRules} - */ -proto.buf.validate.FieldConstraints.prototype.getMap = function() { - return /** @type{?proto.buf.validate.MapRules} */ ( - jspb.Message.getWrapperField(this, proto.buf.validate.MapRules, 19)); -}; - - -/** - * @param {?proto.buf.validate.MapRules|undefined} value - * @return {!proto.buf.validate.FieldConstraints} returns this -*/ -proto.buf.validate.FieldConstraints.prototype.setMap = function(value) { - return jspb.Message.setOneofWrapperField(this, 19, proto.buf.validate.FieldConstraints.oneofGroups_[0], value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.buf.validate.FieldConstraints} returns this - */ -proto.buf.validate.FieldConstraints.prototype.clearMap = function() { - return this.setMap(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.buf.validate.FieldConstraints.prototype.hasMap = function() { - return jspb.Message.getField(this, 19) != null; -}; - - -/** - * optional AnyRules any = 20; - * @return {?proto.buf.validate.AnyRules} - */ -proto.buf.validate.FieldConstraints.prototype.getAny = function() { - return /** @type{?proto.buf.validate.AnyRules} */ ( - jspb.Message.getWrapperField(this, proto.buf.validate.AnyRules, 20)); -}; - - -/** - * @param {?proto.buf.validate.AnyRules|undefined} value - * @return {!proto.buf.validate.FieldConstraints} returns this -*/ -proto.buf.validate.FieldConstraints.prototype.setAny = function(value) { - return jspb.Message.setOneofWrapperField(this, 20, proto.buf.validate.FieldConstraints.oneofGroups_[0], value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.buf.validate.FieldConstraints} returns this - */ -proto.buf.validate.FieldConstraints.prototype.clearAny = function() { - return this.setAny(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.buf.validate.FieldConstraints.prototype.hasAny = function() { - return jspb.Message.getField(this, 20) != null; -}; - - -/** - * optional DurationRules duration = 21; - * @return {?proto.buf.validate.DurationRules} - */ -proto.buf.validate.FieldConstraints.prototype.getDuration = function() { - return /** @type{?proto.buf.validate.DurationRules} */ ( - jspb.Message.getWrapperField(this, proto.buf.validate.DurationRules, 21)); -}; - - -/** - * @param {?proto.buf.validate.DurationRules|undefined} value - * @return {!proto.buf.validate.FieldConstraints} returns this -*/ -proto.buf.validate.FieldConstraints.prototype.setDuration = function(value) { - return jspb.Message.setOneofWrapperField(this, 21, proto.buf.validate.FieldConstraints.oneofGroups_[0], value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.buf.validate.FieldConstraints} returns this - */ -proto.buf.validate.FieldConstraints.prototype.clearDuration = function() { - return this.setDuration(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.buf.validate.FieldConstraints.prototype.hasDuration = function() { - return jspb.Message.getField(this, 21) != null; -}; - - -/** - * optional TimestampRules timestamp = 22; - * @return {?proto.buf.validate.TimestampRules} - */ -proto.buf.validate.FieldConstraints.prototype.getTimestamp = function() { - return /** @type{?proto.buf.validate.TimestampRules} */ ( - jspb.Message.getWrapperField(this, proto.buf.validate.TimestampRules, 22)); -}; - - -/** - * @param {?proto.buf.validate.TimestampRules|undefined} value - * @return {!proto.buf.validate.FieldConstraints} returns this -*/ -proto.buf.validate.FieldConstraints.prototype.setTimestamp = function(value) { - return jspb.Message.setOneofWrapperField(this, 22, proto.buf.validate.FieldConstraints.oneofGroups_[0], value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.buf.validate.FieldConstraints} returns this - */ -proto.buf.validate.FieldConstraints.prototype.clearTimestamp = function() { - return this.setTimestamp(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.buf.validate.FieldConstraints.prototype.hasTimestamp = function() { - return jspb.Message.getField(this, 22) != null; -}; - - - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.buf.validate.FloatRules.repeatedFields_ = [6,7]; - -/** - * Oneof group definitions for this message. Each group defines the field - * numbers belonging to that group. When of these fields' value is set, all - * other fields in the group are cleared. During deserialization, if multiple - * fields are encountered for a group, only the last value seen will be kept. - * @private {!Array>} - * @const - */ -proto.buf.validate.FloatRules.oneofGroups_ = [[2,3],[4,5]]; - -/** - * @enum {number} - */ -proto.buf.validate.FloatRules.LessThanCase = { - LESS_THAN_NOT_SET: 0, - LT: 2, - LTE: 3 -}; - -/** - * @return {proto.buf.validate.FloatRules.LessThanCase} - */ -proto.buf.validate.FloatRules.prototype.getLessThanCase = function() { - return /** @type {proto.buf.validate.FloatRules.LessThanCase} */(jspb.Message.computeOneofCase(this, proto.buf.validate.FloatRules.oneofGroups_[0])); -}; - -/** - * @enum {number} - */ -proto.buf.validate.FloatRules.GreaterThanCase = { - GREATER_THAN_NOT_SET: 0, - GT: 4, - GTE: 5 -}; - -/** - * @return {proto.buf.validate.FloatRules.GreaterThanCase} - */ -proto.buf.validate.FloatRules.prototype.getGreaterThanCase = function() { - return /** @type {proto.buf.validate.FloatRules.GreaterThanCase} */(jspb.Message.computeOneofCase(this, proto.buf.validate.FloatRules.oneofGroups_[1])); -}; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.buf.validate.FloatRules.prototype.toObject = function(opt_includeInstance) { - return proto.buf.validate.FloatRules.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.buf.validate.FloatRules} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.buf.validate.FloatRules.toObject = function(includeInstance, msg) { - var f, obj = { - pb_const: jspb.Message.getFloatingPointFieldWithDefault(msg, 1, 0.0), - lt: jspb.Message.getFloatingPointFieldWithDefault(msg, 2, 0.0), - lte: jspb.Message.getFloatingPointFieldWithDefault(msg, 3, 0.0), - gt: jspb.Message.getFloatingPointFieldWithDefault(msg, 4, 0.0), - gte: jspb.Message.getFloatingPointFieldWithDefault(msg, 5, 0.0), - inList: (f = jspb.Message.getRepeatedFloatingPointField(msg, 6)) == null ? undefined : f, - notInList: (f = jspb.Message.getRepeatedFloatingPointField(msg, 7)) == null ? undefined : f, - finite: jspb.Message.getBooleanFieldWithDefault(msg, 8, false) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.buf.validate.FloatRules} - */ -proto.buf.validate.FloatRules.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.buf.validate.FloatRules; - return proto.buf.validate.FloatRules.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.buf.validate.FloatRules} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.buf.validate.FloatRules} - */ -proto.buf.validate.FloatRules.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {number} */ (reader.readFloat()); - msg.setConst(value); - break; - case 2: - var value = /** @type {number} */ (reader.readFloat()); - msg.setLt(value); - break; - case 3: - var value = /** @type {number} */ (reader.readFloat()); - msg.setLte(value); - break; - case 4: - var value = /** @type {number} */ (reader.readFloat()); - msg.setGt(value); - break; - case 5: - var value = /** @type {number} */ (reader.readFloat()); - msg.setGte(value); - break; - case 6: - var values = /** @type {!Array} */ (reader.isDelimited() ? reader.readPackedFloat() : [reader.readFloat()]); - for (var i = 0; i < values.length; i++) { - msg.addIn(values[i]); - } - break; - case 7: - var values = /** @type {!Array} */ (reader.isDelimited() ? reader.readPackedFloat() : [reader.readFloat()]); - for (var i = 0; i < values.length; i++) { - msg.addNotIn(values[i]); - } - break; - case 8: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setFinite(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.buf.validate.FloatRules.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.buf.validate.FloatRules.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.buf.validate.FloatRules} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.buf.validate.FloatRules.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = /** @type {number} */ (jspb.Message.getField(message, 1)); - if (f != null) { - writer.writeFloat( - 1, - f - ); - } - f = /** @type {number} */ (jspb.Message.getField(message, 2)); - if (f != null) { - writer.writeFloat( - 2, - f - ); - } - f = /** @type {number} */ (jspb.Message.getField(message, 3)); - if (f != null) { - writer.writeFloat( - 3, - f - ); - } - f = /** @type {number} */ (jspb.Message.getField(message, 4)); - if (f != null) { - writer.writeFloat( - 4, - f - ); - } - f = /** @type {number} */ (jspb.Message.getField(message, 5)); - if (f != null) { - writer.writeFloat( - 5, - f - ); - } - f = message.getInList(); - if (f.length > 0) { - writer.writePackedFloat( - 6, - f - ); - } - f = message.getNotInList(); - if (f.length > 0) { - writer.writePackedFloat( - 7, - f - ); - } - f = message.getFinite(); - if (f) { - writer.writeBool( - 8, - f - ); - } -}; - - -/** - * optional float const = 1; - * @return {number} - */ -proto.buf.validate.FloatRules.prototype.getConst = function() { - return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 1, 0.0)); -}; - - -/** - * @param {number} value - * @return {!proto.buf.validate.FloatRules} returns this - */ -proto.buf.validate.FloatRules.prototype.setConst = function(value) { - return jspb.Message.setField(this, 1, value); -}; - - -/** - * Clears the field making it undefined. - * @return {!proto.buf.validate.FloatRules} returns this - */ -proto.buf.validate.FloatRules.prototype.clearConst = function() { - return jspb.Message.setField(this, 1, undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.buf.validate.FloatRules.prototype.hasConst = function() { - return jspb.Message.getField(this, 1) != null; -}; - - -/** - * optional float lt = 2; - * @return {number} - */ -proto.buf.validate.FloatRules.prototype.getLt = function() { - return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 2, 0.0)); -}; - - -/** - * @param {number} value - * @return {!proto.buf.validate.FloatRules} returns this - */ -proto.buf.validate.FloatRules.prototype.setLt = function(value) { - return jspb.Message.setOneofField(this, 2, proto.buf.validate.FloatRules.oneofGroups_[0], value); -}; - - -/** - * Clears the field making it undefined. - * @return {!proto.buf.validate.FloatRules} returns this - */ -proto.buf.validate.FloatRules.prototype.clearLt = function() { - return jspb.Message.setOneofField(this, 2, proto.buf.validate.FloatRules.oneofGroups_[0], undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.buf.validate.FloatRules.prototype.hasLt = function() { - return jspb.Message.getField(this, 2) != null; -}; - - -/** - * optional float lte = 3; - * @return {number} - */ -proto.buf.validate.FloatRules.prototype.getLte = function() { - return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 3, 0.0)); -}; - - -/** - * @param {number} value - * @return {!proto.buf.validate.FloatRules} returns this - */ -proto.buf.validate.FloatRules.prototype.setLte = function(value) { - return jspb.Message.setOneofField(this, 3, proto.buf.validate.FloatRules.oneofGroups_[0], value); -}; - - -/** - * Clears the field making it undefined. - * @return {!proto.buf.validate.FloatRules} returns this - */ -proto.buf.validate.FloatRules.prototype.clearLte = function() { - return jspb.Message.setOneofField(this, 3, proto.buf.validate.FloatRules.oneofGroups_[0], undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.buf.validate.FloatRules.prototype.hasLte = function() { - return jspb.Message.getField(this, 3) != null; -}; - - -/** - * optional float gt = 4; - * @return {number} - */ -proto.buf.validate.FloatRules.prototype.getGt = function() { - return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 4, 0.0)); -}; - - -/** - * @param {number} value - * @return {!proto.buf.validate.FloatRules} returns this - */ -proto.buf.validate.FloatRules.prototype.setGt = function(value) { - return jspb.Message.setOneofField(this, 4, proto.buf.validate.FloatRules.oneofGroups_[1], value); -}; - - -/** - * Clears the field making it undefined. - * @return {!proto.buf.validate.FloatRules} returns this - */ -proto.buf.validate.FloatRules.prototype.clearGt = function() { - return jspb.Message.setOneofField(this, 4, proto.buf.validate.FloatRules.oneofGroups_[1], undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.buf.validate.FloatRules.prototype.hasGt = function() { - return jspb.Message.getField(this, 4) != null; -}; - - -/** - * optional float gte = 5; - * @return {number} - */ -proto.buf.validate.FloatRules.prototype.getGte = function() { - return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 5, 0.0)); -}; - - -/** - * @param {number} value - * @return {!proto.buf.validate.FloatRules} returns this - */ -proto.buf.validate.FloatRules.prototype.setGte = function(value) { - return jspb.Message.setOneofField(this, 5, proto.buf.validate.FloatRules.oneofGroups_[1], value); -}; - - -/** - * Clears the field making it undefined. - * @return {!proto.buf.validate.FloatRules} returns this - */ -proto.buf.validate.FloatRules.prototype.clearGte = function() { - return jspb.Message.setOneofField(this, 5, proto.buf.validate.FloatRules.oneofGroups_[1], undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.buf.validate.FloatRules.prototype.hasGte = function() { - return jspb.Message.getField(this, 5) != null; -}; - - -/** - * repeated float in = 6; - * @return {!Array} - */ -proto.buf.validate.FloatRules.prototype.getInList = function() { - return /** @type {!Array} */ (jspb.Message.getRepeatedFloatingPointField(this, 6)); -}; - - -/** - * @param {!Array} value - * @return {!proto.buf.validate.FloatRules} returns this - */ -proto.buf.validate.FloatRules.prototype.setInList = function(value) { - return jspb.Message.setField(this, 6, value || []); -}; - - -/** - * @param {number} value - * @param {number=} opt_index - * @return {!proto.buf.validate.FloatRules} returns this - */ -proto.buf.validate.FloatRules.prototype.addIn = function(value, opt_index) { - return jspb.Message.addToRepeatedField(this, 6, value, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.buf.validate.FloatRules} returns this - */ -proto.buf.validate.FloatRules.prototype.clearInList = function() { - return this.setInList([]); -}; - - -/** - * repeated float not_in = 7; - * @return {!Array} - */ -proto.buf.validate.FloatRules.prototype.getNotInList = function() { - return /** @type {!Array} */ (jspb.Message.getRepeatedFloatingPointField(this, 7)); -}; - - -/** - * @param {!Array} value - * @return {!proto.buf.validate.FloatRules} returns this - */ -proto.buf.validate.FloatRules.prototype.setNotInList = function(value) { - return jspb.Message.setField(this, 7, value || []); -}; - - -/** - * @param {number} value - * @param {number=} opt_index - * @return {!proto.buf.validate.FloatRules} returns this - */ -proto.buf.validate.FloatRules.prototype.addNotIn = function(value, opt_index) { - return jspb.Message.addToRepeatedField(this, 7, value, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.buf.validate.FloatRules} returns this - */ -proto.buf.validate.FloatRules.prototype.clearNotInList = function() { - return this.setNotInList([]); -}; - - -/** - * optional bool finite = 8; - * @return {boolean} - */ -proto.buf.validate.FloatRules.prototype.getFinite = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 8, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.buf.validate.FloatRules} returns this - */ -proto.buf.validate.FloatRules.prototype.setFinite = function(value) { - return jspb.Message.setProto3BooleanField(this, 8, value); -}; - - - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.buf.validate.DoubleRules.repeatedFields_ = [6,7]; - -/** - * Oneof group definitions for this message. Each group defines the field - * numbers belonging to that group. When of these fields' value is set, all - * other fields in the group are cleared. During deserialization, if multiple - * fields are encountered for a group, only the last value seen will be kept. - * @private {!Array>} - * @const - */ -proto.buf.validate.DoubleRules.oneofGroups_ = [[2,3],[4,5]]; - -/** - * @enum {number} - */ -proto.buf.validate.DoubleRules.LessThanCase = { - LESS_THAN_NOT_SET: 0, - LT: 2, - LTE: 3 -}; - -/** - * @return {proto.buf.validate.DoubleRules.LessThanCase} - */ -proto.buf.validate.DoubleRules.prototype.getLessThanCase = function() { - return /** @type {proto.buf.validate.DoubleRules.LessThanCase} */(jspb.Message.computeOneofCase(this, proto.buf.validate.DoubleRules.oneofGroups_[0])); -}; - -/** - * @enum {number} - */ -proto.buf.validate.DoubleRules.GreaterThanCase = { - GREATER_THAN_NOT_SET: 0, - GT: 4, - GTE: 5 -}; - -/** - * @return {proto.buf.validate.DoubleRules.GreaterThanCase} - */ -proto.buf.validate.DoubleRules.prototype.getGreaterThanCase = function() { - return /** @type {proto.buf.validate.DoubleRules.GreaterThanCase} */(jspb.Message.computeOneofCase(this, proto.buf.validate.DoubleRules.oneofGroups_[1])); -}; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.buf.validate.DoubleRules.prototype.toObject = function(opt_includeInstance) { - return proto.buf.validate.DoubleRules.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.buf.validate.DoubleRules} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.buf.validate.DoubleRules.toObject = function(includeInstance, msg) { - var f, obj = { - pb_const: jspb.Message.getFloatingPointFieldWithDefault(msg, 1, 0.0), - lt: jspb.Message.getFloatingPointFieldWithDefault(msg, 2, 0.0), - lte: jspb.Message.getFloatingPointFieldWithDefault(msg, 3, 0.0), - gt: jspb.Message.getFloatingPointFieldWithDefault(msg, 4, 0.0), - gte: jspb.Message.getFloatingPointFieldWithDefault(msg, 5, 0.0), - inList: (f = jspb.Message.getRepeatedFloatingPointField(msg, 6)) == null ? undefined : f, - notInList: (f = jspb.Message.getRepeatedFloatingPointField(msg, 7)) == null ? undefined : f, - finite: jspb.Message.getBooleanFieldWithDefault(msg, 8, false) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.buf.validate.DoubleRules} - */ -proto.buf.validate.DoubleRules.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.buf.validate.DoubleRules; - return proto.buf.validate.DoubleRules.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.buf.validate.DoubleRules} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.buf.validate.DoubleRules} - */ -proto.buf.validate.DoubleRules.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {number} */ (reader.readDouble()); - msg.setConst(value); - break; - case 2: - var value = /** @type {number} */ (reader.readDouble()); - msg.setLt(value); - break; - case 3: - var value = /** @type {number} */ (reader.readDouble()); - msg.setLte(value); - break; - case 4: - var value = /** @type {number} */ (reader.readDouble()); - msg.setGt(value); - break; - case 5: - var value = /** @type {number} */ (reader.readDouble()); - msg.setGte(value); - break; - case 6: - var values = /** @type {!Array} */ (reader.isDelimited() ? reader.readPackedDouble() : [reader.readDouble()]); - for (var i = 0; i < values.length; i++) { - msg.addIn(values[i]); - } - break; - case 7: - var values = /** @type {!Array} */ (reader.isDelimited() ? reader.readPackedDouble() : [reader.readDouble()]); - for (var i = 0; i < values.length; i++) { - msg.addNotIn(values[i]); - } - break; - case 8: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setFinite(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.buf.validate.DoubleRules.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.buf.validate.DoubleRules.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.buf.validate.DoubleRules} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.buf.validate.DoubleRules.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = /** @type {number} */ (jspb.Message.getField(message, 1)); - if (f != null) { - writer.writeDouble( - 1, - f - ); - } - f = /** @type {number} */ (jspb.Message.getField(message, 2)); - if (f != null) { - writer.writeDouble( - 2, - f - ); - } - f = /** @type {number} */ (jspb.Message.getField(message, 3)); - if (f != null) { - writer.writeDouble( - 3, - f - ); - } - f = /** @type {number} */ (jspb.Message.getField(message, 4)); - if (f != null) { - writer.writeDouble( - 4, - f - ); - } - f = /** @type {number} */ (jspb.Message.getField(message, 5)); - if (f != null) { - writer.writeDouble( - 5, - f - ); - } - f = message.getInList(); - if (f.length > 0) { - writer.writePackedDouble( - 6, - f - ); - } - f = message.getNotInList(); - if (f.length > 0) { - writer.writePackedDouble( - 7, - f - ); - } - f = message.getFinite(); - if (f) { - writer.writeBool( - 8, - f - ); - } -}; - - -/** - * optional double const = 1; - * @return {number} - */ -proto.buf.validate.DoubleRules.prototype.getConst = function() { - return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 1, 0.0)); -}; - - -/** - * @param {number} value - * @return {!proto.buf.validate.DoubleRules} returns this - */ -proto.buf.validate.DoubleRules.prototype.setConst = function(value) { - return jspb.Message.setField(this, 1, value); -}; - - -/** - * Clears the field making it undefined. - * @return {!proto.buf.validate.DoubleRules} returns this - */ -proto.buf.validate.DoubleRules.prototype.clearConst = function() { - return jspb.Message.setField(this, 1, undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.buf.validate.DoubleRules.prototype.hasConst = function() { - return jspb.Message.getField(this, 1) != null; -}; - - -/** - * optional double lt = 2; - * @return {number} - */ -proto.buf.validate.DoubleRules.prototype.getLt = function() { - return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 2, 0.0)); -}; - - -/** - * @param {number} value - * @return {!proto.buf.validate.DoubleRules} returns this - */ -proto.buf.validate.DoubleRules.prototype.setLt = function(value) { - return jspb.Message.setOneofField(this, 2, proto.buf.validate.DoubleRules.oneofGroups_[0], value); -}; - - -/** - * Clears the field making it undefined. - * @return {!proto.buf.validate.DoubleRules} returns this - */ -proto.buf.validate.DoubleRules.prototype.clearLt = function() { - return jspb.Message.setOneofField(this, 2, proto.buf.validate.DoubleRules.oneofGroups_[0], undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.buf.validate.DoubleRules.prototype.hasLt = function() { - return jspb.Message.getField(this, 2) != null; -}; - - -/** - * optional double lte = 3; - * @return {number} - */ -proto.buf.validate.DoubleRules.prototype.getLte = function() { - return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 3, 0.0)); -}; - - -/** - * @param {number} value - * @return {!proto.buf.validate.DoubleRules} returns this - */ -proto.buf.validate.DoubleRules.prototype.setLte = function(value) { - return jspb.Message.setOneofField(this, 3, proto.buf.validate.DoubleRules.oneofGroups_[0], value); -}; - - -/** - * Clears the field making it undefined. - * @return {!proto.buf.validate.DoubleRules} returns this - */ -proto.buf.validate.DoubleRules.prototype.clearLte = function() { - return jspb.Message.setOneofField(this, 3, proto.buf.validate.DoubleRules.oneofGroups_[0], undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.buf.validate.DoubleRules.prototype.hasLte = function() { - return jspb.Message.getField(this, 3) != null; -}; - - -/** - * optional double gt = 4; - * @return {number} - */ -proto.buf.validate.DoubleRules.prototype.getGt = function() { - return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 4, 0.0)); -}; - - -/** - * @param {number} value - * @return {!proto.buf.validate.DoubleRules} returns this - */ -proto.buf.validate.DoubleRules.prototype.setGt = function(value) { - return jspb.Message.setOneofField(this, 4, proto.buf.validate.DoubleRules.oneofGroups_[1], value); -}; - - -/** - * Clears the field making it undefined. - * @return {!proto.buf.validate.DoubleRules} returns this - */ -proto.buf.validate.DoubleRules.prototype.clearGt = function() { - return jspb.Message.setOneofField(this, 4, proto.buf.validate.DoubleRules.oneofGroups_[1], undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.buf.validate.DoubleRules.prototype.hasGt = function() { - return jspb.Message.getField(this, 4) != null; -}; - - -/** - * optional double gte = 5; - * @return {number} - */ -proto.buf.validate.DoubleRules.prototype.getGte = function() { - return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 5, 0.0)); -}; - - -/** - * @param {number} value - * @return {!proto.buf.validate.DoubleRules} returns this - */ -proto.buf.validate.DoubleRules.prototype.setGte = function(value) { - return jspb.Message.setOneofField(this, 5, proto.buf.validate.DoubleRules.oneofGroups_[1], value); -}; - - -/** - * Clears the field making it undefined. - * @return {!proto.buf.validate.DoubleRules} returns this - */ -proto.buf.validate.DoubleRules.prototype.clearGte = function() { - return jspb.Message.setOneofField(this, 5, proto.buf.validate.DoubleRules.oneofGroups_[1], undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.buf.validate.DoubleRules.prototype.hasGte = function() { - return jspb.Message.getField(this, 5) != null; -}; - - -/** - * repeated double in = 6; - * @return {!Array} - */ -proto.buf.validate.DoubleRules.prototype.getInList = function() { - return /** @type {!Array} */ (jspb.Message.getRepeatedFloatingPointField(this, 6)); -}; - - -/** - * @param {!Array} value - * @return {!proto.buf.validate.DoubleRules} returns this - */ -proto.buf.validate.DoubleRules.prototype.setInList = function(value) { - return jspb.Message.setField(this, 6, value || []); -}; - - -/** - * @param {number} value - * @param {number=} opt_index - * @return {!proto.buf.validate.DoubleRules} returns this - */ -proto.buf.validate.DoubleRules.prototype.addIn = function(value, opt_index) { - return jspb.Message.addToRepeatedField(this, 6, value, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.buf.validate.DoubleRules} returns this - */ -proto.buf.validate.DoubleRules.prototype.clearInList = function() { - return this.setInList([]); -}; - - -/** - * repeated double not_in = 7; - * @return {!Array} - */ -proto.buf.validate.DoubleRules.prototype.getNotInList = function() { - return /** @type {!Array} */ (jspb.Message.getRepeatedFloatingPointField(this, 7)); -}; - - -/** - * @param {!Array} value - * @return {!proto.buf.validate.DoubleRules} returns this - */ -proto.buf.validate.DoubleRules.prototype.setNotInList = function(value) { - return jspb.Message.setField(this, 7, value || []); -}; - - -/** - * @param {number} value - * @param {number=} opt_index - * @return {!proto.buf.validate.DoubleRules} returns this - */ -proto.buf.validate.DoubleRules.prototype.addNotIn = function(value, opt_index) { - return jspb.Message.addToRepeatedField(this, 7, value, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.buf.validate.DoubleRules} returns this - */ -proto.buf.validate.DoubleRules.prototype.clearNotInList = function() { - return this.setNotInList([]); -}; - - -/** - * optional bool finite = 8; - * @return {boolean} - */ -proto.buf.validate.DoubleRules.prototype.getFinite = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 8, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.buf.validate.DoubleRules} returns this - */ -proto.buf.validate.DoubleRules.prototype.setFinite = function(value) { - return jspb.Message.setProto3BooleanField(this, 8, value); -}; - - - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.buf.validate.Int32Rules.repeatedFields_ = [6,7]; - -/** - * Oneof group definitions for this message. Each group defines the field - * numbers belonging to that group. When of these fields' value is set, all - * other fields in the group are cleared. During deserialization, if multiple - * fields are encountered for a group, only the last value seen will be kept. - * @private {!Array>} - * @const - */ -proto.buf.validate.Int32Rules.oneofGroups_ = [[2,3],[4,5]]; - -/** - * @enum {number} - */ -proto.buf.validate.Int32Rules.LessThanCase = { - LESS_THAN_NOT_SET: 0, - LT: 2, - LTE: 3 -}; - -/** - * @return {proto.buf.validate.Int32Rules.LessThanCase} - */ -proto.buf.validate.Int32Rules.prototype.getLessThanCase = function() { - return /** @type {proto.buf.validate.Int32Rules.LessThanCase} */(jspb.Message.computeOneofCase(this, proto.buf.validate.Int32Rules.oneofGroups_[0])); -}; - -/** - * @enum {number} - */ -proto.buf.validate.Int32Rules.GreaterThanCase = { - GREATER_THAN_NOT_SET: 0, - GT: 4, - GTE: 5 -}; - -/** - * @return {proto.buf.validate.Int32Rules.GreaterThanCase} - */ -proto.buf.validate.Int32Rules.prototype.getGreaterThanCase = function() { - return /** @type {proto.buf.validate.Int32Rules.GreaterThanCase} */(jspb.Message.computeOneofCase(this, proto.buf.validate.Int32Rules.oneofGroups_[1])); -}; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.buf.validate.Int32Rules.prototype.toObject = function(opt_includeInstance) { - return proto.buf.validate.Int32Rules.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.buf.validate.Int32Rules} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.buf.validate.Int32Rules.toObject = function(includeInstance, msg) { - var f, obj = { - pb_const: jspb.Message.getFieldWithDefault(msg, 1, 0), - lt: jspb.Message.getFieldWithDefault(msg, 2, 0), - lte: jspb.Message.getFieldWithDefault(msg, 3, 0), - gt: jspb.Message.getFieldWithDefault(msg, 4, 0), - gte: jspb.Message.getFieldWithDefault(msg, 5, 0), - inList: (f = jspb.Message.getRepeatedField(msg, 6)) == null ? undefined : f, - notInList: (f = jspb.Message.getRepeatedField(msg, 7)) == null ? undefined : f - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.buf.validate.Int32Rules} - */ -proto.buf.validate.Int32Rules.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.buf.validate.Int32Rules; - return proto.buf.validate.Int32Rules.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.buf.validate.Int32Rules} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.buf.validate.Int32Rules} - */ -proto.buf.validate.Int32Rules.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {number} */ (reader.readInt32()); - msg.setConst(value); - break; - case 2: - var value = /** @type {number} */ (reader.readInt32()); - msg.setLt(value); - break; - case 3: - var value = /** @type {number} */ (reader.readInt32()); - msg.setLte(value); - break; - case 4: - var value = /** @type {number} */ (reader.readInt32()); - msg.setGt(value); - break; - case 5: - var value = /** @type {number} */ (reader.readInt32()); - msg.setGte(value); - break; - case 6: - var values = /** @type {!Array} */ (reader.isDelimited() ? reader.readPackedInt32() : [reader.readInt32()]); - for (var i = 0; i < values.length; i++) { - msg.addIn(values[i]); - } - break; - case 7: - var values = /** @type {!Array} */ (reader.isDelimited() ? reader.readPackedInt32() : [reader.readInt32()]); - for (var i = 0; i < values.length; i++) { - msg.addNotIn(values[i]); - } - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.buf.validate.Int32Rules.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.buf.validate.Int32Rules.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.buf.validate.Int32Rules} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.buf.validate.Int32Rules.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = /** @type {number} */ (jspb.Message.getField(message, 1)); - if (f != null) { - writer.writeInt32( - 1, - f - ); - } - f = /** @type {number} */ (jspb.Message.getField(message, 2)); - if (f != null) { - writer.writeInt32( - 2, - f - ); - } - f = /** @type {number} */ (jspb.Message.getField(message, 3)); - if (f != null) { - writer.writeInt32( - 3, - f - ); - } - f = /** @type {number} */ (jspb.Message.getField(message, 4)); - if (f != null) { - writer.writeInt32( - 4, - f - ); - } - f = /** @type {number} */ (jspb.Message.getField(message, 5)); - if (f != null) { - writer.writeInt32( - 5, - f - ); - } - f = message.getInList(); - if (f.length > 0) { - writer.writePackedInt32( - 6, - f - ); - } - f = message.getNotInList(); - if (f.length > 0) { - writer.writePackedInt32( - 7, - f - ); - } -}; - - -/** - * optional int32 const = 1; - * @return {number} - */ -proto.buf.validate.Int32Rules.prototype.getConst = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.buf.validate.Int32Rules} returns this - */ -proto.buf.validate.Int32Rules.prototype.setConst = function(value) { - return jspb.Message.setField(this, 1, value); -}; - - -/** - * Clears the field making it undefined. - * @return {!proto.buf.validate.Int32Rules} returns this - */ -proto.buf.validate.Int32Rules.prototype.clearConst = function() { - return jspb.Message.setField(this, 1, undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.buf.validate.Int32Rules.prototype.hasConst = function() { - return jspb.Message.getField(this, 1) != null; -}; - - -/** - * optional int32 lt = 2; - * @return {number} - */ -proto.buf.validate.Int32Rules.prototype.getLt = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.buf.validate.Int32Rules} returns this - */ -proto.buf.validate.Int32Rules.prototype.setLt = function(value) { - return jspb.Message.setOneofField(this, 2, proto.buf.validate.Int32Rules.oneofGroups_[0], value); -}; - - -/** - * Clears the field making it undefined. - * @return {!proto.buf.validate.Int32Rules} returns this - */ -proto.buf.validate.Int32Rules.prototype.clearLt = function() { - return jspb.Message.setOneofField(this, 2, proto.buf.validate.Int32Rules.oneofGroups_[0], undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.buf.validate.Int32Rules.prototype.hasLt = function() { - return jspb.Message.getField(this, 2) != null; -}; - - -/** - * optional int32 lte = 3; - * @return {number} - */ -proto.buf.validate.Int32Rules.prototype.getLte = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.buf.validate.Int32Rules} returns this - */ -proto.buf.validate.Int32Rules.prototype.setLte = function(value) { - return jspb.Message.setOneofField(this, 3, proto.buf.validate.Int32Rules.oneofGroups_[0], value); -}; - - -/** - * Clears the field making it undefined. - * @return {!proto.buf.validate.Int32Rules} returns this - */ -proto.buf.validate.Int32Rules.prototype.clearLte = function() { - return jspb.Message.setOneofField(this, 3, proto.buf.validate.Int32Rules.oneofGroups_[0], undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.buf.validate.Int32Rules.prototype.hasLte = function() { - return jspb.Message.getField(this, 3) != null; -}; - - -/** - * optional int32 gt = 4; - * @return {number} - */ -proto.buf.validate.Int32Rules.prototype.getGt = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.buf.validate.Int32Rules} returns this - */ -proto.buf.validate.Int32Rules.prototype.setGt = function(value) { - return jspb.Message.setOneofField(this, 4, proto.buf.validate.Int32Rules.oneofGroups_[1], value); -}; - - -/** - * Clears the field making it undefined. - * @return {!proto.buf.validate.Int32Rules} returns this - */ -proto.buf.validate.Int32Rules.prototype.clearGt = function() { - return jspb.Message.setOneofField(this, 4, proto.buf.validate.Int32Rules.oneofGroups_[1], undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.buf.validate.Int32Rules.prototype.hasGt = function() { - return jspb.Message.getField(this, 4) != null; -}; - - -/** - * optional int32 gte = 5; - * @return {number} - */ -proto.buf.validate.Int32Rules.prototype.getGte = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.buf.validate.Int32Rules} returns this - */ -proto.buf.validate.Int32Rules.prototype.setGte = function(value) { - return jspb.Message.setOneofField(this, 5, proto.buf.validate.Int32Rules.oneofGroups_[1], value); -}; - - -/** - * Clears the field making it undefined. - * @return {!proto.buf.validate.Int32Rules} returns this - */ -proto.buf.validate.Int32Rules.prototype.clearGte = function() { - return jspb.Message.setOneofField(this, 5, proto.buf.validate.Int32Rules.oneofGroups_[1], undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.buf.validate.Int32Rules.prototype.hasGte = function() { - return jspb.Message.getField(this, 5) != null; -}; - - -/** - * repeated int32 in = 6; - * @return {!Array} - */ -proto.buf.validate.Int32Rules.prototype.getInList = function() { - return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 6)); -}; - - -/** - * @param {!Array} value - * @return {!proto.buf.validate.Int32Rules} returns this - */ -proto.buf.validate.Int32Rules.prototype.setInList = function(value) { - return jspb.Message.setField(this, 6, value || []); -}; - - -/** - * @param {number} value - * @param {number=} opt_index - * @return {!proto.buf.validate.Int32Rules} returns this - */ -proto.buf.validate.Int32Rules.prototype.addIn = function(value, opt_index) { - return jspb.Message.addToRepeatedField(this, 6, value, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.buf.validate.Int32Rules} returns this - */ -proto.buf.validate.Int32Rules.prototype.clearInList = function() { - return this.setInList([]); -}; - - -/** - * repeated int32 not_in = 7; - * @return {!Array} - */ -proto.buf.validate.Int32Rules.prototype.getNotInList = function() { - return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 7)); -}; - - -/** - * @param {!Array} value - * @return {!proto.buf.validate.Int32Rules} returns this - */ -proto.buf.validate.Int32Rules.prototype.setNotInList = function(value) { - return jspb.Message.setField(this, 7, value || []); -}; - - -/** - * @param {number} value - * @param {number=} opt_index - * @return {!proto.buf.validate.Int32Rules} returns this - */ -proto.buf.validate.Int32Rules.prototype.addNotIn = function(value, opt_index) { - return jspb.Message.addToRepeatedField(this, 7, value, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.buf.validate.Int32Rules} returns this - */ -proto.buf.validate.Int32Rules.prototype.clearNotInList = function() { - return this.setNotInList([]); -}; - - - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.buf.validate.Int64Rules.repeatedFields_ = [6,7]; - -/** - * Oneof group definitions for this message. Each group defines the field - * numbers belonging to that group. When of these fields' value is set, all - * other fields in the group are cleared. During deserialization, if multiple - * fields are encountered for a group, only the last value seen will be kept. - * @private {!Array>} - * @const - */ -proto.buf.validate.Int64Rules.oneofGroups_ = [[2,3],[4,5]]; - -/** - * @enum {number} - */ -proto.buf.validate.Int64Rules.LessThanCase = { - LESS_THAN_NOT_SET: 0, - LT: 2, - LTE: 3 -}; - -/** - * @return {proto.buf.validate.Int64Rules.LessThanCase} - */ -proto.buf.validate.Int64Rules.prototype.getLessThanCase = function() { - return /** @type {proto.buf.validate.Int64Rules.LessThanCase} */(jspb.Message.computeOneofCase(this, proto.buf.validate.Int64Rules.oneofGroups_[0])); -}; - -/** - * @enum {number} - */ -proto.buf.validate.Int64Rules.GreaterThanCase = { - GREATER_THAN_NOT_SET: 0, - GT: 4, - GTE: 5 -}; - -/** - * @return {proto.buf.validate.Int64Rules.GreaterThanCase} - */ -proto.buf.validate.Int64Rules.prototype.getGreaterThanCase = function() { - return /** @type {proto.buf.validate.Int64Rules.GreaterThanCase} */(jspb.Message.computeOneofCase(this, proto.buf.validate.Int64Rules.oneofGroups_[1])); -}; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.buf.validate.Int64Rules.prototype.toObject = function(opt_includeInstance) { - return proto.buf.validate.Int64Rules.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.buf.validate.Int64Rules} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.buf.validate.Int64Rules.toObject = function(includeInstance, msg) { - var f, obj = { - pb_const: jspb.Message.getFieldWithDefault(msg, 1, 0), - lt: jspb.Message.getFieldWithDefault(msg, 2, 0), - lte: jspb.Message.getFieldWithDefault(msg, 3, 0), - gt: jspb.Message.getFieldWithDefault(msg, 4, 0), - gte: jspb.Message.getFieldWithDefault(msg, 5, 0), - inList: (f = jspb.Message.getRepeatedField(msg, 6)) == null ? undefined : f, - notInList: (f = jspb.Message.getRepeatedField(msg, 7)) == null ? undefined : f - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.buf.validate.Int64Rules} - */ -proto.buf.validate.Int64Rules.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.buf.validate.Int64Rules; - return proto.buf.validate.Int64Rules.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.buf.validate.Int64Rules} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.buf.validate.Int64Rules} - */ -proto.buf.validate.Int64Rules.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {number} */ (reader.readInt64()); - msg.setConst(value); - break; - case 2: - var value = /** @type {number} */ (reader.readInt64()); - msg.setLt(value); - break; - case 3: - var value = /** @type {number} */ (reader.readInt64()); - msg.setLte(value); - break; - case 4: - var value = /** @type {number} */ (reader.readInt64()); - msg.setGt(value); - break; - case 5: - var value = /** @type {number} */ (reader.readInt64()); - msg.setGte(value); - break; - case 6: - var values = /** @type {!Array} */ (reader.isDelimited() ? reader.readPackedInt64() : [reader.readInt64()]); - for (var i = 0; i < values.length; i++) { - msg.addIn(values[i]); - } - break; - case 7: - var values = /** @type {!Array} */ (reader.isDelimited() ? reader.readPackedInt64() : [reader.readInt64()]); - for (var i = 0; i < values.length; i++) { - msg.addNotIn(values[i]); - } - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.buf.validate.Int64Rules.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.buf.validate.Int64Rules.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.buf.validate.Int64Rules} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.buf.validate.Int64Rules.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = /** @type {number} */ (jspb.Message.getField(message, 1)); - if (f != null) { - writer.writeInt64( - 1, - f - ); - } - f = /** @type {number} */ (jspb.Message.getField(message, 2)); - if (f != null) { - writer.writeInt64( - 2, - f - ); - } - f = /** @type {number} */ (jspb.Message.getField(message, 3)); - if (f != null) { - writer.writeInt64( - 3, - f - ); - } - f = /** @type {number} */ (jspb.Message.getField(message, 4)); - if (f != null) { - writer.writeInt64( - 4, - f - ); - } - f = /** @type {number} */ (jspb.Message.getField(message, 5)); - if (f != null) { - writer.writeInt64( - 5, - f - ); - } - f = message.getInList(); - if (f.length > 0) { - writer.writePackedInt64( - 6, - f - ); - } - f = message.getNotInList(); - if (f.length > 0) { - writer.writePackedInt64( - 7, - f - ); - } -}; - - -/** - * optional int64 const = 1; - * @return {number} - */ -proto.buf.validate.Int64Rules.prototype.getConst = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.buf.validate.Int64Rules} returns this - */ -proto.buf.validate.Int64Rules.prototype.setConst = function(value) { - return jspb.Message.setField(this, 1, value); -}; - - -/** - * Clears the field making it undefined. - * @return {!proto.buf.validate.Int64Rules} returns this - */ -proto.buf.validate.Int64Rules.prototype.clearConst = function() { - return jspb.Message.setField(this, 1, undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.buf.validate.Int64Rules.prototype.hasConst = function() { - return jspb.Message.getField(this, 1) != null; -}; - - -/** - * optional int64 lt = 2; - * @return {number} - */ -proto.buf.validate.Int64Rules.prototype.getLt = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.buf.validate.Int64Rules} returns this - */ -proto.buf.validate.Int64Rules.prototype.setLt = function(value) { - return jspb.Message.setOneofField(this, 2, proto.buf.validate.Int64Rules.oneofGroups_[0], value); -}; - - -/** - * Clears the field making it undefined. - * @return {!proto.buf.validate.Int64Rules} returns this - */ -proto.buf.validate.Int64Rules.prototype.clearLt = function() { - return jspb.Message.setOneofField(this, 2, proto.buf.validate.Int64Rules.oneofGroups_[0], undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.buf.validate.Int64Rules.prototype.hasLt = function() { - return jspb.Message.getField(this, 2) != null; -}; - - -/** - * optional int64 lte = 3; - * @return {number} - */ -proto.buf.validate.Int64Rules.prototype.getLte = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.buf.validate.Int64Rules} returns this - */ -proto.buf.validate.Int64Rules.prototype.setLte = function(value) { - return jspb.Message.setOneofField(this, 3, proto.buf.validate.Int64Rules.oneofGroups_[0], value); -}; - - -/** - * Clears the field making it undefined. - * @return {!proto.buf.validate.Int64Rules} returns this - */ -proto.buf.validate.Int64Rules.prototype.clearLte = function() { - return jspb.Message.setOneofField(this, 3, proto.buf.validate.Int64Rules.oneofGroups_[0], undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.buf.validate.Int64Rules.prototype.hasLte = function() { - return jspb.Message.getField(this, 3) != null; -}; - - -/** - * optional int64 gt = 4; - * @return {number} - */ -proto.buf.validate.Int64Rules.prototype.getGt = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.buf.validate.Int64Rules} returns this - */ -proto.buf.validate.Int64Rules.prototype.setGt = function(value) { - return jspb.Message.setOneofField(this, 4, proto.buf.validate.Int64Rules.oneofGroups_[1], value); -}; - - -/** - * Clears the field making it undefined. - * @return {!proto.buf.validate.Int64Rules} returns this - */ -proto.buf.validate.Int64Rules.prototype.clearGt = function() { - return jspb.Message.setOneofField(this, 4, proto.buf.validate.Int64Rules.oneofGroups_[1], undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.buf.validate.Int64Rules.prototype.hasGt = function() { - return jspb.Message.getField(this, 4) != null; -}; - - -/** - * optional int64 gte = 5; - * @return {number} - */ -proto.buf.validate.Int64Rules.prototype.getGte = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.buf.validate.Int64Rules} returns this - */ -proto.buf.validate.Int64Rules.prototype.setGte = function(value) { - return jspb.Message.setOneofField(this, 5, proto.buf.validate.Int64Rules.oneofGroups_[1], value); -}; - - -/** - * Clears the field making it undefined. - * @return {!proto.buf.validate.Int64Rules} returns this - */ -proto.buf.validate.Int64Rules.prototype.clearGte = function() { - return jspb.Message.setOneofField(this, 5, proto.buf.validate.Int64Rules.oneofGroups_[1], undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.buf.validate.Int64Rules.prototype.hasGte = function() { - return jspb.Message.getField(this, 5) != null; -}; - - -/** - * repeated int64 in = 6; - * @return {!Array} - */ -proto.buf.validate.Int64Rules.prototype.getInList = function() { - return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 6)); -}; - - -/** - * @param {!Array} value - * @return {!proto.buf.validate.Int64Rules} returns this - */ -proto.buf.validate.Int64Rules.prototype.setInList = function(value) { - return jspb.Message.setField(this, 6, value || []); -}; - - -/** - * @param {number} value - * @param {number=} opt_index - * @return {!proto.buf.validate.Int64Rules} returns this - */ -proto.buf.validate.Int64Rules.prototype.addIn = function(value, opt_index) { - return jspb.Message.addToRepeatedField(this, 6, value, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.buf.validate.Int64Rules} returns this - */ -proto.buf.validate.Int64Rules.prototype.clearInList = function() { - return this.setInList([]); -}; - - -/** - * repeated int64 not_in = 7; - * @return {!Array} - */ -proto.buf.validate.Int64Rules.prototype.getNotInList = function() { - return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 7)); -}; - - -/** - * @param {!Array} value - * @return {!proto.buf.validate.Int64Rules} returns this - */ -proto.buf.validate.Int64Rules.prototype.setNotInList = function(value) { - return jspb.Message.setField(this, 7, value || []); -}; - - -/** - * @param {number} value - * @param {number=} opt_index - * @return {!proto.buf.validate.Int64Rules} returns this - */ -proto.buf.validate.Int64Rules.prototype.addNotIn = function(value, opt_index) { - return jspb.Message.addToRepeatedField(this, 7, value, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.buf.validate.Int64Rules} returns this - */ -proto.buf.validate.Int64Rules.prototype.clearNotInList = function() { - return this.setNotInList([]); -}; - - - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.buf.validate.UInt32Rules.repeatedFields_ = [6,7]; - -/** - * Oneof group definitions for this message. Each group defines the field - * numbers belonging to that group. When of these fields' value is set, all - * other fields in the group are cleared. During deserialization, if multiple - * fields are encountered for a group, only the last value seen will be kept. - * @private {!Array>} - * @const - */ -proto.buf.validate.UInt32Rules.oneofGroups_ = [[2,3],[4,5]]; - -/** - * @enum {number} - */ -proto.buf.validate.UInt32Rules.LessThanCase = { - LESS_THAN_NOT_SET: 0, - LT: 2, - LTE: 3 -}; - -/** - * @return {proto.buf.validate.UInt32Rules.LessThanCase} - */ -proto.buf.validate.UInt32Rules.prototype.getLessThanCase = function() { - return /** @type {proto.buf.validate.UInt32Rules.LessThanCase} */(jspb.Message.computeOneofCase(this, proto.buf.validate.UInt32Rules.oneofGroups_[0])); -}; - -/** - * @enum {number} - */ -proto.buf.validate.UInt32Rules.GreaterThanCase = { - GREATER_THAN_NOT_SET: 0, - GT: 4, - GTE: 5 -}; - -/** - * @return {proto.buf.validate.UInt32Rules.GreaterThanCase} - */ -proto.buf.validate.UInt32Rules.prototype.getGreaterThanCase = function() { - return /** @type {proto.buf.validate.UInt32Rules.GreaterThanCase} */(jspb.Message.computeOneofCase(this, proto.buf.validate.UInt32Rules.oneofGroups_[1])); -}; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.buf.validate.UInt32Rules.prototype.toObject = function(opt_includeInstance) { - return proto.buf.validate.UInt32Rules.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.buf.validate.UInt32Rules} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.buf.validate.UInt32Rules.toObject = function(includeInstance, msg) { - var f, obj = { - pb_const: jspb.Message.getFieldWithDefault(msg, 1, 0), - lt: jspb.Message.getFieldWithDefault(msg, 2, 0), - lte: jspb.Message.getFieldWithDefault(msg, 3, 0), - gt: jspb.Message.getFieldWithDefault(msg, 4, 0), - gte: jspb.Message.getFieldWithDefault(msg, 5, 0), - inList: (f = jspb.Message.getRepeatedField(msg, 6)) == null ? undefined : f, - notInList: (f = jspb.Message.getRepeatedField(msg, 7)) == null ? undefined : f - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.buf.validate.UInt32Rules} - */ -proto.buf.validate.UInt32Rules.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.buf.validate.UInt32Rules; - return proto.buf.validate.UInt32Rules.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.buf.validate.UInt32Rules} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.buf.validate.UInt32Rules} - */ -proto.buf.validate.UInt32Rules.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {number} */ (reader.readUint32()); - msg.setConst(value); - break; - case 2: - var value = /** @type {number} */ (reader.readUint32()); - msg.setLt(value); - break; - case 3: - var value = /** @type {number} */ (reader.readUint32()); - msg.setLte(value); - break; - case 4: - var value = /** @type {number} */ (reader.readUint32()); - msg.setGt(value); - break; - case 5: - var value = /** @type {number} */ (reader.readUint32()); - msg.setGte(value); - break; - case 6: - var values = /** @type {!Array} */ (reader.isDelimited() ? reader.readPackedUint32() : [reader.readUint32()]); - for (var i = 0; i < values.length; i++) { - msg.addIn(values[i]); - } - break; - case 7: - var values = /** @type {!Array} */ (reader.isDelimited() ? reader.readPackedUint32() : [reader.readUint32()]); - for (var i = 0; i < values.length; i++) { - msg.addNotIn(values[i]); - } - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.buf.validate.UInt32Rules.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.buf.validate.UInt32Rules.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.buf.validate.UInt32Rules} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.buf.validate.UInt32Rules.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = /** @type {number} */ (jspb.Message.getField(message, 1)); - if (f != null) { - writer.writeUint32( - 1, - f - ); - } - f = /** @type {number} */ (jspb.Message.getField(message, 2)); - if (f != null) { - writer.writeUint32( - 2, - f - ); - } - f = /** @type {number} */ (jspb.Message.getField(message, 3)); - if (f != null) { - writer.writeUint32( - 3, - f - ); - } - f = /** @type {number} */ (jspb.Message.getField(message, 4)); - if (f != null) { - writer.writeUint32( - 4, - f - ); - } - f = /** @type {number} */ (jspb.Message.getField(message, 5)); - if (f != null) { - writer.writeUint32( - 5, - f - ); - } - f = message.getInList(); - if (f.length > 0) { - writer.writePackedUint32( - 6, - f - ); - } - f = message.getNotInList(); - if (f.length > 0) { - writer.writePackedUint32( - 7, - f - ); - } -}; - - -/** - * optional uint32 const = 1; - * @return {number} - */ -proto.buf.validate.UInt32Rules.prototype.getConst = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.buf.validate.UInt32Rules} returns this - */ -proto.buf.validate.UInt32Rules.prototype.setConst = function(value) { - return jspb.Message.setField(this, 1, value); -}; - - -/** - * Clears the field making it undefined. - * @return {!proto.buf.validate.UInt32Rules} returns this - */ -proto.buf.validate.UInt32Rules.prototype.clearConst = function() { - return jspb.Message.setField(this, 1, undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.buf.validate.UInt32Rules.prototype.hasConst = function() { - return jspb.Message.getField(this, 1) != null; -}; - - -/** - * optional uint32 lt = 2; - * @return {number} - */ -proto.buf.validate.UInt32Rules.prototype.getLt = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.buf.validate.UInt32Rules} returns this - */ -proto.buf.validate.UInt32Rules.prototype.setLt = function(value) { - return jspb.Message.setOneofField(this, 2, proto.buf.validate.UInt32Rules.oneofGroups_[0], value); -}; - - -/** - * Clears the field making it undefined. - * @return {!proto.buf.validate.UInt32Rules} returns this - */ -proto.buf.validate.UInt32Rules.prototype.clearLt = function() { - return jspb.Message.setOneofField(this, 2, proto.buf.validate.UInt32Rules.oneofGroups_[0], undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.buf.validate.UInt32Rules.prototype.hasLt = function() { - return jspb.Message.getField(this, 2) != null; -}; - - -/** - * optional uint32 lte = 3; - * @return {number} - */ -proto.buf.validate.UInt32Rules.prototype.getLte = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.buf.validate.UInt32Rules} returns this - */ -proto.buf.validate.UInt32Rules.prototype.setLte = function(value) { - return jspb.Message.setOneofField(this, 3, proto.buf.validate.UInt32Rules.oneofGroups_[0], value); -}; - - -/** - * Clears the field making it undefined. - * @return {!proto.buf.validate.UInt32Rules} returns this - */ -proto.buf.validate.UInt32Rules.prototype.clearLte = function() { - return jspb.Message.setOneofField(this, 3, proto.buf.validate.UInt32Rules.oneofGroups_[0], undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.buf.validate.UInt32Rules.prototype.hasLte = function() { - return jspb.Message.getField(this, 3) != null; -}; - - -/** - * optional uint32 gt = 4; - * @return {number} - */ -proto.buf.validate.UInt32Rules.prototype.getGt = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.buf.validate.UInt32Rules} returns this - */ -proto.buf.validate.UInt32Rules.prototype.setGt = function(value) { - return jspb.Message.setOneofField(this, 4, proto.buf.validate.UInt32Rules.oneofGroups_[1], value); -}; - - -/** - * Clears the field making it undefined. - * @return {!proto.buf.validate.UInt32Rules} returns this - */ -proto.buf.validate.UInt32Rules.prototype.clearGt = function() { - return jspb.Message.setOneofField(this, 4, proto.buf.validate.UInt32Rules.oneofGroups_[1], undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.buf.validate.UInt32Rules.prototype.hasGt = function() { - return jspb.Message.getField(this, 4) != null; -}; - - -/** - * optional uint32 gte = 5; - * @return {number} - */ -proto.buf.validate.UInt32Rules.prototype.getGte = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.buf.validate.UInt32Rules} returns this - */ -proto.buf.validate.UInt32Rules.prototype.setGte = function(value) { - return jspb.Message.setOneofField(this, 5, proto.buf.validate.UInt32Rules.oneofGroups_[1], value); -}; - - -/** - * Clears the field making it undefined. - * @return {!proto.buf.validate.UInt32Rules} returns this - */ -proto.buf.validate.UInt32Rules.prototype.clearGte = function() { - return jspb.Message.setOneofField(this, 5, proto.buf.validate.UInt32Rules.oneofGroups_[1], undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.buf.validate.UInt32Rules.prototype.hasGte = function() { - return jspb.Message.getField(this, 5) != null; -}; - - -/** - * repeated uint32 in = 6; - * @return {!Array} - */ -proto.buf.validate.UInt32Rules.prototype.getInList = function() { - return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 6)); -}; - - -/** - * @param {!Array} value - * @return {!proto.buf.validate.UInt32Rules} returns this - */ -proto.buf.validate.UInt32Rules.prototype.setInList = function(value) { - return jspb.Message.setField(this, 6, value || []); -}; - - -/** - * @param {number} value - * @param {number=} opt_index - * @return {!proto.buf.validate.UInt32Rules} returns this - */ -proto.buf.validate.UInt32Rules.prototype.addIn = function(value, opt_index) { - return jspb.Message.addToRepeatedField(this, 6, value, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.buf.validate.UInt32Rules} returns this - */ -proto.buf.validate.UInt32Rules.prototype.clearInList = function() { - return this.setInList([]); -}; - - -/** - * repeated uint32 not_in = 7; - * @return {!Array} - */ -proto.buf.validate.UInt32Rules.prototype.getNotInList = function() { - return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 7)); -}; - - -/** - * @param {!Array} value - * @return {!proto.buf.validate.UInt32Rules} returns this - */ -proto.buf.validate.UInt32Rules.prototype.setNotInList = function(value) { - return jspb.Message.setField(this, 7, value || []); -}; - - -/** - * @param {number} value - * @param {number=} opt_index - * @return {!proto.buf.validate.UInt32Rules} returns this - */ -proto.buf.validate.UInt32Rules.prototype.addNotIn = function(value, opt_index) { - return jspb.Message.addToRepeatedField(this, 7, value, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.buf.validate.UInt32Rules} returns this - */ -proto.buf.validate.UInt32Rules.prototype.clearNotInList = function() { - return this.setNotInList([]); -}; - - - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.buf.validate.UInt64Rules.repeatedFields_ = [6,7]; - -/** - * Oneof group definitions for this message. Each group defines the field - * numbers belonging to that group. When of these fields' value is set, all - * other fields in the group are cleared. During deserialization, if multiple - * fields are encountered for a group, only the last value seen will be kept. - * @private {!Array>} - * @const - */ -proto.buf.validate.UInt64Rules.oneofGroups_ = [[2,3],[4,5]]; - -/** - * @enum {number} - */ -proto.buf.validate.UInt64Rules.LessThanCase = { - LESS_THAN_NOT_SET: 0, - LT: 2, - LTE: 3 -}; - -/** - * @return {proto.buf.validate.UInt64Rules.LessThanCase} - */ -proto.buf.validate.UInt64Rules.prototype.getLessThanCase = function() { - return /** @type {proto.buf.validate.UInt64Rules.LessThanCase} */(jspb.Message.computeOneofCase(this, proto.buf.validate.UInt64Rules.oneofGroups_[0])); -}; - -/** - * @enum {number} - */ -proto.buf.validate.UInt64Rules.GreaterThanCase = { - GREATER_THAN_NOT_SET: 0, - GT: 4, - GTE: 5 -}; - -/** - * @return {proto.buf.validate.UInt64Rules.GreaterThanCase} - */ -proto.buf.validate.UInt64Rules.prototype.getGreaterThanCase = function() { - return /** @type {proto.buf.validate.UInt64Rules.GreaterThanCase} */(jspb.Message.computeOneofCase(this, proto.buf.validate.UInt64Rules.oneofGroups_[1])); -}; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.buf.validate.UInt64Rules.prototype.toObject = function(opt_includeInstance) { - return proto.buf.validate.UInt64Rules.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.buf.validate.UInt64Rules} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.buf.validate.UInt64Rules.toObject = function(includeInstance, msg) { - var f, obj = { - pb_const: jspb.Message.getFieldWithDefault(msg, 1, 0), - lt: jspb.Message.getFieldWithDefault(msg, 2, 0), - lte: jspb.Message.getFieldWithDefault(msg, 3, 0), - gt: jspb.Message.getFieldWithDefault(msg, 4, 0), - gte: jspb.Message.getFieldWithDefault(msg, 5, 0), - inList: (f = jspb.Message.getRepeatedField(msg, 6)) == null ? undefined : f, - notInList: (f = jspb.Message.getRepeatedField(msg, 7)) == null ? undefined : f - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.buf.validate.UInt64Rules} - */ -proto.buf.validate.UInt64Rules.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.buf.validate.UInt64Rules; - return proto.buf.validate.UInt64Rules.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.buf.validate.UInt64Rules} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.buf.validate.UInt64Rules} - */ -proto.buf.validate.UInt64Rules.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {number} */ (reader.readUint64()); - msg.setConst(value); - break; - case 2: - var value = /** @type {number} */ (reader.readUint64()); - msg.setLt(value); - break; - case 3: - var value = /** @type {number} */ (reader.readUint64()); - msg.setLte(value); - break; - case 4: - var value = /** @type {number} */ (reader.readUint64()); - msg.setGt(value); - break; - case 5: - var value = /** @type {number} */ (reader.readUint64()); - msg.setGte(value); - break; - case 6: - var values = /** @type {!Array} */ (reader.isDelimited() ? reader.readPackedUint64() : [reader.readUint64()]); - for (var i = 0; i < values.length; i++) { - msg.addIn(values[i]); - } - break; - case 7: - var values = /** @type {!Array} */ (reader.isDelimited() ? reader.readPackedUint64() : [reader.readUint64()]); - for (var i = 0; i < values.length; i++) { - msg.addNotIn(values[i]); - } - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.buf.validate.UInt64Rules.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.buf.validate.UInt64Rules.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.buf.validate.UInt64Rules} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.buf.validate.UInt64Rules.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = /** @type {number} */ (jspb.Message.getField(message, 1)); - if (f != null) { - writer.writeUint64( - 1, - f - ); - } - f = /** @type {number} */ (jspb.Message.getField(message, 2)); - if (f != null) { - writer.writeUint64( - 2, - f - ); - } - f = /** @type {number} */ (jspb.Message.getField(message, 3)); - if (f != null) { - writer.writeUint64( - 3, - f - ); - } - f = /** @type {number} */ (jspb.Message.getField(message, 4)); - if (f != null) { - writer.writeUint64( - 4, - f - ); - } - f = /** @type {number} */ (jspb.Message.getField(message, 5)); - if (f != null) { - writer.writeUint64( - 5, - f - ); - } - f = message.getInList(); - if (f.length > 0) { - writer.writePackedUint64( - 6, - f - ); - } - f = message.getNotInList(); - if (f.length > 0) { - writer.writePackedUint64( - 7, - f - ); - } -}; - - -/** - * optional uint64 const = 1; - * @return {number} - */ -proto.buf.validate.UInt64Rules.prototype.getConst = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.buf.validate.UInt64Rules} returns this - */ -proto.buf.validate.UInt64Rules.prototype.setConst = function(value) { - return jspb.Message.setField(this, 1, value); -}; - - -/** - * Clears the field making it undefined. - * @return {!proto.buf.validate.UInt64Rules} returns this - */ -proto.buf.validate.UInt64Rules.prototype.clearConst = function() { - return jspb.Message.setField(this, 1, undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.buf.validate.UInt64Rules.prototype.hasConst = function() { - return jspb.Message.getField(this, 1) != null; -}; - - -/** - * optional uint64 lt = 2; - * @return {number} - */ -proto.buf.validate.UInt64Rules.prototype.getLt = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.buf.validate.UInt64Rules} returns this - */ -proto.buf.validate.UInt64Rules.prototype.setLt = function(value) { - return jspb.Message.setOneofField(this, 2, proto.buf.validate.UInt64Rules.oneofGroups_[0], value); -}; - - -/** - * Clears the field making it undefined. - * @return {!proto.buf.validate.UInt64Rules} returns this - */ -proto.buf.validate.UInt64Rules.prototype.clearLt = function() { - return jspb.Message.setOneofField(this, 2, proto.buf.validate.UInt64Rules.oneofGroups_[0], undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.buf.validate.UInt64Rules.prototype.hasLt = function() { - return jspb.Message.getField(this, 2) != null; -}; - - -/** - * optional uint64 lte = 3; - * @return {number} - */ -proto.buf.validate.UInt64Rules.prototype.getLte = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.buf.validate.UInt64Rules} returns this - */ -proto.buf.validate.UInt64Rules.prototype.setLte = function(value) { - return jspb.Message.setOneofField(this, 3, proto.buf.validate.UInt64Rules.oneofGroups_[0], value); -}; - - -/** - * Clears the field making it undefined. - * @return {!proto.buf.validate.UInt64Rules} returns this - */ -proto.buf.validate.UInt64Rules.prototype.clearLte = function() { - return jspb.Message.setOneofField(this, 3, proto.buf.validate.UInt64Rules.oneofGroups_[0], undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.buf.validate.UInt64Rules.prototype.hasLte = function() { - return jspb.Message.getField(this, 3) != null; -}; - - -/** - * optional uint64 gt = 4; - * @return {number} - */ -proto.buf.validate.UInt64Rules.prototype.getGt = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.buf.validate.UInt64Rules} returns this - */ -proto.buf.validate.UInt64Rules.prototype.setGt = function(value) { - return jspb.Message.setOneofField(this, 4, proto.buf.validate.UInt64Rules.oneofGroups_[1], value); -}; - - -/** - * Clears the field making it undefined. - * @return {!proto.buf.validate.UInt64Rules} returns this - */ -proto.buf.validate.UInt64Rules.prototype.clearGt = function() { - return jspb.Message.setOneofField(this, 4, proto.buf.validate.UInt64Rules.oneofGroups_[1], undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.buf.validate.UInt64Rules.prototype.hasGt = function() { - return jspb.Message.getField(this, 4) != null; -}; - - -/** - * optional uint64 gte = 5; - * @return {number} - */ -proto.buf.validate.UInt64Rules.prototype.getGte = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.buf.validate.UInt64Rules} returns this - */ -proto.buf.validate.UInt64Rules.prototype.setGte = function(value) { - return jspb.Message.setOneofField(this, 5, proto.buf.validate.UInt64Rules.oneofGroups_[1], value); -}; - - -/** - * Clears the field making it undefined. - * @return {!proto.buf.validate.UInt64Rules} returns this - */ -proto.buf.validate.UInt64Rules.prototype.clearGte = function() { - return jspb.Message.setOneofField(this, 5, proto.buf.validate.UInt64Rules.oneofGroups_[1], undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.buf.validate.UInt64Rules.prototype.hasGte = function() { - return jspb.Message.getField(this, 5) != null; -}; - - -/** - * repeated uint64 in = 6; - * @return {!Array} - */ -proto.buf.validate.UInt64Rules.prototype.getInList = function() { - return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 6)); -}; - - -/** - * @param {!Array} value - * @return {!proto.buf.validate.UInt64Rules} returns this - */ -proto.buf.validate.UInt64Rules.prototype.setInList = function(value) { - return jspb.Message.setField(this, 6, value || []); -}; - - -/** - * @param {number} value - * @param {number=} opt_index - * @return {!proto.buf.validate.UInt64Rules} returns this - */ -proto.buf.validate.UInt64Rules.prototype.addIn = function(value, opt_index) { - return jspb.Message.addToRepeatedField(this, 6, value, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.buf.validate.UInt64Rules} returns this - */ -proto.buf.validate.UInt64Rules.prototype.clearInList = function() { - return this.setInList([]); -}; - - -/** - * repeated uint64 not_in = 7; - * @return {!Array} - */ -proto.buf.validate.UInt64Rules.prototype.getNotInList = function() { - return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 7)); -}; - - -/** - * @param {!Array} value - * @return {!proto.buf.validate.UInt64Rules} returns this - */ -proto.buf.validate.UInt64Rules.prototype.setNotInList = function(value) { - return jspb.Message.setField(this, 7, value || []); -}; - - -/** - * @param {number} value - * @param {number=} opt_index - * @return {!proto.buf.validate.UInt64Rules} returns this - */ -proto.buf.validate.UInt64Rules.prototype.addNotIn = function(value, opt_index) { - return jspb.Message.addToRepeatedField(this, 7, value, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.buf.validate.UInt64Rules} returns this - */ -proto.buf.validate.UInt64Rules.prototype.clearNotInList = function() { - return this.setNotInList([]); -}; - - - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.buf.validate.SInt32Rules.repeatedFields_ = [6,7]; - -/** - * Oneof group definitions for this message. Each group defines the field - * numbers belonging to that group. When of these fields' value is set, all - * other fields in the group are cleared. During deserialization, if multiple - * fields are encountered for a group, only the last value seen will be kept. - * @private {!Array>} - * @const - */ -proto.buf.validate.SInt32Rules.oneofGroups_ = [[2,3],[4,5]]; - -/** - * @enum {number} - */ -proto.buf.validate.SInt32Rules.LessThanCase = { - LESS_THAN_NOT_SET: 0, - LT: 2, - LTE: 3 -}; - -/** - * @return {proto.buf.validate.SInt32Rules.LessThanCase} - */ -proto.buf.validate.SInt32Rules.prototype.getLessThanCase = function() { - return /** @type {proto.buf.validate.SInt32Rules.LessThanCase} */(jspb.Message.computeOneofCase(this, proto.buf.validate.SInt32Rules.oneofGroups_[0])); -}; - -/** - * @enum {number} - */ -proto.buf.validate.SInt32Rules.GreaterThanCase = { - GREATER_THAN_NOT_SET: 0, - GT: 4, - GTE: 5 -}; - -/** - * @return {proto.buf.validate.SInt32Rules.GreaterThanCase} - */ -proto.buf.validate.SInt32Rules.prototype.getGreaterThanCase = function() { - return /** @type {proto.buf.validate.SInt32Rules.GreaterThanCase} */(jspb.Message.computeOneofCase(this, proto.buf.validate.SInt32Rules.oneofGroups_[1])); -}; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.buf.validate.SInt32Rules.prototype.toObject = function(opt_includeInstance) { - return proto.buf.validate.SInt32Rules.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.buf.validate.SInt32Rules} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.buf.validate.SInt32Rules.toObject = function(includeInstance, msg) { - var f, obj = { - pb_const: jspb.Message.getFieldWithDefault(msg, 1, 0), - lt: jspb.Message.getFieldWithDefault(msg, 2, 0), - lte: jspb.Message.getFieldWithDefault(msg, 3, 0), - gt: jspb.Message.getFieldWithDefault(msg, 4, 0), - gte: jspb.Message.getFieldWithDefault(msg, 5, 0), - inList: (f = jspb.Message.getRepeatedField(msg, 6)) == null ? undefined : f, - notInList: (f = jspb.Message.getRepeatedField(msg, 7)) == null ? undefined : f - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.buf.validate.SInt32Rules} - */ -proto.buf.validate.SInt32Rules.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.buf.validate.SInt32Rules; - return proto.buf.validate.SInt32Rules.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.buf.validate.SInt32Rules} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.buf.validate.SInt32Rules} - */ -proto.buf.validate.SInt32Rules.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {number} */ (reader.readSint32()); - msg.setConst(value); - break; - case 2: - var value = /** @type {number} */ (reader.readSint32()); - msg.setLt(value); - break; - case 3: - var value = /** @type {number} */ (reader.readSint32()); - msg.setLte(value); - break; - case 4: - var value = /** @type {number} */ (reader.readSint32()); - msg.setGt(value); - break; - case 5: - var value = /** @type {number} */ (reader.readSint32()); - msg.setGte(value); - break; - case 6: - var values = /** @type {!Array} */ (reader.isDelimited() ? reader.readPackedSint32() : [reader.readSint32()]); - for (var i = 0; i < values.length; i++) { - msg.addIn(values[i]); - } - break; - case 7: - var values = /** @type {!Array} */ (reader.isDelimited() ? reader.readPackedSint32() : [reader.readSint32()]); - for (var i = 0; i < values.length; i++) { - msg.addNotIn(values[i]); - } - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.buf.validate.SInt32Rules.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.buf.validate.SInt32Rules.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.buf.validate.SInt32Rules} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.buf.validate.SInt32Rules.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = /** @type {number} */ (jspb.Message.getField(message, 1)); - if (f != null) { - writer.writeSint32( - 1, - f - ); - } - f = /** @type {number} */ (jspb.Message.getField(message, 2)); - if (f != null) { - writer.writeSint32( - 2, - f - ); - } - f = /** @type {number} */ (jspb.Message.getField(message, 3)); - if (f != null) { - writer.writeSint32( - 3, - f - ); - } - f = /** @type {number} */ (jspb.Message.getField(message, 4)); - if (f != null) { - writer.writeSint32( - 4, - f - ); - } - f = /** @type {number} */ (jspb.Message.getField(message, 5)); - if (f != null) { - writer.writeSint32( - 5, - f - ); - } - f = message.getInList(); - if (f.length > 0) { - writer.writePackedSint32( - 6, - f - ); - } - f = message.getNotInList(); - if (f.length > 0) { - writer.writePackedSint32( - 7, - f - ); - } -}; - - -/** - * optional sint32 const = 1; - * @return {number} - */ -proto.buf.validate.SInt32Rules.prototype.getConst = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.buf.validate.SInt32Rules} returns this - */ -proto.buf.validate.SInt32Rules.prototype.setConst = function(value) { - return jspb.Message.setField(this, 1, value); -}; - - -/** - * Clears the field making it undefined. - * @return {!proto.buf.validate.SInt32Rules} returns this - */ -proto.buf.validate.SInt32Rules.prototype.clearConst = function() { - return jspb.Message.setField(this, 1, undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.buf.validate.SInt32Rules.prototype.hasConst = function() { - return jspb.Message.getField(this, 1) != null; -}; - - -/** - * optional sint32 lt = 2; - * @return {number} - */ -proto.buf.validate.SInt32Rules.prototype.getLt = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.buf.validate.SInt32Rules} returns this - */ -proto.buf.validate.SInt32Rules.prototype.setLt = function(value) { - return jspb.Message.setOneofField(this, 2, proto.buf.validate.SInt32Rules.oneofGroups_[0], value); -}; - - -/** - * Clears the field making it undefined. - * @return {!proto.buf.validate.SInt32Rules} returns this - */ -proto.buf.validate.SInt32Rules.prototype.clearLt = function() { - return jspb.Message.setOneofField(this, 2, proto.buf.validate.SInt32Rules.oneofGroups_[0], undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.buf.validate.SInt32Rules.prototype.hasLt = function() { - return jspb.Message.getField(this, 2) != null; -}; - - -/** - * optional sint32 lte = 3; - * @return {number} - */ -proto.buf.validate.SInt32Rules.prototype.getLte = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.buf.validate.SInt32Rules} returns this - */ -proto.buf.validate.SInt32Rules.prototype.setLte = function(value) { - return jspb.Message.setOneofField(this, 3, proto.buf.validate.SInt32Rules.oneofGroups_[0], value); -}; - - -/** - * Clears the field making it undefined. - * @return {!proto.buf.validate.SInt32Rules} returns this - */ -proto.buf.validate.SInt32Rules.prototype.clearLte = function() { - return jspb.Message.setOneofField(this, 3, proto.buf.validate.SInt32Rules.oneofGroups_[0], undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.buf.validate.SInt32Rules.prototype.hasLte = function() { - return jspb.Message.getField(this, 3) != null; -}; - - -/** - * optional sint32 gt = 4; - * @return {number} - */ -proto.buf.validate.SInt32Rules.prototype.getGt = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.buf.validate.SInt32Rules} returns this - */ -proto.buf.validate.SInt32Rules.prototype.setGt = function(value) { - return jspb.Message.setOneofField(this, 4, proto.buf.validate.SInt32Rules.oneofGroups_[1], value); -}; - - -/** - * Clears the field making it undefined. - * @return {!proto.buf.validate.SInt32Rules} returns this - */ -proto.buf.validate.SInt32Rules.prototype.clearGt = function() { - return jspb.Message.setOneofField(this, 4, proto.buf.validate.SInt32Rules.oneofGroups_[1], undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.buf.validate.SInt32Rules.prototype.hasGt = function() { - return jspb.Message.getField(this, 4) != null; -}; - - -/** - * optional sint32 gte = 5; - * @return {number} - */ -proto.buf.validate.SInt32Rules.prototype.getGte = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.buf.validate.SInt32Rules} returns this - */ -proto.buf.validate.SInt32Rules.prototype.setGte = function(value) { - return jspb.Message.setOneofField(this, 5, proto.buf.validate.SInt32Rules.oneofGroups_[1], value); -}; - - -/** - * Clears the field making it undefined. - * @return {!proto.buf.validate.SInt32Rules} returns this - */ -proto.buf.validate.SInt32Rules.prototype.clearGte = function() { - return jspb.Message.setOneofField(this, 5, proto.buf.validate.SInt32Rules.oneofGroups_[1], undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.buf.validate.SInt32Rules.prototype.hasGte = function() { - return jspb.Message.getField(this, 5) != null; -}; - - -/** - * repeated sint32 in = 6; - * @return {!Array} - */ -proto.buf.validate.SInt32Rules.prototype.getInList = function() { - return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 6)); -}; - - -/** - * @param {!Array} value - * @return {!proto.buf.validate.SInt32Rules} returns this - */ -proto.buf.validate.SInt32Rules.prototype.setInList = function(value) { - return jspb.Message.setField(this, 6, value || []); -}; - - -/** - * @param {number} value - * @param {number=} opt_index - * @return {!proto.buf.validate.SInt32Rules} returns this - */ -proto.buf.validate.SInt32Rules.prototype.addIn = function(value, opt_index) { - return jspb.Message.addToRepeatedField(this, 6, value, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.buf.validate.SInt32Rules} returns this - */ -proto.buf.validate.SInt32Rules.prototype.clearInList = function() { - return this.setInList([]); -}; - - -/** - * repeated sint32 not_in = 7; - * @return {!Array} - */ -proto.buf.validate.SInt32Rules.prototype.getNotInList = function() { - return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 7)); -}; - - -/** - * @param {!Array} value - * @return {!proto.buf.validate.SInt32Rules} returns this - */ -proto.buf.validate.SInt32Rules.prototype.setNotInList = function(value) { - return jspb.Message.setField(this, 7, value || []); -}; - - -/** - * @param {number} value - * @param {number=} opt_index - * @return {!proto.buf.validate.SInt32Rules} returns this - */ -proto.buf.validate.SInt32Rules.prototype.addNotIn = function(value, opt_index) { - return jspb.Message.addToRepeatedField(this, 7, value, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.buf.validate.SInt32Rules} returns this - */ -proto.buf.validate.SInt32Rules.prototype.clearNotInList = function() { - return this.setNotInList([]); -}; - - - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.buf.validate.SInt64Rules.repeatedFields_ = [6,7]; - -/** - * Oneof group definitions for this message. Each group defines the field - * numbers belonging to that group. When of these fields' value is set, all - * other fields in the group are cleared. During deserialization, if multiple - * fields are encountered for a group, only the last value seen will be kept. - * @private {!Array>} - * @const - */ -proto.buf.validate.SInt64Rules.oneofGroups_ = [[2,3],[4,5]]; - -/** - * @enum {number} - */ -proto.buf.validate.SInt64Rules.LessThanCase = { - LESS_THAN_NOT_SET: 0, - LT: 2, - LTE: 3 -}; - -/** - * @return {proto.buf.validate.SInt64Rules.LessThanCase} - */ -proto.buf.validate.SInt64Rules.prototype.getLessThanCase = function() { - return /** @type {proto.buf.validate.SInt64Rules.LessThanCase} */(jspb.Message.computeOneofCase(this, proto.buf.validate.SInt64Rules.oneofGroups_[0])); -}; - -/** - * @enum {number} - */ -proto.buf.validate.SInt64Rules.GreaterThanCase = { - GREATER_THAN_NOT_SET: 0, - GT: 4, - GTE: 5 -}; - -/** - * @return {proto.buf.validate.SInt64Rules.GreaterThanCase} - */ -proto.buf.validate.SInt64Rules.prototype.getGreaterThanCase = function() { - return /** @type {proto.buf.validate.SInt64Rules.GreaterThanCase} */(jspb.Message.computeOneofCase(this, proto.buf.validate.SInt64Rules.oneofGroups_[1])); -}; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.buf.validate.SInt64Rules.prototype.toObject = function(opt_includeInstance) { - return proto.buf.validate.SInt64Rules.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.buf.validate.SInt64Rules} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.buf.validate.SInt64Rules.toObject = function(includeInstance, msg) { - var f, obj = { - pb_const: jspb.Message.getFieldWithDefault(msg, 1, 0), - lt: jspb.Message.getFieldWithDefault(msg, 2, 0), - lte: jspb.Message.getFieldWithDefault(msg, 3, 0), - gt: jspb.Message.getFieldWithDefault(msg, 4, 0), - gte: jspb.Message.getFieldWithDefault(msg, 5, 0), - inList: (f = jspb.Message.getRepeatedField(msg, 6)) == null ? undefined : f, - notInList: (f = jspb.Message.getRepeatedField(msg, 7)) == null ? undefined : f - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.buf.validate.SInt64Rules} - */ -proto.buf.validate.SInt64Rules.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.buf.validate.SInt64Rules; - return proto.buf.validate.SInt64Rules.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.buf.validate.SInt64Rules} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.buf.validate.SInt64Rules} - */ -proto.buf.validate.SInt64Rules.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {number} */ (reader.readSint64()); - msg.setConst(value); - break; - case 2: - var value = /** @type {number} */ (reader.readSint64()); - msg.setLt(value); - break; - case 3: - var value = /** @type {number} */ (reader.readSint64()); - msg.setLte(value); - break; - case 4: - var value = /** @type {number} */ (reader.readSint64()); - msg.setGt(value); - break; - case 5: - var value = /** @type {number} */ (reader.readSint64()); - msg.setGte(value); - break; - case 6: - var values = /** @type {!Array} */ (reader.isDelimited() ? reader.readPackedSint64() : [reader.readSint64()]); - for (var i = 0; i < values.length; i++) { - msg.addIn(values[i]); - } - break; - case 7: - var values = /** @type {!Array} */ (reader.isDelimited() ? reader.readPackedSint64() : [reader.readSint64()]); - for (var i = 0; i < values.length; i++) { - msg.addNotIn(values[i]); - } - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.buf.validate.SInt64Rules.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.buf.validate.SInt64Rules.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.buf.validate.SInt64Rules} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.buf.validate.SInt64Rules.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = /** @type {number} */ (jspb.Message.getField(message, 1)); - if (f != null) { - writer.writeSint64( - 1, - f - ); - } - f = /** @type {number} */ (jspb.Message.getField(message, 2)); - if (f != null) { - writer.writeSint64( - 2, - f - ); - } - f = /** @type {number} */ (jspb.Message.getField(message, 3)); - if (f != null) { - writer.writeSint64( - 3, - f - ); - } - f = /** @type {number} */ (jspb.Message.getField(message, 4)); - if (f != null) { - writer.writeSint64( - 4, - f - ); - } - f = /** @type {number} */ (jspb.Message.getField(message, 5)); - if (f != null) { - writer.writeSint64( - 5, - f - ); - } - f = message.getInList(); - if (f.length > 0) { - writer.writePackedSint64( - 6, - f - ); - } - f = message.getNotInList(); - if (f.length > 0) { - writer.writePackedSint64( - 7, - f - ); - } -}; - - -/** - * optional sint64 const = 1; - * @return {number} - */ -proto.buf.validate.SInt64Rules.prototype.getConst = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.buf.validate.SInt64Rules} returns this - */ -proto.buf.validate.SInt64Rules.prototype.setConst = function(value) { - return jspb.Message.setField(this, 1, value); -}; - - -/** - * Clears the field making it undefined. - * @return {!proto.buf.validate.SInt64Rules} returns this - */ -proto.buf.validate.SInt64Rules.prototype.clearConst = function() { - return jspb.Message.setField(this, 1, undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.buf.validate.SInt64Rules.prototype.hasConst = function() { - return jspb.Message.getField(this, 1) != null; -}; - - -/** - * optional sint64 lt = 2; - * @return {number} - */ -proto.buf.validate.SInt64Rules.prototype.getLt = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.buf.validate.SInt64Rules} returns this - */ -proto.buf.validate.SInt64Rules.prototype.setLt = function(value) { - return jspb.Message.setOneofField(this, 2, proto.buf.validate.SInt64Rules.oneofGroups_[0], value); -}; - - -/** - * Clears the field making it undefined. - * @return {!proto.buf.validate.SInt64Rules} returns this - */ -proto.buf.validate.SInt64Rules.prototype.clearLt = function() { - return jspb.Message.setOneofField(this, 2, proto.buf.validate.SInt64Rules.oneofGroups_[0], undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.buf.validate.SInt64Rules.prototype.hasLt = function() { - return jspb.Message.getField(this, 2) != null; -}; - - -/** - * optional sint64 lte = 3; - * @return {number} - */ -proto.buf.validate.SInt64Rules.prototype.getLte = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.buf.validate.SInt64Rules} returns this - */ -proto.buf.validate.SInt64Rules.prototype.setLte = function(value) { - return jspb.Message.setOneofField(this, 3, proto.buf.validate.SInt64Rules.oneofGroups_[0], value); -}; - - -/** - * Clears the field making it undefined. - * @return {!proto.buf.validate.SInt64Rules} returns this - */ -proto.buf.validate.SInt64Rules.prototype.clearLte = function() { - return jspb.Message.setOneofField(this, 3, proto.buf.validate.SInt64Rules.oneofGroups_[0], undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.buf.validate.SInt64Rules.prototype.hasLte = function() { - return jspb.Message.getField(this, 3) != null; -}; - - -/** - * optional sint64 gt = 4; - * @return {number} - */ -proto.buf.validate.SInt64Rules.prototype.getGt = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.buf.validate.SInt64Rules} returns this - */ -proto.buf.validate.SInt64Rules.prototype.setGt = function(value) { - return jspb.Message.setOneofField(this, 4, proto.buf.validate.SInt64Rules.oneofGroups_[1], value); -}; - - -/** - * Clears the field making it undefined. - * @return {!proto.buf.validate.SInt64Rules} returns this - */ -proto.buf.validate.SInt64Rules.prototype.clearGt = function() { - return jspb.Message.setOneofField(this, 4, proto.buf.validate.SInt64Rules.oneofGroups_[1], undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.buf.validate.SInt64Rules.prototype.hasGt = function() { - return jspb.Message.getField(this, 4) != null; -}; - - -/** - * optional sint64 gte = 5; - * @return {number} - */ -proto.buf.validate.SInt64Rules.prototype.getGte = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.buf.validate.SInt64Rules} returns this - */ -proto.buf.validate.SInt64Rules.prototype.setGte = function(value) { - return jspb.Message.setOneofField(this, 5, proto.buf.validate.SInt64Rules.oneofGroups_[1], value); -}; - - -/** - * Clears the field making it undefined. - * @return {!proto.buf.validate.SInt64Rules} returns this - */ -proto.buf.validate.SInt64Rules.prototype.clearGte = function() { - return jspb.Message.setOneofField(this, 5, proto.buf.validate.SInt64Rules.oneofGroups_[1], undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.buf.validate.SInt64Rules.prototype.hasGte = function() { - return jspb.Message.getField(this, 5) != null; -}; - - -/** - * repeated sint64 in = 6; - * @return {!Array} - */ -proto.buf.validate.SInt64Rules.prototype.getInList = function() { - return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 6)); -}; - - -/** - * @param {!Array} value - * @return {!proto.buf.validate.SInt64Rules} returns this - */ -proto.buf.validate.SInt64Rules.prototype.setInList = function(value) { - return jspb.Message.setField(this, 6, value || []); -}; - - -/** - * @param {number} value - * @param {number=} opt_index - * @return {!proto.buf.validate.SInt64Rules} returns this - */ -proto.buf.validate.SInt64Rules.prototype.addIn = function(value, opt_index) { - return jspb.Message.addToRepeatedField(this, 6, value, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.buf.validate.SInt64Rules} returns this - */ -proto.buf.validate.SInt64Rules.prototype.clearInList = function() { - return this.setInList([]); -}; - - -/** - * repeated sint64 not_in = 7; - * @return {!Array} - */ -proto.buf.validate.SInt64Rules.prototype.getNotInList = function() { - return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 7)); -}; - - -/** - * @param {!Array} value - * @return {!proto.buf.validate.SInt64Rules} returns this - */ -proto.buf.validate.SInt64Rules.prototype.setNotInList = function(value) { - return jspb.Message.setField(this, 7, value || []); -}; - - -/** - * @param {number} value - * @param {number=} opt_index - * @return {!proto.buf.validate.SInt64Rules} returns this - */ -proto.buf.validate.SInt64Rules.prototype.addNotIn = function(value, opt_index) { - return jspb.Message.addToRepeatedField(this, 7, value, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.buf.validate.SInt64Rules} returns this - */ -proto.buf.validate.SInt64Rules.prototype.clearNotInList = function() { - return this.setNotInList([]); -}; - - - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.buf.validate.Fixed32Rules.repeatedFields_ = [6,7]; - -/** - * Oneof group definitions for this message. Each group defines the field - * numbers belonging to that group. When of these fields' value is set, all - * other fields in the group are cleared. During deserialization, if multiple - * fields are encountered for a group, only the last value seen will be kept. - * @private {!Array>} - * @const - */ -proto.buf.validate.Fixed32Rules.oneofGroups_ = [[2,3],[4,5]]; - -/** - * @enum {number} - */ -proto.buf.validate.Fixed32Rules.LessThanCase = { - LESS_THAN_NOT_SET: 0, - LT: 2, - LTE: 3 -}; - -/** - * @return {proto.buf.validate.Fixed32Rules.LessThanCase} - */ -proto.buf.validate.Fixed32Rules.prototype.getLessThanCase = function() { - return /** @type {proto.buf.validate.Fixed32Rules.LessThanCase} */(jspb.Message.computeOneofCase(this, proto.buf.validate.Fixed32Rules.oneofGroups_[0])); -}; - -/** - * @enum {number} - */ -proto.buf.validate.Fixed32Rules.GreaterThanCase = { - GREATER_THAN_NOT_SET: 0, - GT: 4, - GTE: 5 -}; - -/** - * @return {proto.buf.validate.Fixed32Rules.GreaterThanCase} - */ -proto.buf.validate.Fixed32Rules.prototype.getGreaterThanCase = function() { - return /** @type {proto.buf.validate.Fixed32Rules.GreaterThanCase} */(jspb.Message.computeOneofCase(this, proto.buf.validate.Fixed32Rules.oneofGroups_[1])); -}; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.buf.validate.Fixed32Rules.prototype.toObject = function(opt_includeInstance) { - return proto.buf.validate.Fixed32Rules.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.buf.validate.Fixed32Rules} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.buf.validate.Fixed32Rules.toObject = function(includeInstance, msg) { - var f, obj = { - pb_const: jspb.Message.getFieldWithDefault(msg, 1, 0), - lt: jspb.Message.getFieldWithDefault(msg, 2, 0), - lte: jspb.Message.getFieldWithDefault(msg, 3, 0), - gt: jspb.Message.getFieldWithDefault(msg, 4, 0), - gte: jspb.Message.getFieldWithDefault(msg, 5, 0), - inList: (f = jspb.Message.getRepeatedField(msg, 6)) == null ? undefined : f, - notInList: (f = jspb.Message.getRepeatedField(msg, 7)) == null ? undefined : f - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.buf.validate.Fixed32Rules} - */ -proto.buf.validate.Fixed32Rules.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.buf.validate.Fixed32Rules; - return proto.buf.validate.Fixed32Rules.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.buf.validate.Fixed32Rules} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.buf.validate.Fixed32Rules} - */ -proto.buf.validate.Fixed32Rules.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {number} */ (reader.readFixed32()); - msg.setConst(value); - break; - case 2: - var value = /** @type {number} */ (reader.readFixed32()); - msg.setLt(value); - break; - case 3: - var value = /** @type {number} */ (reader.readFixed32()); - msg.setLte(value); - break; - case 4: - var value = /** @type {number} */ (reader.readFixed32()); - msg.setGt(value); - break; - case 5: - var value = /** @type {number} */ (reader.readFixed32()); - msg.setGte(value); - break; - case 6: - var values = /** @type {!Array} */ (reader.isDelimited() ? reader.readPackedFixed32() : [reader.readFixed32()]); - for (var i = 0; i < values.length; i++) { - msg.addIn(values[i]); - } - break; - case 7: - var values = /** @type {!Array} */ (reader.isDelimited() ? reader.readPackedFixed32() : [reader.readFixed32()]); - for (var i = 0; i < values.length; i++) { - msg.addNotIn(values[i]); - } - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.buf.validate.Fixed32Rules.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.buf.validate.Fixed32Rules.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.buf.validate.Fixed32Rules} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.buf.validate.Fixed32Rules.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = /** @type {number} */ (jspb.Message.getField(message, 1)); - if (f != null) { - writer.writeFixed32( - 1, - f - ); - } - f = /** @type {number} */ (jspb.Message.getField(message, 2)); - if (f != null) { - writer.writeFixed32( - 2, - f - ); - } - f = /** @type {number} */ (jspb.Message.getField(message, 3)); - if (f != null) { - writer.writeFixed32( - 3, - f - ); - } - f = /** @type {number} */ (jspb.Message.getField(message, 4)); - if (f != null) { - writer.writeFixed32( - 4, - f - ); - } - f = /** @type {number} */ (jspb.Message.getField(message, 5)); - if (f != null) { - writer.writeFixed32( - 5, - f - ); - } - f = message.getInList(); - if (f.length > 0) { - writer.writePackedFixed32( - 6, - f - ); - } - f = message.getNotInList(); - if (f.length > 0) { - writer.writePackedFixed32( - 7, - f - ); - } -}; - - -/** - * optional fixed32 const = 1; - * @return {number} - */ -proto.buf.validate.Fixed32Rules.prototype.getConst = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.buf.validate.Fixed32Rules} returns this - */ -proto.buf.validate.Fixed32Rules.prototype.setConst = function(value) { - return jspb.Message.setField(this, 1, value); -}; - - -/** - * Clears the field making it undefined. - * @return {!proto.buf.validate.Fixed32Rules} returns this - */ -proto.buf.validate.Fixed32Rules.prototype.clearConst = function() { - return jspb.Message.setField(this, 1, undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.buf.validate.Fixed32Rules.prototype.hasConst = function() { - return jspb.Message.getField(this, 1) != null; -}; - - -/** - * optional fixed32 lt = 2; - * @return {number} - */ -proto.buf.validate.Fixed32Rules.prototype.getLt = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.buf.validate.Fixed32Rules} returns this - */ -proto.buf.validate.Fixed32Rules.prototype.setLt = function(value) { - return jspb.Message.setOneofField(this, 2, proto.buf.validate.Fixed32Rules.oneofGroups_[0], value); -}; - - -/** - * Clears the field making it undefined. - * @return {!proto.buf.validate.Fixed32Rules} returns this - */ -proto.buf.validate.Fixed32Rules.prototype.clearLt = function() { - return jspb.Message.setOneofField(this, 2, proto.buf.validate.Fixed32Rules.oneofGroups_[0], undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.buf.validate.Fixed32Rules.prototype.hasLt = function() { - return jspb.Message.getField(this, 2) != null; -}; - - -/** - * optional fixed32 lte = 3; - * @return {number} - */ -proto.buf.validate.Fixed32Rules.prototype.getLte = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.buf.validate.Fixed32Rules} returns this - */ -proto.buf.validate.Fixed32Rules.prototype.setLte = function(value) { - return jspb.Message.setOneofField(this, 3, proto.buf.validate.Fixed32Rules.oneofGroups_[0], value); -}; - - -/** - * Clears the field making it undefined. - * @return {!proto.buf.validate.Fixed32Rules} returns this - */ -proto.buf.validate.Fixed32Rules.prototype.clearLte = function() { - return jspb.Message.setOneofField(this, 3, proto.buf.validate.Fixed32Rules.oneofGroups_[0], undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.buf.validate.Fixed32Rules.prototype.hasLte = function() { - return jspb.Message.getField(this, 3) != null; -}; - - -/** - * optional fixed32 gt = 4; - * @return {number} - */ -proto.buf.validate.Fixed32Rules.prototype.getGt = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.buf.validate.Fixed32Rules} returns this - */ -proto.buf.validate.Fixed32Rules.prototype.setGt = function(value) { - return jspb.Message.setOneofField(this, 4, proto.buf.validate.Fixed32Rules.oneofGroups_[1], value); -}; - - -/** - * Clears the field making it undefined. - * @return {!proto.buf.validate.Fixed32Rules} returns this - */ -proto.buf.validate.Fixed32Rules.prototype.clearGt = function() { - return jspb.Message.setOneofField(this, 4, proto.buf.validate.Fixed32Rules.oneofGroups_[1], undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.buf.validate.Fixed32Rules.prototype.hasGt = function() { - return jspb.Message.getField(this, 4) != null; -}; - - -/** - * optional fixed32 gte = 5; - * @return {number} - */ -proto.buf.validate.Fixed32Rules.prototype.getGte = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.buf.validate.Fixed32Rules} returns this - */ -proto.buf.validate.Fixed32Rules.prototype.setGte = function(value) { - return jspb.Message.setOneofField(this, 5, proto.buf.validate.Fixed32Rules.oneofGroups_[1], value); -}; - - -/** - * Clears the field making it undefined. - * @return {!proto.buf.validate.Fixed32Rules} returns this - */ -proto.buf.validate.Fixed32Rules.prototype.clearGte = function() { - return jspb.Message.setOneofField(this, 5, proto.buf.validate.Fixed32Rules.oneofGroups_[1], undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.buf.validate.Fixed32Rules.prototype.hasGte = function() { - return jspb.Message.getField(this, 5) != null; -}; - - -/** - * repeated fixed32 in = 6; - * @return {!Array} - */ -proto.buf.validate.Fixed32Rules.prototype.getInList = function() { - return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 6)); -}; - - -/** - * @param {!Array} value - * @return {!proto.buf.validate.Fixed32Rules} returns this - */ -proto.buf.validate.Fixed32Rules.prototype.setInList = function(value) { - return jspb.Message.setField(this, 6, value || []); -}; - - -/** - * @param {number} value - * @param {number=} opt_index - * @return {!proto.buf.validate.Fixed32Rules} returns this - */ -proto.buf.validate.Fixed32Rules.prototype.addIn = function(value, opt_index) { - return jspb.Message.addToRepeatedField(this, 6, value, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.buf.validate.Fixed32Rules} returns this - */ -proto.buf.validate.Fixed32Rules.prototype.clearInList = function() { - return this.setInList([]); -}; - - -/** - * repeated fixed32 not_in = 7; - * @return {!Array} - */ -proto.buf.validate.Fixed32Rules.prototype.getNotInList = function() { - return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 7)); -}; - - -/** - * @param {!Array} value - * @return {!proto.buf.validate.Fixed32Rules} returns this - */ -proto.buf.validate.Fixed32Rules.prototype.setNotInList = function(value) { - return jspb.Message.setField(this, 7, value || []); -}; - - -/** - * @param {number} value - * @param {number=} opt_index - * @return {!proto.buf.validate.Fixed32Rules} returns this - */ -proto.buf.validate.Fixed32Rules.prototype.addNotIn = function(value, opt_index) { - return jspb.Message.addToRepeatedField(this, 7, value, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.buf.validate.Fixed32Rules} returns this - */ -proto.buf.validate.Fixed32Rules.prototype.clearNotInList = function() { - return this.setNotInList([]); -}; - - - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.buf.validate.Fixed64Rules.repeatedFields_ = [6,7]; - -/** - * Oneof group definitions for this message. Each group defines the field - * numbers belonging to that group. When of these fields' value is set, all - * other fields in the group are cleared. During deserialization, if multiple - * fields are encountered for a group, only the last value seen will be kept. - * @private {!Array>} - * @const - */ -proto.buf.validate.Fixed64Rules.oneofGroups_ = [[2,3],[4,5]]; - -/** - * @enum {number} - */ -proto.buf.validate.Fixed64Rules.LessThanCase = { - LESS_THAN_NOT_SET: 0, - LT: 2, - LTE: 3 -}; - -/** - * @return {proto.buf.validate.Fixed64Rules.LessThanCase} - */ -proto.buf.validate.Fixed64Rules.prototype.getLessThanCase = function() { - return /** @type {proto.buf.validate.Fixed64Rules.LessThanCase} */(jspb.Message.computeOneofCase(this, proto.buf.validate.Fixed64Rules.oneofGroups_[0])); -}; - -/** - * @enum {number} - */ -proto.buf.validate.Fixed64Rules.GreaterThanCase = { - GREATER_THAN_NOT_SET: 0, - GT: 4, - GTE: 5 -}; - -/** - * @return {proto.buf.validate.Fixed64Rules.GreaterThanCase} - */ -proto.buf.validate.Fixed64Rules.prototype.getGreaterThanCase = function() { - return /** @type {proto.buf.validate.Fixed64Rules.GreaterThanCase} */(jspb.Message.computeOneofCase(this, proto.buf.validate.Fixed64Rules.oneofGroups_[1])); -}; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.buf.validate.Fixed64Rules.prototype.toObject = function(opt_includeInstance) { - return proto.buf.validate.Fixed64Rules.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.buf.validate.Fixed64Rules} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.buf.validate.Fixed64Rules.toObject = function(includeInstance, msg) { - var f, obj = { - pb_const: jspb.Message.getFieldWithDefault(msg, 1, 0), - lt: jspb.Message.getFieldWithDefault(msg, 2, 0), - lte: jspb.Message.getFieldWithDefault(msg, 3, 0), - gt: jspb.Message.getFieldWithDefault(msg, 4, 0), - gte: jspb.Message.getFieldWithDefault(msg, 5, 0), - inList: (f = jspb.Message.getRepeatedField(msg, 6)) == null ? undefined : f, - notInList: (f = jspb.Message.getRepeatedField(msg, 7)) == null ? undefined : f - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.buf.validate.Fixed64Rules} - */ -proto.buf.validate.Fixed64Rules.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.buf.validate.Fixed64Rules; - return proto.buf.validate.Fixed64Rules.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.buf.validate.Fixed64Rules} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.buf.validate.Fixed64Rules} - */ -proto.buf.validate.Fixed64Rules.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {number} */ (reader.readFixed64()); - msg.setConst(value); - break; - case 2: - var value = /** @type {number} */ (reader.readFixed64()); - msg.setLt(value); - break; - case 3: - var value = /** @type {number} */ (reader.readFixed64()); - msg.setLte(value); - break; - case 4: - var value = /** @type {number} */ (reader.readFixed64()); - msg.setGt(value); - break; - case 5: - var value = /** @type {number} */ (reader.readFixed64()); - msg.setGte(value); - break; - case 6: - var values = /** @type {!Array} */ (reader.isDelimited() ? reader.readPackedFixed64() : [reader.readFixed64()]); - for (var i = 0; i < values.length; i++) { - msg.addIn(values[i]); - } - break; - case 7: - var values = /** @type {!Array} */ (reader.isDelimited() ? reader.readPackedFixed64() : [reader.readFixed64()]); - for (var i = 0; i < values.length; i++) { - msg.addNotIn(values[i]); - } - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.buf.validate.Fixed64Rules.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.buf.validate.Fixed64Rules.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.buf.validate.Fixed64Rules} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.buf.validate.Fixed64Rules.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = /** @type {number} */ (jspb.Message.getField(message, 1)); - if (f != null) { - writer.writeFixed64( - 1, - f - ); - } - f = /** @type {number} */ (jspb.Message.getField(message, 2)); - if (f != null) { - writer.writeFixed64( - 2, - f - ); - } - f = /** @type {number} */ (jspb.Message.getField(message, 3)); - if (f != null) { - writer.writeFixed64( - 3, - f - ); - } - f = /** @type {number} */ (jspb.Message.getField(message, 4)); - if (f != null) { - writer.writeFixed64( - 4, - f - ); - } - f = /** @type {number} */ (jspb.Message.getField(message, 5)); - if (f != null) { - writer.writeFixed64( - 5, - f - ); - } - f = message.getInList(); - if (f.length > 0) { - writer.writePackedFixed64( - 6, - f - ); - } - f = message.getNotInList(); - if (f.length > 0) { - writer.writePackedFixed64( - 7, - f - ); - } -}; - - -/** - * optional fixed64 const = 1; - * @return {number} - */ -proto.buf.validate.Fixed64Rules.prototype.getConst = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.buf.validate.Fixed64Rules} returns this - */ -proto.buf.validate.Fixed64Rules.prototype.setConst = function(value) { - return jspb.Message.setField(this, 1, value); -}; - - -/** - * Clears the field making it undefined. - * @return {!proto.buf.validate.Fixed64Rules} returns this - */ -proto.buf.validate.Fixed64Rules.prototype.clearConst = function() { - return jspb.Message.setField(this, 1, undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.buf.validate.Fixed64Rules.prototype.hasConst = function() { - return jspb.Message.getField(this, 1) != null; -}; - - -/** - * optional fixed64 lt = 2; - * @return {number} - */ -proto.buf.validate.Fixed64Rules.prototype.getLt = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.buf.validate.Fixed64Rules} returns this - */ -proto.buf.validate.Fixed64Rules.prototype.setLt = function(value) { - return jspb.Message.setOneofField(this, 2, proto.buf.validate.Fixed64Rules.oneofGroups_[0], value); -}; - - -/** - * Clears the field making it undefined. - * @return {!proto.buf.validate.Fixed64Rules} returns this - */ -proto.buf.validate.Fixed64Rules.prototype.clearLt = function() { - return jspb.Message.setOneofField(this, 2, proto.buf.validate.Fixed64Rules.oneofGroups_[0], undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.buf.validate.Fixed64Rules.prototype.hasLt = function() { - return jspb.Message.getField(this, 2) != null; -}; - - -/** - * optional fixed64 lte = 3; - * @return {number} - */ -proto.buf.validate.Fixed64Rules.prototype.getLte = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.buf.validate.Fixed64Rules} returns this - */ -proto.buf.validate.Fixed64Rules.prototype.setLte = function(value) { - return jspb.Message.setOneofField(this, 3, proto.buf.validate.Fixed64Rules.oneofGroups_[0], value); -}; - - -/** - * Clears the field making it undefined. - * @return {!proto.buf.validate.Fixed64Rules} returns this - */ -proto.buf.validate.Fixed64Rules.prototype.clearLte = function() { - return jspb.Message.setOneofField(this, 3, proto.buf.validate.Fixed64Rules.oneofGroups_[0], undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.buf.validate.Fixed64Rules.prototype.hasLte = function() { - return jspb.Message.getField(this, 3) != null; -}; - - -/** - * optional fixed64 gt = 4; - * @return {number} - */ -proto.buf.validate.Fixed64Rules.prototype.getGt = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.buf.validate.Fixed64Rules} returns this - */ -proto.buf.validate.Fixed64Rules.prototype.setGt = function(value) { - return jspb.Message.setOneofField(this, 4, proto.buf.validate.Fixed64Rules.oneofGroups_[1], value); -}; - - -/** - * Clears the field making it undefined. - * @return {!proto.buf.validate.Fixed64Rules} returns this - */ -proto.buf.validate.Fixed64Rules.prototype.clearGt = function() { - return jspb.Message.setOneofField(this, 4, proto.buf.validate.Fixed64Rules.oneofGroups_[1], undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.buf.validate.Fixed64Rules.prototype.hasGt = function() { - return jspb.Message.getField(this, 4) != null; -}; - - -/** - * optional fixed64 gte = 5; - * @return {number} - */ -proto.buf.validate.Fixed64Rules.prototype.getGte = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.buf.validate.Fixed64Rules} returns this - */ -proto.buf.validate.Fixed64Rules.prototype.setGte = function(value) { - return jspb.Message.setOneofField(this, 5, proto.buf.validate.Fixed64Rules.oneofGroups_[1], value); -}; - - -/** - * Clears the field making it undefined. - * @return {!proto.buf.validate.Fixed64Rules} returns this - */ -proto.buf.validate.Fixed64Rules.prototype.clearGte = function() { - return jspb.Message.setOneofField(this, 5, proto.buf.validate.Fixed64Rules.oneofGroups_[1], undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.buf.validate.Fixed64Rules.prototype.hasGte = function() { - return jspb.Message.getField(this, 5) != null; -}; - - -/** - * repeated fixed64 in = 6; - * @return {!Array} - */ -proto.buf.validate.Fixed64Rules.prototype.getInList = function() { - return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 6)); -}; - - -/** - * @param {!Array} value - * @return {!proto.buf.validate.Fixed64Rules} returns this - */ -proto.buf.validate.Fixed64Rules.prototype.setInList = function(value) { - return jspb.Message.setField(this, 6, value || []); -}; - - -/** - * @param {number} value - * @param {number=} opt_index - * @return {!proto.buf.validate.Fixed64Rules} returns this - */ -proto.buf.validate.Fixed64Rules.prototype.addIn = function(value, opt_index) { - return jspb.Message.addToRepeatedField(this, 6, value, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.buf.validate.Fixed64Rules} returns this - */ -proto.buf.validate.Fixed64Rules.prototype.clearInList = function() { - return this.setInList([]); -}; - - -/** - * repeated fixed64 not_in = 7; - * @return {!Array} - */ -proto.buf.validate.Fixed64Rules.prototype.getNotInList = function() { - return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 7)); -}; - - -/** - * @param {!Array} value - * @return {!proto.buf.validate.Fixed64Rules} returns this - */ -proto.buf.validate.Fixed64Rules.prototype.setNotInList = function(value) { - return jspb.Message.setField(this, 7, value || []); -}; - - -/** - * @param {number} value - * @param {number=} opt_index - * @return {!proto.buf.validate.Fixed64Rules} returns this - */ -proto.buf.validate.Fixed64Rules.prototype.addNotIn = function(value, opt_index) { - return jspb.Message.addToRepeatedField(this, 7, value, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.buf.validate.Fixed64Rules} returns this - */ -proto.buf.validate.Fixed64Rules.prototype.clearNotInList = function() { - return this.setNotInList([]); -}; - - - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.buf.validate.SFixed32Rules.repeatedFields_ = [6,7]; - -/** - * Oneof group definitions for this message. Each group defines the field - * numbers belonging to that group. When of these fields' value is set, all - * other fields in the group are cleared. During deserialization, if multiple - * fields are encountered for a group, only the last value seen will be kept. - * @private {!Array>} - * @const - */ -proto.buf.validate.SFixed32Rules.oneofGroups_ = [[2,3],[4,5]]; - -/** - * @enum {number} - */ -proto.buf.validate.SFixed32Rules.LessThanCase = { - LESS_THAN_NOT_SET: 0, - LT: 2, - LTE: 3 -}; - -/** - * @return {proto.buf.validate.SFixed32Rules.LessThanCase} - */ -proto.buf.validate.SFixed32Rules.prototype.getLessThanCase = function() { - return /** @type {proto.buf.validate.SFixed32Rules.LessThanCase} */(jspb.Message.computeOneofCase(this, proto.buf.validate.SFixed32Rules.oneofGroups_[0])); -}; - -/** - * @enum {number} - */ -proto.buf.validate.SFixed32Rules.GreaterThanCase = { - GREATER_THAN_NOT_SET: 0, - GT: 4, - GTE: 5 -}; - -/** - * @return {proto.buf.validate.SFixed32Rules.GreaterThanCase} - */ -proto.buf.validate.SFixed32Rules.prototype.getGreaterThanCase = function() { - return /** @type {proto.buf.validate.SFixed32Rules.GreaterThanCase} */(jspb.Message.computeOneofCase(this, proto.buf.validate.SFixed32Rules.oneofGroups_[1])); -}; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.buf.validate.SFixed32Rules.prototype.toObject = function(opt_includeInstance) { - return proto.buf.validate.SFixed32Rules.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.buf.validate.SFixed32Rules} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.buf.validate.SFixed32Rules.toObject = function(includeInstance, msg) { - var f, obj = { - pb_const: jspb.Message.getFieldWithDefault(msg, 1, 0), - lt: jspb.Message.getFieldWithDefault(msg, 2, 0), - lte: jspb.Message.getFieldWithDefault(msg, 3, 0), - gt: jspb.Message.getFieldWithDefault(msg, 4, 0), - gte: jspb.Message.getFieldWithDefault(msg, 5, 0), - inList: (f = jspb.Message.getRepeatedField(msg, 6)) == null ? undefined : f, - notInList: (f = jspb.Message.getRepeatedField(msg, 7)) == null ? undefined : f - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.buf.validate.SFixed32Rules} - */ -proto.buf.validate.SFixed32Rules.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.buf.validate.SFixed32Rules; - return proto.buf.validate.SFixed32Rules.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.buf.validate.SFixed32Rules} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.buf.validate.SFixed32Rules} - */ -proto.buf.validate.SFixed32Rules.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {number} */ (reader.readSfixed32()); - msg.setConst(value); - break; - case 2: - var value = /** @type {number} */ (reader.readSfixed32()); - msg.setLt(value); - break; - case 3: - var value = /** @type {number} */ (reader.readSfixed32()); - msg.setLte(value); - break; - case 4: - var value = /** @type {number} */ (reader.readSfixed32()); - msg.setGt(value); - break; - case 5: - var value = /** @type {number} */ (reader.readSfixed32()); - msg.setGte(value); - break; - case 6: - var values = /** @type {!Array} */ (reader.isDelimited() ? reader.readPackedSfixed32() : [reader.readSfixed32()]); - for (var i = 0; i < values.length; i++) { - msg.addIn(values[i]); - } - break; - case 7: - var values = /** @type {!Array} */ (reader.isDelimited() ? reader.readPackedSfixed32() : [reader.readSfixed32()]); - for (var i = 0; i < values.length; i++) { - msg.addNotIn(values[i]); - } - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.buf.validate.SFixed32Rules.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.buf.validate.SFixed32Rules.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.buf.validate.SFixed32Rules} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.buf.validate.SFixed32Rules.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = /** @type {number} */ (jspb.Message.getField(message, 1)); - if (f != null) { - writer.writeSfixed32( - 1, - f - ); - } - f = /** @type {number} */ (jspb.Message.getField(message, 2)); - if (f != null) { - writer.writeSfixed32( - 2, - f - ); - } - f = /** @type {number} */ (jspb.Message.getField(message, 3)); - if (f != null) { - writer.writeSfixed32( - 3, - f - ); - } - f = /** @type {number} */ (jspb.Message.getField(message, 4)); - if (f != null) { - writer.writeSfixed32( - 4, - f - ); - } - f = /** @type {number} */ (jspb.Message.getField(message, 5)); - if (f != null) { - writer.writeSfixed32( - 5, - f - ); - } - f = message.getInList(); - if (f.length > 0) { - writer.writePackedSfixed32( - 6, - f - ); - } - f = message.getNotInList(); - if (f.length > 0) { - writer.writePackedSfixed32( - 7, - f - ); - } -}; - - -/** - * optional sfixed32 const = 1; - * @return {number} - */ -proto.buf.validate.SFixed32Rules.prototype.getConst = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.buf.validate.SFixed32Rules} returns this - */ -proto.buf.validate.SFixed32Rules.prototype.setConst = function(value) { - return jspb.Message.setField(this, 1, value); -}; - - -/** - * Clears the field making it undefined. - * @return {!proto.buf.validate.SFixed32Rules} returns this - */ -proto.buf.validate.SFixed32Rules.prototype.clearConst = function() { - return jspb.Message.setField(this, 1, undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.buf.validate.SFixed32Rules.prototype.hasConst = function() { - return jspb.Message.getField(this, 1) != null; -}; - - -/** - * optional sfixed32 lt = 2; - * @return {number} - */ -proto.buf.validate.SFixed32Rules.prototype.getLt = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.buf.validate.SFixed32Rules} returns this - */ -proto.buf.validate.SFixed32Rules.prototype.setLt = function(value) { - return jspb.Message.setOneofField(this, 2, proto.buf.validate.SFixed32Rules.oneofGroups_[0], value); -}; - - -/** - * Clears the field making it undefined. - * @return {!proto.buf.validate.SFixed32Rules} returns this - */ -proto.buf.validate.SFixed32Rules.prototype.clearLt = function() { - return jspb.Message.setOneofField(this, 2, proto.buf.validate.SFixed32Rules.oneofGroups_[0], undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.buf.validate.SFixed32Rules.prototype.hasLt = function() { - return jspb.Message.getField(this, 2) != null; -}; - - -/** - * optional sfixed32 lte = 3; - * @return {number} - */ -proto.buf.validate.SFixed32Rules.prototype.getLte = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.buf.validate.SFixed32Rules} returns this - */ -proto.buf.validate.SFixed32Rules.prototype.setLte = function(value) { - return jspb.Message.setOneofField(this, 3, proto.buf.validate.SFixed32Rules.oneofGroups_[0], value); -}; - - -/** - * Clears the field making it undefined. - * @return {!proto.buf.validate.SFixed32Rules} returns this - */ -proto.buf.validate.SFixed32Rules.prototype.clearLte = function() { - return jspb.Message.setOneofField(this, 3, proto.buf.validate.SFixed32Rules.oneofGroups_[0], undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.buf.validate.SFixed32Rules.prototype.hasLte = function() { - return jspb.Message.getField(this, 3) != null; -}; - - -/** - * optional sfixed32 gt = 4; - * @return {number} - */ -proto.buf.validate.SFixed32Rules.prototype.getGt = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.buf.validate.SFixed32Rules} returns this - */ -proto.buf.validate.SFixed32Rules.prototype.setGt = function(value) { - return jspb.Message.setOneofField(this, 4, proto.buf.validate.SFixed32Rules.oneofGroups_[1], value); -}; - - -/** - * Clears the field making it undefined. - * @return {!proto.buf.validate.SFixed32Rules} returns this - */ -proto.buf.validate.SFixed32Rules.prototype.clearGt = function() { - return jspb.Message.setOneofField(this, 4, proto.buf.validate.SFixed32Rules.oneofGroups_[1], undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.buf.validate.SFixed32Rules.prototype.hasGt = function() { - return jspb.Message.getField(this, 4) != null; -}; - - -/** - * optional sfixed32 gte = 5; - * @return {number} - */ -proto.buf.validate.SFixed32Rules.prototype.getGte = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.buf.validate.SFixed32Rules} returns this - */ -proto.buf.validate.SFixed32Rules.prototype.setGte = function(value) { - return jspb.Message.setOneofField(this, 5, proto.buf.validate.SFixed32Rules.oneofGroups_[1], value); -}; - - -/** - * Clears the field making it undefined. - * @return {!proto.buf.validate.SFixed32Rules} returns this - */ -proto.buf.validate.SFixed32Rules.prototype.clearGte = function() { - return jspb.Message.setOneofField(this, 5, proto.buf.validate.SFixed32Rules.oneofGroups_[1], undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.buf.validate.SFixed32Rules.prototype.hasGte = function() { - return jspb.Message.getField(this, 5) != null; -}; - - -/** - * repeated sfixed32 in = 6; - * @return {!Array} - */ -proto.buf.validate.SFixed32Rules.prototype.getInList = function() { - return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 6)); -}; - - -/** - * @param {!Array} value - * @return {!proto.buf.validate.SFixed32Rules} returns this - */ -proto.buf.validate.SFixed32Rules.prototype.setInList = function(value) { - return jspb.Message.setField(this, 6, value || []); -}; - - -/** - * @param {number} value - * @param {number=} opt_index - * @return {!proto.buf.validate.SFixed32Rules} returns this - */ -proto.buf.validate.SFixed32Rules.prototype.addIn = function(value, opt_index) { - return jspb.Message.addToRepeatedField(this, 6, value, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.buf.validate.SFixed32Rules} returns this - */ -proto.buf.validate.SFixed32Rules.prototype.clearInList = function() { - return this.setInList([]); -}; - - -/** - * repeated sfixed32 not_in = 7; - * @return {!Array} - */ -proto.buf.validate.SFixed32Rules.prototype.getNotInList = function() { - return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 7)); -}; - - -/** - * @param {!Array} value - * @return {!proto.buf.validate.SFixed32Rules} returns this - */ -proto.buf.validate.SFixed32Rules.prototype.setNotInList = function(value) { - return jspb.Message.setField(this, 7, value || []); -}; - - -/** - * @param {number} value - * @param {number=} opt_index - * @return {!proto.buf.validate.SFixed32Rules} returns this - */ -proto.buf.validate.SFixed32Rules.prototype.addNotIn = function(value, opt_index) { - return jspb.Message.addToRepeatedField(this, 7, value, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.buf.validate.SFixed32Rules} returns this - */ -proto.buf.validate.SFixed32Rules.prototype.clearNotInList = function() { - return this.setNotInList([]); -}; - - - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.buf.validate.SFixed64Rules.repeatedFields_ = [6,7]; - -/** - * Oneof group definitions for this message. Each group defines the field - * numbers belonging to that group. When of these fields' value is set, all - * other fields in the group are cleared. During deserialization, if multiple - * fields are encountered for a group, only the last value seen will be kept. - * @private {!Array>} - * @const - */ -proto.buf.validate.SFixed64Rules.oneofGroups_ = [[2,3],[4,5]]; - -/** - * @enum {number} - */ -proto.buf.validate.SFixed64Rules.LessThanCase = { - LESS_THAN_NOT_SET: 0, - LT: 2, - LTE: 3 -}; - -/** - * @return {proto.buf.validate.SFixed64Rules.LessThanCase} - */ -proto.buf.validate.SFixed64Rules.prototype.getLessThanCase = function() { - return /** @type {proto.buf.validate.SFixed64Rules.LessThanCase} */(jspb.Message.computeOneofCase(this, proto.buf.validate.SFixed64Rules.oneofGroups_[0])); -}; - -/** - * @enum {number} - */ -proto.buf.validate.SFixed64Rules.GreaterThanCase = { - GREATER_THAN_NOT_SET: 0, - GT: 4, - GTE: 5 -}; - -/** - * @return {proto.buf.validate.SFixed64Rules.GreaterThanCase} - */ -proto.buf.validate.SFixed64Rules.prototype.getGreaterThanCase = function() { - return /** @type {proto.buf.validate.SFixed64Rules.GreaterThanCase} */(jspb.Message.computeOneofCase(this, proto.buf.validate.SFixed64Rules.oneofGroups_[1])); -}; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.buf.validate.SFixed64Rules.prototype.toObject = function(opt_includeInstance) { - return proto.buf.validate.SFixed64Rules.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.buf.validate.SFixed64Rules} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.buf.validate.SFixed64Rules.toObject = function(includeInstance, msg) { - var f, obj = { - pb_const: jspb.Message.getFieldWithDefault(msg, 1, 0), - lt: jspb.Message.getFieldWithDefault(msg, 2, 0), - lte: jspb.Message.getFieldWithDefault(msg, 3, 0), - gt: jspb.Message.getFieldWithDefault(msg, 4, 0), - gte: jspb.Message.getFieldWithDefault(msg, 5, 0), - inList: (f = jspb.Message.getRepeatedField(msg, 6)) == null ? undefined : f, - notInList: (f = jspb.Message.getRepeatedField(msg, 7)) == null ? undefined : f - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.buf.validate.SFixed64Rules} - */ -proto.buf.validate.SFixed64Rules.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.buf.validate.SFixed64Rules; - return proto.buf.validate.SFixed64Rules.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.buf.validate.SFixed64Rules} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.buf.validate.SFixed64Rules} - */ -proto.buf.validate.SFixed64Rules.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {number} */ (reader.readSfixed64()); - msg.setConst(value); - break; - case 2: - var value = /** @type {number} */ (reader.readSfixed64()); - msg.setLt(value); - break; - case 3: - var value = /** @type {number} */ (reader.readSfixed64()); - msg.setLte(value); - break; - case 4: - var value = /** @type {number} */ (reader.readSfixed64()); - msg.setGt(value); - break; - case 5: - var value = /** @type {number} */ (reader.readSfixed64()); - msg.setGte(value); - break; - case 6: - var values = /** @type {!Array} */ (reader.isDelimited() ? reader.readPackedSfixed64() : [reader.readSfixed64()]); - for (var i = 0; i < values.length; i++) { - msg.addIn(values[i]); - } - break; - case 7: - var values = /** @type {!Array} */ (reader.isDelimited() ? reader.readPackedSfixed64() : [reader.readSfixed64()]); - for (var i = 0; i < values.length; i++) { - msg.addNotIn(values[i]); - } - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.buf.validate.SFixed64Rules.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.buf.validate.SFixed64Rules.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.buf.validate.SFixed64Rules} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.buf.validate.SFixed64Rules.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = /** @type {number} */ (jspb.Message.getField(message, 1)); - if (f != null) { - writer.writeSfixed64( - 1, - f - ); - } - f = /** @type {number} */ (jspb.Message.getField(message, 2)); - if (f != null) { - writer.writeSfixed64( - 2, - f - ); - } - f = /** @type {number} */ (jspb.Message.getField(message, 3)); - if (f != null) { - writer.writeSfixed64( - 3, - f - ); - } - f = /** @type {number} */ (jspb.Message.getField(message, 4)); - if (f != null) { - writer.writeSfixed64( - 4, - f - ); - } - f = /** @type {number} */ (jspb.Message.getField(message, 5)); - if (f != null) { - writer.writeSfixed64( - 5, - f - ); - } - f = message.getInList(); - if (f.length > 0) { - writer.writePackedSfixed64( - 6, - f - ); - } - f = message.getNotInList(); - if (f.length > 0) { - writer.writePackedSfixed64( - 7, - f - ); - } -}; - - -/** - * optional sfixed64 const = 1; - * @return {number} - */ -proto.buf.validate.SFixed64Rules.prototype.getConst = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.buf.validate.SFixed64Rules} returns this - */ -proto.buf.validate.SFixed64Rules.prototype.setConst = function(value) { - return jspb.Message.setField(this, 1, value); -}; - - -/** - * Clears the field making it undefined. - * @return {!proto.buf.validate.SFixed64Rules} returns this - */ -proto.buf.validate.SFixed64Rules.prototype.clearConst = function() { - return jspb.Message.setField(this, 1, undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.buf.validate.SFixed64Rules.prototype.hasConst = function() { - return jspb.Message.getField(this, 1) != null; -}; - - -/** - * optional sfixed64 lt = 2; - * @return {number} - */ -proto.buf.validate.SFixed64Rules.prototype.getLt = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.buf.validate.SFixed64Rules} returns this - */ -proto.buf.validate.SFixed64Rules.prototype.setLt = function(value) { - return jspb.Message.setOneofField(this, 2, proto.buf.validate.SFixed64Rules.oneofGroups_[0], value); -}; - - -/** - * Clears the field making it undefined. - * @return {!proto.buf.validate.SFixed64Rules} returns this - */ -proto.buf.validate.SFixed64Rules.prototype.clearLt = function() { - return jspb.Message.setOneofField(this, 2, proto.buf.validate.SFixed64Rules.oneofGroups_[0], undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.buf.validate.SFixed64Rules.prototype.hasLt = function() { - return jspb.Message.getField(this, 2) != null; -}; - - -/** - * optional sfixed64 lte = 3; - * @return {number} - */ -proto.buf.validate.SFixed64Rules.prototype.getLte = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.buf.validate.SFixed64Rules} returns this - */ -proto.buf.validate.SFixed64Rules.prototype.setLte = function(value) { - return jspb.Message.setOneofField(this, 3, proto.buf.validate.SFixed64Rules.oneofGroups_[0], value); -}; - - -/** - * Clears the field making it undefined. - * @return {!proto.buf.validate.SFixed64Rules} returns this - */ -proto.buf.validate.SFixed64Rules.prototype.clearLte = function() { - return jspb.Message.setOneofField(this, 3, proto.buf.validate.SFixed64Rules.oneofGroups_[0], undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.buf.validate.SFixed64Rules.prototype.hasLte = function() { - return jspb.Message.getField(this, 3) != null; -}; - - -/** - * optional sfixed64 gt = 4; - * @return {number} - */ -proto.buf.validate.SFixed64Rules.prototype.getGt = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.buf.validate.SFixed64Rules} returns this - */ -proto.buf.validate.SFixed64Rules.prototype.setGt = function(value) { - return jspb.Message.setOneofField(this, 4, proto.buf.validate.SFixed64Rules.oneofGroups_[1], value); -}; - - -/** - * Clears the field making it undefined. - * @return {!proto.buf.validate.SFixed64Rules} returns this - */ -proto.buf.validate.SFixed64Rules.prototype.clearGt = function() { - return jspb.Message.setOneofField(this, 4, proto.buf.validate.SFixed64Rules.oneofGroups_[1], undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.buf.validate.SFixed64Rules.prototype.hasGt = function() { - return jspb.Message.getField(this, 4) != null; -}; - - -/** - * optional sfixed64 gte = 5; - * @return {number} - */ -proto.buf.validate.SFixed64Rules.prototype.getGte = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.buf.validate.SFixed64Rules} returns this - */ -proto.buf.validate.SFixed64Rules.prototype.setGte = function(value) { - return jspb.Message.setOneofField(this, 5, proto.buf.validate.SFixed64Rules.oneofGroups_[1], value); -}; - - -/** - * Clears the field making it undefined. - * @return {!proto.buf.validate.SFixed64Rules} returns this - */ -proto.buf.validate.SFixed64Rules.prototype.clearGte = function() { - return jspb.Message.setOneofField(this, 5, proto.buf.validate.SFixed64Rules.oneofGroups_[1], undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.buf.validate.SFixed64Rules.prototype.hasGte = function() { - return jspb.Message.getField(this, 5) != null; -}; - - -/** - * repeated sfixed64 in = 6; - * @return {!Array} - */ -proto.buf.validate.SFixed64Rules.prototype.getInList = function() { - return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 6)); -}; - - -/** - * @param {!Array} value - * @return {!proto.buf.validate.SFixed64Rules} returns this - */ -proto.buf.validate.SFixed64Rules.prototype.setInList = function(value) { - return jspb.Message.setField(this, 6, value || []); -}; - - -/** - * @param {number} value - * @param {number=} opt_index - * @return {!proto.buf.validate.SFixed64Rules} returns this - */ -proto.buf.validate.SFixed64Rules.prototype.addIn = function(value, opt_index) { - return jspb.Message.addToRepeatedField(this, 6, value, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.buf.validate.SFixed64Rules} returns this - */ -proto.buf.validate.SFixed64Rules.prototype.clearInList = function() { - return this.setInList([]); -}; - - -/** - * repeated sfixed64 not_in = 7; - * @return {!Array} - */ -proto.buf.validate.SFixed64Rules.prototype.getNotInList = function() { - return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 7)); -}; - - -/** - * @param {!Array} value - * @return {!proto.buf.validate.SFixed64Rules} returns this - */ -proto.buf.validate.SFixed64Rules.prototype.setNotInList = function(value) { - return jspb.Message.setField(this, 7, value || []); -}; - - -/** - * @param {number} value - * @param {number=} opt_index - * @return {!proto.buf.validate.SFixed64Rules} returns this - */ -proto.buf.validate.SFixed64Rules.prototype.addNotIn = function(value, opt_index) { - return jspb.Message.addToRepeatedField(this, 7, value, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.buf.validate.SFixed64Rules} returns this - */ -proto.buf.validate.SFixed64Rules.prototype.clearNotInList = function() { - return this.setNotInList([]); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.buf.validate.BoolRules.prototype.toObject = function(opt_includeInstance) { - return proto.buf.validate.BoolRules.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.buf.validate.BoolRules} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.buf.validate.BoolRules.toObject = function(includeInstance, msg) { - var f, obj = { - pb_const: jspb.Message.getBooleanFieldWithDefault(msg, 1, false) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.buf.validate.BoolRules} - */ -proto.buf.validate.BoolRules.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.buf.validate.BoolRules; - return proto.buf.validate.BoolRules.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.buf.validate.BoolRules} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.buf.validate.BoolRules} - */ -proto.buf.validate.BoolRules.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setConst(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.buf.validate.BoolRules.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.buf.validate.BoolRules.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.buf.validate.BoolRules} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.buf.validate.BoolRules.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = /** @type {boolean} */ (jspb.Message.getField(message, 1)); - if (f != null) { - writer.writeBool( - 1, - f - ); - } -}; - - -/** - * optional bool const = 1; - * @return {boolean} - */ -proto.buf.validate.BoolRules.prototype.getConst = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 1, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.buf.validate.BoolRules} returns this - */ -proto.buf.validate.BoolRules.prototype.setConst = function(value) { - return jspb.Message.setField(this, 1, value); -}; - - -/** - * Clears the field making it undefined. - * @return {!proto.buf.validate.BoolRules} returns this - */ -proto.buf.validate.BoolRules.prototype.clearConst = function() { - return jspb.Message.setField(this, 1, undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.buf.validate.BoolRules.prototype.hasConst = function() { - return jspb.Message.getField(this, 1) != null; -}; - - - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.buf.validate.StringRules.repeatedFields_ = [10,11]; - -/** - * Oneof group definitions for this message. Each group defines the field - * numbers belonging to that group. When of these fields' value is set, all - * other fields in the group are cleared. During deserialization, if multiple - * fields are encountered for a group, only the last value seen will be kept. - * @private {!Array>} - * @const - */ -proto.buf.validate.StringRules.oneofGroups_ = [[12,13,14,15,16,17,18,21,22,26,27,28,29,30,31,24]]; - -/** - * @enum {number} - */ -proto.buf.validate.StringRules.WellKnownCase = { - WELL_KNOWN_NOT_SET: 0, - EMAIL: 12, - HOSTNAME: 13, - IP: 14, - IPV4: 15, - IPV6: 16, - URI: 17, - URI_REF: 18, - ADDRESS: 21, - UUID: 22, - IP_WITH_PREFIXLEN: 26, - IPV4_WITH_PREFIXLEN: 27, - IPV6_WITH_PREFIXLEN: 28, - IP_PREFIX: 29, - IPV4_PREFIX: 30, - IPV6_PREFIX: 31, - WELL_KNOWN_REGEX: 24 -}; - -/** - * @return {proto.buf.validate.StringRules.WellKnownCase} - */ -proto.buf.validate.StringRules.prototype.getWellKnownCase = function() { - return /** @type {proto.buf.validate.StringRules.WellKnownCase} */(jspb.Message.computeOneofCase(this, proto.buf.validate.StringRules.oneofGroups_[0])); -}; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.buf.validate.StringRules.prototype.toObject = function(opt_includeInstance) { - return proto.buf.validate.StringRules.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.buf.validate.StringRules} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.buf.validate.StringRules.toObject = function(includeInstance, msg) { - var f, obj = { - pb_const: jspb.Message.getFieldWithDefault(msg, 1, ""), - len: jspb.Message.getFieldWithDefault(msg, 19, 0), - minLen: jspb.Message.getFieldWithDefault(msg, 2, 0), - maxLen: jspb.Message.getFieldWithDefault(msg, 3, 0), - lenBytes: jspb.Message.getFieldWithDefault(msg, 20, 0), - minBytes: jspb.Message.getFieldWithDefault(msg, 4, 0), - maxBytes: jspb.Message.getFieldWithDefault(msg, 5, 0), - pattern: jspb.Message.getFieldWithDefault(msg, 6, ""), - prefix: jspb.Message.getFieldWithDefault(msg, 7, ""), - suffix: jspb.Message.getFieldWithDefault(msg, 8, ""), - contains: jspb.Message.getFieldWithDefault(msg, 9, ""), - notContains: jspb.Message.getFieldWithDefault(msg, 23, ""), - inList: (f = jspb.Message.getRepeatedField(msg, 10)) == null ? undefined : f, - notInList: (f = jspb.Message.getRepeatedField(msg, 11)) == null ? undefined : f, - email: jspb.Message.getBooleanFieldWithDefault(msg, 12, false), - hostname: jspb.Message.getBooleanFieldWithDefault(msg, 13, false), - ip: jspb.Message.getBooleanFieldWithDefault(msg, 14, false), - ipv4: jspb.Message.getBooleanFieldWithDefault(msg, 15, false), - ipv6: jspb.Message.getBooleanFieldWithDefault(msg, 16, false), - uri: jspb.Message.getBooleanFieldWithDefault(msg, 17, false), - uriRef: jspb.Message.getBooleanFieldWithDefault(msg, 18, false), - address: jspb.Message.getBooleanFieldWithDefault(msg, 21, false), - uuid: jspb.Message.getBooleanFieldWithDefault(msg, 22, false), - ipWithPrefixlen: jspb.Message.getBooleanFieldWithDefault(msg, 26, false), - ipv4WithPrefixlen: jspb.Message.getBooleanFieldWithDefault(msg, 27, false), - ipv6WithPrefixlen: jspb.Message.getBooleanFieldWithDefault(msg, 28, false), - ipPrefix: jspb.Message.getBooleanFieldWithDefault(msg, 29, false), - ipv4Prefix: jspb.Message.getBooleanFieldWithDefault(msg, 30, false), - ipv6Prefix: jspb.Message.getBooleanFieldWithDefault(msg, 31, false), - wellKnownRegex: jspb.Message.getFieldWithDefault(msg, 24, 0), - strict: jspb.Message.getBooleanFieldWithDefault(msg, 25, false) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.buf.validate.StringRules} - */ -proto.buf.validate.StringRules.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.buf.validate.StringRules; - return proto.buf.validate.StringRules.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.buf.validate.StringRules} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.buf.validate.StringRules} - */ -proto.buf.validate.StringRules.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setConst(value); - break; - case 19: - var value = /** @type {number} */ (reader.readUint64()); - msg.setLen(value); - break; - case 2: - var value = /** @type {number} */ (reader.readUint64()); - msg.setMinLen(value); - break; - case 3: - var value = /** @type {number} */ (reader.readUint64()); - msg.setMaxLen(value); - break; - case 20: - var value = /** @type {number} */ (reader.readUint64()); - msg.setLenBytes(value); - break; - case 4: - var value = /** @type {number} */ (reader.readUint64()); - msg.setMinBytes(value); - break; - case 5: - var value = /** @type {number} */ (reader.readUint64()); - msg.setMaxBytes(value); - break; - case 6: - var value = /** @type {string} */ (reader.readString()); - msg.setPattern(value); - break; - case 7: - var value = /** @type {string} */ (reader.readString()); - msg.setPrefix(value); - break; - case 8: - var value = /** @type {string} */ (reader.readString()); - msg.setSuffix(value); - break; - case 9: - var value = /** @type {string} */ (reader.readString()); - msg.setContains(value); - break; - case 23: - var value = /** @type {string} */ (reader.readString()); - msg.setNotContains(value); - break; - case 10: - var value = /** @type {string} */ (reader.readString()); - msg.addIn(value); - break; - case 11: - var value = /** @type {string} */ (reader.readString()); - msg.addNotIn(value); - break; - case 12: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setEmail(value); - break; - case 13: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setHostname(value); - break; - case 14: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setIp(value); - break; - case 15: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setIpv4(value); - break; - case 16: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setIpv6(value); - break; - case 17: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setUri(value); - break; - case 18: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setUriRef(value); - break; - case 21: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setAddress(value); - break; - case 22: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setUuid(value); - break; - case 26: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setIpWithPrefixlen(value); - break; - case 27: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setIpv4WithPrefixlen(value); - break; - case 28: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setIpv6WithPrefixlen(value); - break; - case 29: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setIpPrefix(value); - break; - case 30: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setIpv4Prefix(value); - break; - case 31: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setIpv6Prefix(value); - break; - case 24: - var value = /** @type {!proto.buf.validate.KnownRegex} */ (reader.readEnum()); - msg.setWellKnownRegex(value); - break; - case 25: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setStrict(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.buf.validate.StringRules.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.buf.validate.StringRules.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.buf.validate.StringRules} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.buf.validate.StringRules.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = /** @type {string} */ (jspb.Message.getField(message, 1)); - if (f != null) { - writer.writeString( - 1, - f - ); - } - f = /** @type {number} */ (jspb.Message.getField(message, 19)); - if (f != null) { - writer.writeUint64( - 19, - f - ); - } - f = /** @type {number} */ (jspb.Message.getField(message, 2)); - if (f != null) { - writer.writeUint64( - 2, - f - ); - } - f = /** @type {number} */ (jspb.Message.getField(message, 3)); - if (f != null) { - writer.writeUint64( - 3, - f - ); - } - f = /** @type {number} */ (jspb.Message.getField(message, 20)); - if (f != null) { - writer.writeUint64( - 20, - f - ); - } - f = /** @type {number} */ (jspb.Message.getField(message, 4)); - if (f != null) { - writer.writeUint64( - 4, - f - ); - } - f = /** @type {number} */ (jspb.Message.getField(message, 5)); - if (f != null) { - writer.writeUint64( - 5, - f - ); - } - f = /** @type {string} */ (jspb.Message.getField(message, 6)); - if (f != null) { - writer.writeString( - 6, - f - ); - } - f = /** @type {string} */ (jspb.Message.getField(message, 7)); - if (f != null) { - writer.writeString( - 7, - f - ); - } - f = /** @type {string} */ (jspb.Message.getField(message, 8)); - if (f != null) { - writer.writeString( - 8, - f - ); - } - f = /** @type {string} */ (jspb.Message.getField(message, 9)); - if (f != null) { - writer.writeString( - 9, - f - ); - } - f = /** @type {string} */ (jspb.Message.getField(message, 23)); - if (f != null) { - writer.writeString( - 23, - f - ); - } - f = message.getInList(); - if (f.length > 0) { - writer.writeRepeatedString( - 10, - f - ); - } - f = message.getNotInList(); - if (f.length > 0) { - writer.writeRepeatedString( - 11, - f - ); - } - f = /** @type {boolean} */ (jspb.Message.getField(message, 12)); - if (f != null) { - writer.writeBool( - 12, - f - ); - } - f = /** @type {boolean} */ (jspb.Message.getField(message, 13)); - if (f != null) { - writer.writeBool( - 13, - f - ); - } - f = /** @type {boolean} */ (jspb.Message.getField(message, 14)); - if (f != null) { - writer.writeBool( - 14, - f - ); - } - f = /** @type {boolean} */ (jspb.Message.getField(message, 15)); - if (f != null) { - writer.writeBool( - 15, - f - ); - } - f = /** @type {boolean} */ (jspb.Message.getField(message, 16)); - if (f != null) { - writer.writeBool( - 16, - f - ); - } - f = /** @type {boolean} */ (jspb.Message.getField(message, 17)); - if (f != null) { - writer.writeBool( - 17, - f - ); - } - f = /** @type {boolean} */ (jspb.Message.getField(message, 18)); - if (f != null) { - writer.writeBool( - 18, - f - ); - } - f = /** @type {boolean} */ (jspb.Message.getField(message, 21)); - if (f != null) { - writer.writeBool( - 21, - f - ); - } - f = /** @type {boolean} */ (jspb.Message.getField(message, 22)); - if (f != null) { - writer.writeBool( - 22, - f - ); - } - f = /** @type {boolean} */ (jspb.Message.getField(message, 26)); - if (f != null) { - writer.writeBool( - 26, - f - ); - } - f = /** @type {boolean} */ (jspb.Message.getField(message, 27)); - if (f != null) { - writer.writeBool( - 27, - f - ); - } - f = /** @type {boolean} */ (jspb.Message.getField(message, 28)); - if (f != null) { - writer.writeBool( - 28, - f - ); - } - f = /** @type {boolean} */ (jspb.Message.getField(message, 29)); - if (f != null) { - writer.writeBool( - 29, - f - ); - } - f = /** @type {boolean} */ (jspb.Message.getField(message, 30)); - if (f != null) { - writer.writeBool( - 30, - f - ); - } - f = /** @type {boolean} */ (jspb.Message.getField(message, 31)); - if (f != null) { - writer.writeBool( - 31, - f - ); - } - f = /** @type {!proto.buf.validate.KnownRegex} */ (jspb.Message.getField(message, 24)); - if (f != null) { - writer.writeEnum( - 24, - f - ); - } - f = /** @type {boolean} */ (jspb.Message.getField(message, 25)); - if (f != null) { - writer.writeBool( - 25, - f - ); - } -}; - - -/** - * optional string const = 1; - * @return {string} - */ -proto.buf.validate.StringRules.prototype.getConst = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.buf.validate.StringRules} returns this - */ -proto.buf.validate.StringRules.prototype.setConst = function(value) { - return jspb.Message.setField(this, 1, value); -}; - - -/** - * Clears the field making it undefined. - * @return {!proto.buf.validate.StringRules} returns this - */ -proto.buf.validate.StringRules.prototype.clearConst = function() { - return jspb.Message.setField(this, 1, undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.buf.validate.StringRules.prototype.hasConst = function() { - return jspb.Message.getField(this, 1) != null; -}; - - -/** - * optional uint64 len = 19; - * @return {number} - */ -proto.buf.validate.StringRules.prototype.getLen = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 19, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.buf.validate.StringRules} returns this - */ -proto.buf.validate.StringRules.prototype.setLen = function(value) { - return jspb.Message.setField(this, 19, value); -}; - - -/** - * Clears the field making it undefined. - * @return {!proto.buf.validate.StringRules} returns this - */ -proto.buf.validate.StringRules.prototype.clearLen = function() { - return jspb.Message.setField(this, 19, undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.buf.validate.StringRules.prototype.hasLen = function() { - return jspb.Message.getField(this, 19) != null; -}; - - -/** - * optional uint64 min_len = 2; - * @return {number} - */ -proto.buf.validate.StringRules.prototype.getMinLen = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.buf.validate.StringRules} returns this - */ -proto.buf.validate.StringRules.prototype.setMinLen = function(value) { - return jspb.Message.setField(this, 2, value); -}; - - -/** - * Clears the field making it undefined. - * @return {!proto.buf.validate.StringRules} returns this - */ -proto.buf.validate.StringRules.prototype.clearMinLen = function() { - return jspb.Message.setField(this, 2, undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.buf.validate.StringRules.prototype.hasMinLen = function() { - return jspb.Message.getField(this, 2) != null; -}; - - -/** - * optional uint64 max_len = 3; - * @return {number} - */ -proto.buf.validate.StringRules.prototype.getMaxLen = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.buf.validate.StringRules} returns this - */ -proto.buf.validate.StringRules.prototype.setMaxLen = function(value) { - return jspb.Message.setField(this, 3, value); -}; - - -/** - * Clears the field making it undefined. - * @return {!proto.buf.validate.StringRules} returns this - */ -proto.buf.validate.StringRules.prototype.clearMaxLen = function() { - return jspb.Message.setField(this, 3, undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.buf.validate.StringRules.prototype.hasMaxLen = function() { - return jspb.Message.getField(this, 3) != null; -}; - - -/** - * optional uint64 len_bytes = 20; - * @return {number} - */ -proto.buf.validate.StringRules.prototype.getLenBytes = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 20, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.buf.validate.StringRules} returns this - */ -proto.buf.validate.StringRules.prototype.setLenBytes = function(value) { - return jspb.Message.setField(this, 20, value); -}; - - -/** - * Clears the field making it undefined. - * @return {!proto.buf.validate.StringRules} returns this - */ -proto.buf.validate.StringRules.prototype.clearLenBytes = function() { - return jspb.Message.setField(this, 20, undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.buf.validate.StringRules.prototype.hasLenBytes = function() { - return jspb.Message.getField(this, 20) != null; -}; - - -/** - * optional uint64 min_bytes = 4; - * @return {number} - */ -proto.buf.validate.StringRules.prototype.getMinBytes = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.buf.validate.StringRules} returns this - */ -proto.buf.validate.StringRules.prototype.setMinBytes = function(value) { - return jspb.Message.setField(this, 4, value); -}; - - -/** - * Clears the field making it undefined. - * @return {!proto.buf.validate.StringRules} returns this - */ -proto.buf.validate.StringRules.prototype.clearMinBytes = function() { - return jspb.Message.setField(this, 4, undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.buf.validate.StringRules.prototype.hasMinBytes = function() { - return jspb.Message.getField(this, 4) != null; -}; - - -/** - * optional uint64 max_bytes = 5; - * @return {number} - */ -proto.buf.validate.StringRules.prototype.getMaxBytes = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.buf.validate.StringRules} returns this - */ -proto.buf.validate.StringRules.prototype.setMaxBytes = function(value) { - return jspb.Message.setField(this, 5, value); -}; - - -/** - * Clears the field making it undefined. - * @return {!proto.buf.validate.StringRules} returns this - */ -proto.buf.validate.StringRules.prototype.clearMaxBytes = function() { - return jspb.Message.setField(this, 5, undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.buf.validate.StringRules.prototype.hasMaxBytes = function() { - return jspb.Message.getField(this, 5) != null; -}; - - -/** - * optional string pattern = 6; - * @return {string} - */ -proto.buf.validate.StringRules.prototype.getPattern = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, "")); -}; - - -/** - * @param {string} value - * @return {!proto.buf.validate.StringRules} returns this - */ -proto.buf.validate.StringRules.prototype.setPattern = function(value) { - return jspb.Message.setField(this, 6, value); -}; - - -/** - * Clears the field making it undefined. - * @return {!proto.buf.validate.StringRules} returns this - */ -proto.buf.validate.StringRules.prototype.clearPattern = function() { - return jspb.Message.setField(this, 6, undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.buf.validate.StringRules.prototype.hasPattern = function() { - return jspb.Message.getField(this, 6) != null; -}; - - -/** - * optional string prefix = 7; - * @return {string} - */ -proto.buf.validate.StringRules.prototype.getPrefix = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, "")); -}; - - -/** - * @param {string} value - * @return {!proto.buf.validate.StringRules} returns this - */ -proto.buf.validate.StringRules.prototype.setPrefix = function(value) { - return jspb.Message.setField(this, 7, value); -}; - - -/** - * Clears the field making it undefined. - * @return {!proto.buf.validate.StringRules} returns this - */ -proto.buf.validate.StringRules.prototype.clearPrefix = function() { - return jspb.Message.setField(this, 7, undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.buf.validate.StringRules.prototype.hasPrefix = function() { - return jspb.Message.getField(this, 7) != null; -}; - - -/** - * optional string suffix = 8; - * @return {string} - */ -proto.buf.validate.StringRules.prototype.getSuffix = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 8, "")); -}; - - -/** - * @param {string} value - * @return {!proto.buf.validate.StringRules} returns this - */ -proto.buf.validate.StringRules.prototype.setSuffix = function(value) { - return jspb.Message.setField(this, 8, value); -}; - - -/** - * Clears the field making it undefined. - * @return {!proto.buf.validate.StringRules} returns this - */ -proto.buf.validate.StringRules.prototype.clearSuffix = function() { - return jspb.Message.setField(this, 8, undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.buf.validate.StringRules.prototype.hasSuffix = function() { - return jspb.Message.getField(this, 8) != null; -}; - - -/** - * optional string contains = 9; - * @return {string} - */ -proto.buf.validate.StringRules.prototype.getContains = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 9, "")); -}; - - -/** - * @param {string} value - * @return {!proto.buf.validate.StringRules} returns this - */ -proto.buf.validate.StringRules.prototype.setContains = function(value) { - return jspb.Message.setField(this, 9, value); -}; - - -/** - * Clears the field making it undefined. - * @return {!proto.buf.validate.StringRules} returns this - */ -proto.buf.validate.StringRules.prototype.clearContains = function() { - return jspb.Message.setField(this, 9, undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.buf.validate.StringRules.prototype.hasContains = function() { - return jspb.Message.getField(this, 9) != null; -}; - - -/** - * optional string not_contains = 23; - * @return {string} - */ -proto.buf.validate.StringRules.prototype.getNotContains = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 23, "")); -}; - - -/** - * @param {string} value - * @return {!proto.buf.validate.StringRules} returns this - */ -proto.buf.validate.StringRules.prototype.setNotContains = function(value) { - return jspb.Message.setField(this, 23, value); -}; - - -/** - * Clears the field making it undefined. - * @return {!proto.buf.validate.StringRules} returns this - */ -proto.buf.validate.StringRules.prototype.clearNotContains = function() { - return jspb.Message.setField(this, 23, undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.buf.validate.StringRules.prototype.hasNotContains = function() { - return jspb.Message.getField(this, 23) != null; -}; - - -/** - * repeated string in = 10; - * @return {!Array} - */ -proto.buf.validate.StringRules.prototype.getInList = function() { - return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 10)); -}; - - -/** - * @param {!Array} value - * @return {!proto.buf.validate.StringRules} returns this - */ -proto.buf.validate.StringRules.prototype.setInList = function(value) { - return jspb.Message.setField(this, 10, value || []); -}; - - -/** - * @param {string} value - * @param {number=} opt_index - * @return {!proto.buf.validate.StringRules} returns this - */ -proto.buf.validate.StringRules.prototype.addIn = function(value, opt_index) { - return jspb.Message.addToRepeatedField(this, 10, value, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.buf.validate.StringRules} returns this - */ -proto.buf.validate.StringRules.prototype.clearInList = function() { - return this.setInList([]); -}; - - -/** - * repeated string not_in = 11; - * @return {!Array} - */ -proto.buf.validate.StringRules.prototype.getNotInList = function() { - return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 11)); -}; - - -/** - * @param {!Array} value - * @return {!proto.buf.validate.StringRules} returns this - */ -proto.buf.validate.StringRules.prototype.setNotInList = function(value) { - return jspb.Message.setField(this, 11, value || []); -}; - - -/** - * @param {string} value - * @param {number=} opt_index - * @return {!proto.buf.validate.StringRules} returns this - */ -proto.buf.validate.StringRules.prototype.addNotIn = function(value, opt_index) { - return jspb.Message.addToRepeatedField(this, 11, value, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.buf.validate.StringRules} returns this - */ -proto.buf.validate.StringRules.prototype.clearNotInList = function() { - return this.setNotInList([]); -}; - - -/** - * optional bool email = 12; - * @return {boolean} - */ -proto.buf.validate.StringRules.prototype.getEmail = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 12, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.buf.validate.StringRules} returns this - */ -proto.buf.validate.StringRules.prototype.setEmail = function(value) { - return jspb.Message.setOneofField(this, 12, proto.buf.validate.StringRules.oneofGroups_[0], value); -}; - - -/** - * Clears the field making it undefined. - * @return {!proto.buf.validate.StringRules} returns this - */ -proto.buf.validate.StringRules.prototype.clearEmail = function() { - return jspb.Message.setOneofField(this, 12, proto.buf.validate.StringRules.oneofGroups_[0], undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.buf.validate.StringRules.prototype.hasEmail = function() { - return jspb.Message.getField(this, 12) != null; -}; - - -/** - * optional bool hostname = 13; - * @return {boolean} - */ -proto.buf.validate.StringRules.prototype.getHostname = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 13, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.buf.validate.StringRules} returns this - */ -proto.buf.validate.StringRules.prototype.setHostname = function(value) { - return jspb.Message.setOneofField(this, 13, proto.buf.validate.StringRules.oneofGroups_[0], value); -}; - - -/** - * Clears the field making it undefined. - * @return {!proto.buf.validate.StringRules} returns this - */ -proto.buf.validate.StringRules.prototype.clearHostname = function() { - return jspb.Message.setOneofField(this, 13, proto.buf.validate.StringRules.oneofGroups_[0], undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.buf.validate.StringRules.prototype.hasHostname = function() { - return jspb.Message.getField(this, 13) != null; -}; - - -/** - * optional bool ip = 14; - * @return {boolean} - */ -proto.buf.validate.StringRules.prototype.getIp = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 14, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.buf.validate.StringRules} returns this - */ -proto.buf.validate.StringRules.prototype.setIp = function(value) { - return jspb.Message.setOneofField(this, 14, proto.buf.validate.StringRules.oneofGroups_[0], value); -}; - - -/** - * Clears the field making it undefined. - * @return {!proto.buf.validate.StringRules} returns this - */ -proto.buf.validate.StringRules.prototype.clearIp = function() { - return jspb.Message.setOneofField(this, 14, proto.buf.validate.StringRules.oneofGroups_[0], undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.buf.validate.StringRules.prototype.hasIp = function() { - return jspb.Message.getField(this, 14) != null; -}; - - -/** - * optional bool ipv4 = 15; - * @return {boolean} - */ -proto.buf.validate.StringRules.prototype.getIpv4 = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 15, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.buf.validate.StringRules} returns this - */ -proto.buf.validate.StringRules.prototype.setIpv4 = function(value) { - return jspb.Message.setOneofField(this, 15, proto.buf.validate.StringRules.oneofGroups_[0], value); -}; - - -/** - * Clears the field making it undefined. - * @return {!proto.buf.validate.StringRules} returns this - */ -proto.buf.validate.StringRules.prototype.clearIpv4 = function() { - return jspb.Message.setOneofField(this, 15, proto.buf.validate.StringRules.oneofGroups_[0], undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.buf.validate.StringRules.prototype.hasIpv4 = function() { - return jspb.Message.getField(this, 15) != null; -}; - - -/** - * optional bool ipv6 = 16; - * @return {boolean} - */ -proto.buf.validate.StringRules.prototype.getIpv6 = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 16, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.buf.validate.StringRules} returns this - */ -proto.buf.validate.StringRules.prototype.setIpv6 = function(value) { - return jspb.Message.setOneofField(this, 16, proto.buf.validate.StringRules.oneofGroups_[0], value); -}; - - -/** - * Clears the field making it undefined. - * @return {!proto.buf.validate.StringRules} returns this - */ -proto.buf.validate.StringRules.prototype.clearIpv6 = function() { - return jspb.Message.setOneofField(this, 16, proto.buf.validate.StringRules.oneofGroups_[0], undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.buf.validate.StringRules.prototype.hasIpv6 = function() { - return jspb.Message.getField(this, 16) != null; -}; - - -/** - * optional bool uri = 17; - * @return {boolean} - */ -proto.buf.validate.StringRules.prototype.getUri = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 17, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.buf.validate.StringRules} returns this - */ -proto.buf.validate.StringRules.prototype.setUri = function(value) { - return jspb.Message.setOneofField(this, 17, proto.buf.validate.StringRules.oneofGroups_[0], value); -}; - - -/** - * Clears the field making it undefined. - * @return {!proto.buf.validate.StringRules} returns this - */ -proto.buf.validate.StringRules.prototype.clearUri = function() { - return jspb.Message.setOneofField(this, 17, proto.buf.validate.StringRules.oneofGroups_[0], undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.buf.validate.StringRules.prototype.hasUri = function() { - return jspb.Message.getField(this, 17) != null; -}; - - -/** - * optional bool uri_ref = 18; - * @return {boolean} - */ -proto.buf.validate.StringRules.prototype.getUriRef = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 18, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.buf.validate.StringRules} returns this - */ -proto.buf.validate.StringRules.prototype.setUriRef = function(value) { - return jspb.Message.setOneofField(this, 18, proto.buf.validate.StringRules.oneofGroups_[0], value); -}; - - -/** - * Clears the field making it undefined. - * @return {!proto.buf.validate.StringRules} returns this - */ -proto.buf.validate.StringRules.prototype.clearUriRef = function() { - return jspb.Message.setOneofField(this, 18, proto.buf.validate.StringRules.oneofGroups_[0], undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.buf.validate.StringRules.prototype.hasUriRef = function() { - return jspb.Message.getField(this, 18) != null; -}; - - -/** - * optional bool address = 21; - * @return {boolean} - */ -proto.buf.validate.StringRules.prototype.getAddress = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 21, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.buf.validate.StringRules} returns this - */ -proto.buf.validate.StringRules.prototype.setAddress = function(value) { - return jspb.Message.setOneofField(this, 21, proto.buf.validate.StringRules.oneofGroups_[0], value); -}; - - -/** - * Clears the field making it undefined. - * @return {!proto.buf.validate.StringRules} returns this - */ -proto.buf.validate.StringRules.prototype.clearAddress = function() { - return jspb.Message.setOneofField(this, 21, proto.buf.validate.StringRules.oneofGroups_[0], undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.buf.validate.StringRules.prototype.hasAddress = function() { - return jspb.Message.getField(this, 21) != null; -}; - - -/** - * optional bool uuid = 22; - * @return {boolean} - */ -proto.buf.validate.StringRules.prototype.getUuid = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 22, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.buf.validate.StringRules} returns this - */ -proto.buf.validate.StringRules.prototype.setUuid = function(value) { - return jspb.Message.setOneofField(this, 22, proto.buf.validate.StringRules.oneofGroups_[0], value); -}; - - -/** - * Clears the field making it undefined. - * @return {!proto.buf.validate.StringRules} returns this - */ -proto.buf.validate.StringRules.prototype.clearUuid = function() { - return jspb.Message.setOneofField(this, 22, proto.buf.validate.StringRules.oneofGroups_[0], undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.buf.validate.StringRules.prototype.hasUuid = function() { - return jspb.Message.getField(this, 22) != null; -}; - - -/** - * optional bool ip_with_prefixlen = 26; - * @return {boolean} - */ -proto.buf.validate.StringRules.prototype.getIpWithPrefixlen = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 26, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.buf.validate.StringRules} returns this - */ -proto.buf.validate.StringRules.prototype.setIpWithPrefixlen = function(value) { - return jspb.Message.setOneofField(this, 26, proto.buf.validate.StringRules.oneofGroups_[0], value); -}; - - -/** - * Clears the field making it undefined. - * @return {!proto.buf.validate.StringRules} returns this - */ -proto.buf.validate.StringRules.prototype.clearIpWithPrefixlen = function() { - return jspb.Message.setOneofField(this, 26, proto.buf.validate.StringRules.oneofGroups_[0], undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.buf.validate.StringRules.prototype.hasIpWithPrefixlen = function() { - return jspb.Message.getField(this, 26) != null; -}; - - -/** - * optional bool ipv4_with_prefixlen = 27; - * @return {boolean} - */ -proto.buf.validate.StringRules.prototype.getIpv4WithPrefixlen = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 27, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.buf.validate.StringRules} returns this - */ -proto.buf.validate.StringRules.prototype.setIpv4WithPrefixlen = function(value) { - return jspb.Message.setOneofField(this, 27, proto.buf.validate.StringRules.oneofGroups_[0], value); -}; - - -/** - * Clears the field making it undefined. - * @return {!proto.buf.validate.StringRules} returns this - */ -proto.buf.validate.StringRules.prototype.clearIpv4WithPrefixlen = function() { - return jspb.Message.setOneofField(this, 27, proto.buf.validate.StringRules.oneofGroups_[0], undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.buf.validate.StringRules.prototype.hasIpv4WithPrefixlen = function() { - return jspb.Message.getField(this, 27) != null; -}; - - -/** - * optional bool ipv6_with_prefixlen = 28; - * @return {boolean} - */ -proto.buf.validate.StringRules.prototype.getIpv6WithPrefixlen = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 28, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.buf.validate.StringRules} returns this - */ -proto.buf.validate.StringRules.prototype.setIpv6WithPrefixlen = function(value) { - return jspb.Message.setOneofField(this, 28, proto.buf.validate.StringRules.oneofGroups_[0], value); -}; - - -/** - * Clears the field making it undefined. - * @return {!proto.buf.validate.StringRules} returns this - */ -proto.buf.validate.StringRules.prototype.clearIpv6WithPrefixlen = function() { - return jspb.Message.setOneofField(this, 28, proto.buf.validate.StringRules.oneofGroups_[0], undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.buf.validate.StringRules.prototype.hasIpv6WithPrefixlen = function() { - return jspb.Message.getField(this, 28) != null; -}; - - -/** - * optional bool ip_prefix = 29; - * @return {boolean} - */ -proto.buf.validate.StringRules.prototype.getIpPrefix = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 29, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.buf.validate.StringRules} returns this - */ -proto.buf.validate.StringRules.prototype.setIpPrefix = function(value) { - return jspb.Message.setOneofField(this, 29, proto.buf.validate.StringRules.oneofGroups_[0], value); -}; - - -/** - * Clears the field making it undefined. - * @return {!proto.buf.validate.StringRules} returns this - */ -proto.buf.validate.StringRules.prototype.clearIpPrefix = function() { - return jspb.Message.setOneofField(this, 29, proto.buf.validate.StringRules.oneofGroups_[0], undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.buf.validate.StringRules.prototype.hasIpPrefix = function() { - return jspb.Message.getField(this, 29) != null; -}; - - -/** - * optional bool ipv4_prefix = 30; - * @return {boolean} - */ -proto.buf.validate.StringRules.prototype.getIpv4Prefix = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 30, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.buf.validate.StringRules} returns this - */ -proto.buf.validate.StringRules.prototype.setIpv4Prefix = function(value) { - return jspb.Message.setOneofField(this, 30, proto.buf.validate.StringRules.oneofGroups_[0], value); -}; - - -/** - * Clears the field making it undefined. - * @return {!proto.buf.validate.StringRules} returns this - */ -proto.buf.validate.StringRules.prototype.clearIpv4Prefix = function() { - return jspb.Message.setOneofField(this, 30, proto.buf.validate.StringRules.oneofGroups_[0], undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.buf.validate.StringRules.prototype.hasIpv4Prefix = function() { - return jspb.Message.getField(this, 30) != null; -}; - - -/** - * optional bool ipv6_prefix = 31; - * @return {boolean} - */ -proto.buf.validate.StringRules.prototype.getIpv6Prefix = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 31, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.buf.validate.StringRules} returns this - */ -proto.buf.validate.StringRules.prototype.setIpv6Prefix = function(value) { - return jspb.Message.setOneofField(this, 31, proto.buf.validate.StringRules.oneofGroups_[0], value); -}; - - -/** - * Clears the field making it undefined. - * @return {!proto.buf.validate.StringRules} returns this - */ -proto.buf.validate.StringRules.prototype.clearIpv6Prefix = function() { - return jspb.Message.setOneofField(this, 31, proto.buf.validate.StringRules.oneofGroups_[0], undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.buf.validate.StringRules.prototype.hasIpv6Prefix = function() { - return jspb.Message.getField(this, 31) != null; -}; - - -/** - * optional KnownRegex well_known_regex = 24; - * @return {!proto.buf.validate.KnownRegex} - */ -proto.buf.validate.StringRules.prototype.getWellKnownRegex = function() { - return /** @type {!proto.buf.validate.KnownRegex} */ (jspb.Message.getFieldWithDefault(this, 24, 0)); -}; - - -/** - * @param {!proto.buf.validate.KnownRegex} value - * @return {!proto.buf.validate.StringRules} returns this - */ -proto.buf.validate.StringRules.prototype.setWellKnownRegex = function(value) { - return jspb.Message.setOneofField(this, 24, proto.buf.validate.StringRules.oneofGroups_[0], value); -}; - - -/** - * Clears the field making it undefined. - * @return {!proto.buf.validate.StringRules} returns this - */ -proto.buf.validate.StringRules.prototype.clearWellKnownRegex = function() { - return jspb.Message.setOneofField(this, 24, proto.buf.validate.StringRules.oneofGroups_[0], undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.buf.validate.StringRules.prototype.hasWellKnownRegex = function() { - return jspb.Message.getField(this, 24) != null; -}; - - -/** - * optional bool strict = 25; - * @return {boolean} - */ -proto.buf.validate.StringRules.prototype.getStrict = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 25, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.buf.validate.StringRules} returns this - */ -proto.buf.validate.StringRules.prototype.setStrict = function(value) { - return jspb.Message.setField(this, 25, value); -}; - - -/** - * Clears the field making it undefined. - * @return {!proto.buf.validate.StringRules} returns this - */ -proto.buf.validate.StringRules.prototype.clearStrict = function() { - return jspb.Message.setField(this, 25, undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.buf.validate.StringRules.prototype.hasStrict = function() { - return jspb.Message.getField(this, 25) != null; -}; - - - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.buf.validate.BytesRules.repeatedFields_ = [8,9]; - -/** - * Oneof group definitions for this message. Each group defines the field - * numbers belonging to that group. When of these fields' value is set, all - * other fields in the group are cleared. During deserialization, if multiple - * fields are encountered for a group, only the last value seen will be kept. - * @private {!Array>} - * @const - */ -proto.buf.validate.BytesRules.oneofGroups_ = [[10,11,12]]; - -/** - * @enum {number} - */ -proto.buf.validate.BytesRules.WellKnownCase = { - WELL_KNOWN_NOT_SET: 0, - IP: 10, - IPV4: 11, - IPV6: 12 -}; - -/** - * @return {proto.buf.validate.BytesRules.WellKnownCase} - */ -proto.buf.validate.BytesRules.prototype.getWellKnownCase = function() { - return /** @type {proto.buf.validate.BytesRules.WellKnownCase} */(jspb.Message.computeOneofCase(this, proto.buf.validate.BytesRules.oneofGroups_[0])); -}; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.buf.validate.BytesRules.prototype.toObject = function(opt_includeInstance) { - return proto.buf.validate.BytesRules.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.buf.validate.BytesRules} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.buf.validate.BytesRules.toObject = function(includeInstance, msg) { - var f, obj = { - pb_const: msg.getConst_asB64(), - len: jspb.Message.getFieldWithDefault(msg, 13, 0), - minLen: jspb.Message.getFieldWithDefault(msg, 2, 0), - maxLen: jspb.Message.getFieldWithDefault(msg, 3, 0), - pattern: jspb.Message.getFieldWithDefault(msg, 4, ""), - prefix: msg.getPrefix_asB64(), - suffix: msg.getSuffix_asB64(), - contains: msg.getContains_asB64(), - inList: msg.getInList_asB64(), - notInList: msg.getNotInList_asB64(), - ip: jspb.Message.getBooleanFieldWithDefault(msg, 10, false), - ipv4: jspb.Message.getBooleanFieldWithDefault(msg, 11, false), - ipv6: jspb.Message.getBooleanFieldWithDefault(msg, 12, false) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.buf.validate.BytesRules} - */ -proto.buf.validate.BytesRules.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.buf.validate.BytesRules; - return proto.buf.validate.BytesRules.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.buf.validate.BytesRules} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.buf.validate.BytesRules} - */ -proto.buf.validate.BytesRules.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setConst(value); - break; - case 13: - var value = /** @type {number} */ (reader.readUint64()); - msg.setLen(value); - break; - case 2: - var value = /** @type {number} */ (reader.readUint64()); - msg.setMinLen(value); - break; - case 3: - var value = /** @type {number} */ (reader.readUint64()); - msg.setMaxLen(value); - break; - case 4: - var value = /** @type {string} */ (reader.readString()); - msg.setPattern(value); - break; - case 5: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setPrefix(value); - break; - case 6: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setSuffix(value); - break; - case 7: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setContains(value); - break; - case 8: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.addIn(value); - break; - case 9: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.addNotIn(value); - break; - case 10: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setIp(value); - break; - case 11: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setIpv4(value); - break; - case 12: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setIpv6(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.buf.validate.BytesRules.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.buf.validate.BytesRules.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.buf.validate.BytesRules} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.buf.validate.BytesRules.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = /** @type {!(string|Uint8Array)} */ (jspb.Message.getField(message, 1)); - if (f != null) { - writer.writeBytes( - 1, - f - ); - } - f = /** @type {number} */ (jspb.Message.getField(message, 13)); - if (f != null) { - writer.writeUint64( - 13, - f - ); - } - f = /** @type {number} */ (jspb.Message.getField(message, 2)); - if (f != null) { - writer.writeUint64( - 2, - f - ); - } - f = /** @type {number} */ (jspb.Message.getField(message, 3)); - if (f != null) { - writer.writeUint64( - 3, - f - ); - } - f = /** @type {string} */ (jspb.Message.getField(message, 4)); - if (f != null) { - writer.writeString( - 4, - f - ); - } - f = /** @type {!(string|Uint8Array)} */ (jspb.Message.getField(message, 5)); - if (f != null) { - writer.writeBytes( - 5, - f - ); - } - f = /** @type {!(string|Uint8Array)} */ (jspb.Message.getField(message, 6)); - if (f != null) { - writer.writeBytes( - 6, - f - ); - } - f = /** @type {!(string|Uint8Array)} */ (jspb.Message.getField(message, 7)); - if (f != null) { - writer.writeBytes( - 7, - f - ); - } - f = message.getInList_asU8(); - if (f.length > 0) { - writer.writeRepeatedBytes( - 8, - f - ); - } - f = message.getNotInList_asU8(); - if (f.length > 0) { - writer.writeRepeatedBytes( - 9, - f - ); - } - f = /** @type {boolean} */ (jspb.Message.getField(message, 10)); - if (f != null) { - writer.writeBool( - 10, - f - ); - } - f = /** @type {boolean} */ (jspb.Message.getField(message, 11)); - if (f != null) { - writer.writeBool( - 11, - f - ); - } - f = /** @type {boolean} */ (jspb.Message.getField(message, 12)); - if (f != null) { - writer.writeBool( - 12, - f - ); - } -}; - - -/** - * optional bytes const = 1; - * @return {string} - */ -proto.buf.validate.BytesRules.prototype.getConst = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * optional bytes const = 1; - * This is a type-conversion wrapper around `getConst()` - * @return {string} - */ -proto.buf.validate.BytesRules.prototype.getConst_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getConst())); -}; - - -/** - * optional bytes const = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getConst()` - * @return {!Uint8Array} - */ -proto.buf.validate.BytesRules.prototype.getConst_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getConst())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.buf.validate.BytesRules} returns this - */ -proto.buf.validate.BytesRules.prototype.setConst = function(value) { - return jspb.Message.setField(this, 1, value); -}; - - -/** - * Clears the field making it undefined. - * @return {!proto.buf.validate.BytesRules} returns this - */ -proto.buf.validate.BytesRules.prototype.clearConst = function() { - return jspb.Message.setField(this, 1, undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.buf.validate.BytesRules.prototype.hasConst = function() { - return jspb.Message.getField(this, 1) != null; -}; - - -/** - * optional uint64 len = 13; - * @return {number} - */ -proto.buf.validate.BytesRules.prototype.getLen = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 13, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.buf.validate.BytesRules} returns this - */ -proto.buf.validate.BytesRules.prototype.setLen = function(value) { - return jspb.Message.setField(this, 13, value); -}; - - -/** - * Clears the field making it undefined. - * @return {!proto.buf.validate.BytesRules} returns this - */ -proto.buf.validate.BytesRules.prototype.clearLen = function() { - return jspb.Message.setField(this, 13, undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.buf.validate.BytesRules.prototype.hasLen = function() { - return jspb.Message.getField(this, 13) != null; -}; - - -/** - * optional uint64 min_len = 2; - * @return {number} - */ -proto.buf.validate.BytesRules.prototype.getMinLen = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.buf.validate.BytesRules} returns this - */ -proto.buf.validate.BytesRules.prototype.setMinLen = function(value) { - return jspb.Message.setField(this, 2, value); -}; - - -/** - * Clears the field making it undefined. - * @return {!proto.buf.validate.BytesRules} returns this - */ -proto.buf.validate.BytesRules.prototype.clearMinLen = function() { - return jspb.Message.setField(this, 2, undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.buf.validate.BytesRules.prototype.hasMinLen = function() { - return jspb.Message.getField(this, 2) != null; -}; - - -/** - * optional uint64 max_len = 3; - * @return {number} - */ -proto.buf.validate.BytesRules.prototype.getMaxLen = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.buf.validate.BytesRules} returns this - */ -proto.buf.validate.BytesRules.prototype.setMaxLen = function(value) { - return jspb.Message.setField(this, 3, value); -}; - - -/** - * Clears the field making it undefined. - * @return {!proto.buf.validate.BytesRules} returns this - */ -proto.buf.validate.BytesRules.prototype.clearMaxLen = function() { - return jspb.Message.setField(this, 3, undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.buf.validate.BytesRules.prototype.hasMaxLen = function() { - return jspb.Message.getField(this, 3) != null; -}; - - -/** - * optional string pattern = 4; - * @return {string} - */ -proto.buf.validate.BytesRules.prototype.getPattern = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); -}; - - -/** - * @param {string} value - * @return {!proto.buf.validate.BytesRules} returns this - */ -proto.buf.validate.BytesRules.prototype.setPattern = function(value) { - return jspb.Message.setField(this, 4, value); -}; - - -/** - * Clears the field making it undefined. - * @return {!proto.buf.validate.BytesRules} returns this - */ -proto.buf.validate.BytesRules.prototype.clearPattern = function() { - return jspb.Message.setField(this, 4, undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.buf.validate.BytesRules.prototype.hasPattern = function() { - return jspb.Message.getField(this, 4) != null; -}; - - -/** - * optional bytes prefix = 5; - * @return {string} - */ -proto.buf.validate.BytesRules.prototype.getPrefix = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); -}; - - -/** - * optional bytes prefix = 5; - * This is a type-conversion wrapper around `getPrefix()` - * @return {string} - */ -proto.buf.validate.BytesRules.prototype.getPrefix_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getPrefix())); -}; - - -/** - * optional bytes prefix = 5; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getPrefix()` - * @return {!Uint8Array} - */ -proto.buf.validate.BytesRules.prototype.getPrefix_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getPrefix())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.buf.validate.BytesRules} returns this - */ -proto.buf.validate.BytesRules.prototype.setPrefix = function(value) { - return jspb.Message.setField(this, 5, value); -}; - - -/** - * Clears the field making it undefined. - * @return {!proto.buf.validate.BytesRules} returns this - */ -proto.buf.validate.BytesRules.prototype.clearPrefix = function() { - return jspb.Message.setField(this, 5, undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.buf.validate.BytesRules.prototype.hasPrefix = function() { - return jspb.Message.getField(this, 5) != null; -}; - - -/** - * optional bytes suffix = 6; - * @return {string} - */ -proto.buf.validate.BytesRules.prototype.getSuffix = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, "")); -}; - - -/** - * optional bytes suffix = 6; - * This is a type-conversion wrapper around `getSuffix()` - * @return {string} - */ -proto.buf.validate.BytesRules.prototype.getSuffix_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getSuffix())); -}; - - -/** - * optional bytes suffix = 6; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getSuffix()` - * @return {!Uint8Array} - */ -proto.buf.validate.BytesRules.prototype.getSuffix_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getSuffix())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.buf.validate.BytesRules} returns this - */ -proto.buf.validate.BytesRules.prototype.setSuffix = function(value) { - return jspb.Message.setField(this, 6, value); -}; - - -/** - * Clears the field making it undefined. - * @return {!proto.buf.validate.BytesRules} returns this - */ -proto.buf.validate.BytesRules.prototype.clearSuffix = function() { - return jspb.Message.setField(this, 6, undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.buf.validate.BytesRules.prototype.hasSuffix = function() { - return jspb.Message.getField(this, 6) != null; -}; - - -/** - * optional bytes contains = 7; - * @return {string} - */ -proto.buf.validate.BytesRules.prototype.getContains = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, "")); -}; - - -/** - * optional bytes contains = 7; - * This is a type-conversion wrapper around `getContains()` - * @return {string} - */ -proto.buf.validate.BytesRules.prototype.getContains_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getContains())); -}; - - -/** - * optional bytes contains = 7; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getContains()` - * @return {!Uint8Array} - */ -proto.buf.validate.BytesRules.prototype.getContains_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getContains())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.buf.validate.BytesRules} returns this - */ -proto.buf.validate.BytesRules.prototype.setContains = function(value) { - return jspb.Message.setField(this, 7, value); -}; - - -/** - * Clears the field making it undefined. - * @return {!proto.buf.validate.BytesRules} returns this - */ -proto.buf.validate.BytesRules.prototype.clearContains = function() { - return jspb.Message.setField(this, 7, undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.buf.validate.BytesRules.prototype.hasContains = function() { - return jspb.Message.getField(this, 7) != null; -}; - - -/** - * repeated bytes in = 8; - * @return {!Array} - */ -proto.buf.validate.BytesRules.prototype.getInList = function() { - return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 8)); -}; - - -/** - * repeated bytes in = 8; - * This is a type-conversion wrapper around `getInList()` - * @return {!Array} - */ -proto.buf.validate.BytesRules.prototype.getInList_asB64 = function() { - return /** @type {!Array} */ (jspb.Message.bytesListAsB64( - this.getInList())); -}; - - -/** - * repeated bytes in = 8; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getInList()` - * @return {!Array} - */ -proto.buf.validate.BytesRules.prototype.getInList_asU8 = function() { - return /** @type {!Array} */ (jspb.Message.bytesListAsU8( - this.getInList())); -}; - - -/** - * @param {!(Array|Array)} value - * @return {!proto.buf.validate.BytesRules} returns this - */ -proto.buf.validate.BytesRules.prototype.setInList = function(value) { - return jspb.Message.setField(this, 8, value || []); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @param {number=} opt_index - * @return {!proto.buf.validate.BytesRules} returns this - */ -proto.buf.validate.BytesRules.prototype.addIn = function(value, opt_index) { - return jspb.Message.addToRepeatedField(this, 8, value, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.buf.validate.BytesRules} returns this - */ -proto.buf.validate.BytesRules.prototype.clearInList = function() { - return this.setInList([]); -}; - - -/** - * repeated bytes not_in = 9; - * @return {!Array} - */ -proto.buf.validate.BytesRules.prototype.getNotInList = function() { - return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 9)); -}; - - -/** - * repeated bytes not_in = 9; - * This is a type-conversion wrapper around `getNotInList()` - * @return {!Array} - */ -proto.buf.validate.BytesRules.prototype.getNotInList_asB64 = function() { - return /** @type {!Array} */ (jspb.Message.bytesListAsB64( - this.getNotInList())); -}; - - -/** - * repeated bytes not_in = 9; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getNotInList()` - * @return {!Array} - */ -proto.buf.validate.BytesRules.prototype.getNotInList_asU8 = function() { - return /** @type {!Array} */ (jspb.Message.bytesListAsU8( - this.getNotInList())); -}; - - -/** - * @param {!(Array|Array)} value - * @return {!proto.buf.validate.BytesRules} returns this - */ -proto.buf.validate.BytesRules.prototype.setNotInList = function(value) { - return jspb.Message.setField(this, 9, value || []); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @param {number=} opt_index - * @return {!proto.buf.validate.BytesRules} returns this - */ -proto.buf.validate.BytesRules.prototype.addNotIn = function(value, opt_index) { - return jspb.Message.addToRepeatedField(this, 9, value, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.buf.validate.BytesRules} returns this - */ -proto.buf.validate.BytesRules.prototype.clearNotInList = function() { - return this.setNotInList([]); -}; - - -/** - * optional bool ip = 10; - * @return {boolean} - */ -proto.buf.validate.BytesRules.prototype.getIp = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 10, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.buf.validate.BytesRules} returns this - */ -proto.buf.validate.BytesRules.prototype.setIp = function(value) { - return jspb.Message.setOneofField(this, 10, proto.buf.validate.BytesRules.oneofGroups_[0], value); -}; - - -/** - * Clears the field making it undefined. - * @return {!proto.buf.validate.BytesRules} returns this - */ -proto.buf.validate.BytesRules.prototype.clearIp = function() { - return jspb.Message.setOneofField(this, 10, proto.buf.validate.BytesRules.oneofGroups_[0], undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.buf.validate.BytesRules.prototype.hasIp = function() { - return jspb.Message.getField(this, 10) != null; -}; - - -/** - * optional bool ipv4 = 11; - * @return {boolean} - */ -proto.buf.validate.BytesRules.prototype.getIpv4 = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 11, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.buf.validate.BytesRules} returns this - */ -proto.buf.validate.BytesRules.prototype.setIpv4 = function(value) { - return jspb.Message.setOneofField(this, 11, proto.buf.validate.BytesRules.oneofGroups_[0], value); -}; - - -/** - * Clears the field making it undefined. - * @return {!proto.buf.validate.BytesRules} returns this - */ -proto.buf.validate.BytesRules.prototype.clearIpv4 = function() { - return jspb.Message.setOneofField(this, 11, proto.buf.validate.BytesRules.oneofGroups_[0], undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.buf.validate.BytesRules.prototype.hasIpv4 = function() { - return jspb.Message.getField(this, 11) != null; -}; - - -/** - * optional bool ipv6 = 12; - * @return {boolean} - */ -proto.buf.validate.BytesRules.prototype.getIpv6 = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 12, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.buf.validate.BytesRules} returns this - */ -proto.buf.validate.BytesRules.prototype.setIpv6 = function(value) { - return jspb.Message.setOneofField(this, 12, proto.buf.validate.BytesRules.oneofGroups_[0], value); -}; - - -/** - * Clears the field making it undefined. - * @return {!proto.buf.validate.BytesRules} returns this - */ -proto.buf.validate.BytesRules.prototype.clearIpv6 = function() { - return jspb.Message.setOneofField(this, 12, proto.buf.validate.BytesRules.oneofGroups_[0], undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.buf.validate.BytesRules.prototype.hasIpv6 = function() { - return jspb.Message.getField(this, 12) != null; -}; - - - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.buf.validate.EnumRules.repeatedFields_ = [3,4]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.buf.validate.EnumRules.prototype.toObject = function(opt_includeInstance) { - return proto.buf.validate.EnumRules.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.buf.validate.EnumRules} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.buf.validate.EnumRules.toObject = function(includeInstance, msg) { - var f, obj = { - pb_const: jspb.Message.getFieldWithDefault(msg, 1, 0), - definedOnly: jspb.Message.getBooleanFieldWithDefault(msg, 2, false), - inList: (f = jspb.Message.getRepeatedField(msg, 3)) == null ? undefined : f, - notInList: (f = jspb.Message.getRepeatedField(msg, 4)) == null ? undefined : f - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.buf.validate.EnumRules} - */ -proto.buf.validate.EnumRules.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.buf.validate.EnumRules; - return proto.buf.validate.EnumRules.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.buf.validate.EnumRules} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.buf.validate.EnumRules} - */ -proto.buf.validate.EnumRules.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {number} */ (reader.readInt32()); - msg.setConst(value); - break; - case 2: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setDefinedOnly(value); - break; - case 3: - var values = /** @type {!Array} */ (reader.isDelimited() ? reader.readPackedInt32() : [reader.readInt32()]); - for (var i = 0; i < values.length; i++) { - msg.addIn(values[i]); - } - break; - case 4: - var values = /** @type {!Array} */ (reader.isDelimited() ? reader.readPackedInt32() : [reader.readInt32()]); - for (var i = 0; i < values.length; i++) { - msg.addNotIn(values[i]); - } - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.buf.validate.EnumRules.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.buf.validate.EnumRules.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.buf.validate.EnumRules} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.buf.validate.EnumRules.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = /** @type {number} */ (jspb.Message.getField(message, 1)); - if (f != null) { - writer.writeInt32( - 1, - f - ); - } - f = /** @type {boolean} */ (jspb.Message.getField(message, 2)); - if (f != null) { - writer.writeBool( - 2, - f - ); - } - f = message.getInList(); - if (f.length > 0) { - writer.writePackedInt32( - 3, - f - ); - } - f = message.getNotInList(); - if (f.length > 0) { - writer.writePackedInt32( - 4, - f - ); - } -}; - - -/** - * optional int32 const = 1; - * @return {number} - */ -proto.buf.validate.EnumRules.prototype.getConst = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.buf.validate.EnumRules} returns this - */ -proto.buf.validate.EnumRules.prototype.setConst = function(value) { - return jspb.Message.setField(this, 1, value); -}; - - -/** - * Clears the field making it undefined. - * @return {!proto.buf.validate.EnumRules} returns this - */ -proto.buf.validate.EnumRules.prototype.clearConst = function() { - return jspb.Message.setField(this, 1, undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.buf.validate.EnumRules.prototype.hasConst = function() { - return jspb.Message.getField(this, 1) != null; -}; - - -/** - * optional bool defined_only = 2; - * @return {boolean} - */ -proto.buf.validate.EnumRules.prototype.getDefinedOnly = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.buf.validate.EnumRules} returns this - */ -proto.buf.validate.EnumRules.prototype.setDefinedOnly = function(value) { - return jspb.Message.setField(this, 2, value); -}; - - -/** - * Clears the field making it undefined. - * @return {!proto.buf.validate.EnumRules} returns this - */ -proto.buf.validate.EnumRules.prototype.clearDefinedOnly = function() { - return jspb.Message.setField(this, 2, undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.buf.validate.EnumRules.prototype.hasDefinedOnly = function() { - return jspb.Message.getField(this, 2) != null; -}; - - -/** - * repeated int32 in = 3; - * @return {!Array} - */ -proto.buf.validate.EnumRules.prototype.getInList = function() { - return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 3)); -}; - - -/** - * @param {!Array} value - * @return {!proto.buf.validate.EnumRules} returns this - */ -proto.buf.validate.EnumRules.prototype.setInList = function(value) { - return jspb.Message.setField(this, 3, value || []); -}; - - -/** - * @param {number} value - * @param {number=} opt_index - * @return {!proto.buf.validate.EnumRules} returns this - */ -proto.buf.validate.EnumRules.prototype.addIn = function(value, opt_index) { - return jspb.Message.addToRepeatedField(this, 3, value, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.buf.validate.EnumRules} returns this - */ -proto.buf.validate.EnumRules.prototype.clearInList = function() { - return this.setInList([]); -}; - - -/** - * repeated int32 not_in = 4; - * @return {!Array} - */ -proto.buf.validate.EnumRules.prototype.getNotInList = function() { - return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 4)); -}; - - -/** - * @param {!Array} value - * @return {!proto.buf.validate.EnumRules} returns this - */ -proto.buf.validate.EnumRules.prototype.setNotInList = function(value) { - return jspb.Message.setField(this, 4, value || []); -}; - - -/** - * @param {number} value - * @param {number=} opt_index - * @return {!proto.buf.validate.EnumRules} returns this - */ -proto.buf.validate.EnumRules.prototype.addNotIn = function(value, opt_index) { - return jspb.Message.addToRepeatedField(this, 4, value, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.buf.validate.EnumRules} returns this - */ -proto.buf.validate.EnumRules.prototype.clearNotInList = function() { - return this.setNotInList([]); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.buf.validate.RepeatedRules.prototype.toObject = function(opt_includeInstance) { - return proto.buf.validate.RepeatedRules.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.buf.validate.RepeatedRules} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.buf.validate.RepeatedRules.toObject = function(includeInstance, msg) { - var f, obj = { - minItems: jspb.Message.getFieldWithDefault(msg, 1, 0), - maxItems: jspb.Message.getFieldWithDefault(msg, 2, 0), - unique: jspb.Message.getBooleanFieldWithDefault(msg, 3, false), - items: (f = msg.getItems()) && proto.buf.validate.FieldConstraints.toObject(includeInstance, f) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.buf.validate.RepeatedRules} - */ -proto.buf.validate.RepeatedRules.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.buf.validate.RepeatedRules; - return proto.buf.validate.RepeatedRules.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.buf.validate.RepeatedRules} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.buf.validate.RepeatedRules} - */ -proto.buf.validate.RepeatedRules.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {number} */ (reader.readUint64()); - msg.setMinItems(value); - break; - case 2: - var value = /** @type {number} */ (reader.readUint64()); - msg.setMaxItems(value); - break; - case 3: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setUnique(value); - break; - case 4: - var value = new proto.buf.validate.FieldConstraints; - reader.readMessage(value,proto.buf.validate.FieldConstraints.deserializeBinaryFromReader); - msg.setItems(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.buf.validate.RepeatedRules.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.buf.validate.RepeatedRules.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.buf.validate.RepeatedRules} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.buf.validate.RepeatedRules.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = /** @type {number} */ (jspb.Message.getField(message, 1)); - if (f != null) { - writer.writeUint64( - 1, - f - ); - } - f = /** @type {number} */ (jspb.Message.getField(message, 2)); - if (f != null) { - writer.writeUint64( - 2, - f - ); - } - f = /** @type {boolean} */ (jspb.Message.getField(message, 3)); - if (f != null) { - writer.writeBool( - 3, - f - ); - } - f = message.getItems(); - if (f != null) { - writer.writeMessage( - 4, - f, - proto.buf.validate.FieldConstraints.serializeBinaryToWriter - ); - } -}; - - -/** - * optional uint64 min_items = 1; - * @return {number} - */ -proto.buf.validate.RepeatedRules.prototype.getMinItems = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.buf.validate.RepeatedRules} returns this - */ -proto.buf.validate.RepeatedRules.prototype.setMinItems = function(value) { - return jspb.Message.setField(this, 1, value); -}; - - -/** - * Clears the field making it undefined. - * @return {!proto.buf.validate.RepeatedRules} returns this - */ -proto.buf.validate.RepeatedRules.prototype.clearMinItems = function() { - return jspb.Message.setField(this, 1, undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.buf.validate.RepeatedRules.prototype.hasMinItems = function() { - return jspb.Message.getField(this, 1) != null; -}; - - -/** - * optional uint64 max_items = 2; - * @return {number} - */ -proto.buf.validate.RepeatedRules.prototype.getMaxItems = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.buf.validate.RepeatedRules} returns this - */ -proto.buf.validate.RepeatedRules.prototype.setMaxItems = function(value) { - return jspb.Message.setField(this, 2, value); -}; - - -/** - * Clears the field making it undefined. - * @return {!proto.buf.validate.RepeatedRules} returns this - */ -proto.buf.validate.RepeatedRules.prototype.clearMaxItems = function() { - return jspb.Message.setField(this, 2, undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.buf.validate.RepeatedRules.prototype.hasMaxItems = function() { - return jspb.Message.getField(this, 2) != null; -}; - - -/** - * optional bool unique = 3; - * @return {boolean} - */ -proto.buf.validate.RepeatedRules.prototype.getUnique = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 3, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.buf.validate.RepeatedRules} returns this - */ -proto.buf.validate.RepeatedRules.prototype.setUnique = function(value) { - return jspb.Message.setField(this, 3, value); -}; - - -/** - * Clears the field making it undefined. - * @return {!proto.buf.validate.RepeatedRules} returns this - */ -proto.buf.validate.RepeatedRules.prototype.clearUnique = function() { - return jspb.Message.setField(this, 3, undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.buf.validate.RepeatedRules.prototype.hasUnique = function() { - return jspb.Message.getField(this, 3) != null; -}; - - -/** - * optional FieldConstraints items = 4; - * @return {?proto.buf.validate.FieldConstraints} - */ -proto.buf.validate.RepeatedRules.prototype.getItems = function() { - return /** @type{?proto.buf.validate.FieldConstraints} */ ( - jspb.Message.getWrapperField(this, proto.buf.validate.FieldConstraints, 4)); -}; - - -/** - * @param {?proto.buf.validate.FieldConstraints|undefined} value - * @return {!proto.buf.validate.RepeatedRules} returns this -*/ -proto.buf.validate.RepeatedRules.prototype.setItems = function(value) { - return jspb.Message.setWrapperField(this, 4, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.buf.validate.RepeatedRules} returns this - */ -proto.buf.validate.RepeatedRules.prototype.clearItems = function() { - return this.setItems(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.buf.validate.RepeatedRules.prototype.hasItems = function() { - return jspb.Message.getField(this, 4) != null; -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.buf.validate.MapRules.prototype.toObject = function(opt_includeInstance) { - return proto.buf.validate.MapRules.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.buf.validate.MapRules} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.buf.validate.MapRules.toObject = function(includeInstance, msg) { - var f, obj = { - minPairs: jspb.Message.getFieldWithDefault(msg, 1, 0), - maxPairs: jspb.Message.getFieldWithDefault(msg, 2, 0), - keys: (f = msg.getKeys()) && proto.buf.validate.FieldConstraints.toObject(includeInstance, f), - values: (f = msg.getValues()) && proto.buf.validate.FieldConstraints.toObject(includeInstance, f) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.buf.validate.MapRules} - */ -proto.buf.validate.MapRules.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.buf.validate.MapRules; - return proto.buf.validate.MapRules.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.buf.validate.MapRules} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.buf.validate.MapRules} - */ -proto.buf.validate.MapRules.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {number} */ (reader.readUint64()); - msg.setMinPairs(value); - break; - case 2: - var value = /** @type {number} */ (reader.readUint64()); - msg.setMaxPairs(value); - break; - case 4: - var value = new proto.buf.validate.FieldConstraints; - reader.readMessage(value,proto.buf.validate.FieldConstraints.deserializeBinaryFromReader); - msg.setKeys(value); - break; - case 5: - var value = new proto.buf.validate.FieldConstraints; - reader.readMessage(value,proto.buf.validate.FieldConstraints.deserializeBinaryFromReader); - msg.setValues(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.buf.validate.MapRules.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.buf.validate.MapRules.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.buf.validate.MapRules} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.buf.validate.MapRules.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = /** @type {number} */ (jspb.Message.getField(message, 1)); - if (f != null) { - writer.writeUint64( - 1, - f - ); - } - f = /** @type {number} */ (jspb.Message.getField(message, 2)); - if (f != null) { - writer.writeUint64( - 2, - f - ); - } - f = message.getKeys(); - if (f != null) { - writer.writeMessage( - 4, - f, - proto.buf.validate.FieldConstraints.serializeBinaryToWriter - ); - } - f = message.getValues(); - if (f != null) { - writer.writeMessage( - 5, - f, - proto.buf.validate.FieldConstraints.serializeBinaryToWriter - ); - } -}; - - -/** - * optional uint64 min_pairs = 1; - * @return {number} - */ -proto.buf.validate.MapRules.prototype.getMinPairs = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.buf.validate.MapRules} returns this - */ -proto.buf.validate.MapRules.prototype.setMinPairs = function(value) { - return jspb.Message.setField(this, 1, value); -}; - - -/** - * Clears the field making it undefined. - * @return {!proto.buf.validate.MapRules} returns this - */ -proto.buf.validate.MapRules.prototype.clearMinPairs = function() { - return jspb.Message.setField(this, 1, undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.buf.validate.MapRules.prototype.hasMinPairs = function() { - return jspb.Message.getField(this, 1) != null; -}; - - -/** - * optional uint64 max_pairs = 2; - * @return {number} - */ -proto.buf.validate.MapRules.prototype.getMaxPairs = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.buf.validate.MapRules} returns this - */ -proto.buf.validate.MapRules.prototype.setMaxPairs = function(value) { - return jspb.Message.setField(this, 2, value); -}; - - -/** - * Clears the field making it undefined. - * @return {!proto.buf.validate.MapRules} returns this - */ -proto.buf.validate.MapRules.prototype.clearMaxPairs = function() { - return jspb.Message.setField(this, 2, undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.buf.validate.MapRules.prototype.hasMaxPairs = function() { - return jspb.Message.getField(this, 2) != null; -}; - - -/** - * optional FieldConstraints keys = 4; - * @return {?proto.buf.validate.FieldConstraints} - */ -proto.buf.validate.MapRules.prototype.getKeys = function() { - return /** @type{?proto.buf.validate.FieldConstraints} */ ( - jspb.Message.getWrapperField(this, proto.buf.validate.FieldConstraints, 4)); -}; - - -/** - * @param {?proto.buf.validate.FieldConstraints|undefined} value - * @return {!proto.buf.validate.MapRules} returns this -*/ -proto.buf.validate.MapRules.prototype.setKeys = function(value) { - return jspb.Message.setWrapperField(this, 4, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.buf.validate.MapRules} returns this - */ -proto.buf.validate.MapRules.prototype.clearKeys = function() { - return this.setKeys(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.buf.validate.MapRules.prototype.hasKeys = function() { - return jspb.Message.getField(this, 4) != null; -}; - - -/** - * optional FieldConstraints values = 5; - * @return {?proto.buf.validate.FieldConstraints} - */ -proto.buf.validate.MapRules.prototype.getValues = function() { - return /** @type{?proto.buf.validate.FieldConstraints} */ ( - jspb.Message.getWrapperField(this, proto.buf.validate.FieldConstraints, 5)); -}; - - -/** - * @param {?proto.buf.validate.FieldConstraints|undefined} value - * @return {!proto.buf.validate.MapRules} returns this -*/ -proto.buf.validate.MapRules.prototype.setValues = function(value) { - return jspb.Message.setWrapperField(this, 5, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.buf.validate.MapRules} returns this - */ -proto.buf.validate.MapRules.prototype.clearValues = function() { - return this.setValues(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.buf.validate.MapRules.prototype.hasValues = function() { - return jspb.Message.getField(this, 5) != null; -}; - - - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.buf.validate.AnyRules.repeatedFields_ = [2,3]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.buf.validate.AnyRules.prototype.toObject = function(opt_includeInstance) { - return proto.buf.validate.AnyRules.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.buf.validate.AnyRules} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.buf.validate.AnyRules.toObject = function(includeInstance, msg) { - var f, obj = { - inList: (f = jspb.Message.getRepeatedField(msg, 2)) == null ? undefined : f, - notInList: (f = jspb.Message.getRepeatedField(msg, 3)) == null ? undefined : f - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.buf.validate.AnyRules} - */ -proto.buf.validate.AnyRules.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.buf.validate.AnyRules; - return proto.buf.validate.AnyRules.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.buf.validate.AnyRules} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.buf.validate.AnyRules} - */ -proto.buf.validate.AnyRules.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.addIn(value); - break; - case 3: - var value = /** @type {string} */ (reader.readString()); - msg.addNotIn(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.buf.validate.AnyRules.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.buf.validate.AnyRules.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.buf.validate.AnyRules} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.buf.validate.AnyRules.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getInList(); - if (f.length > 0) { - writer.writeRepeatedString( - 2, - f - ); - } - f = message.getNotInList(); - if (f.length > 0) { - writer.writeRepeatedString( - 3, - f - ); - } -}; - - -/** - * repeated string in = 2; - * @return {!Array} - */ -proto.buf.validate.AnyRules.prototype.getInList = function() { - return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 2)); -}; - - -/** - * @param {!Array} value - * @return {!proto.buf.validate.AnyRules} returns this - */ -proto.buf.validate.AnyRules.prototype.setInList = function(value) { - return jspb.Message.setField(this, 2, value || []); -}; - - -/** - * @param {string} value - * @param {number=} opt_index - * @return {!proto.buf.validate.AnyRules} returns this - */ -proto.buf.validate.AnyRules.prototype.addIn = function(value, opt_index) { - return jspb.Message.addToRepeatedField(this, 2, value, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.buf.validate.AnyRules} returns this - */ -proto.buf.validate.AnyRules.prototype.clearInList = function() { - return this.setInList([]); -}; - - -/** - * repeated string not_in = 3; - * @return {!Array} - */ -proto.buf.validate.AnyRules.prototype.getNotInList = function() { - return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 3)); -}; - - -/** - * @param {!Array} value - * @return {!proto.buf.validate.AnyRules} returns this - */ -proto.buf.validate.AnyRules.prototype.setNotInList = function(value) { - return jspb.Message.setField(this, 3, value || []); -}; - - -/** - * @param {string} value - * @param {number=} opt_index - * @return {!proto.buf.validate.AnyRules} returns this - */ -proto.buf.validate.AnyRules.prototype.addNotIn = function(value, opt_index) { - return jspb.Message.addToRepeatedField(this, 3, value, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.buf.validate.AnyRules} returns this - */ -proto.buf.validate.AnyRules.prototype.clearNotInList = function() { - return this.setNotInList([]); -}; - - - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.buf.validate.DurationRules.repeatedFields_ = [7,8]; - -/** - * Oneof group definitions for this message. Each group defines the field - * numbers belonging to that group. When of these fields' value is set, all - * other fields in the group are cleared. During deserialization, if multiple - * fields are encountered for a group, only the last value seen will be kept. - * @private {!Array>} - * @const - */ -proto.buf.validate.DurationRules.oneofGroups_ = [[3,4],[5,6]]; - -/** - * @enum {number} - */ -proto.buf.validate.DurationRules.LessThanCase = { - LESS_THAN_NOT_SET: 0, - LT: 3, - LTE: 4 -}; - -/** - * @return {proto.buf.validate.DurationRules.LessThanCase} - */ -proto.buf.validate.DurationRules.prototype.getLessThanCase = function() { - return /** @type {proto.buf.validate.DurationRules.LessThanCase} */(jspb.Message.computeOneofCase(this, proto.buf.validate.DurationRules.oneofGroups_[0])); -}; - -/** - * @enum {number} - */ -proto.buf.validate.DurationRules.GreaterThanCase = { - GREATER_THAN_NOT_SET: 0, - GT: 5, - GTE: 6 -}; - -/** - * @return {proto.buf.validate.DurationRules.GreaterThanCase} - */ -proto.buf.validate.DurationRules.prototype.getGreaterThanCase = function() { - return /** @type {proto.buf.validate.DurationRules.GreaterThanCase} */(jspb.Message.computeOneofCase(this, proto.buf.validate.DurationRules.oneofGroups_[1])); -}; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.buf.validate.DurationRules.prototype.toObject = function(opt_includeInstance) { - return proto.buf.validate.DurationRules.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.buf.validate.DurationRules} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.buf.validate.DurationRules.toObject = function(includeInstance, msg) { - var f, obj = { - pb_const: (f = msg.getConst()) && google_protobuf_duration_pb.Duration.toObject(includeInstance, f), - lt: (f = msg.getLt()) && google_protobuf_duration_pb.Duration.toObject(includeInstance, f), - lte: (f = msg.getLte()) && google_protobuf_duration_pb.Duration.toObject(includeInstance, f), - gt: (f = msg.getGt()) && google_protobuf_duration_pb.Duration.toObject(includeInstance, f), - gte: (f = msg.getGte()) && google_protobuf_duration_pb.Duration.toObject(includeInstance, f), - inList: jspb.Message.toObjectList(msg.getInList(), - google_protobuf_duration_pb.Duration.toObject, includeInstance), - notInList: jspb.Message.toObjectList(msg.getNotInList(), - google_protobuf_duration_pb.Duration.toObject, includeInstance) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.buf.validate.DurationRules} - */ -proto.buf.validate.DurationRules.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.buf.validate.DurationRules; - return proto.buf.validate.DurationRules.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.buf.validate.DurationRules} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.buf.validate.DurationRules} - */ -proto.buf.validate.DurationRules.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; + internalBinaryRead(reader, length, options, target) { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* optional google.protobuf.Timestamp const */ 2: + message.const = timestamp_pb_1.Timestamp.internalBinaryRead(reader, reader.uint32(), options, message.const); + break; + case /* google.protobuf.Timestamp lt */ 3: + message.less_than = { + oneofKind: "lt", + lt: timestamp_pb_1.Timestamp.internalBinaryRead(reader, reader.uint32(), options, message.less_than.lt) + }; + break; + case /* google.protobuf.Timestamp lte */ 4: + message.less_than = { + oneofKind: "lte", + lte: timestamp_pb_1.Timestamp.internalBinaryRead(reader, reader.uint32(), options, message.less_than.lte) + }; + break; + case /* bool lt_now */ 7: + message.less_than = { + oneofKind: "lt_now", + lt_now: reader.bool() + }; + break; + case /* google.protobuf.Timestamp gt */ 5: + message.greater_than = { + oneofKind: "gt", + gt: timestamp_pb_1.Timestamp.internalBinaryRead(reader, reader.uint32(), options, message.greater_than.gt) + }; + break; + case /* google.protobuf.Timestamp gte */ 6: + message.greater_than = { + oneofKind: "gte", + gte: timestamp_pb_1.Timestamp.internalBinaryRead(reader, reader.uint32(), options, message.greater_than.gte) + }; + break; + case /* bool gt_now */ 8: + message.greater_than = { + oneofKind: "gt_now", + gt_now: reader.bool() + }; + break; + case /* optional google.protobuf.Duration within */ 9: + message.within = duration_pb_1.Duration.internalBinaryRead(reader, reader.uint32(), options, message.within); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? runtime_2.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; } - var field = reader.getFieldNumber(); - switch (field) { - case 2: - var value = new google_protobuf_duration_pb.Duration; - reader.readMessage(value,google_protobuf_duration_pb.Duration.deserializeBinaryFromReader); - msg.setConst(value); - break; - case 3: - var value = new google_protobuf_duration_pb.Duration; - reader.readMessage(value,google_protobuf_duration_pb.Duration.deserializeBinaryFromReader); - msg.setLt(value); - break; - case 4: - var value = new google_protobuf_duration_pb.Duration; - reader.readMessage(value,google_protobuf_duration_pb.Duration.deserializeBinaryFromReader); - msg.setLte(value); - break; - case 5: - var value = new google_protobuf_duration_pb.Duration; - reader.readMessage(value,google_protobuf_duration_pb.Duration.deserializeBinaryFromReader); - msg.setGt(value); - break; - case 6: - var value = new google_protobuf_duration_pb.Duration; - reader.readMessage(value,google_protobuf_duration_pb.Duration.deserializeBinaryFromReader); - msg.setGte(value); - break; - case 7: - var value = new google_protobuf_duration_pb.Duration; - reader.readMessage(value,google_protobuf_duration_pb.Duration.deserializeBinaryFromReader); - msg.addIn(value); - break; - case 8: - var value = new google_protobuf_duration_pb.Duration; - reader.readMessage(value,google_protobuf_duration_pb.Duration.deserializeBinaryFromReader); - msg.addNotIn(value); - break; - default: - reader.skipField(); - break; + internalBinaryWrite(message, writer, options) { + /* optional google.protobuf.Timestamp const = 2; */ + if (message.const) + timestamp_pb_1.Timestamp.internalBinaryWrite(message.const, writer.tag(2, runtime_1.WireType.LengthDelimited).fork(), options).join(); + /* google.protobuf.Timestamp lt = 3; */ + if (message.less_than.oneofKind === "lt") + timestamp_pb_1.Timestamp.internalBinaryWrite(message.less_than.lt, writer.tag(3, runtime_1.WireType.LengthDelimited).fork(), options).join(); + /* google.protobuf.Timestamp lte = 4; */ + if (message.less_than.oneofKind === "lte") + timestamp_pb_1.Timestamp.internalBinaryWrite(message.less_than.lte, writer.tag(4, runtime_1.WireType.LengthDelimited).fork(), options).join(); + /* bool lt_now = 7; */ + if (message.less_than.oneofKind === "lt_now") + writer.tag(7, runtime_1.WireType.Varint).bool(message.less_than.lt_now); + /* google.protobuf.Timestamp gt = 5; */ + if (message.greater_than.oneofKind === "gt") + timestamp_pb_1.Timestamp.internalBinaryWrite(message.greater_than.gt, writer.tag(5, runtime_1.WireType.LengthDelimited).fork(), options).join(); + /* google.protobuf.Timestamp gte = 6; */ + if (message.greater_than.oneofKind === "gte") + timestamp_pb_1.Timestamp.internalBinaryWrite(message.greater_than.gte, writer.tag(6, runtime_1.WireType.LengthDelimited).fork(), options).join(); + /* bool gt_now = 8; */ + if (message.greater_than.oneofKind === "gt_now") + writer.tag(8, runtime_1.WireType.Varint).bool(message.greater_than.gt_now); + /* optional google.protobuf.Duration within = 9; */ + if (message.within) + duration_pb_1.Duration.internalBinaryWrite(message.within, writer.tag(9, runtime_1.WireType.LengthDelimited).fork(), options).join(); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.buf.validate.DurationRules.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.buf.validate.DurationRules.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.buf.validate.DurationRules} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.buf.validate.DurationRules.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getConst(); - if (f != null) { - writer.writeMessage( - 2, - f, - google_protobuf_duration_pb.Duration.serializeBinaryToWriter - ); - } - f = message.getLt(); - if (f != null) { - writer.writeMessage( - 3, - f, - google_protobuf_duration_pb.Duration.serializeBinaryToWriter - ); - } - f = message.getLte(); - if (f != null) { - writer.writeMessage( - 4, - f, - google_protobuf_duration_pb.Duration.serializeBinaryToWriter - ); - } - f = message.getGt(); - if (f != null) { - writer.writeMessage( - 5, - f, - google_protobuf_duration_pb.Duration.serializeBinaryToWriter - ); - } - f = message.getGte(); - if (f != null) { - writer.writeMessage( - 6, - f, - google_protobuf_duration_pb.Duration.serializeBinaryToWriter - ); - } - f = message.getInList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 7, - f, - google_protobuf_duration_pb.Duration.serializeBinaryToWriter - ); - } - f = message.getNotInList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 8, - f, - google_protobuf_duration_pb.Duration.serializeBinaryToWriter - ); - } -}; - - -/** - * optional google.protobuf.Duration const = 2; - * @return {?proto.google.protobuf.Duration} - */ -proto.buf.validate.DurationRules.prototype.getConst = function() { - return /** @type{?proto.google.protobuf.Duration} */ ( - jspb.Message.getWrapperField(this, google_protobuf_duration_pb.Duration, 2)); -}; - - -/** - * @param {?proto.google.protobuf.Duration|undefined} value - * @return {!proto.buf.validate.DurationRules} returns this -*/ -proto.buf.validate.DurationRules.prototype.setConst = function(value) { - return jspb.Message.setWrapperField(this, 2, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.buf.validate.DurationRules} returns this - */ -proto.buf.validate.DurationRules.prototype.clearConst = function() { - return this.setConst(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.buf.validate.DurationRules.prototype.hasConst = function() { - return jspb.Message.getField(this, 2) != null; -}; - - -/** - * optional google.protobuf.Duration lt = 3; - * @return {?proto.google.protobuf.Duration} - */ -proto.buf.validate.DurationRules.prototype.getLt = function() { - return /** @type{?proto.google.protobuf.Duration} */ ( - jspb.Message.getWrapperField(this, google_protobuf_duration_pb.Duration, 3)); -}; - - -/** - * @param {?proto.google.protobuf.Duration|undefined} value - * @return {!proto.buf.validate.DurationRules} returns this -*/ -proto.buf.validate.DurationRules.prototype.setLt = function(value) { - return jspb.Message.setOneofWrapperField(this, 3, proto.buf.validate.DurationRules.oneofGroups_[0], value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.buf.validate.DurationRules} returns this - */ -proto.buf.validate.DurationRules.prototype.clearLt = function() { - return this.setLt(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.buf.validate.DurationRules.prototype.hasLt = function() { - return jspb.Message.getField(this, 3) != null; -}; - - -/** - * optional google.protobuf.Duration lte = 4; - * @return {?proto.google.protobuf.Duration} - */ -proto.buf.validate.DurationRules.prototype.getLte = function() { - return /** @type{?proto.google.protobuf.Duration} */ ( - jspb.Message.getWrapperField(this, google_protobuf_duration_pb.Duration, 4)); -}; - - -/** - * @param {?proto.google.protobuf.Duration|undefined} value - * @return {!proto.buf.validate.DurationRules} returns this -*/ -proto.buf.validate.DurationRules.prototype.setLte = function(value) { - return jspb.Message.setOneofWrapperField(this, 4, proto.buf.validate.DurationRules.oneofGroups_[0], value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.buf.validate.DurationRules} returns this - */ -proto.buf.validate.DurationRules.prototype.clearLte = function() { - return this.setLte(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.buf.validate.DurationRules.prototype.hasLte = function() { - return jspb.Message.getField(this, 4) != null; -}; - - -/** - * optional google.protobuf.Duration gt = 5; - * @return {?proto.google.protobuf.Duration} - */ -proto.buf.validate.DurationRules.prototype.getGt = function() { - return /** @type{?proto.google.protobuf.Duration} */ ( - jspb.Message.getWrapperField(this, google_protobuf_duration_pb.Duration, 5)); -}; - - -/** - * @param {?proto.google.protobuf.Duration|undefined} value - * @return {!proto.buf.validate.DurationRules} returns this -*/ -proto.buf.validate.DurationRules.prototype.setGt = function(value) { - return jspb.Message.setOneofWrapperField(this, 5, proto.buf.validate.DurationRules.oneofGroups_[1], value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.buf.validate.DurationRules} returns this - */ -proto.buf.validate.DurationRules.prototype.clearGt = function() { - return this.setGt(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.buf.validate.DurationRules.prototype.hasGt = function() { - return jspb.Message.getField(this, 5) != null; -}; - - -/** - * optional google.protobuf.Duration gte = 6; - * @return {?proto.google.protobuf.Duration} - */ -proto.buf.validate.DurationRules.prototype.getGte = function() { - return /** @type{?proto.google.protobuf.Duration} */ ( - jspb.Message.getWrapperField(this, google_protobuf_duration_pb.Duration, 6)); -}; - - -/** - * @param {?proto.google.protobuf.Duration|undefined} value - * @return {!proto.buf.validate.DurationRules} returns this -*/ -proto.buf.validate.DurationRules.prototype.setGte = function(value) { - return jspb.Message.setOneofWrapperField(this, 6, proto.buf.validate.DurationRules.oneofGroups_[1], value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.buf.validate.DurationRules} returns this - */ -proto.buf.validate.DurationRules.prototype.clearGte = function() { - return this.setGte(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.buf.validate.DurationRules.prototype.hasGte = function() { - return jspb.Message.getField(this, 6) != null; -}; - - -/** - * repeated google.protobuf.Duration in = 7; - * @return {!Array} - */ -proto.buf.validate.DurationRules.prototype.getInList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, google_protobuf_duration_pb.Duration, 7)); -}; - - -/** - * @param {!Array} value - * @return {!proto.buf.validate.DurationRules} returns this -*/ -proto.buf.validate.DurationRules.prototype.setInList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 7, value); -}; - - -/** - * @param {!proto.google.protobuf.Duration=} opt_value - * @param {number=} opt_index - * @return {!proto.google.protobuf.Duration} - */ -proto.buf.validate.DurationRules.prototype.addIn = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 7, opt_value, proto.google.protobuf.Duration, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.buf.validate.DurationRules} returns this - */ -proto.buf.validate.DurationRules.prototype.clearInList = function() { - return this.setInList([]); -}; - - -/** - * repeated google.protobuf.Duration not_in = 8; - * @return {!Array} - */ -proto.buf.validate.DurationRules.prototype.getNotInList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, google_protobuf_duration_pb.Duration, 8)); -}; - - -/** - * @param {!Array} value - * @return {!proto.buf.validate.DurationRules} returns this -*/ -proto.buf.validate.DurationRules.prototype.setNotInList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 8, value); -}; - - -/** - * @param {!proto.google.protobuf.Duration=} opt_value - * @param {number=} opt_index - * @return {!proto.google.protobuf.Duration} - */ -proto.buf.validate.DurationRules.prototype.addNotIn = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 8, opt_value, proto.google.protobuf.Duration, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.buf.validate.DurationRules} returns this - */ -proto.buf.validate.DurationRules.prototype.clearNotInList = function() { - return this.setNotInList([]); -}; - - - -/** - * Oneof group definitions for this message. Each group defines the field - * numbers belonging to that group. When of these fields' value is set, all - * other fields in the group are cleared. During deserialization, if multiple - * fields are encountered for a group, only the last value seen will be kept. - * @private {!Array>} - * @const - */ -proto.buf.validate.TimestampRules.oneofGroups_ = [[3,4,7],[5,6,8]]; - -/** - * @enum {number} - */ -proto.buf.validate.TimestampRules.LessThanCase = { - LESS_THAN_NOT_SET: 0, - LT: 3, - LTE: 4, - LT_NOW: 7 -}; - -/** - * @return {proto.buf.validate.TimestampRules.LessThanCase} - */ -proto.buf.validate.TimestampRules.prototype.getLessThanCase = function() { - return /** @type {proto.buf.validate.TimestampRules.LessThanCase} */(jspb.Message.computeOneofCase(this, proto.buf.validate.TimestampRules.oneofGroups_[0])); -}; - -/** - * @enum {number} - */ -proto.buf.validate.TimestampRules.GreaterThanCase = { - GREATER_THAN_NOT_SET: 0, - GT: 5, - GTE: 6, - GT_NOW: 8 -}; - -/** - * @return {proto.buf.validate.TimestampRules.GreaterThanCase} - */ -proto.buf.validate.TimestampRules.prototype.getGreaterThanCase = function() { - return /** @type {proto.buf.validate.TimestampRules.GreaterThanCase} */(jspb.Message.computeOneofCase(this, proto.buf.validate.TimestampRules.oneofGroups_[1])); -}; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.buf.validate.TimestampRules.prototype.toObject = function(opt_includeInstance) { - return proto.buf.validate.TimestampRules.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.buf.validate.TimestampRules} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.buf.validate.TimestampRules.toObject = function(includeInstance, msg) { - var f, obj = { - pb_const: (f = msg.getConst()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f), - lt: (f = msg.getLt()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f), - lte: (f = msg.getLte()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f), - ltNow: jspb.Message.getBooleanFieldWithDefault(msg, 7, false), - gt: (f = msg.getGt()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f), - gte: (f = msg.getGte()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f), - gtNow: jspb.Message.getBooleanFieldWithDefault(msg, 8, false), - within: (f = msg.getWithin()) && google_protobuf_duration_pb.Duration.toObject(includeInstance, f) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; } - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.buf.validate.TimestampRules} - */ -proto.buf.validate.TimestampRules.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.buf.validate.TimestampRules; - return proto.buf.validate.TimestampRules.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.buf.validate.TimestampRules} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.buf.validate.TimestampRules} - */ -proto.buf.validate.TimestampRules.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 2: - var value = new google_protobuf_timestamp_pb.Timestamp; - reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); - msg.setConst(value); - break; - case 3: - var value = new google_protobuf_timestamp_pb.Timestamp; - reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); - msg.setLt(value); - break; - case 4: - var value = new google_protobuf_timestamp_pb.Timestamp; - reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); - msg.setLte(value); - break; - case 7: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setLtNow(value); - break; - case 5: - var value = new google_protobuf_timestamp_pb.Timestamp; - reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); - msg.setGt(value); - break; - case 6: - var value = new google_protobuf_timestamp_pb.Timestamp; - reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); - msg.setGte(value); - break; - case 8: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setGtNow(value); - break; - case 9: - var value = new google_protobuf_duration_pb.Duration; - reader.readMessage(value,google_protobuf_duration_pb.Duration.deserializeBinaryFromReader); - msg.setWithin(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.buf.validate.TimestampRules.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.buf.validate.TimestampRules.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.buf.validate.TimestampRules} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.buf.validate.TimestampRules.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getConst(); - if (f != null) { - writer.writeMessage( - 2, - f, - google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter - ); - } - f = message.getLt(); - if (f != null) { - writer.writeMessage( - 3, - f, - google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter - ); - } - f = message.getLte(); - if (f != null) { - writer.writeMessage( - 4, - f, - google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter - ); - } - f = /** @type {boolean} */ (jspb.Message.getField(message, 7)); - if (f != null) { - writer.writeBool( - 7, - f - ); - } - f = message.getGt(); - if (f != null) { - writer.writeMessage( - 5, - f, - google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter - ); - } - f = message.getGte(); - if (f != null) { - writer.writeMessage( - 6, - f, - google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter - ); - } - f = /** @type {boolean} */ (jspb.Message.getField(message, 8)); - if (f != null) { - writer.writeBool( - 8, - f - ); - } - f = message.getWithin(); - if (f != null) { - writer.writeMessage( - 9, - f, - google_protobuf_duration_pb.Duration.serializeBinaryToWriter - ); - } -}; - - -/** - * optional google.protobuf.Timestamp const = 2; - * @return {?proto.google.protobuf.Timestamp} - */ -proto.buf.validate.TimestampRules.prototype.getConst = function() { - return /** @type{?proto.google.protobuf.Timestamp} */ ( - jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 2)); -}; - - -/** - * @param {?proto.google.protobuf.Timestamp|undefined} value - * @return {!proto.buf.validate.TimestampRules} returns this -*/ -proto.buf.validate.TimestampRules.prototype.setConst = function(value) { - return jspb.Message.setWrapperField(this, 2, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.buf.validate.TimestampRules} returns this - */ -proto.buf.validate.TimestampRules.prototype.clearConst = function() { - return this.setConst(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.buf.validate.TimestampRules.prototype.hasConst = function() { - return jspb.Message.getField(this, 2) != null; -}; - - -/** - * optional google.protobuf.Timestamp lt = 3; - * @return {?proto.google.protobuf.Timestamp} - */ -proto.buf.validate.TimestampRules.prototype.getLt = function() { - return /** @type{?proto.google.protobuf.Timestamp} */ ( - jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 3)); -}; - - -/** - * @param {?proto.google.protobuf.Timestamp|undefined} value - * @return {!proto.buf.validate.TimestampRules} returns this -*/ -proto.buf.validate.TimestampRules.prototype.setLt = function(value) { - return jspb.Message.setOneofWrapperField(this, 3, proto.buf.validate.TimestampRules.oneofGroups_[0], value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.buf.validate.TimestampRules} returns this - */ -proto.buf.validate.TimestampRules.prototype.clearLt = function() { - return this.setLt(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.buf.validate.TimestampRules.prototype.hasLt = function() { - return jspb.Message.getField(this, 3) != null; -}; - - -/** - * optional google.protobuf.Timestamp lte = 4; - * @return {?proto.google.protobuf.Timestamp} - */ -proto.buf.validate.TimestampRules.prototype.getLte = function() { - return /** @type{?proto.google.protobuf.Timestamp} */ ( - jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 4)); -}; - - -/** - * @param {?proto.google.protobuf.Timestamp|undefined} value - * @return {!proto.buf.validate.TimestampRules} returns this -*/ -proto.buf.validate.TimestampRules.prototype.setLte = function(value) { - return jspb.Message.setOneofWrapperField(this, 4, proto.buf.validate.TimestampRules.oneofGroups_[0], value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.buf.validate.TimestampRules} returns this - */ -proto.buf.validate.TimestampRules.prototype.clearLte = function() { - return this.setLte(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.buf.validate.TimestampRules.prototype.hasLte = function() { - return jspb.Message.getField(this, 4) != null; -}; - - -/** - * optional bool lt_now = 7; - * @return {boolean} - */ -proto.buf.validate.TimestampRules.prototype.getLtNow = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 7, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.buf.validate.TimestampRules} returns this - */ -proto.buf.validate.TimestampRules.prototype.setLtNow = function(value) { - return jspb.Message.setOneofField(this, 7, proto.buf.validate.TimestampRules.oneofGroups_[0], value); -}; - - -/** - * Clears the field making it undefined. - * @return {!proto.buf.validate.TimestampRules} returns this - */ -proto.buf.validate.TimestampRules.prototype.clearLtNow = function() { - return jspb.Message.setOneofField(this, 7, proto.buf.validate.TimestampRules.oneofGroups_[0], undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.buf.validate.TimestampRules.prototype.hasLtNow = function() { - return jspb.Message.getField(this, 7) != null; -}; - - -/** - * optional google.protobuf.Timestamp gt = 5; - * @return {?proto.google.protobuf.Timestamp} - */ -proto.buf.validate.TimestampRules.prototype.getGt = function() { - return /** @type{?proto.google.protobuf.Timestamp} */ ( - jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 5)); -}; - - -/** - * @param {?proto.google.protobuf.Timestamp|undefined} value - * @return {!proto.buf.validate.TimestampRules} returns this -*/ -proto.buf.validate.TimestampRules.prototype.setGt = function(value) { - return jspb.Message.setOneofWrapperField(this, 5, proto.buf.validate.TimestampRules.oneofGroups_[1], value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.buf.validate.TimestampRules} returns this - */ -proto.buf.validate.TimestampRules.prototype.clearGt = function() { - return this.setGt(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.buf.validate.TimestampRules.prototype.hasGt = function() { - return jspb.Message.getField(this, 5) != null; -}; - - -/** - * optional google.protobuf.Timestamp gte = 6; - * @return {?proto.google.protobuf.Timestamp} - */ -proto.buf.validate.TimestampRules.prototype.getGte = function() { - return /** @type{?proto.google.protobuf.Timestamp} */ ( - jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 6)); -}; - - -/** - * @param {?proto.google.protobuf.Timestamp|undefined} value - * @return {!proto.buf.validate.TimestampRules} returns this -*/ -proto.buf.validate.TimestampRules.prototype.setGte = function(value) { - return jspb.Message.setOneofWrapperField(this, 6, proto.buf.validate.TimestampRules.oneofGroups_[1], value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.buf.validate.TimestampRules} returns this - */ -proto.buf.validate.TimestampRules.prototype.clearGte = function() { - return this.setGte(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.buf.validate.TimestampRules.prototype.hasGte = function() { - return jspb.Message.getField(this, 6) != null; -}; - - -/** - * optional bool gt_now = 8; - * @return {boolean} - */ -proto.buf.validate.TimestampRules.prototype.getGtNow = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 8, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.buf.validate.TimestampRules} returns this - */ -proto.buf.validate.TimestampRules.prototype.setGtNow = function(value) { - return jspb.Message.setOneofField(this, 8, proto.buf.validate.TimestampRules.oneofGroups_[1], value); -}; - - -/** - * Clears the field making it undefined. - * @return {!proto.buf.validate.TimestampRules} returns this - */ -proto.buf.validate.TimestampRules.prototype.clearGtNow = function() { - return jspb.Message.setOneofField(this, 8, proto.buf.validate.TimestampRules.oneofGroups_[1], undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.buf.validate.TimestampRules.prototype.hasGtNow = function() { - return jspb.Message.getField(this, 8) != null; -}; - - -/** - * optional google.protobuf.Duration within = 9; - * @return {?proto.google.protobuf.Duration} - */ -proto.buf.validate.TimestampRules.prototype.getWithin = function() { - return /** @type{?proto.google.protobuf.Duration} */ ( - jspb.Message.getWrapperField(this, google_protobuf_duration_pb.Duration, 9)); -}; - - -/** - * @param {?proto.google.protobuf.Duration|undefined} value - * @return {!proto.buf.validate.TimestampRules} returns this -*/ -proto.buf.validate.TimestampRules.prototype.setWithin = function(value) { - return jspb.Message.setWrapperField(this, 9, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.buf.validate.TimestampRules} returns this - */ -proto.buf.validate.TimestampRules.prototype.clearWithin = function() { - return this.setWithin(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.buf.validate.TimestampRules.prototype.hasWithin = function() { - return jspb.Message.getField(this, 9) != null; -}; - - -/** - * @enum {number} - */ -proto.buf.validate.KnownRegex = { - KNOWN_REGEX_UNSPECIFIED: 0, - KNOWN_REGEX_HTTP_HEADER_NAME: 1, - KNOWN_REGEX_HTTP_HEADER_VALUE: 2 -}; - - -/** - * A tuple of {field number, class constructor} for the extension - * field named `message`. - * @type {!jspb.ExtensionFieldInfo} - */ -proto.buf.validate.message = new jspb.ExtensionFieldInfo( - 1159, - {message: 0}, - proto.buf.validate.MessageConstraints, - /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( - proto.buf.validate.MessageConstraints.toObject), - 0); - -google_protobuf_descriptor_pb.MessageOptions.extensionsBinary[1159] = new jspb.ExtensionFieldBinaryInfo( - proto.buf.validate.message, - jspb.BinaryReader.prototype.readMessage, - jspb.BinaryWriter.prototype.writeMessage, - proto.buf.validate.MessageConstraints.serializeBinaryToWriter, - proto.buf.validate.MessageConstraints.deserializeBinaryFromReader, - false); -// This registers the extension field with the extended class, so that -// toObject() will function correctly. -google_protobuf_descriptor_pb.MessageOptions.extensions[1159] = proto.buf.validate.message; - - -/** - * A tuple of {field number, class constructor} for the extension - * field named `oneof`. - * @type {!jspb.ExtensionFieldInfo} - */ -proto.buf.validate.oneof = new jspb.ExtensionFieldInfo( - 1159, - {oneof: 0}, - proto.buf.validate.OneofConstraints, - /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( - proto.buf.validate.OneofConstraints.toObject), - 0); - -google_protobuf_descriptor_pb.OneofOptions.extensionsBinary[1159] = new jspb.ExtensionFieldBinaryInfo( - proto.buf.validate.oneof, - jspb.BinaryReader.prototype.readMessage, - jspb.BinaryWriter.prototype.writeMessage, - proto.buf.validate.OneofConstraints.serializeBinaryToWriter, - proto.buf.validate.OneofConstraints.deserializeBinaryFromReader, - false); -// This registers the extension field with the extended class, so that -// toObject() will function correctly. -google_protobuf_descriptor_pb.OneofOptions.extensions[1159] = proto.buf.validate.oneof; - - /** - * A tuple of {field number, class constructor} for the extension - * field named `field`. - * @type {!jspb.ExtensionFieldInfo} + * @generated MessageType for protobuf message buf.validate.TimestampRules */ -proto.buf.validate.field = new jspb.ExtensionFieldInfo( - 1159, - {field: 0}, - proto.buf.validate.FieldConstraints, - /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( - proto.buf.validate.FieldConstraints.toObject), - 0); - -google_protobuf_descriptor_pb.FieldOptions.extensionsBinary[1159] = new jspb.ExtensionFieldBinaryInfo( - proto.buf.validate.field, - jspb.BinaryReader.prototype.readMessage, - jspb.BinaryWriter.prototype.writeMessage, - proto.buf.validate.FieldConstraints.serializeBinaryToWriter, - proto.buf.validate.FieldConstraints.deserializeBinaryFromReader, - false); -// This registers the extension field with the extended class, so that -// toObject() will function correctly. -google_protobuf_descriptor_pb.FieldOptions.extensions[1159] = proto.buf.validate.field; - -goog.object.extend(exports, proto.buf.validate); +exports.TimestampRules = new TimestampRules$Type(); diff --git a/src/buf/validate/validate_pb.ts b/src/buf/validate/validate_pb.ts deleted file mode 100644 index 0168694..0000000 --- a/src/buf/validate/validate_pb.ts +++ /dev/null @@ -1,6305 +0,0 @@ -// @generated by protobuf-ts 2.9.3 with parameter add_pb_suffix,client_grpc1,generate_dependencies,keep_enum_prefix,ts_nocheck,use_proto_field_name -// @generated from protobuf file "buf/validate/validate.proto" (package "buf.validate", syntax proto3) -// tslint:disable -// @ts-nocheck -// -// Copyright 2023 Buf Technologies, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -import type { BinaryWriteOptions } from "@protobuf-ts/runtime"; -import type { IBinaryWriter } from "@protobuf-ts/runtime"; -import { WireType } from "@protobuf-ts/runtime"; -import type { BinaryReadOptions } from "@protobuf-ts/runtime"; -import type { IBinaryReader } from "@protobuf-ts/runtime"; -import { UnknownFieldHandler } from "@protobuf-ts/runtime"; -import type { PartialMessage } from "@protobuf-ts/runtime"; -import { reflectionMergePartial } from "@protobuf-ts/runtime"; -import { MessageType } from "@protobuf-ts/runtime"; -import { Timestamp } from "../../google/protobuf/timestamp_pb"; -import { Duration } from "../../google/protobuf/duration_pb"; -import { Constraint } from "./expression_pb"; -/** - * MessageConstraints represents validation rules that are applied to the entire message. - * It includes disabling options and a list of Constraint messages representing Common Expression Language (CEL) validation rules. - * - * @generated from protobuf message buf.validate.MessageConstraints - */ -export interface MessageConstraints { - /** - * `disabled` is a boolean flag that, when set to true, nullifies any validation rules for this message. - * This includes any fields within the message that would otherwise support validation. - * - * ```proto - * message MyMessage { - * // validation will be bypassed for this message - * option (buf.validate.message).disabled = true; - * } - * ``` - * - * @generated from protobuf field: optional bool disabled = 1; - */ - disabled?: boolean; - /** - * `cel` is a repeated field of type Constraint. Each Constraint specifies a validation rule to be applied to this message. - * These constraints are written in Common Expression Language (CEL) syntax. For more information on - * CEL, [see our documentation](https://github.com/bufbuild/protovalidate/blob/main/docs/cel.md). - * - * - * ```proto - * message MyMessage { - * // The field `foo` must be greater than 42. - * option (buf.validate.message).cel = { - * id: "my_message.value", - * message: "value must be greater than 42", - * expression: "this.foo > 42", - * }; - * optional int32 foo = 1; - * } - * ``` - * - * @generated from protobuf field: repeated buf.validate.Constraint cel = 3; - */ - cel: Constraint[]; -} -/** - * The `OneofConstraints` message type enables you to manage constraints for - * oneof fields in your protobuf messages. - * - * @generated from protobuf message buf.validate.OneofConstraints - */ -export interface OneofConstraints { - /** - * If `required` is true, exactly one field of the oneof must be present. A - * validation error is returned if no fields in the oneof are present. The - * field itself may still be a default value; further constraints - * should be placed on the fields themselves to ensure they are valid values, - * such as `min_len` or `gt`. - * - * ```proto - * message MyMessage { - * oneof value { - * // Either `a` or `b` must be set. If `a` is set, it must also be - * // non-empty; whereas if `b` is set, it can still be an empty string. - * option (buf.validate.oneof).required = true; - * string a = 1 [(buf.validate.field).string.min_len = 1]; - * string b = 2; - * } - * } - * ``` - * - * @generated from protobuf field: optional bool required = 1; - */ - required?: boolean; -} -/** - * FieldRules encapsulates the rules for each type of field. Depending on the - * field, the correct set should be used to ensure proper validations. - * - * @generated from protobuf message buf.validate.FieldConstraints - */ -export interface FieldConstraints { - /** - * `cel` is a repeated field used to represent a textual expression - * in the Common Expression Language (CEL) syntax. For more information on - * CEL, [see our documentation](https://github.com/bufbuild/protovalidate/blob/main/docs/cel.md). - * - * ```proto - * message MyMessage { - * // The field `value` must be greater than 42. - * optional int32 value = 1 [(buf.validate.field).cel = { - * id: "my_message.value", - * message: "value must be greater than 42", - * expression: "this > 42", - * }]; - * } - * ``` - * - * @generated from protobuf field: repeated buf.validate.Constraint cel = 23; - */ - cel: Constraint[]; - /** - * `skipped` is an optional boolean attribute that specifies that the - * validation rules of this field should not be evaluated. If skipped is set to - * true, any validation rules set for the field will be ignored. - * - * ```proto - * message MyMessage { - * // The field `value` must not be set. - * optional MyOtherMessage value = 1 [(buf.validate.field).skipped = true]; - * } - * ``` - * - * @generated from protobuf field: bool skipped = 24; - */ - skipped: boolean; - /** - * If `required` is true, the field must be populated. Field presence can be - * described as "serialized in the wire format," which follows the following rules: - * - * - the following "nullable" fields must be explicitly set to be considered present: - * - singular message fields (may be their empty value) - * - member fields of a oneof (may be their default value) - * - proto3 optional fields (may be their default value) - * - proto2 scalar fields - * - proto3 scalar fields must be non-zero to be considered present - * - repeated and map fields must be non-empty to be considered present - * - * ```proto - * message MyMessage { - * // The field `value` must be set to a non-null value. - * optional MyOtherMessage value = 1 [(buf.validate.field).required = true]; - * } - * ``` - * - * @generated from protobuf field: bool required = 25; - */ - required: boolean; - /** - * If `ignore_empty` is true and applied to a non-nullable field (see - * `required` for more details), validation is skipped on the field if it is - * the default or empty value. Adding `ignore_empty` to a "nullable" field is - * a noop as these unset fields already skip validation (with the exception - * of `required`). - * - * ```proto - * message MyRepeated { - * // The field `value` min_len rule is only applied if the field isn't empty. - * repeated string value = 1 [ - * (buf.validate.field).ignore_empty = true, - * (buf.validate.field).min_len = 5 - * ]; - * } - * ``` - * - * @generated from protobuf field: bool ignore_empty = 26; - */ - ignore_empty: boolean; - /** - * @generated from protobuf oneof: type - */ - type: { - oneofKind: "float"; - /** - * Scalar Field Types - * - * @generated from protobuf field: buf.validate.FloatRules float = 1; - */ - float: FloatRules; - } | { - oneofKind: "double"; - /** - * @generated from protobuf field: buf.validate.DoubleRules double = 2; - */ - double: DoubleRules; - } | { - oneofKind: "int32"; - /** - * @generated from protobuf field: buf.validate.Int32Rules int32 = 3; - */ - int32: Int32Rules; - } | { - oneofKind: "int64"; - /** - * @generated from protobuf field: buf.validate.Int64Rules int64 = 4; - */ - int64: Int64Rules; - } | { - oneofKind: "uint32"; - /** - * @generated from protobuf field: buf.validate.UInt32Rules uint32 = 5; - */ - uint32: UInt32Rules; - } | { - oneofKind: "uint64"; - /** - * @generated from protobuf field: buf.validate.UInt64Rules uint64 = 6; - */ - uint64: UInt64Rules; - } | { - oneofKind: "sint32"; - /** - * @generated from protobuf field: buf.validate.SInt32Rules sint32 = 7; - */ - sint32: SInt32Rules; - } | { - oneofKind: "sint64"; - /** - * @generated from protobuf field: buf.validate.SInt64Rules sint64 = 8; - */ - sint64: SInt64Rules; - } | { - oneofKind: "fixed32"; - /** - * @generated from protobuf field: buf.validate.Fixed32Rules fixed32 = 9; - */ - fixed32: Fixed32Rules; - } | { - oneofKind: "fixed64"; - /** - * @generated from protobuf field: buf.validate.Fixed64Rules fixed64 = 10; - */ - fixed64: Fixed64Rules; - } | { - oneofKind: "sfixed32"; - /** - * @generated from protobuf field: buf.validate.SFixed32Rules sfixed32 = 11; - */ - sfixed32: SFixed32Rules; - } | { - oneofKind: "sfixed64"; - /** - * @generated from protobuf field: buf.validate.SFixed64Rules sfixed64 = 12; - */ - sfixed64: SFixed64Rules; - } | { - oneofKind: "bool"; - /** - * @generated from protobuf field: buf.validate.BoolRules bool = 13; - */ - bool: BoolRules; - } | { - oneofKind: "string"; - /** - * @generated from protobuf field: buf.validate.StringRules string = 14; - */ - string: StringRules; - } | { - oneofKind: "bytes"; - /** - * @generated from protobuf field: buf.validate.BytesRules bytes = 15; - */ - bytes: BytesRules; - } | { - oneofKind: "enum"; - /** - * Complex Field Types - * - * @generated from protobuf field: buf.validate.EnumRules enum = 16; - */ - enum: EnumRules; - } | { - oneofKind: "repeated"; - /** - * @generated from protobuf field: buf.validate.RepeatedRules repeated = 18; - */ - repeated: RepeatedRules; - } | { - oneofKind: "map"; - /** - * @generated from protobuf field: buf.validate.MapRules map = 19; - */ - map: MapRules; - } | { - oneofKind: "any"; - /** - * Well-Known Field Types - * - * @generated from protobuf field: buf.validate.AnyRules any = 20; - */ - any: AnyRules; - } | { - oneofKind: "duration"; - /** - * @generated from protobuf field: buf.validate.DurationRules duration = 21; - */ - duration: DurationRules; - } | { - oneofKind: "timestamp"; - /** - * @generated from protobuf field: buf.validate.TimestampRules timestamp = 22; - */ - timestamp: TimestampRules; - } | { - oneofKind: undefined; - }; -} -/** - * FloatRules describes the constraints applied to `float` values. These - * rules may also be applied to the `google.protobuf.FloatValue` Well-Known-Type. - * - * @generated from protobuf message buf.validate.FloatRules - */ -export interface FloatRules { - /** - * `const` requires the field value to exactly match the specified value. If - * the field value doesn't match, an error message is generated. - * - * ```proto - * message MyFloat { - * // value must equal 42.0 - * float value = 1 [(buf.validate.field).float.const = 42.0]; - * } - * ``` - * - * @generated from protobuf field: optional float const = 1; - */ - const?: number; - /** - * @generated from protobuf oneof: less_than - */ - less_than: { - oneofKind: "lt"; - /** - * `lt` requires the field value to be less than the specified value (field < - * value). If the field value is equal to or greater than the specified value, - * an error message is generated. - * - * ```proto - * message MyFloat { - * // value must be less than 10.0 - * float value = 1 [(buf.validate.field).float.lt = 10.0]; - * } - * ``` - * - * @generated from protobuf field: float lt = 2; - */ - lt: number; - } | { - oneofKind: "lte"; - /** - * `lte` requires the field value to be less than or equal to the specified - * value (field <= value). If the field value is greater than the specified - * value, an error message is generated. - * - * ```proto - * message MyFloat { - * // value must be less than or equal to 10.0 - * float value = 1 [(buf.validate.field).float.lte = 10.0]; - * } - * ``` - * - * @generated from protobuf field: float lte = 3; - */ - lte: number; - } | { - oneofKind: undefined; - }; - /** - * @generated from protobuf oneof: greater_than - */ - greater_than: { - oneofKind: "gt"; - /** - * `gt` requires the field value to be greater than the specified value - * (exclusive). If the value of `gt` is larger than a specified `lt` or - * `lte`, the range is reversed, and the field value must be outside the - * specified range. If the field value doesn't meet the required conditions, - * an error message is generated. - * - * ```proto - * message MyFloat { - * // value must be greater than 5.0 [float.gt] - * float value = 1 [(buf.validate.field).float.gt = 5.0]; - * - * // value must be greater than 5 and less than 10.0 [float.gt_lt] - * float other_value = 2 [(buf.validate.field).float = { gt: 5.0, lt: 10.0 }]; - * - * // value must be greater than 10 or less than 5.0 [float.gt_lt_exclusive] - * float another_value = 3 [(buf.validate.field).float = { gt: 10.0, lt: 5.0 }]; - * } - * ``` - * - * @generated from protobuf field: float gt = 4; - */ - gt: number; - } | { - oneofKind: "gte"; - /** - * `gte` requires the field value to be greater than or equal to the specified - * value (exclusive). If the value of `gte` is larger than a specified `lt` - * or `lte`, the range is reversed, and the field value must be outside the - * specified range. If the field value doesn't meet the required conditions, - * an error message is generated. - * - * ```proto - * message MyFloat { - * // value must be greater than or equal to 5.0 [float.gte] - * float value = 1 [(buf.validate.field).float.gte = 5.0]; - * - * // value must be greater than or equal to 5.0 and less than 10.0 [float.gte_lt] - * float other_value = 2 [(buf.validate.field).float = { gte: 5.0, lt: 10.0 }]; - * - * // value must be greater than or equal to 10.0 or less than 5.0 [float.gte_lt_exclusive] - * float another_value = 3 [(buf.validate.field).float = { gte: 10.0, lt: 5.0 }]; - * } - * ``` - * - * @generated from protobuf field: float gte = 5; - */ - gte: number; - } | { - oneofKind: undefined; - }; - /** - * `in` requires the field value to be equal to one of the specified values. - * If the field value isn't one of the specified values, an error message - * is generated. - * - * ```proto - * message MyFloat { - * // value must be in list [1.0, 2.0, 3.0] - * repeated float value = 1 (buf.validate.field).float = { in: [1.0, 2.0, 3.0] }; - * } - * ``` - * - * @generated from protobuf field: repeated float in = 6; - */ - in: number[]; - /** - * `in` requires the field value to not be equal to any of the specified - * values. If the field value is one of the specified values, an error - * message is generated. - * - * ```proto - * message MyFloat { - * // value must not be in list [1.0, 2.0, 3.0] - * repeated float value = 1 (buf.validate.field).float = { not_in: [1.0, 2.0, 3.0] }; - * } - * ``` - * - * @generated from protobuf field: repeated float not_in = 7; - */ - not_in: number[]; - /** - * `finite` requires the field value to be finite. If the field value is - * infinite or NaN, an error message is generated. - * - * @generated from protobuf field: bool finite = 8; - */ - finite: boolean; -} -/** - * DoubleRules describes the constraints applied to `double` values. These - * rules may also be applied to the `google.protobuf.DoubleValue` Well-Known-Type. - * - * @generated from protobuf message buf.validate.DoubleRules - */ -export interface DoubleRules { - /** - * `const` requires the field value to exactly match the specified value. If - * the field value doesn't match, an error message is generated. - * - * ```proto - * message MyDouble { - * // value must equal 42.0 - * double value = 1 [(buf.validate.field).double.const = 42.0]; - * } - * ``` - * - * @generated from protobuf field: optional double const = 1; - */ - const?: number; - /** - * @generated from protobuf oneof: less_than - */ - less_than: { - oneofKind: "lt"; - /** - * `lt` requires the field value to be less than the specified value (field < - * value). If the field value is equal to or greater than the specified - * value, an error message is generated. - * - * ```proto - * message MyDouble { - * // value must be less than 10.0 - * double value = 1 [(buf.validate.field).double.lt = 10.0]; - * } - * ``` - * - * @generated from protobuf field: double lt = 2; - */ - lt: number; - } | { - oneofKind: "lte"; - /** - * `lte` requires the field value to be less than or equal to the specified value - * (field <= value). If the field value is greater than the specified value, - * an error message is generated. - * - * ```proto - * message MyDouble { - * // value must be less than or equal to 10.0 - * double value = 1 [(buf.validate.field).double.lte = 10.0]; - * } - * ``` - * - * @generated from protobuf field: double lte = 3; - */ - lte: number; - } | { - oneofKind: undefined; - }; - /** - * @generated from protobuf oneof: greater_than - */ - greater_than: { - oneofKind: "gt"; - /** - * `gt` requires the field value to be greater than the specified value - * (exclusive). If the value of `gt` is larger than a specified `lt` or `lte`, - * the range is reversed, and the field value must be outside the specified - * range. If the field value doesn't meet the required conditions, an error - * message is generated. - * - * ```proto - * message MyDouble { - * // value must be greater than 5.0 [double.gt] - * double value = 1 [(buf.validate.field).double.gt = 5.0]; - * - * // value must be greater than 5 and less than 10.0 [double.gt_lt] - * double other_value = 2 [(buf.validate.field).double = { gt: 5.0, lt: 10.0 }]; - * - * // value must be greater than 10 or less than 5.0 [double.gt_lt_exclusive] - * double another_value = 3 [(buf.validate.field).double = { gt: 10.0, lt: 5.0 }]; - * } - * ``` - * - * @generated from protobuf field: double gt = 4; - */ - gt: number; - } | { - oneofKind: "gte"; - /** - * `gte` requires the field value to be greater than or equal to the specified - * value (exclusive). If the value of `gte` is larger than a specified `lt` or - * `lte`, the range is reversed, and the field value must be outside the - * specified range. If the field value doesn't meet the required conditions, - * an error message is generated. - * - * ```proto - * message MyDouble { - * // value must be greater than or equal to 5.0 [double.gte] - * double value = 1 [(buf.validate.field).double.gte = 5.0]; - * - * // value must be greater than or equal to 5.0 and less than 10.0 [double.gte_lt] - * double other_value = 2 [(buf.validate.field).double = { gte: 5.0, lt: 10.0 }]; - * - * // value must be greater than or equal to 10.0 or less than 5.0 [double.gte_lt_exclusive] - * double another_value = 3 [(buf.validate.field).double = { gte: 10.0, lt: 5.0 }]; - * } - * ``` - * - * @generated from protobuf field: double gte = 5; - */ - gte: number; - } | { - oneofKind: undefined; - }; - /** - * `in` requires the field value to be equal to one of the specified values. - * If the field value isn't one of the specified values, an error message is - * generated. - * - * ```proto - * message MyDouble { - * // value must be in list [1.0, 2.0, 3.0] - * repeated double value = 1 (buf.validate.field).double = { in: [1.0, 2.0, 3.0] }; - * } - * ``` - * - * @generated from protobuf field: repeated double in = 6; - */ - in: number[]; - /** - * `not_in` requires the field value to not be equal to any of the specified - * values. If the field value is one of the specified values, an error - * message is generated. - * - * ```proto - * message MyDouble { - * // value must not be in list [1.0, 2.0, 3.0] - * repeated double value = 1 (buf.validate.field).double = { not_in: [1.0, 2.0, 3.0] }; - * } - * ``` - * - * @generated from protobuf field: repeated double not_in = 7; - */ - not_in: number[]; - /** - * `finite` requires the field value to be finite. If the field value is - * infinite or NaN, an error message is generated. - * - * @generated from protobuf field: bool finite = 8; - */ - finite: boolean; -} -/** - * Int32Rules describes the constraints applied to `int32` values. These - * rules may also be applied to the `google.protobuf.Int32Value` Well-Known-Type. - * - * @generated from protobuf message buf.validate.Int32Rules - */ -export interface Int32Rules { - /** - * `const` requires the field value to exactly match the specified value. If - * the field value doesn't match, an error message is generated. - * - * ```proto - * message MyInt32 { - * // value must equal 42 - * int32 value = 1 [(buf.validate.field).int32.const = 42]; - * } - * ``` - * - * @generated from protobuf field: optional int32 const = 1; - */ - const?: number; - /** - * @generated from protobuf oneof: less_than - */ - less_than: { - oneofKind: "lt"; - /** - * `lt` requires the field value to be less than the specified value (field - * < value). If the field value is equal to or greater than the specified - * value, an error message is generated. - * - * ```proto - * message MyInt32 { - * // value must be less than 10 - * int32 value = 1 [(buf.validate.field).int32.lt = 10]; - * } - * ``` - * - * @generated from protobuf field: int32 lt = 2; - */ - lt: number; - } | { - oneofKind: "lte"; - /** - * `lte` requires the field value to be less than or equal to the specified - * value (field <= value). If the field value is greater than the specified - * value, an error message is generated. - * - * ```proto - * message MyInt32 { - * // value must be less than or equal to 10 - * int32 value = 1 [(buf.validate.field).int32.lte = 10]; - * } - * ``` - * - * @generated from protobuf field: int32 lte = 3; - */ - lte: number; - } | { - oneofKind: undefined; - }; - /** - * @generated from protobuf oneof: greater_than - */ - greater_than: { - oneofKind: "gt"; - /** - * `gt` requires the field value to be greater than the specified value - * (exclusive). If the value of `gt` is larger than a specified `lt` or - * `lte`, the range is reversed, and the field value must be outside the - * specified range. If the field value doesn't meet the required conditions, - * an error message is generated. - * - * ```proto - * message MyInt32 { - * // value must be greater than 5 [int32.gt] - * int32 value = 1 [(buf.validate.field).int32.gt = 5]; - * - * // value must be greater than 5 and less than 10 [int32.gt_lt] - * int32 other_value = 2 [(buf.validate.field).int32 = { gt: 5, lt: 10 }]; - * - * // value must be greater than 10 or less than 5 [int32.gt_lt_exclusive] - * int32 another_value = 3 [(buf.validate.field).int32 = { gt: 10, lt: 5 }]; - * } - * ``` - * - * @generated from protobuf field: int32 gt = 4; - */ - gt: number; - } | { - oneofKind: "gte"; - /** - * `gte` requires the field value to be greater than or equal to the specified value - * (exclusive). If the value of `gte` is larger than a specified `lt` or - * `lte`, the range is reversed, and the field value must be outside the - * specified range. If the field value doesn't meet the required conditions, - * an error message is generated. - * - * ```proto - * message MyInt32 { - * // value must be greater than or equal to 5 [int32.gte] - * int32 value = 1 [(buf.validate.field).int32.gte = 5]; - * - * // value must be greater than or equal to 5 and less than 10 [int32.gte_lt] - * int32 other_value = 2 [(buf.validate.field).int32 = { gte: 5, lt: 10 }]; - * - * // value must be greater than or equal to 10 or less than 5 [int32.gte_lt_exclusive] - * int32 another_value = 3 [(buf.validate.field).int32 = { gte: 10, lt: 5 }]; - * } - * ``` - * - * @generated from protobuf field: int32 gte = 5; - */ - gte: number; - } | { - oneofKind: undefined; - }; - /** - * `in` requires the field value to be equal to one of the specified values. - * If the field value isn't one of the specified values, an error message is - * generated. - * - * ```proto - * message MyInt32 { - * // value must be in list [1, 2, 3] - * repeated int32 value = 1 (buf.validate.field).int32 = { in: [1, 2, 3] }; - * } - * ``` - * - * @generated from protobuf field: repeated int32 in = 6; - */ - in: number[]; - /** - * `not_in` requires the field value to not be equal to any of the specified - * values. If the field value is one of the specified values, an error message - * is generated. - * - * ```proto - * message MyInt32 { - * // value must not be in list [1, 2, 3] - * repeated int32 value = 1 (buf.validate.field).int32 = { not_in: [1, 2, 3] }; - * } - * ``` - * - * @generated from protobuf field: repeated int32 not_in = 7; - */ - not_in: number[]; -} -/** - * Int64Rules describes the constraints applied to `int64` values. These - * rules may also be applied to the `google.protobuf.Int64Value` Well-Known-Type. - * - * @generated from protobuf message buf.validate.Int64Rules - */ -export interface Int64Rules { - /** - * `const` requires the field value to exactly match the specified value. If - * the field value doesn't match, an error message is generated. - * - * ```proto - * message MyInt64 { - * // value must equal 42 - * int64 value = 1 [(buf.validate.field).int64.const = 42]; - * } - * ``` - * - * @generated from protobuf field: optional int64 const = 1; - */ - const?: bigint; - /** - * @generated from protobuf oneof: less_than - */ - less_than: { - oneofKind: "lt"; - /** - * `lt` requires the field value to be less than the specified value (field < - * value). If the field value is equal to or greater than the specified value, - * an error message is generated. - * - * ```proto - * message MyInt64 { - * // value must be less than 10 - * int64 value = 1 [(buf.validate.field).int64.lt = 10]; - * } - * ``` - * - * @generated from protobuf field: int64 lt = 2; - */ - lt: bigint; - } | { - oneofKind: "lte"; - /** - * `lte` requires the field value to be less than or equal to the specified - * value (field <= value). If the field value is greater than the specified - * value, an error message is generated. - * - * ```proto - * message MyInt64 { - * // value must be less than or equal to 10 - * int64 value = 1 [(buf.validate.field).int64.lte = 10]; - * } - * ``` - * - * @generated from protobuf field: int64 lte = 3; - */ - lte: bigint; - } | { - oneofKind: undefined; - }; - /** - * @generated from protobuf oneof: greater_than - */ - greater_than: { - oneofKind: "gt"; - /** - * `gt` requires the field value to be greater than the specified value - * (exclusive). If the value of `gt` is larger than a specified `lt` or - * `lte`, the range is reversed, and the field value must be outside the - * specified range. If the field value doesn't meet the required conditions, - * an error message is generated. - * - * ```proto - * message MyInt64 { - * // value must be greater than 5 [int64.gt] - * int64 value = 1 [(buf.validate.field).int64.gt = 5]; - * - * // value must be greater than 5 and less than 10 [int64.gt_lt] - * int64 other_value = 2 [(buf.validate.field).int64 = { gt: 5, lt: 10 }]; - * - * // value must be greater than 10 or less than 5 [int64.gt_lt_exclusive] - * int64 another_value = 3 [(buf.validate.field).int64 = { gt: 10, lt: 5 }]; - * } - * ``` - * - * @generated from protobuf field: int64 gt = 4; - */ - gt: bigint; - } | { - oneofKind: "gte"; - /** - * `gte` requires the field value to be greater than or equal to the specified - * value (exclusive). If the value of `gte` is larger than a specified `lt` - * or `lte`, the range is reversed, and the field value must be outside the - * specified range. If the field value doesn't meet the required conditions, - * an error message is generated. - * - * ```proto - * message MyInt64 { - * // value must be greater than or equal to 5 [int64.gte] - * int64 value = 1 [(buf.validate.field).int64.gte = 5]; - * - * // value must be greater than or equal to 5 and less than 10 [int64.gte_lt] - * int64 other_value = 2 [(buf.validate.field).int64 = { gte: 5, lt: 10 }]; - * - * // value must be greater than or equal to 10 or less than 5 [int64.gte_lt_exclusive] - * int64 another_value = 3 [(buf.validate.field).int64 = { gte: 10, lt: 5 }]; - * } - * ``` - * - * @generated from protobuf field: int64 gte = 5; - */ - gte: bigint; - } | { - oneofKind: undefined; - }; - /** - * `in` requires the field value to be equal to one of the specified values. - * If the field value isn't one of the specified values, an error message is - * generated. - * - * ```proto - * message MyInt64 { - * // value must be in list [1, 2, 3] - * repeated int64 value = 1 (buf.validate.field).int64 = { in: [1, 2, 3] }; - * } - * ``` - * - * @generated from protobuf field: repeated int64 in = 6; - */ - in: bigint[]; - /** - * `not_in` requires the field value to not be equal to any of the specified - * values. If the field value is one of the specified values, an error - * message is generated. - * - * ```proto - * message MyInt64 { - * // value must not be in list [1, 2, 3] - * repeated int64 value = 1 (buf.validate.field).int64 = { not_in: [1, 2, 3] }; - * } - * ``` - * - * @generated from protobuf field: repeated int64 not_in = 7; - */ - not_in: bigint[]; -} -/** - * UInt32Rules describes the constraints applied to `uint32` values. These - * rules may also be applied to the `google.protobuf.UInt32Value` Well-Known-Type. - * - * @generated from protobuf message buf.validate.UInt32Rules - */ -export interface UInt32Rules { - /** - * `const` requires the field value to exactly match the specified value. If - * the field value doesn't match, an error message is generated. - * - * ```proto - * message MyUInt32 { - * // value must equal 42 - * uint32 value = 1 [(buf.validate.field).uint32.const = 42]; - * } - * ``` - * - * @generated from protobuf field: optional uint32 const = 1; - */ - const?: number; - /** - * @generated from protobuf oneof: less_than - */ - less_than: { - oneofKind: "lt"; - /** - * `lt` requires the field value to be less than the specified value (field < - * value). If the field value is equal to or greater than the specified value, - * an error message is generated. - * - * ```proto - * message MyUInt32 { - * // value must be less than 10 - * uint32 value = 1 [(buf.validate.field).uint32.lt = 10]; - * } - * ``` - * - * @generated from protobuf field: uint32 lt = 2; - */ - lt: number; - } | { - oneofKind: "lte"; - /** - * `lte` requires the field value to be less than or equal to the specified - * value (field <= value). If the field value is greater than the specified - * value, an error message is generated. - * - * ```proto - * message MyUInt32 { - * // value must be less than or equal to 10 - * uint32 value = 1 [(buf.validate.field).uint32.lte = 10]; - * } - * ``` - * - * @generated from protobuf field: uint32 lte = 3; - */ - lte: number; - } | { - oneofKind: undefined; - }; - /** - * @generated from protobuf oneof: greater_than - */ - greater_than: { - oneofKind: "gt"; - /** - * `gt` requires the field value to be greater than the specified value - * (exclusive). If the value of `gt` is larger than a specified `lt` or - * `lte`, the range is reversed, and the field value must be outside the - * specified range. If the field value doesn't meet the required conditions, - * an error message is generated. - * - * ```proto - * message MyUInt32 { - * // value must be greater than 5 [uint32.gt] - * uint32 value = 1 [(buf.validate.field).uint32.gt = 5]; - * - * // value must be greater than 5 and less than 10 [uint32.gt_lt] - * uint32 other_value = 2 [(buf.validate.field).uint32 = { gt: 5, lt: 10 }]; - * - * // value must be greater than 10 or less than 5 [uint32.gt_lt_exclusive] - * uint32 another_value = 3 [(buf.validate.field).uint32 = { gt: 10, lt: 5 }]; - * } - * ``` - * - * @generated from protobuf field: uint32 gt = 4; - */ - gt: number; - } | { - oneofKind: "gte"; - /** - * `gte` requires the field value to be greater than or equal to the specified - * value (exclusive). If the value of `gte` is larger than a specified `lt` - * or `lte`, the range is reversed, and the field value must be outside the - * specified range. If the field value doesn't meet the required conditions, - * an error message is generated. - * - * ```proto - * message MyUInt32 { - * // value must be greater than or equal to 5 [uint32.gte] - * uint32 value = 1 [(buf.validate.field).uint32.gte = 5]; - * - * // value must be greater than or equal to 5 and less than 10 [uint32.gte_lt] - * uint32 other_value = 2 [(buf.validate.field).uint32 = { gte: 5, lt: 10 }]; - * - * // value must be greater than or equal to 10 or less than 5 [uint32.gte_lt_exclusive] - * uint32 another_value = 3 [(buf.validate.field).uint32 = { gte: 10, lt: 5 }]; - * } - * ``` - * - * @generated from protobuf field: uint32 gte = 5; - */ - gte: number; - } | { - oneofKind: undefined; - }; - /** - * `in` requires the field value to be equal to one of the specified values. - * If the field value isn't one of the specified values, an error message is - * generated. - * - * ```proto - * message MyUInt32 { - * // value must be in list [1, 2, 3] - * repeated uint32 value = 1 (buf.validate.field).uint32 = { in: [1, 2, 3] }; - * } - * ``` - * - * @generated from protobuf field: repeated uint32 in = 6; - */ - in: number[]; - /** - * `not_in` requires the field value to not be equal to any of the specified - * values. If the field value is one of the specified values, an error - * message is generated. - * - * ```proto - * message MyUInt32 { - * // value must not be in list [1, 2, 3] - * repeated uint32 value = 1 (buf.validate.field).uint32 = { not_in: [1, 2, 3] }; - * } - * ``` - * - * @generated from protobuf field: repeated uint32 not_in = 7; - */ - not_in: number[]; -} -/** - * UInt64Rules describes the constraints applied to `uint64` values. These - * rules may also be applied to the `google.protobuf.UInt64Value` Well-Known-Type. - * - * @generated from protobuf message buf.validate.UInt64Rules - */ -export interface UInt64Rules { - /** - * `const` requires the field value to exactly match the specified value. If - * the field value doesn't match, an error message is generated. - * - * ```proto - * message MyUInt64 { - * // value must equal 42 - * uint64 value = 1 [(buf.validate.field).uint64.const = 42]; - * } - * ``` - * - * @generated from protobuf field: optional uint64 const = 1; - */ - const?: bigint; - /** - * @generated from protobuf oneof: less_than - */ - less_than: { - oneofKind: "lt"; - /** - * `lt` requires the field value to be less than the specified value (field < - * value). If the field value is equal to or greater than the specified value, - * an error message is generated. - * - * ```proto - * message MyUInt64 { - * // value must be less than 10 - * uint64 value = 1 [(buf.validate.field).uint64.lt = 10]; - * } - * ``` - * - * @generated from protobuf field: uint64 lt = 2; - */ - lt: bigint; - } | { - oneofKind: "lte"; - /** - * `lte` requires the field value to be less than or equal to the specified - * value (field <= value). If the field value is greater than the specified - * value, an error message is generated. - * - * ```proto - * message MyUInt64 { - * // value must be less than or equal to 10 - * uint64 value = 1 [(buf.validate.field).uint64.lte = 10]; - * } - * ``` - * - * @generated from protobuf field: uint64 lte = 3; - */ - lte: bigint; - } | { - oneofKind: undefined; - }; - /** - * @generated from protobuf oneof: greater_than - */ - greater_than: { - oneofKind: "gt"; - /** - * `gt` requires the field value to be greater than the specified value - * (exclusive). If the value of `gt` is larger than a specified `lt` or - * `lte`, the range is reversed, and the field value must be outside the - * specified range. If the field value doesn't meet the required conditions, - * an error message is generated. - * - * ```proto - * message MyUInt64 { - * // value must be greater than 5 [uint64.gt] - * uint64 value = 1 [(buf.validate.field).uint64.gt = 5]; - * - * // value must be greater than 5 and less than 10 [uint64.gt_lt] - * uint64 other_value = 2 [(buf.validate.field).uint64 = { gt: 5, lt: 10 }]; - * - * // value must be greater than 10 or less than 5 [uint64.gt_lt_exclusive] - * uint64 another_value = 3 [(buf.validate.field).uint64 = { gt: 10, lt: 5 }]; - * } - * ``` - * - * @generated from protobuf field: uint64 gt = 4; - */ - gt: bigint; - } | { - oneofKind: "gte"; - /** - * `gte` requires the field value to be greater than or equal to the specified - * value (exclusive). If the value of `gte` is larger than a specified `lt` - * or `lte`, the range is reversed, and the field value must be outside the - * specified range. If the field value doesn't meet the required conditions, - * an error message is generated. - * - * ```proto - * message MyUInt64 { - * // value must be greater than or equal to 5 [uint64.gte] - * uint64 value = 1 [(buf.validate.field).uint64.gte = 5]; - * - * // value must be greater than or equal to 5 and less than 10 [uint64.gte_lt] - * uint64 other_value = 2 [(buf.validate.field).uint64 = { gte: 5, lt: 10 }]; - * - * // value must be greater than or equal to 10 or less than 5 [uint64.gte_lt_exclusive] - * uint64 another_value = 3 [(buf.validate.field).uint64 = { gte: 10, lt: 5 }]; - * } - * ``` - * - * @generated from protobuf field: uint64 gte = 5; - */ - gte: bigint; - } | { - oneofKind: undefined; - }; - /** - * `in` requires the field value to be equal to one of the specified values. - * If the field value isn't one of the specified values, an error message is - * generated. - * - * ```proto - * message MyUInt64 { - * // value must be in list [1, 2, 3] - * repeated uint64 value = 1 (buf.validate.field).uint64 = { in: [1, 2, 3] }; - * } - * ``` - * - * @generated from protobuf field: repeated uint64 in = 6; - */ - in: bigint[]; - /** - * `not_in` requires the field value to not be equal to any of the specified - * values. If the field value is one of the specified values, an error - * message is generated. - * - * ```proto - * message MyUInt64 { - * // value must not be in list [1, 2, 3] - * repeated uint64 value = 1 (buf.validate.field).uint64 = { not_in: [1, 2, 3] }; - * } - * ``` - * - * @generated from protobuf field: repeated uint64 not_in = 7; - */ - not_in: bigint[]; -} -/** - * SInt32Rules describes the constraints applied to `sint32` values. - * - * @generated from protobuf message buf.validate.SInt32Rules - */ -export interface SInt32Rules { - /** - * `const` requires the field value to exactly match the specified value. If - * the field value doesn't match, an error message is generated. - * - * ```proto - * message MySInt32 { - * // value must equal 42 - * sint32 value = 1 [(buf.validate.field).sint32.const = 42]; - * } - * ``` - * - * @generated from protobuf field: optional sint32 const = 1; - */ - const?: number; - /** - * @generated from protobuf oneof: less_than - */ - less_than: { - oneofKind: "lt"; - /** - * `lt` requires the field value to be less than the specified value (field - * < value). If the field value is equal to or greater than the specified - * value, an error message is generated. - * - * ```proto - * message MySInt32 { - * // value must be less than 10 - * sint32 value = 1 [(buf.validate.field).sint32.lt = 10]; - * } - * ``` - * - * @generated from protobuf field: sint32 lt = 2; - */ - lt: number; - } | { - oneofKind: "lte"; - /** - * `lte` requires the field value to be less than or equal to the specified - * value (field <= value). If the field value is greater than the specified - * value, an error message is generated. - * - * ```proto - * message MySInt32 { - * // value must be less than or equal to 10 - * sint32 value = 1 [(buf.validate.field).sint32.lte = 10]; - * } - * ``` - * - * @generated from protobuf field: sint32 lte = 3; - */ - lte: number; - } | { - oneofKind: undefined; - }; - /** - * @generated from protobuf oneof: greater_than - */ - greater_than: { - oneofKind: "gt"; - /** - * `gt` requires the field value to be greater than the specified value - * (exclusive). If the value of `gt` is larger than a specified `lt` or - * `lte`, the range is reversed, and the field value must be outside the - * specified range. If the field value doesn't meet the required conditions, - * an error message is generated. - * - * ```proto - * message MySInt32 { - * // value must be greater than 5 [sint32.gt] - * sint32 value = 1 [(buf.validate.field).sint32.gt = 5]; - * - * // value must be greater than 5 and less than 10 [sint32.gt_lt] - * sint32 other_value = 2 [(buf.validate.field).sint32 = { gt: 5, lt: 10 }]; - * - * // value must be greater than 10 or less than 5 [sint32.gt_lt_exclusive] - * sint32 another_value = 3 [(buf.validate.field).sint32 = { gt: 10, lt: 5 }]; - * } - * ``` - * - * @generated from protobuf field: sint32 gt = 4; - */ - gt: number; - } | { - oneofKind: "gte"; - /** - * `gte` requires the field value to be greater than or equal to the specified - * value (exclusive). If the value of `gte` is larger than a specified `lt` - * or `lte`, the range is reversed, and the field value must be outside the - * specified range. If the field value doesn't meet the required conditions, - * an error message is generated. - * - * ```proto - * message MySInt32 { - * // value must be greater than or equal to 5 [sint32.gte] - * sint32 value = 1 [(buf.validate.field).sint32.gte = 5]; - * - * // value must be greater than or equal to 5 and less than 10 [sint32.gte_lt] - * sint32 other_value = 2 [(buf.validate.field).sint32 = { gte: 5, lt: 10 }]; - * - * // value must be greater than or equal to 10 or less than 5 [sint32.gte_lt_exclusive] - * sint32 another_value = 3 [(buf.validate.field).sint32 = { gte: 10, lt: 5 }]; - * } - * ``` - * - * @generated from protobuf field: sint32 gte = 5; - */ - gte: number; - } | { - oneofKind: undefined; - }; - /** - * `in` requires the field value to be equal to one of the specified values. - * If the field value isn't one of the specified values, an error message is - * generated. - * - * ```proto - * message MySInt32 { - * // value must be in list [1, 2, 3] - * repeated sint32 value = 1 (buf.validate.field).sint32 = { in: [1, 2, 3] }; - * } - * ``` - * - * @generated from protobuf field: repeated sint32 in = 6; - */ - in: number[]; - /** - * `not_in` requires the field value to not be equal to any of the specified - * values. If the field value is one of the specified values, an error - * message is generated. - * - * ```proto - * message MySInt32 { - * // value must not be in list [1, 2, 3] - * repeated sint32 value = 1 (buf.validate.field).sint32 = { not_in: [1, 2, 3] }; - * } - * ``` - * - * @generated from protobuf field: repeated sint32 not_in = 7; - */ - not_in: number[]; -} -/** - * SInt64Rules describes the constraints applied to `sint64` values. - * - * @generated from protobuf message buf.validate.SInt64Rules - */ -export interface SInt64Rules { - /** - * `const` requires the field value to exactly match the specified value. If - * the field value doesn't match, an error message is generated. - * - * ```proto - * message MySInt64 { - * // value must equal 42 - * sint64 value = 1 [(buf.validate.field).sint64.const = 42]; - * } - * ``` - * - * @generated from protobuf field: optional sint64 const = 1; - */ - const?: bigint; - /** - * @generated from protobuf oneof: less_than - */ - less_than: { - oneofKind: "lt"; - /** - * `lt` requires the field value to be less than the specified value (field - * < value). If the field value is equal to or greater than the specified - * value, an error message is generated. - * - * ```proto - * message MySInt64 { - * // value must be less than 10 - * sint64 value = 1 [(buf.validate.field).sint64.lt = 10]; - * } - * ``` - * - * @generated from protobuf field: sint64 lt = 2; - */ - lt: bigint; - } | { - oneofKind: "lte"; - /** - * `lte` requires the field value to be less than or equal to the specified - * value (field <= value). If the field value is greater than the specified - * value, an error message is generated. - * - * ```proto - * message MySInt64 { - * // value must be less than or equal to 10 - * sint64 value = 1 [(buf.validate.field).sint64.lte = 10]; - * } - * ``` - * - * @generated from protobuf field: sint64 lte = 3; - */ - lte: bigint; - } | { - oneofKind: undefined; - }; - /** - * @generated from protobuf oneof: greater_than - */ - greater_than: { - oneofKind: "gt"; - /** - * `gt` requires the field value to be greater than the specified value - * (exclusive). If the value of `gt` is larger than a specified `lt` or - * `lte`, the range is reversed, and the field value must be outside the - * specified range. If the field value doesn't meet the required conditions, - * an error message is generated. - * - * ```proto - * message MySInt64 { - * // value must be greater than 5 [sint64.gt] - * sint64 value = 1 [(buf.validate.field).sint64.gt = 5]; - * - * // value must be greater than 5 and less than 10 [sint64.gt_lt] - * sint64 other_value = 2 [(buf.validate.field).sint64 = { gt: 5, lt: 10 }]; - * - * // value must be greater than 10 or less than 5 [sint64.gt_lt_exclusive] - * sint64 another_value = 3 [(buf.validate.field).sint64 = { gt: 10, lt: 5 }]; - * } - * ``` - * - * @generated from protobuf field: sint64 gt = 4; - */ - gt: bigint; - } | { - oneofKind: "gte"; - /** - * `gte` requires the field value to be greater than or equal to the specified - * value (exclusive). If the value of `gte` is larger than a specified `lt` - * or `lte`, the range is reversed, and the field value must be outside the - * specified range. If the field value doesn't meet the required conditions, - * an error message is generated. - * - * ```proto - * message MySInt64 { - * // value must be greater than or equal to 5 [sint64.gte] - * sint64 value = 1 [(buf.validate.field).sint64.gte = 5]; - * - * // value must be greater than or equal to 5 and less than 10 [sint64.gte_lt] - * sint64 other_value = 2 [(buf.validate.field).sint64 = { gte: 5, lt: 10 }]; - * - * // value must be greater than or equal to 10 or less than 5 [sint64.gte_lt_exclusive] - * sint64 another_value = 3 [(buf.validate.field).sint64 = { gte: 10, lt: 5 }]; - * } - * ``` - * - * @generated from protobuf field: sint64 gte = 5; - */ - gte: bigint; - } | { - oneofKind: undefined; - }; - /** - * `in` requires the field value to be equal to one of the specified values. - * If the field value isn't one of the specified values, an error message - * is generated. - * - * ```proto - * message MySInt64 { - * // value must be in list [1, 2, 3] - * repeated sint64 value = 1 (buf.validate.field).sint64 = { in: [1, 2, 3] }; - * } - * ``` - * - * @generated from protobuf field: repeated sint64 in = 6; - */ - in: bigint[]; - /** - * `not_in` requires the field value to not be equal to any of the specified - * values. If the field value is one of the specified values, an error - * message is generated. - * - * ```proto - * message MySInt64 { - * // value must not be in list [1, 2, 3] - * repeated sint64 value = 1 (buf.validate.field).sint64 = { not_in: [1, 2, 3] }; - * } - * ``` - * - * @generated from protobuf field: repeated sint64 not_in = 7; - */ - not_in: bigint[]; -} -/** - * Fixed32Rules describes the constraints applied to `fixed32` values. - * - * @generated from protobuf message buf.validate.Fixed32Rules - */ -export interface Fixed32Rules { - /** - * `const` requires the field value to exactly match the specified value. - * If the field value doesn't match, an error message is generated. - * - * ```proto - * message MyFixed32 { - * // value must equal 42 - * fixed32 value = 1 [(buf.validate.field).fixed32.const = 42]; - * } - * ``` - * - * @generated from protobuf field: optional fixed32 const = 1; - */ - const?: number; - /** - * @generated from protobuf oneof: less_than - */ - less_than: { - oneofKind: "lt"; - /** - * `lt` requires the field value to be less than the specified value (field < - * value). If the field value is equal to or greater than the specified value, - * an error message is generated. - * - * ```proto - * message MyFixed32 { - * // value must be less than 10 - * fixed32 value = 1 [(buf.validate.field).fixed32.lt = 10]; - * } - * ``` - * - * @generated from protobuf field: fixed32 lt = 2; - */ - lt: number; - } | { - oneofKind: "lte"; - /** - * `lte` requires the field value to be less than or equal to the specified - * value (field <= value). If the field value is greater than the specified - * value, an error message is generated. - * - * ```proto - * message MyFixed32 { - * // value must be less than or equal to 10 - * fixed32 value = 1 [(buf.validate.field).fixed32.lte = 10]; - * } - * ``` - * - * @generated from protobuf field: fixed32 lte = 3; - */ - lte: number; - } | { - oneofKind: undefined; - }; - /** - * @generated from protobuf oneof: greater_than - */ - greater_than: { - oneofKind: "gt"; - /** - * `gt` requires the field value to be greater than the specified value - * (exclusive). If the value of `gt` is larger than a specified `lt` or - * `lte`, the range is reversed, and the field value must be outside the - * specified range. If the field value doesn't meet the required conditions, - * an error message is generated. - * - * ```proto - * message MyFixed32 { - * // value must be greater than 5 [fixed32.gt] - * fixed32 value = 1 [(buf.validate.field).fixed32.gt = 5]; - * - * // value must be greater than 5 and less than 10 [fixed32.gt_lt] - * fixed32 other_value = 2 [(buf.validate.field).fixed32 = { gt: 5, lt: 10 }]; - * - * // value must be greater than 10 or less than 5 [fixed32.gt_lt_exclusive] - * fixed32 another_value = 3 [(buf.validate.field).fixed32 = { gt: 10, lt: 5 }]; - * } - * ``` - * - * @generated from protobuf field: fixed32 gt = 4; - */ - gt: number; - } | { - oneofKind: "gte"; - /** - * `gte` requires the field value to be greater than or equal to the specified - * value (exclusive). If the value of `gte` is larger than a specified `lt` - * or `lte`, the range is reversed, and the field value must be outside the - * specified range. If the field value doesn't meet the required conditions, - * an error message is generated. - * - * ```proto - * message MyFixed32 { - * // value must be greater than or equal to 5 [fixed32.gte] - * fixed32 value = 1 [(buf.validate.field).fixed32.gte = 5]; - * - * // value must be greater than or equal to 5 and less than 10 [fixed32.gte_lt] - * fixed32 other_value = 2 [(buf.validate.field).fixed32 = { gte: 5, lt: 10 }]; - * - * // value must be greater than or equal to 10 or less than 5 [fixed32.gte_lt_exclusive] - * fixed32 another_value = 3 [(buf.validate.field).fixed32 = { gte: 10, lt: 5 }]; - * } - * ``` - * - * @generated from protobuf field: fixed32 gte = 5; - */ - gte: number; - } | { - oneofKind: undefined; - }; - /** - * `in` requires the field value to be equal to one of the specified values. - * If the field value isn't one of the specified values, an error message - * is generated. - * - * ```proto - * message MyFixed32 { - * // value must be in list [1, 2, 3] - * repeated fixed32 value = 1 (buf.validate.field).fixed32 = { in: [1, 2, 3] }; - * } - * ``` - * - * @generated from protobuf field: repeated fixed32 in = 6; - */ - in: number[]; - /** - * `not_in` requires the field value to not be equal to any of the specified - * values. If the field value is one of the specified values, an error - * message is generated. - * - * ```proto - * message MyFixed32 { - * // value must not be in list [1, 2, 3] - * repeated fixed32 value = 1 (buf.validate.field).fixed32 = { not_in: [1, 2, 3] }; - * } - * ``` - * - * @generated from protobuf field: repeated fixed32 not_in = 7; - */ - not_in: number[]; -} -/** - * Fixed64Rules describes the constraints applied to `fixed64` values. - * - * @generated from protobuf message buf.validate.Fixed64Rules - */ -export interface Fixed64Rules { - /** - * `const` requires the field value to exactly match the specified value. If - * the field value doesn't match, an error message is generated. - * - * ```proto - * message MyFixed64 { - * // value must equal 42 - * fixed64 value = 1 [(buf.validate.field).fixed64.const = 42]; - * } - * ``` - * - * @generated from protobuf field: optional fixed64 const = 1; - */ - const?: bigint; - /** - * @generated from protobuf oneof: less_than - */ - less_than: { - oneofKind: "lt"; - /** - * `lt` requires the field value to be less than the specified value (field < - * value). If the field value is equal to or greater than the specified value, - * an error message is generated. - * - * ```proto - * message MyFixed64 { - * // value must be less than 10 - * fixed64 value = 1 [(buf.validate.field).fixed64.lt = 10]; - * } - * ``` - * - * @generated from protobuf field: fixed64 lt = 2; - */ - lt: bigint; - } | { - oneofKind: "lte"; - /** - * `lte` requires the field value to be less than or equal to the specified - * value (field <= value). If the field value is greater than the specified - * value, an error message is generated. - * - * ```proto - * message MyFixed64 { - * // value must be less than or equal to 10 - * fixed64 value = 1 [(buf.validate.field).fixed64.lte = 10]; - * } - * ``` - * - * @generated from protobuf field: fixed64 lte = 3; - */ - lte: bigint; - } | { - oneofKind: undefined; - }; - /** - * @generated from protobuf oneof: greater_than - */ - greater_than: { - oneofKind: "gt"; - /** - * `gt` requires the field value to be greater than the specified value - * (exclusive). If the value of `gt` is larger than a specified `lt` or - * `lte`, the range is reversed, and the field value must be outside the - * specified range. If the field value doesn't meet the required conditions, - * an error message is generated. - * - * ```proto - * message MyFixed64 { - * // value must be greater than 5 [fixed64.gt] - * fixed64 value = 1 [(buf.validate.field).fixed64.gt = 5]; - * - * // value must be greater than 5 and less than 10 [fixed64.gt_lt] - * fixed64 other_value = 2 [(buf.validate.field).fixed64 = { gt: 5, lt: 10 }]; - * - * // value must be greater than 10 or less than 5 [fixed64.gt_lt_exclusive] - * fixed64 another_value = 3 [(buf.validate.field).fixed64 = { gt: 10, lt: 5 }]; - * } - * ``` - * - * @generated from protobuf field: fixed64 gt = 4; - */ - gt: bigint; - } | { - oneofKind: "gte"; - /** - * `gte` requires the field value to be greater than or equal to the specified - * value (exclusive). If the value of `gte` is larger than a specified `lt` - * or `lte`, the range is reversed, and the field value must be outside the - * specified range. If the field value doesn't meet the required conditions, - * an error message is generated. - * - * ```proto - * message MyFixed64 { - * // value must be greater than or equal to 5 [fixed64.gte] - * fixed64 value = 1 [(buf.validate.field).fixed64.gte = 5]; - * - * // value must be greater than or equal to 5 and less than 10 [fixed64.gte_lt] - * fixed64 other_value = 2 [(buf.validate.field).fixed64 = { gte: 5, lt: 10 }]; - * - * // value must be greater than or equal to 10 or less than 5 [fixed64.gte_lt_exclusive] - * fixed64 another_value = 3 [(buf.validate.field).fixed64 = { gte: 10, lt: 5 }]; - * } - * ``` - * - * @generated from protobuf field: fixed64 gte = 5; - */ - gte: bigint; - } | { - oneofKind: undefined; - }; - /** - * `in` requires the field value to be equal to one of the specified values. - * If the field value isn't one of the specified values, an error message is - * generated. - * - * ```proto - * message MyFixed64 { - * // value must be in list [1, 2, 3] - * repeated fixed64 value = 1 (buf.validate.field).fixed64 = { in: [1, 2, 3] }; - * } - * ``` - * - * @generated from protobuf field: repeated fixed64 in = 6; - */ - in: bigint[]; - /** - * `not_in` requires the field value to not be equal to any of the specified - * values. If the field value is one of the specified values, an error - * message is generated. - * - * ```proto - * message MyFixed64 { - * // value must not be in list [1, 2, 3] - * repeated fixed64 value = 1 (buf.validate.field).fixed64 = { not_in: [1, 2, 3] }; - * } - * ``` - * - * @generated from protobuf field: repeated fixed64 not_in = 7; - */ - not_in: bigint[]; -} -/** - * SFixed32Rules describes the constraints applied to `fixed32` values. - * - * @generated from protobuf message buf.validate.SFixed32Rules - */ -export interface SFixed32Rules { - /** - * `const` requires the field value to exactly match the specified value. If - * the field value doesn't match, an error message is generated. - * - * ```proto - * message MySFixed32 { - * // value must equal 42 - * sfixed32 value = 1 [(buf.validate.field).sfixed32.const = 42]; - * } - * ``` - * - * @generated from protobuf field: optional sfixed32 const = 1; - */ - const?: number; - /** - * @generated from protobuf oneof: less_than - */ - less_than: { - oneofKind: "lt"; - /** - * `lt` requires the field value to be less than the specified value (field < - * value). If the field value is equal to or greater than the specified value, - * an error message is generated. - * - * ```proto - * message MySFixed32 { - * // value must be less than 10 - * sfixed32 value = 1 [(buf.validate.field).sfixed32.lt = 10]; - * } - * ``` - * - * @generated from protobuf field: sfixed32 lt = 2; - */ - lt: number; - } | { - oneofKind: "lte"; - /** - * `lte` requires the field value to be less than or equal to the specified - * value (field <= value). If the field value is greater than the specified - * value, an error message is generated. - * - * ```proto - * message MySFixed32 { - * // value must be less than or equal to 10 - * sfixed32 value = 1 [(buf.validate.field).sfixed32.lte = 10]; - * } - * ``` - * - * @generated from protobuf field: sfixed32 lte = 3; - */ - lte: number; - } | { - oneofKind: undefined; - }; - /** - * @generated from protobuf oneof: greater_than - */ - greater_than: { - oneofKind: "gt"; - /** - * `gt` requires the field value to be greater than the specified value - * (exclusive). If the value of `gt` is larger than a specified `lt` or - * `lte`, the range is reversed, and the field value must be outside the - * specified range. If the field value doesn't meet the required conditions, - * an error message is generated. - * - * ```proto - * message MySFixed32 { - * // value must be greater than 5 [sfixed32.gt] - * sfixed32 value = 1 [(buf.validate.field).sfixed32.gt = 5]; - * - * // value must be greater than 5 and less than 10 [sfixed32.gt_lt] - * sfixed32 other_value = 2 [(buf.validate.field).sfixed32 = { gt: 5, lt: 10 }]; - * - * // value must be greater than 10 or less than 5 [sfixed32.gt_lt_exclusive] - * sfixed32 another_value = 3 [(buf.validate.field).sfixed32 = { gt: 10, lt: 5 }]; - * } - * ``` - * - * @generated from protobuf field: sfixed32 gt = 4; - */ - gt: number; - } | { - oneofKind: "gte"; - /** - * `gte` requires the field value to be greater than or equal to the specified - * value (exclusive). If the value of `gte` is larger than a specified `lt` - * or `lte`, the range is reversed, and the field value must be outside the - * specified range. If the field value doesn't meet the required conditions, - * an error message is generated. - * - * ```proto - * message MySFixed32 { - * // value must be greater than or equal to 5 [sfixed32.gte] - * sfixed32 value = 1 [(buf.validate.field).sfixed32.gte = 5]; - * - * // value must be greater than or equal to 5 and less than 10 [sfixed32.gte_lt] - * sfixed32 other_value = 2 [(buf.validate.field).sfixed32 = { gte: 5, lt: 10 }]; - * - * // value must be greater than or equal to 10 or less than 5 [sfixed32.gte_lt_exclusive] - * sfixed32 another_value = 3 [(buf.validate.field).sfixed32 = { gte: 10, lt: 5 }]; - * } - * ``` - * - * @generated from protobuf field: sfixed32 gte = 5; - */ - gte: number; - } | { - oneofKind: undefined; - }; - /** - * `in` requires the field value to be equal to one of the specified values. - * If the field value isn't one of the specified values, an error message is - * generated. - * - * ```proto - * message MySFixed32 { - * // value must be in list [1, 2, 3] - * repeated sfixed32 value = 1 (buf.validate.field).sfixed32 = { in: [1, 2, 3] }; - * } - * ``` - * - * @generated from protobuf field: repeated sfixed32 in = 6; - */ - in: number[]; - /** - * `not_in` requires the field value to not be equal to any of the specified - * values. If the field value is one of the specified values, an error - * message is generated. - * - * ```proto - * message MySFixed32 { - * // value must not be in list [1, 2, 3] - * repeated sfixed32 value = 1 (buf.validate.field).sfixed32 = { not_in: [1, 2, 3] }; - * } - * ``` - * - * @generated from protobuf field: repeated sfixed32 not_in = 7; - */ - not_in: number[]; -} -/** - * SFixed64Rules describes the constraints applied to `fixed64` values. - * - * @generated from protobuf message buf.validate.SFixed64Rules - */ -export interface SFixed64Rules { - /** - * `const` requires the field value to exactly match the specified value. If - * the field value doesn't match, an error message is generated. - * - * ```proto - * message MySFixed64 { - * // value must equal 42 - * sfixed64 value = 1 [(buf.validate.field).sfixed64.const = 42]; - * } - * ``` - * - * @generated from protobuf field: optional sfixed64 const = 1; - */ - const?: bigint; - /** - * @generated from protobuf oneof: less_than - */ - less_than: { - oneofKind: "lt"; - /** - * `lt` requires the field value to be less than the specified value (field < - * value). If the field value is equal to or greater than the specified value, - * an error message is generated. - * - * ```proto - * message MySFixed64 { - * // value must be less than 10 - * sfixed64 value = 1 [(buf.validate.field).sfixed64.lt = 10]; - * } - * ``` - * - * @generated from protobuf field: sfixed64 lt = 2; - */ - lt: bigint; - } | { - oneofKind: "lte"; - /** - * `lte` requires the field value to be less than or equal to the specified - * value (field <= value). If the field value is greater than the specified - * value, an error message is generated. - * - * ```proto - * message MySFixed64 { - * // value must be less than or equal to 10 - * sfixed64 value = 1 [(buf.validate.field).sfixed64.lte = 10]; - * } - * ``` - * - * @generated from protobuf field: sfixed64 lte = 3; - */ - lte: bigint; - } | { - oneofKind: undefined; - }; - /** - * @generated from protobuf oneof: greater_than - */ - greater_than: { - oneofKind: "gt"; - /** - * `gt` requires the field value to be greater than the specified value - * (exclusive). If the value of `gt` is larger than a specified `lt` or - * `lte`, the range is reversed, and the field value must be outside the - * specified range. If the field value doesn't meet the required conditions, - * an error message is generated. - * - * ```proto - * message MySFixed64 { - * // value must be greater than 5 [sfixed64.gt] - * sfixed64 value = 1 [(buf.validate.field).sfixed64.gt = 5]; - * - * // value must be greater than 5 and less than 10 [sfixed64.gt_lt] - * sfixed64 other_value = 2 [(buf.validate.field).sfixed64 = { gt: 5, lt: 10 }]; - * - * // value must be greater than 10 or less than 5 [sfixed64.gt_lt_exclusive] - * sfixed64 another_value = 3 [(buf.validate.field).sfixed64 = { gt: 10, lt: 5 }]; - * } - * ``` - * - * @generated from protobuf field: sfixed64 gt = 4; - */ - gt: bigint; - } | { - oneofKind: "gte"; - /** - * `gte` requires the field value to be greater than or equal to the specified - * value (exclusive). If the value of `gte` is larger than a specified `lt` - * or `lte`, the range is reversed, and the field value must be outside the - * specified range. If the field value doesn't meet the required conditions, - * an error message is generated. - * - * ```proto - * message MySFixed64 { - * // value must be greater than or equal to 5 [sfixed64.gte] - * sfixed64 value = 1 [(buf.validate.field).sfixed64.gte = 5]; - * - * // value must be greater than or equal to 5 and less than 10 [sfixed64.gte_lt] - * sfixed64 other_value = 2 [(buf.validate.field).sfixed64 = { gte: 5, lt: 10 }]; - * - * // value must be greater than or equal to 10 or less than 5 [sfixed64.gte_lt_exclusive] - * sfixed64 another_value = 3 [(buf.validate.field).sfixed64 = { gte: 10, lt: 5 }]; - * } - * ``` - * - * @generated from protobuf field: sfixed64 gte = 5; - */ - gte: bigint; - } | { - oneofKind: undefined; - }; - /** - * `in` requires the field value to be equal to one of the specified values. - * If the field value isn't one of the specified values, an error message is - * generated. - * - * ```proto - * message MySFixed64 { - * // value must be in list [1, 2, 3] - * repeated sfixed64 value = 1 (buf.validate.field).sfixed64 = { in: [1, 2, 3] }; - * } - * ``` - * - * @generated from protobuf field: repeated sfixed64 in = 6; - */ - in: bigint[]; - /** - * `not_in` requires the field value to not be equal to any of the specified - * values. If the field value is one of the specified values, an error - * message is generated. - * - * ```proto - * message MySFixed64 { - * // value must not be in list [1, 2, 3] - * repeated sfixed64 value = 1 (buf.validate.field).sfixed64 = { not_in: [1, 2, 3] }; - * } - * ``` - * - * @generated from protobuf field: repeated sfixed64 not_in = 7; - */ - not_in: bigint[]; -} -/** - * BoolRules describes the constraints applied to `bool` values. These rules - * may also be applied to the `google.protobuf.BoolValue` Well-Known-Type. - * - * @generated from protobuf message buf.validate.BoolRules - */ -export interface BoolRules { - /** - * `const` requires the field value to exactly match the specified boolean value. - * If the field value doesn't match, an error message is generated. - * - * ```proto - * message MyBool { - * // value must equal true - * bool value = 1 [(buf.validate.field).bool.const = true]; - * } - * ``` - * - * @generated from protobuf field: optional bool const = 1; - */ - const?: boolean; -} -/** - * StringRules describes the constraints applied to `string` values These - * rules may also be applied to the `google.protobuf.StringValue` Well-Known-Type. - * - * @generated from protobuf message buf.validate.StringRules - */ -export interface StringRules { - /** - * `const` requires the field value to exactly match the specified value. If - * the field value doesn't match, an error message is generated. - * - * ```proto - * message MyString { - * // value must equal `hello` - * string value = 1 [(buf.validate.field).string.const = "hello"]; - * } - * ``` - * - * @generated from protobuf field: optional string const = 1; - */ - const?: string; - /** - * `len` dictates that the field value must have the specified - * number of characters (Unicode code points), which may differ from the number - * of bytes in the string. If the field value does not meet the specified - * length, an error message will be generated. - * - * ```proto - * message MyString { - * // value length must be 5 characters - * string value = 1 [(buf.validate.field).string.len = 5]; - * } - * ``` - * - * @generated from protobuf field: optional uint64 len = 19; - */ - len?: bigint; - /** - * `min_len` specifies that the field value must have at least the specified - * number of characters (Unicode code points), which may differ from the number - * of bytes in the string. If the field value contains fewer characters, an error - * message will be generated. - * - * ```proto - * message MyString { - * // value length must be at least 3 characters - * string value = 1 [(buf.validate.field).string.min_len = 3]; - * } - * ``` - * - * @generated from protobuf field: optional uint64 min_len = 2; - */ - min_len?: bigint; - /** - * `max_len` specifies that the field value must have no more than the specified - * number of characters (Unicode code points), which may differ from the - * number of bytes in the string. If the field value contains more characters, - * an error message will be generated. - * - * ```proto - * message MyString { - * // value length must be at most 10 characters - * string value = 1 [(buf.validate.field).string.max_len = 10]; - * } - * ``` - * - * @generated from protobuf field: optional uint64 max_len = 3; - */ - max_len?: bigint; - /** - * `len_bytes` dictates that the field value must have the specified number of - * bytes. If the field value does not match the specified length in bytes, - * an error message will be generated. - * - * ```proto - * message MyString { - * // value length must be 6 bytes - * string value = 1 [(buf.validate.field).string.len_bytes = 6]; - * } - * ``` - * - * @generated from protobuf field: optional uint64 len_bytes = 20; - */ - len_bytes?: bigint; - /** - * `min_bytes` specifies that the field value must have at least the specified - * number of bytes. If the field value contains fewer bytes, an error message - * will be generated. - * - * ```proto - * message MyString { - * // value length must be at least 4 bytes - * string value = 1 [(buf.validate.field).string.min_bytes = 4]; - * } - * - * ``` - * - * @generated from protobuf field: optional uint64 min_bytes = 4; - */ - min_bytes?: bigint; - /** - * `max_bytes` specifies that the field value must have no more than the - * specified number of bytes. If the field value contains more bytes, an - * error message will be generated. - * - * ```proto - * message MyString { - * // value length must be at most 8 bytes - * string value = 1 [(buf.validate.field).string.max_bytes = 8]; - * } - * ``` - * - * @generated from protobuf field: optional uint64 max_bytes = 5; - */ - max_bytes?: bigint; - /** - * `pattern` specifies that the field value must match the specified - * regular expression (RE2 syntax), with the expression provided without any - * delimiters. If the field value doesn't match the regular expression, an - * error message will be generated. - * - * ```proto - * message MyString { - * // value does not match regex pattern `^[a-zA-Z]//$` - * string value = 1 [(buf.validate.field).string.pattern = "^[a-zA-Z]//$"]; - * } - * ``` - * - * @generated from protobuf field: optional string pattern = 6; - */ - pattern?: string; - /** - * `prefix` specifies that the field value must have the - * specified substring at the beginning of the string. If the field value - * doesn't start with the specified prefix, an error message will be - * generated. - * - * ```proto - * message MyString { - * // value does not have prefix `pre` - * string value = 1 [(buf.validate.field).string.prefix = "pre"]; - * } - * ``` - * - * @generated from protobuf field: optional string prefix = 7; - */ - prefix?: string; - /** - * `suffix` specifies that the field value must have the - * specified substring at the end of the string. If the field value doesn't - * end with the specified suffix, an error message will be generated. - * - * ```proto - * message MyString { - * // value does not have suffix `post` - * string value = 1 [(buf.validate.field).string.suffix = "post"]; - * } - * ``` - * - * @generated from protobuf field: optional string suffix = 8; - */ - suffix?: string; - /** - * `contains` specifies that the field value must have the - * specified substring anywhere in the string. If the field value doesn't - * contain the specified substring, an error message will be generated. - * - * ```proto - * message MyString { - * // value does not contain substring `inside`. - * string value = 1 [(buf.validate.field).string.contains = "inside"]; - * } - * ``` - * - * @generated from protobuf field: optional string contains = 9; - */ - contains?: string; - /** - * `not_contains` specifies that the field value must not have the - * specified substring anywhere in the string. If the field value contains - * the specified substring, an error message will be generated. - * - * ```proto - * message MyString { - * // value contains substring `inside`. - * string value = 1 [(buf.validate.field).string.not_contains = "inside"]; - * } - * ``` - * - * @generated from protobuf field: optional string not_contains = 23; - */ - not_contains?: string; - /** - * `in` specifies that the field value must be equal to one of the specified - * values. If the field value isn't one of the specified values, an error - * message will be generated. - * - * ```proto - * message MyString { - * // value must be in list ["apple", "banana"] - * repeated string value = 1 [(buf.validate.field).string.in = "apple", (buf.validate.field).string.in = "banana"]; - * } - * ``` - * - * @generated from protobuf field: repeated string in = 10; - */ - in: string[]; - /** - * `not_in` specifies that the field value cannot be equal to any - * of the specified values. If the field value is one of the specified values, - * an error message will be generated. - * ```proto - * message MyString { - * // value must not be in list ["orange", "grape"] - * repeated string value = 1 [(buf.validate.field).string.not_in = "orange", (buf.validate.field).string.not_in = "grape"]; - * } - * ``` - * - * @generated from protobuf field: repeated string not_in = 11; - */ - not_in: string[]; - /** - * @generated from protobuf oneof: well_known - */ - well_known: { - oneofKind: "email"; - /** - * `email` specifies that the field value must be a valid email address - * (addr-spec only) as defined by [RFC 5322](https://tools.ietf.org/html/rfc5322#section-3.4.1). - * If the field value isn't a valid email address, an error message will be generated. - * - * ```proto - * message MyString { - * // value must be a valid email address - * string value = 1 [(buf.validate.field).string.email = true]; - * } - * ``` - * - * @generated from protobuf field: bool email = 12; - */ - email: boolean; - } | { - oneofKind: "hostname"; - /** - * `hostname` specifies that the field value must be a valid - * hostname as defined by [RFC 1034](https://tools.ietf.org/html/rfc1034#section-3.5). This constraint doesn't support - * internationalized domain names (IDNs). If the field value isn't a - * valid hostname, an error message will be generated. - * - * ```proto - * message MyString { - * // value must be a valid hostname - * string value = 1 [(buf.validate.field).string.hostname = true]; - * } - * ``` - * - * @generated from protobuf field: bool hostname = 13; - */ - hostname: boolean; - } | { - oneofKind: "ip"; - /** - * `ip` specifies that the field value must be a valid IP - * (v4 or v6) address, without surrounding square brackets for IPv6 addresses. - * If the field value isn't a valid IP address, an error message will be - * generated. - * - * ```proto - * message MyString { - * // value must be a valid IP address - * string value = 1 [(buf.validate.field).string.ip = true]; - * } - * ``` - * - * @generated from protobuf field: bool ip = 14; - */ - ip: boolean; - } | { - oneofKind: "ipv4"; - /** - * `ipv4` specifies that the field value must be a valid IPv4 - * address. If the field value isn't a valid IPv4 address, an error message - * will be generated. - * - * ```proto - * message MyString { - * // value must be a valid IPv4 address - * string value = 1 [(buf.validate.field).string.ipv4 = true]; - * } - * ``` - * - * @generated from protobuf field: bool ipv4 = 15; - */ - ipv4: boolean; - } | { - oneofKind: "ipv6"; - /** - * `ipv6` specifies that the field value must be a valid - * IPv6 address, without surrounding square brackets. If the field value is - * not a valid IPv6 address, an error message will be generated. - * - * ```proto - * message MyString { - * // value must be a valid IPv6 address - * string value = 1 [(buf.validate.field).string.ipv6 = true]; - * } - * ``` - * - * @generated from protobuf field: bool ipv6 = 16; - */ - ipv6: boolean; - } | { - oneofKind: "uri"; - /** - * `uri` specifies that the field value must be a valid, - * absolute URI as defined by [RFC 3986](https://tools.ietf.org/html/rfc3986#section-3). If the field value isn't a valid, - * absolute URI, an error message will be generated. - * - * ```proto - * message MyString { - * // value must be a valid URI - * string value = 1 [(buf.validate.field).string.uri = true]; - * } - * ``` - * - * @generated from protobuf field: bool uri = 17; - */ - uri: boolean; - } | { - oneofKind: "uri_ref"; - /** - * `uri_ref` specifies that the field value must be a valid URI - * as defined by [RFC 3986](https://tools.ietf.org/html/rfc3986#section-3) and may be either relative or absolute. If the - * field value isn't a valid URI, an error message will be generated. - * - * ```proto - * message MyString { - * // value must be a valid URI - * string value = 1 [(buf.validate.field).string.uri_ref = true]; - * } - * ``` - * - * @generated from protobuf field: bool uri_ref = 18; - */ - uri_ref: boolean; - } | { - oneofKind: "address"; - /** - * `address` specifies that the field value must be either a valid hostname - * as defined by [RFC 1034](https://tools.ietf.org/html/rfc1034#section-3.5) - * (which doesn't support internationalized domain names or IDNs) or a valid - * IP (v4 or v6). If the field value isn't a valid hostname or IP, an error - * message will be generated. - * - * ```proto - * message MyString { - * // value must be a valid hostname, or ip address - * string value = 1 [(buf.validate.field).string.address = true]; - * } - * ``` - * - * @generated from protobuf field: bool address = 21; - */ - address: boolean; - } | { - oneofKind: "uuid"; - /** - * `uuid` specifies that the field value must be a valid UUID as defined by - * [RFC 4122](https://tools.ietf.org/html/rfc4122#section-4.1.2). If the - * field value isn't a valid UUID, an error message will be generated. - * - * ```proto - * message MyString { - * // value must be a valid UUID - * string value = 1 [(buf.validate.field).string.uuid = true]; - * } - * ``` - * - * @generated from protobuf field: bool uuid = 22; - */ - uuid: boolean; - } | { - oneofKind: "ip_with_prefixlen"; - /** - * `ip_with_prefixlen` specifies that the field value must be a valid IP (v4 or v6) - * address with prefix length. If the field value isn't a valid IP with prefix - * length, an error message will be generated. - * - * - * ```proto - * message MyString { - * // value must be a valid IP with prefix length - * string value = 1 [(buf.validate.field).string.ip_with_prefixlen = true]; - * } - * ``` - * - * @generated from protobuf field: bool ip_with_prefixlen = 26; - */ - ip_with_prefixlen: boolean; - } | { - oneofKind: "ipv4_with_prefixlen"; - /** - * `ipv4_with_prefixlen` specifies that the field value must be a valid - * IPv4 address with prefix. - * If the field value isn't a valid IPv4 address with prefix length, - * an error message will be generated. - * - * ```proto - * message MyString { - * // value must be a valid IPv4 address with prefix lentgh - * string value = 1 [(buf.validate.field).string.ipv4_with_prefixlen = true]; - * } - * ``` - * - * @generated from protobuf field: bool ipv4_with_prefixlen = 27; - */ - ipv4_with_prefixlen: boolean; - } | { - oneofKind: "ipv6_with_prefixlen"; - /** - * `ipv6_with_prefixlen` specifies that the field value must be a valid - * IPv6 address with prefix length. - * If the field value is not a valid IPv6 address with prefix length, - * an error message will be generated. - * - * ```proto - * message MyString { - * // value must be a valid IPv6 address prefix length - * string value = 1 [(buf.validate.field).string.ipv6_with_prefixlen = true]; - * } - * ``` - * - * @generated from protobuf field: bool ipv6_with_prefixlen = 28; - */ - ipv6_with_prefixlen: boolean; - } | { - oneofKind: "ip_prefix"; - /** - * `ip_prefix` specifies that the field value must be a valid IP (v4 or v6) prefix. - * If the field value isn't a valid IP prefix, an error message will be - * generated. The prefix must have all zeros for the masked bits of the prefix (e.g., - * `127.0.0.0/16`, not `127.0.0.1/16`). - * - * ```proto - * message MyString { - * // value must be a valid IP prefix - * string value = 1 [(buf.validate.field).string.ip_prefix = true]; - * } - * ``` - * - * @generated from protobuf field: bool ip_prefix = 29; - */ - ip_prefix: boolean; - } | { - oneofKind: "ipv4_prefix"; - /** - * `ipv4_prefix` specifies that the field value must be a valid IPv4 - * prefix. If the field value isn't a valid IPv4 prefix, an error message - * will be generated. The prefix must have all zeros for the masked bits of - * the prefix (e.g., `127.0.0.0/16`, not `127.0.0.1/16`). - * - * ```proto - * message MyString { - * // value must be a valid IPv4 prefix - * string value = 1 [(buf.validate.field).string.ipv4_prefix = true]; - * } - * ``` - * - * @generated from protobuf field: bool ipv4_prefix = 30; - */ - ipv4_prefix: boolean; - } | { - oneofKind: "ipv6_prefix"; - /** - * `ipv6_prefix` specifies that the field value must be a valid IPv6 prefix. - * If the field value is not a valid IPv6 prefix, an error message will be - * generated. The prefix must have all zeros for the masked bits of the prefix - * (e.g., `2001:db8::/48`, not `2001:db8::1/48`). - * - * ```proto - * message MyString { - * // value must be a valid IPv6 prefix - * string value = 1 [(buf.validate.field).string.ipv6_prefix = true]; - * } - * ``` - * - * @generated from protobuf field: bool ipv6_prefix = 31; - */ - ipv6_prefix: boolean; - } | { - oneofKind: "well_known_regex"; - /** - * `well_known_regex` specifies a common well-known pattern - * defined as a regex. If the field value doesn't match the well-known - * regex, an error message will be generated. - * - * ```proto - * message MyString { - * // value must be a valid HTTP header value - * string value = 1 [(buf.validate.field).string.well_known_regex = 2]; - * } - * ``` - * - * #### KnownRegex - * - * `well_known_regex` contains some well-known patterns. - * - * | Name | Number | Description | - * |-------------------------------|--------|-------------------------------------------| - * | KNOWN_REGEX_UNSPECIFIED | 0 | | - * | KNOWN_REGEX_HTTP_HEADER_NAME | 1 | HTTP header name as defined by [RFC 7230](https://tools.ietf.org/html/rfc7230#section-3.2) | - * | KNOWN_REGEX_HTTP_HEADER_VALUE | 2 | HTTP header value as defined by [RFC 7230](https://tools.ietf.org/html/rfc7230#section-3.2.4) | - * - * @generated from protobuf field: buf.validate.KnownRegex well_known_regex = 24; - */ - well_known_regex: KnownRegex; - } | { - oneofKind: undefined; - }; - /** - * This applies to regexes `HTTP_HEADER_NAME` and `HTTP_HEADER_VALUE` to - * enable strict header validation. By default, this is true, and HTTP header - * validations are [RFC-compliant](https://tools.ietf.org/html/rfc7230#section-3). Setting to false will enable looser - * validations that only disallow `\r\n\0` characters, which can be used to - * bypass header matching rules. - * - * ```proto - * message MyString { - * // The field `value` must have be a valid HTTP headers, but not enforced with strict rules. - * string value = 1 [(buf.validate.field).string.strict = false]; - * } - * ``` - * - * @generated from protobuf field: optional bool strict = 25; - */ - strict?: boolean; -} -/** - * BytesRules describe the constraints applied to `bytes` values. These rules - * may also be applied to the `google.protobuf.BytesValue` Well-Known-Type. - * - * @generated from protobuf message buf.validate.BytesRules - */ -export interface BytesRules { - /** - * `const` requires the field value to exactly match the specified bytes - * value. If the field value doesn't match, an error message is generated. - * - * ```proto - * message MyBytes { - * // value must be "\x01\x02\x03\x04" - * bytes value = 1 [(buf.validate.field).bytes.const = "\x01\x02\x03\x04"]; - * } - * ``` - * - * @generated from protobuf field: optional bytes const = 1; - */ - const?: Uint8Array; - /** - * `len` requires the field value to have the specified length in bytes. - * If the field value doesn't match, an error message is generated. - * - * ```proto - * message MyBytes { - * // value length must be 4 bytes. - * optional bytes value = 1 [(buf.validate.field).bytes.len = 4]; - * } - * ``` - * - * @generated from protobuf field: optional uint64 len = 13; - */ - len?: bigint; - /** - * `min_len` requires the field value to have at least the specified minimum - * length in bytes. - * If the field value doesn't meet the requirement, an error message is generated. - * - * ```proto - * message MyBytes { - * // value length must be at least 2 bytes. - * optional bytes value = 1 [(buf.validate.field).bytes.min_len = 2]; - * } - * ``` - * - * @generated from protobuf field: optional uint64 min_len = 2; - */ - min_len?: bigint; - /** - * `max_len` requires the field value to have at most the specified maximum - * length in bytes. - * If the field value exceeds the requirement, an error message is generated. - * - * ```proto - * message MyBytes { - * // value must be at most 6 bytes. - * optional bytes value = 1 [(buf.validate.field).bytes.max_len = 6]; - * } - * ``` - * - * @generated from protobuf field: optional uint64 max_len = 3; - */ - max_len?: bigint; - /** - * `pattern` requires the field value to match the specified regular - * expression ([RE2 syntax](https://github.com/google/re2/wiki/Syntax)). - * The value of the field must be valid UTF-8 or validation will fail with a - * runtime error. - * If the field value doesn't match the pattern, an error message is generated. - * - * ```proto - * message MyBytes { - * // value must match regex pattern "^[a-zA-Z0-9]+$". - * optional bytes value = 1 [(buf.validate.field).bytes.pattern = "^[a-zA-Z0-9]+$"]; - * } - * ``` - * - * @generated from protobuf field: optional string pattern = 4; - */ - pattern?: string; - /** - * `prefix` requires the field value to have the specified bytes at the - * beginning of the string. - * If the field value doesn't meet the requirement, an error message is generated. - * - * ```proto - * message MyBytes { - * // value does not have prefix \x01\x02 - * optional bytes value = 1 [(buf.validate.field).bytes.prefix = "\x01\x02"]; - * } - * ``` - * - * @generated from protobuf field: optional bytes prefix = 5; - */ - prefix?: Uint8Array; - /** - * `suffix` requires the field value to have the specified bytes at the end - * of the string. - * If the field value doesn't meet the requirement, an error message is generated. - * - * ```proto - * message MyBytes { - * // value does not have suffix \x03\x04 - * optional bytes value = 1 [(buf.validate.field).bytes.suffix = "\x03\x04"]; - * } - * ``` - * - * @generated from protobuf field: optional bytes suffix = 6; - */ - suffix?: Uint8Array; - /** - * `contains` requires the field value to have the specified bytes anywhere in - * the string. - * If the field value doesn't meet the requirement, an error message is generated. - * - * ```protobuf - * message MyBytes { - * // value does not contain \x02\x03 - * optional bytes value = 1 [(buf.validate.field).bytes.contains = "\x02\x03"]; - * } - * ``` - * - * @generated from protobuf field: optional bytes contains = 7; - */ - contains?: Uint8Array; - /** - * `in` requires the field value to be equal to one of the specified - * values. If the field value doesn't match any of the specified values, an - * error message is generated. - * - * ```protobuf - * message MyBytes { - * // value must in ["\x01\x02", "\x02\x03", "\x03\x04"] - * optional bytes value = 1 [(buf.validate.field).bytes.in = {"\x01\x02", "\x02\x03", "\x03\x04"}]; - * } - * ``` - * - * @generated from protobuf field: repeated bytes in = 8; - */ - in: Uint8Array[]; - /** - * `not_in` requires the field value to be not equal to any of the specified - * values. - * If the field value matches any of the specified values, an error message is - * generated. - * - * ```proto - * message MyBytes { - * // value must not in ["\x01\x02", "\x02\x03", "\x03\x04"] - * optional bytes value = 1 [(buf.validate.field).bytes.not_in = {"\x01\x02", "\x02\x03", "\x03\x04"}]; - * } - * ``` - * - * @generated from protobuf field: repeated bytes not_in = 9; - */ - not_in: Uint8Array[]; - /** - * @generated from protobuf oneof: well_known - */ - well_known: { - oneofKind: "ip"; - /** - * `ip` ensures that the field `value` is a valid IP address (v4 or v6) in byte format. - * If the field value doesn't meet this constraint, an error message is generated. - * - * ```proto - * message MyBytes { - * // value must be a valid IP address - * optional bytes value = 1 [(buf.validate.field).bytes.ip = true]; - * } - * ``` - * - * @generated from protobuf field: bool ip = 10; - */ - ip: boolean; - } | { - oneofKind: "ipv4"; - /** - * `ipv4` ensures that the field `value` is a valid IPv4 address in byte format. - * If the field value doesn't meet this constraint, an error message is generated. - * - * ```proto - * message MyBytes { - * // value must be a valid IPv4 address - * optional bytes value = 1 [(buf.validate.field).bytes.ipv4 = true]; - * } - * ``` - * - * @generated from protobuf field: bool ipv4 = 11; - */ - ipv4: boolean; - } | { - oneofKind: "ipv6"; - /** - * `ipv6` ensures that the field `value` is a valid IPv6 address in byte format. - * If the field value doesn't meet this constraint, an error message is generated. - * ```proto - * message MyBytes { - * // value must be a valid IPv6 address - * optional bytes value = 1 [(buf.validate.field).bytes.ipv6 = true]; - * } - * ``` - * - * @generated from protobuf field: bool ipv6 = 12; - */ - ipv6: boolean; - } | { - oneofKind: undefined; - }; -} -/** - * EnumRules describe the constraints applied to `enum` values. - * - * @generated from protobuf message buf.validate.EnumRules - */ -export interface EnumRules { - /** - * `const` requires the field value to exactly match the specified enum value. - * If the field value doesn't match, an error message is generated. - * - * ```proto - * enum MyEnum { - * MY_ENUM_UNSPECIFIED = 0; - * MY_ENUM_VALUE1 = 1; - * MY_ENUM_VALUE2 = 2; - * } - * - * message MyMessage { - * // The field `value` must be exactly MY_ENUM_VALUE1. - * MyEnum value = 1 [(buf.validate.field).enum.const = 1]; - * } - * ``` - * - * @generated from protobuf field: optional int32 const = 1; - */ - const?: number; - /** - * `defined_only` requires the field value to be one of the defined values for - * this enum, failing on any undefined value. - * - * ```proto - * enum MyEnum { - * MY_ENUM_UNSPECIFIED = 0; - * MY_ENUM_VALUE1 = 1; - * MY_ENUM_VALUE2 = 2; - * } - * - * message MyMessage { - * // The field `value` must be a defined value of MyEnum. - * MyEnum value = 1 [(buf.validate.field).enum.defined_only = true]; - * } - * ``` - * - * @generated from protobuf field: optional bool defined_only = 2; - */ - defined_only?: boolean; - /** - * `in` requires the field value to be equal to one of the - * specified enum values. If the field value doesn't match any of the - * specified values, an error message is generated. - * - * ```proto - * enum MyEnum { - * MY_ENUM_UNSPECIFIED = 0; - * MY_ENUM_VALUE1 = 1; - * MY_ENUM_VALUE2 = 2; - * } - * - * message MyMessage { - * // The field `value` must be equal to one of the specified values. - * MyEnum value = 1 [(buf.validate.field).enum.in = {1, 2}]; - * } - * ``` - * - * @generated from protobuf field: repeated int32 in = 3; - */ - in: number[]; - /** - * `not_in` requires the field value to be not equal to any of the - * specified enum values. If the field value matches one of the specified - * values, an error message is generated. - * - * ```proto - * enum MyEnum { - * MY_ENUM_UNSPECIFIED = 0; - * MY_ENUM_VALUE1 = 1; - * MY_ENUM_VALUE2 = 2; - * } - * - * message MyMessage { - * // The field `value` must not be equal to any of the specified values. - * MyEnum value = 1 [(buf.validate.field).enum.not_in = {1, 2}]; - * } - * ``` - * - * @generated from protobuf field: repeated int32 not_in = 4; - */ - not_in: number[]; -} -/** - * RepeatedRules describe the constraints applied to `repeated` values. - * - * @generated from protobuf message buf.validate.RepeatedRules - */ -export interface RepeatedRules { - /** - * `min_items` requires that this field must contain at least the specified - * minimum number of items. - * - * Note that `min_items = 1` is equivalent to setting a field as `required`. - * - * ```proto - * message MyRepeated { - * // value must contain at least 2 items - * repeated string value = 1 [(buf.validate.field).repeated.min_items = 2]; - * } - * ``` - * - * @generated from protobuf field: optional uint64 min_items = 1; - */ - min_items?: bigint; - /** - * `max_items` denotes that this field must not exceed a - * certain number of items as the upper limit. If the field contains more - * items than specified, an error message will be generated, requiring the - * field to maintain no more than the specified number of items. - * - * ```proto - * message MyRepeated { - * // value must contain no more than 3 item(s) - * repeated string value = 1 [(buf.validate.field).repeated.max_items = 3]; - * } - * ``` - * - * @generated from protobuf field: optional uint64 max_items = 2; - */ - max_items?: bigint; - /** - * `unique` indicates that all elements in this field must - * be unique. This constraint is strictly applicable to scalar and enum - * types, with message types not being supported. - * - * ```proto - * message MyRepeated { - * // repeated value must contain unique items - * repeated string value = 1 [(buf.validate.field).repeated.unique = true]; - * } - * ``` - * - * @generated from protobuf field: optional bool unique = 3; - */ - unique?: boolean; - /** - * `items` details the constraints to be applied to each item - * in the field. Even for repeated message fields, validation is executed - * against each item unless skip is explicitly specified. - * - * ```proto - * message MyRepeated { - * // The items in the field `value` must follow the specified constraints. - * repeated string value = 1 [(buf.validate.field).repeated.items = { - * string: { - * min_len: 3 - * max_len: 10 - * } - * }]; - * } - * ``` - * - * @generated from protobuf field: optional buf.validate.FieldConstraints items = 4; - */ - items?: FieldConstraints; -} -/** - * MapRules describe the constraints applied to `map` values. - * - * @generated from protobuf message buf.validate.MapRules - */ -export interface MapRules { - /** - * Specifies the minimum number of key-value pairs allowed. If the field has - * fewer key-value pairs than specified, an error message is generated. - * - * ```proto - * message MyMap { - * // The field `value` must have at least 2 key-value pairs. - * map value = 1 [(buf.validate.field).map.min_pairs = 2]; - * } - * ``` - * - * @generated from protobuf field: optional uint64 min_pairs = 1; - */ - min_pairs?: bigint; - /** - * Specifies the maximum number of key-value pairs allowed. If the field has - * more key-value pairs than specified, an error message is generated. - * - * ```proto - * message MyMap { - * // The field `value` must have at most 3 key-value pairs. - * map value = 1 [(buf.validate.field).map.max_pairs = 3]; - * } - * ``` - * - * @generated from protobuf field: optional uint64 max_pairs = 2; - */ - max_pairs?: bigint; - /** - * Specifies the constraints to be applied to each key in the field. - * - * ```proto - * message MyMap { - * // The keys in the field `value` must follow the specified constraints. - * map value = 1 [(buf.validate.field).map.keys = { - * string: { - * min_len: 3 - * max_len: 10 - * } - * }]; - * } - * ``` - * - * @generated from protobuf field: optional buf.validate.FieldConstraints keys = 4; - */ - keys?: FieldConstraints; - /** - * Specifies the constraints to be applied to the value of each key in the - * field. Message values will still have their validations evaluated unless - * skip is specified here. - * - * ```proto - * message MyMap { - * // The values in the field `value` must follow the specified constraints. - * map value = 1 [(buf.validate.field).map.values = { - * string: { - * min_len: 5 - * max_len: 20 - * } - * }]; - * } - * ``` - * - * @generated from protobuf field: optional buf.validate.FieldConstraints values = 5; - */ - values?: FieldConstraints; -} -/** - * AnyRules describe constraints applied exclusively to the `google.protobuf.Any` well-known type. - * - * @generated from protobuf message buf.validate.AnyRules - */ -export interface AnyRules { - /** - * `in` requires the field's `type_url` to be equal to one of the - * specified values. If it doesn't match any of the specified values, an error - * message is generated. - * - * ```proto - * message MyAny { - * // The `value` field must have a `type_url` equal to one of the specified values. - * google.protobuf.Any value = 1 [(buf.validate.field).any.in = ["type.googleapis.com/MyType1", "type.googleapis.com/MyType2"]]; - * } - * ``` - * - * @generated from protobuf field: repeated string in = 2; - */ - in: string[]; - /** - * requires the field's type_url to be not equal to any of the specified values. If it matches any of the specified values, an error message is generated. - * - * ```proto - * message MyAny { - * // The field `value` must not have a `type_url` equal to any of the specified values. - * google.protobuf.Any value = 1 [(buf.validate.field).any.not_in = ["type.googleapis.com/ForbiddenType1", "type.googleapis.com/ForbiddenType2"]]; - * } - * ``` - * - * @generated from protobuf field: repeated string not_in = 3; - */ - not_in: string[]; -} -/** - * DurationRules describe the constraints applied exclusively to the `google.protobuf.Duration` well-known type. - * - * @generated from protobuf message buf.validate.DurationRules - */ -export interface DurationRules { - /** - * `const` dictates that the field must match the specified value of the `google.protobuf.Duration` type exactly. - * If the field's value deviates from the specified value, an error message - * will be generated. - * - * ```proto - * message MyDuration { - * // value must equal 5s - * google.protobuf.Duration value = 1 [(buf.validate.field).duration.const = "5s"]; - * } - * ``` - * - * @generated from protobuf field: optional google.protobuf.Duration const = 2; - */ - const?: Duration; - /** - * @generated from protobuf oneof: less_than - */ - less_than: { - oneofKind: "lt"; - /** - * `lt` stipulates that the field must be less than the specified value of the `google.protobuf.Duration` type, - * exclusive. If the field's value is greater than or equal to the specified - * value, an error message will be generated. - * - * ```proto - * message MyDuration { - * // value must be less than 5s - * google.protobuf.Duration value = 1 [(buf.validate.field).duration.lt = "5s"]; - * } - * ``` - * - * @generated from protobuf field: google.protobuf.Duration lt = 3; - */ - lt: Duration; - } | { - oneofKind: "lte"; - /** - * `lte` indicates that the field must be less than or equal to the specified - * value of the `google.protobuf.Duration` type, inclusive. If the field's value is greater than the specified value, - * an error message will be generated. - * - * ```proto - * message MyDuration { - * // value must be less than or equal to 10s - * google.protobuf.Duration value = 1 [(buf.validate.field).duration.lte = "10s"]; - * } - * ``` - * - * @generated from protobuf field: google.protobuf.Duration lte = 4; - */ - lte: Duration; - } | { - oneofKind: undefined; - }; - /** - * @generated from protobuf oneof: greater_than - */ - greater_than: { - oneofKind: "gt"; - /** - * `gt` requires the duration field value to be greater than the specified - * value (exclusive). If the value of `gt` is larger than a specified `lt` - * or `lte`, the range is reversed, and the field value must be outside the - * specified range. If the field value doesn't meet the required conditions, - * an error message is generated. - * - * ```proto - * message MyDuration { - * // duration must be greater than 5s [duration.gt] - * google.protobuf.Duration value = 1 [(buf.validate.field).duration.gt = { seconds: 5 }]; - * - * // duration must be greater than 5s and less than 10s [duration.gt_lt] - * google.protobuf.Duration another_value = 2 [(buf.validate.field).duration = { gt: { seconds: 5 }, lt: { seconds: 10 } }]; - * - * // duration must be greater than 10s or less than 5s [duration.gt_lt_exclusive] - * google.protobuf.Duration other_value = 3 [(buf.validate.field).duration = { gt: { seconds: 10 }, lt: { seconds: 5 } }]; - * } - * ``` - * - * @generated from protobuf field: google.protobuf.Duration gt = 5; - */ - gt: Duration; - } | { - oneofKind: "gte"; - /** - * `gte` requires the duration field value to be greater than or equal to the - * specified value (exclusive). If the value of `gte` is larger than a - * specified `lt` or `lte`, the range is reversed, and the field value must - * be outside the specified range. If the field value doesn't meet the - * required conditions, an error message is generated. - * - * ```proto - * message MyDuration { - * // duration must be greater than or equal to 5s [duration.gte] - * google.protobuf.Duration value = 1 [(buf.validate.field).duration.gte = { seconds: 5 }]; - * - * // duration must be greater than or equal to 5s and less than 10s [duration.gte_lt] - * google.protobuf.Duration another_value = 2 [(buf.validate.field).duration = { gte: { seconds: 5 }, lt: { seconds: 10 } }]; - * - * // duration must be greater than or equal to 10s or less than 5s [duration.gte_lt_exclusive] - * google.protobuf.Duration other_value = 3 [(buf.validate.field).duration = { gte: { seconds: 10 }, lt: { seconds: 5 } }]; - * } - * ``` - * - * @generated from protobuf field: google.protobuf.Duration gte = 6; - */ - gte: Duration; - } | { - oneofKind: undefined; - }; - /** - * `in` asserts that the field must be equal to one of the specified values of the `google.protobuf.Duration` type. - * If the field's value doesn't correspond to any of the specified values, - * an error message will be generated. - * - * ```proto - * message MyDuration { - * // value must be in list [1s, 2s, 3s] - * google.protobuf.Duration value = 1 [(buf.validate.field).duration.in = ["1s", "2s", "3s"]]; - * } - * ``` - * - * @generated from protobuf field: repeated google.protobuf.Duration in = 7; - */ - in: Duration[]; - /** - * `not_in` denotes that the field must not be equal to - * any of the specified values of the `google.protobuf.Duration` type. - * If the field's value matches any of these values, an error message will be - * generated. - * - * ```proto - * message MyDuration { - * // value must not be in list [1s, 2s, 3s] - * google.protobuf.Duration value = 1 [(buf.validate.field).duration.not_in = ["1s", "2s", "3s"]]; - * } - * ``` - * - * @generated from protobuf field: repeated google.protobuf.Duration not_in = 8; - */ - not_in: Duration[]; -} -/** - * TimestampRules describe the constraints applied exclusively to the `google.protobuf.Timestamp` well-known type. - * - * @generated from protobuf message buf.validate.TimestampRules - */ -export interface TimestampRules { - /** - * `const` dictates that this field, of the `google.protobuf.Timestamp` type, must exactly match the specified value. If the field value doesn't correspond to the specified timestamp, an error message will be generated. - * - * ```proto - * message MyTimestamp { - * // value must equal 2023-05-03T10:00:00Z - * google.protobuf.Timestamp created_at = 1 [(buf.validate.field).timestamp.const = {seconds: 1727998800}]; - * } - * ``` - * - * @generated from protobuf field: optional google.protobuf.Timestamp const = 2; - */ - const?: Timestamp; - /** - * @generated from protobuf oneof: less_than - */ - less_than: { - oneofKind: "lt"; - /** - * requires the duration field value to be less than the specified value (field < value). If the field value doesn't meet the required conditions, an error message is generated. - * - * ```proto - * message MyDuration { - * // duration must be less than 'P3D' [duration.lt] - * google.protobuf.Duration value = 1 [(buf.validate.field).duration.lt = { seconds: 259200 }]; - * } - * ``` - * - * @generated from protobuf field: google.protobuf.Timestamp lt = 3; - */ - lt: Timestamp; - } | { - oneofKind: "lte"; - /** - * requires the timestamp field value to be less than or equal to the specified value (field <= value). If the field value doesn't meet the required conditions, an error message is generated. - * - * ```proto - * message MyTimestamp { - * // timestamp must be less than or equal to '2023-05-14T00:00:00Z' [timestamp.lte] - * google.protobuf.Timestamp value = 1 [(buf.validate.field).timestamp.lte = { seconds: 1678867200 }]; - * } - * ``` - * - * @generated from protobuf field: google.protobuf.Timestamp lte = 4; - */ - lte: Timestamp; - } | { - oneofKind: "lt_now"; - /** - * `lt_now` specifies that this field, of the `google.protobuf.Timestamp` type, must be less than the current time. `lt_now` can only be used with the `within` rule. - * - * ```proto - * message MyTimestamp { - * // value must be less than now - * google.protobuf.Timestamp created_at = 1 [(buf.validate.field).timestamp.lt_now = true]; - * } - * ``` - * - * @generated from protobuf field: bool lt_now = 7; - */ - lt_now: boolean; - } | { - oneofKind: undefined; - }; - /** - * @generated from protobuf oneof: greater_than - */ - greater_than: { - oneofKind: "gt"; - /** - * `gt` requires the timestamp field value to be greater than the specified - * value (exclusive). If the value of `gt` is larger than a specified `lt` - * or `lte`, the range is reversed, and the field value must be outside the - * specified range. If the field value doesn't meet the required conditions, - * an error message is generated. - * - * ```proto - * message MyTimestamp { - * // timestamp must be greater than '2023-01-01T00:00:00Z' [timestamp.gt] - * google.protobuf.Timestamp value = 1 [(buf.validate.field).timestamp.gt = { seconds: 1672444800 }]; - * - * // timestamp must be greater than '2023-01-01T00:00:00Z' and less than '2023-01-02T00:00:00Z' [timestamp.gt_lt] - * google.protobuf.Timestamp another_value = 2 [(buf.validate.field).timestamp = { gt: { seconds: 1672444800 }, lt: { seconds: 1672531200 } }]; - * - * // timestamp must be greater than '2023-01-02T00:00:00Z' or less than '2023-01-01T00:00:00Z' [timestamp.gt_lt_exclusive] - * google.protobuf.Timestamp other_value = 3 [(buf.validate.field).timestamp = { gt: { seconds: 1672531200 }, lt: { seconds: 1672444800 } }]; - * } - * ``` - * - * @generated from protobuf field: google.protobuf.Timestamp gt = 5; - */ - gt: Timestamp; - } | { - oneofKind: "gte"; - /** - * `gte` requires the timestamp field value to be greater than or equal to the - * specified value (exclusive). If the value of `gte` is larger than a - * specified `lt` or `lte`, the range is reversed, and the field value - * must be outside the specified range. If the field value doesn't meet - * the required conditions, an error message is generated. - * - * ```proto - * message MyTimestamp { - * // timestamp must be greater than or equal to '2023-01-01T00:00:00Z' [timestamp.gte] - * google.protobuf.Timestamp value = 1 [(buf.validate.field).timestamp.gte = { seconds: 1672444800 }]; - * - * // timestamp must be greater than or equal to '2023-01-01T00:00:00Z' and less than '2023-01-02T00:00:00Z' [timestamp.gte_lt] - * google.protobuf.Timestamp another_value = 2 [(buf.validate.field).timestamp = { gte: { seconds: 1672444800 }, lt: { seconds: 1672531200 } }]; - * - * // timestamp must be greater than or equal to '2023-01-02T00:00:00Z' or less than '2023-01-01T00:00:00Z' [timestamp.gte_lt_exclusive] - * google.protobuf.Timestamp other_value = 3 [(buf.validate.field).timestamp = { gte: { seconds: 1672531200 }, lt: { seconds: 1672444800 } }]; - * } - * ``` - * - * @generated from protobuf field: google.protobuf.Timestamp gte = 6; - */ - gte: Timestamp; - } | { - oneofKind: "gt_now"; - /** - * `gt_now` specifies that this field, of the `google.protobuf.Timestamp` type, must be greater than the current time. `gt_now` can only be used with the `within` rule. - * - * ```proto - * message MyTimestamp { - * // value must be greater than now - * google.protobuf.Timestamp created_at = 1 [(buf.validate.field).timestamp.gt_now = true]; - * } - * ``` - * - * @generated from protobuf field: bool gt_now = 8; - */ - gt_now: boolean; - } | { - oneofKind: undefined; - }; - /** - * `within` specifies that this field, of the `google.protobuf.Timestamp` type, must be within the specified duration of the current time. If the field value isn't within the duration, an error message is generated. - * - * ```proto - * message MyTimestamp { - * // value must be within 1 hour of now - * google.protobuf.Timestamp created_at = 1 [(buf.validate.field).timestamp.within = {seconds: 3600}]; - * } - * ``` - * - * @generated from protobuf field: optional google.protobuf.Duration within = 9; - */ - within?: Duration; -} -/** - * WellKnownRegex contain some well-known patterns. - * - * @generated from protobuf enum buf.validate.KnownRegex - */ -export enum KnownRegex { - /** - * @generated from protobuf enum value: KNOWN_REGEX_UNSPECIFIED = 0; - */ - KNOWN_REGEX_UNSPECIFIED = 0, - /** - * HTTP header name as defined by [RFC 7230](https://tools.ietf.org/html/rfc7230#section-3.2). - * - * @generated from protobuf enum value: KNOWN_REGEX_HTTP_HEADER_NAME = 1; - */ - KNOWN_REGEX_HTTP_HEADER_NAME = 1, - /** - * HTTP header value as defined by [RFC 7230](https://tools.ietf.org/html/rfc7230#section-3.2.4). - * - * @generated from protobuf enum value: KNOWN_REGEX_HTTP_HEADER_VALUE = 2; - */ - KNOWN_REGEX_HTTP_HEADER_VALUE = 2 -} -// @generated message type with reflection information, may provide speed optimized methods -class MessageConstraints$Type extends MessageType { - constructor() { - super("buf.validate.MessageConstraints", [ - { no: 1, name: "disabled", kind: "scalar", opt: true, T: 8 /*ScalarType.BOOL*/ }, - { no: 3, name: "cel", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => Constraint } - ]); - } - create(value?: PartialMessage): MessageConstraints { - const message = globalThis.Object.create((this.messagePrototype!)); - message.cel = []; - if (value !== undefined) - reflectionMergePartial(this, message, value); - return message; - } - internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: MessageConstraints): MessageConstraints { - let message = target ?? this.create(), end = reader.pos + length; - while (reader.pos < end) { - let [fieldNo, wireType] = reader.tag(); - switch (fieldNo) { - case /* optional bool disabled */ 1: - message.disabled = reader.bool(); - break; - case /* repeated buf.validate.Constraint cel */ 3: - message.cel.push(Constraint.internalBinaryRead(reader, reader.uint32(), options)); - break; - default: - let u = options.readUnknownField; - if (u === "throw") - throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); - let d = reader.skip(wireType); - if (u !== false) - (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); - } - } - return message; - } - internalBinaryWrite(message: MessageConstraints, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { - /* optional bool disabled = 1; */ - if (message.disabled !== undefined) - writer.tag(1, WireType.Varint).bool(message.disabled); - /* repeated buf.validate.Constraint cel = 3; */ - for (let i = 0; i < message.cel.length; i++) - Constraint.internalBinaryWrite(message.cel[i], writer.tag(3, WireType.LengthDelimited).fork(), options).join(); - let u = options.writeUnknownFields; - if (u !== false) - (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); - return writer; - } -} -/** - * @generated MessageType for protobuf message buf.validate.MessageConstraints - */ -export const MessageConstraints = new MessageConstraints$Type(); -// @generated message type with reflection information, may provide speed optimized methods -class OneofConstraints$Type extends MessageType { - constructor() { - super("buf.validate.OneofConstraints", [ - { no: 1, name: "required", kind: "scalar", opt: true, T: 8 /*ScalarType.BOOL*/ } - ]); - } - create(value?: PartialMessage): OneofConstraints { - const message = globalThis.Object.create((this.messagePrototype!)); - if (value !== undefined) - reflectionMergePartial(this, message, value); - return message; - } - internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: OneofConstraints): OneofConstraints { - let message = target ?? this.create(), end = reader.pos + length; - while (reader.pos < end) { - let [fieldNo, wireType] = reader.tag(); - switch (fieldNo) { - case /* optional bool required */ 1: - message.required = reader.bool(); - break; - default: - let u = options.readUnknownField; - if (u === "throw") - throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); - let d = reader.skip(wireType); - if (u !== false) - (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); - } - } - return message; - } - internalBinaryWrite(message: OneofConstraints, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { - /* optional bool required = 1; */ - if (message.required !== undefined) - writer.tag(1, WireType.Varint).bool(message.required); - let u = options.writeUnknownFields; - if (u !== false) - (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); - return writer; - } -} -/** - * @generated MessageType for protobuf message buf.validate.OneofConstraints - */ -export const OneofConstraints = new OneofConstraints$Type(); -// @generated message type with reflection information, may provide speed optimized methods -class FieldConstraints$Type extends MessageType { - constructor() { - super("buf.validate.FieldConstraints", [ - { no: 23, name: "cel", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => Constraint }, - { no: 24, name: "skipped", kind: "scalar", T: 8 /*ScalarType.BOOL*/ }, - { no: 25, name: "required", kind: "scalar", T: 8 /*ScalarType.BOOL*/ }, - { no: 26, name: "ignore_empty", kind: "scalar", localName: "ignore_empty", T: 8 /*ScalarType.BOOL*/ }, - { no: 1, name: "float", kind: "message", oneof: "type", T: () => FloatRules }, - { no: 2, name: "double", kind: "message", oneof: "type", T: () => DoubleRules }, - { no: 3, name: "int32", kind: "message", oneof: "type", T: () => Int32Rules }, - { no: 4, name: "int64", kind: "message", oneof: "type", T: () => Int64Rules }, - { no: 5, name: "uint32", kind: "message", oneof: "type", T: () => UInt32Rules }, - { no: 6, name: "uint64", kind: "message", oneof: "type", T: () => UInt64Rules }, - { no: 7, name: "sint32", kind: "message", oneof: "type", T: () => SInt32Rules }, - { no: 8, name: "sint64", kind: "message", oneof: "type", T: () => SInt64Rules }, - { no: 9, name: "fixed32", kind: "message", oneof: "type", T: () => Fixed32Rules }, - { no: 10, name: "fixed64", kind: "message", oneof: "type", T: () => Fixed64Rules }, - { no: 11, name: "sfixed32", kind: "message", oneof: "type", T: () => SFixed32Rules }, - { no: 12, name: "sfixed64", kind: "message", oneof: "type", T: () => SFixed64Rules }, - { no: 13, name: "bool", kind: "message", oneof: "type", T: () => BoolRules }, - { no: 14, name: "string", kind: "message", oneof: "type", T: () => StringRules }, - { no: 15, name: "bytes", kind: "message", oneof: "type", T: () => BytesRules }, - { no: 16, name: "enum", kind: "message", oneof: "type", T: () => EnumRules }, - { no: 18, name: "repeated", kind: "message", oneof: "type", T: () => RepeatedRules }, - { no: 19, name: "map", kind: "message", oneof: "type", T: () => MapRules }, - { no: 20, name: "any", kind: "message", oneof: "type", T: () => AnyRules }, - { no: 21, name: "duration", kind: "message", oneof: "type", T: () => DurationRules }, - { no: 22, name: "timestamp", kind: "message", oneof: "type", T: () => TimestampRules } - ]); - } - create(value?: PartialMessage): FieldConstraints { - const message = globalThis.Object.create((this.messagePrototype!)); - message.cel = []; - message.skipped = false; - message.required = false; - message.ignore_empty = false; - message.type = { oneofKind: undefined }; - if (value !== undefined) - reflectionMergePartial(this, message, value); - return message; - } - internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: FieldConstraints): FieldConstraints { - let message = target ?? this.create(), end = reader.pos + length; - while (reader.pos < end) { - let [fieldNo, wireType] = reader.tag(); - switch (fieldNo) { - case /* repeated buf.validate.Constraint cel */ 23: - message.cel.push(Constraint.internalBinaryRead(reader, reader.uint32(), options)); - break; - case /* bool skipped */ 24: - message.skipped = reader.bool(); - break; - case /* bool required */ 25: - message.required = reader.bool(); - break; - case /* bool ignore_empty */ 26: - message.ignore_empty = reader.bool(); - break; - case /* buf.validate.FloatRules float */ 1: - message.type = { - oneofKind: "float", - float: FloatRules.internalBinaryRead(reader, reader.uint32(), options, (message.type as any).float) - }; - break; - case /* buf.validate.DoubleRules double */ 2: - message.type = { - oneofKind: "double", - double: DoubleRules.internalBinaryRead(reader, reader.uint32(), options, (message.type as any).double) - }; - break; - case /* buf.validate.Int32Rules int32 */ 3: - message.type = { - oneofKind: "int32", - int32: Int32Rules.internalBinaryRead(reader, reader.uint32(), options, (message.type as any).int32) - }; - break; - case /* buf.validate.Int64Rules int64 */ 4: - message.type = { - oneofKind: "int64", - int64: Int64Rules.internalBinaryRead(reader, reader.uint32(), options, (message.type as any).int64) - }; - break; - case /* buf.validate.UInt32Rules uint32 */ 5: - message.type = { - oneofKind: "uint32", - uint32: UInt32Rules.internalBinaryRead(reader, reader.uint32(), options, (message.type as any).uint32) - }; - break; - case /* buf.validate.UInt64Rules uint64 */ 6: - message.type = { - oneofKind: "uint64", - uint64: UInt64Rules.internalBinaryRead(reader, reader.uint32(), options, (message.type as any).uint64) - }; - break; - case /* buf.validate.SInt32Rules sint32 */ 7: - message.type = { - oneofKind: "sint32", - sint32: SInt32Rules.internalBinaryRead(reader, reader.uint32(), options, (message.type as any).sint32) - }; - break; - case /* buf.validate.SInt64Rules sint64 */ 8: - message.type = { - oneofKind: "sint64", - sint64: SInt64Rules.internalBinaryRead(reader, reader.uint32(), options, (message.type as any).sint64) - }; - break; - case /* buf.validate.Fixed32Rules fixed32 */ 9: - message.type = { - oneofKind: "fixed32", - fixed32: Fixed32Rules.internalBinaryRead(reader, reader.uint32(), options, (message.type as any).fixed32) - }; - break; - case /* buf.validate.Fixed64Rules fixed64 */ 10: - message.type = { - oneofKind: "fixed64", - fixed64: Fixed64Rules.internalBinaryRead(reader, reader.uint32(), options, (message.type as any).fixed64) - }; - break; - case /* buf.validate.SFixed32Rules sfixed32 */ 11: - message.type = { - oneofKind: "sfixed32", - sfixed32: SFixed32Rules.internalBinaryRead(reader, reader.uint32(), options, (message.type as any).sfixed32) - }; - break; - case /* buf.validate.SFixed64Rules sfixed64 */ 12: - message.type = { - oneofKind: "sfixed64", - sfixed64: SFixed64Rules.internalBinaryRead(reader, reader.uint32(), options, (message.type as any).sfixed64) - }; - break; - case /* buf.validate.BoolRules bool */ 13: - message.type = { - oneofKind: "bool", - bool: BoolRules.internalBinaryRead(reader, reader.uint32(), options, (message.type as any).bool) - }; - break; - case /* buf.validate.StringRules string */ 14: - message.type = { - oneofKind: "string", - string: StringRules.internalBinaryRead(reader, reader.uint32(), options, (message.type as any).string) - }; - break; - case /* buf.validate.BytesRules bytes */ 15: - message.type = { - oneofKind: "bytes", - bytes: BytesRules.internalBinaryRead(reader, reader.uint32(), options, (message.type as any).bytes) - }; - break; - case /* buf.validate.EnumRules enum */ 16: - message.type = { - oneofKind: "enum", - enum: EnumRules.internalBinaryRead(reader, reader.uint32(), options, (message.type as any).enum) - }; - break; - case /* buf.validate.RepeatedRules repeated */ 18: - message.type = { - oneofKind: "repeated", - repeated: RepeatedRules.internalBinaryRead(reader, reader.uint32(), options, (message.type as any).repeated) - }; - break; - case /* buf.validate.MapRules map */ 19: - message.type = { - oneofKind: "map", - map: MapRules.internalBinaryRead(reader, reader.uint32(), options, (message.type as any).map) - }; - break; - case /* buf.validate.AnyRules any */ 20: - message.type = { - oneofKind: "any", - any: AnyRules.internalBinaryRead(reader, reader.uint32(), options, (message.type as any).any) - }; - break; - case /* buf.validate.DurationRules duration */ 21: - message.type = { - oneofKind: "duration", - duration: DurationRules.internalBinaryRead(reader, reader.uint32(), options, (message.type as any).duration) - }; - break; - case /* buf.validate.TimestampRules timestamp */ 22: - message.type = { - oneofKind: "timestamp", - timestamp: TimestampRules.internalBinaryRead(reader, reader.uint32(), options, (message.type as any).timestamp) - }; - break; - default: - let u = options.readUnknownField; - if (u === "throw") - throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); - let d = reader.skip(wireType); - if (u !== false) - (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); - } - } - return message; - } - internalBinaryWrite(message: FieldConstraints, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { - /* repeated buf.validate.Constraint cel = 23; */ - for (let i = 0; i < message.cel.length; i++) - Constraint.internalBinaryWrite(message.cel[i], writer.tag(23, WireType.LengthDelimited).fork(), options).join(); - /* bool skipped = 24; */ - if (message.skipped !== false) - writer.tag(24, WireType.Varint).bool(message.skipped); - /* bool required = 25; */ - if (message.required !== false) - writer.tag(25, WireType.Varint).bool(message.required); - /* bool ignore_empty = 26; */ - if (message.ignore_empty !== false) - writer.tag(26, WireType.Varint).bool(message.ignore_empty); - /* buf.validate.FloatRules float = 1; */ - if (message.type.oneofKind === "float") - FloatRules.internalBinaryWrite(message.type.float, writer.tag(1, WireType.LengthDelimited).fork(), options).join(); - /* buf.validate.DoubleRules double = 2; */ - if (message.type.oneofKind === "double") - DoubleRules.internalBinaryWrite(message.type.double, writer.tag(2, WireType.LengthDelimited).fork(), options).join(); - /* buf.validate.Int32Rules int32 = 3; */ - if (message.type.oneofKind === "int32") - Int32Rules.internalBinaryWrite(message.type.int32, writer.tag(3, WireType.LengthDelimited).fork(), options).join(); - /* buf.validate.Int64Rules int64 = 4; */ - if (message.type.oneofKind === "int64") - Int64Rules.internalBinaryWrite(message.type.int64, writer.tag(4, WireType.LengthDelimited).fork(), options).join(); - /* buf.validate.UInt32Rules uint32 = 5; */ - if (message.type.oneofKind === "uint32") - UInt32Rules.internalBinaryWrite(message.type.uint32, writer.tag(5, WireType.LengthDelimited).fork(), options).join(); - /* buf.validate.UInt64Rules uint64 = 6; */ - if (message.type.oneofKind === "uint64") - UInt64Rules.internalBinaryWrite(message.type.uint64, writer.tag(6, WireType.LengthDelimited).fork(), options).join(); - /* buf.validate.SInt32Rules sint32 = 7; */ - if (message.type.oneofKind === "sint32") - SInt32Rules.internalBinaryWrite(message.type.sint32, writer.tag(7, WireType.LengthDelimited).fork(), options).join(); - /* buf.validate.SInt64Rules sint64 = 8; */ - if (message.type.oneofKind === "sint64") - SInt64Rules.internalBinaryWrite(message.type.sint64, writer.tag(8, WireType.LengthDelimited).fork(), options).join(); - /* buf.validate.Fixed32Rules fixed32 = 9; */ - if (message.type.oneofKind === "fixed32") - Fixed32Rules.internalBinaryWrite(message.type.fixed32, writer.tag(9, WireType.LengthDelimited).fork(), options).join(); - /* buf.validate.Fixed64Rules fixed64 = 10; */ - if (message.type.oneofKind === "fixed64") - Fixed64Rules.internalBinaryWrite(message.type.fixed64, writer.tag(10, WireType.LengthDelimited).fork(), options).join(); - /* buf.validate.SFixed32Rules sfixed32 = 11; */ - if (message.type.oneofKind === "sfixed32") - SFixed32Rules.internalBinaryWrite(message.type.sfixed32, writer.tag(11, WireType.LengthDelimited).fork(), options).join(); - /* buf.validate.SFixed64Rules sfixed64 = 12; */ - if (message.type.oneofKind === "sfixed64") - SFixed64Rules.internalBinaryWrite(message.type.sfixed64, writer.tag(12, WireType.LengthDelimited).fork(), options).join(); - /* buf.validate.BoolRules bool = 13; */ - if (message.type.oneofKind === "bool") - BoolRules.internalBinaryWrite(message.type.bool, writer.tag(13, WireType.LengthDelimited).fork(), options).join(); - /* buf.validate.StringRules string = 14; */ - if (message.type.oneofKind === "string") - StringRules.internalBinaryWrite(message.type.string, writer.tag(14, WireType.LengthDelimited).fork(), options).join(); - /* buf.validate.BytesRules bytes = 15; */ - if (message.type.oneofKind === "bytes") - BytesRules.internalBinaryWrite(message.type.bytes, writer.tag(15, WireType.LengthDelimited).fork(), options).join(); - /* buf.validate.EnumRules enum = 16; */ - if (message.type.oneofKind === "enum") - EnumRules.internalBinaryWrite(message.type.enum, writer.tag(16, WireType.LengthDelimited).fork(), options).join(); - /* buf.validate.RepeatedRules repeated = 18; */ - if (message.type.oneofKind === "repeated") - RepeatedRules.internalBinaryWrite(message.type.repeated, writer.tag(18, WireType.LengthDelimited).fork(), options).join(); - /* buf.validate.MapRules map = 19; */ - if (message.type.oneofKind === "map") - MapRules.internalBinaryWrite(message.type.map, writer.tag(19, WireType.LengthDelimited).fork(), options).join(); - /* buf.validate.AnyRules any = 20; */ - if (message.type.oneofKind === "any") - AnyRules.internalBinaryWrite(message.type.any, writer.tag(20, WireType.LengthDelimited).fork(), options).join(); - /* buf.validate.DurationRules duration = 21; */ - if (message.type.oneofKind === "duration") - DurationRules.internalBinaryWrite(message.type.duration, writer.tag(21, WireType.LengthDelimited).fork(), options).join(); - /* buf.validate.TimestampRules timestamp = 22; */ - if (message.type.oneofKind === "timestamp") - TimestampRules.internalBinaryWrite(message.type.timestamp, writer.tag(22, WireType.LengthDelimited).fork(), options).join(); - let u = options.writeUnknownFields; - if (u !== false) - (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); - return writer; - } -} -/** - * @generated MessageType for protobuf message buf.validate.FieldConstraints - */ -export const FieldConstraints = new FieldConstraints$Type(); -// @generated message type with reflection information, may provide speed optimized methods -class FloatRules$Type extends MessageType { - constructor() { - super("buf.validate.FloatRules", [ - { no: 1, name: "const", kind: "scalar", opt: true, T: 2 /*ScalarType.FLOAT*/, options: { "buf.validate.priv.field": { cel: [{ id: "float.const", expression: "this != rules.const ? 'value must equal %s'.format([rules.const]) : ''" }] } } }, - { no: 2, name: "lt", kind: "scalar", oneof: "less_than", T: 2 /*ScalarType.FLOAT*/, options: { "buf.validate.priv.field": { cel: [{ id: "float.lt", expression: "!has(rules.gte) && !has(rules.gt) && (this.isNan() || this >= rules.lt)? 'value must be less than %s'.format([rules.lt]) : ''" }] } } }, - { no: 3, name: "lte", kind: "scalar", oneof: "less_than", T: 2 /*ScalarType.FLOAT*/, options: { "buf.validate.priv.field": { cel: [{ id: "float.lte", expression: "!has(rules.gte) && !has(rules.gt) && (this.isNan() || this > rules.lte)? 'value must be less than or equal to %s'.format([rules.lte]) : ''" }] } } }, - { no: 4, name: "gt", kind: "scalar", oneof: "greater_than", T: 2 /*ScalarType.FLOAT*/, options: { "buf.validate.priv.field": { cel: [{ id: "float.gt", expression: "!has(rules.lt) && !has(rules.lte) && (this.isNan() || this <= rules.gt)? 'value must be greater than %s'.format([rules.gt]) : ''" }, { id: "float.gt_lt", expression: "has(rules.lt) && rules.lt >= rules.gt && (this.isNan() || this >= rules.lt || this <= rules.gt)? 'value must be greater than %s and less than %s'.format([rules.gt, rules.lt]) : ''" }, { id: "float.gt_lt_exclusive", expression: "has(rules.lt) && rules.lt < rules.gt && (this.isNan() || (rules.lt <= this && this <= rules.gt))? 'value must be greater than %s or less than %s'.format([rules.gt, rules.lt]) : ''" }, { id: "float.gt_lte", expression: "has(rules.lte) && rules.lte >= rules.gt && (this.isNan() || this > rules.lte || this <= rules.gt)? 'value must be greater than %s and less than or equal to %s'.format([rules.gt, rules.lte]) : ''" }, { id: "float.gt_lte_exclusive", expression: "has(rules.lte) && rules.lte < rules.gt && (this.isNan() || (rules.lte < this && this <= rules.gt))? 'value must be greater than %s or less than or equal to %s'.format([rules.gt, rules.lte]) : ''" }] } } }, - { no: 5, name: "gte", kind: "scalar", oneof: "greater_than", T: 2 /*ScalarType.FLOAT*/, options: { "buf.validate.priv.field": { cel: [{ id: "float.gte", expression: "!has(rules.lt) && !has(rules.lte) && (this.isNan() || this < rules.gte)? 'value must be greater than or equal to %s'.format([rules.gte]) : ''" }, { id: "float.gte_lt", expression: "has(rules.lt) && rules.lt >= rules.gte && (this.isNan() || this >= rules.lt || this < rules.gte)? 'value must be greater than or equal to %s and less than %s'.format([rules.gte, rules.lt]) : ''" }, { id: "float.gte_lt_exclusive", expression: "has(rules.lt) && rules.lt < rules.gte && (this.isNan() || (rules.lt <= this && this < rules.gte))? 'value must be greater than or equal to %s or less than %s'.format([rules.gte, rules.lt]) : ''" }, { id: "float.gte_lte", expression: "has(rules.lte) && rules.lte >= rules.gte && (this.isNan() || this > rules.lte || this < rules.gte)? 'value must be greater than or equal to %s and less than or equal to %s'.format([rules.gte, rules.lte]) : ''" }, { id: "float.gte_lte_exclusive", expression: "has(rules.lte) && rules.lte < rules.gte && (this.isNan() || (rules.lte < this && this < rules.gte))? 'value must be greater than or equal to %s or less than or equal to %s'.format([rules.gte, rules.lte]) : ''" }] } } }, - { no: 6, name: "in", kind: "scalar", repeat: 1 /*RepeatType.PACKED*/, T: 2 /*ScalarType.FLOAT*/, options: { "buf.validate.priv.field": { cel: [{ id: "float.in", expression: "!(this in dyn(rules)['in']) ? 'value must be in list %s'.format([dyn(rules)['in']]) : ''" }] } } }, - { no: 7, name: "not_in", kind: "scalar", localName: "not_in", repeat: 1 /*RepeatType.PACKED*/, T: 2 /*ScalarType.FLOAT*/, options: { "buf.validate.priv.field": { cel: [{ id: "float.not_in", expression: "this in rules.not_in ? 'value must not be in list %s'.format([rules.not_in]) : ''" }] } } }, - { no: 8, name: "finite", kind: "scalar", T: 8 /*ScalarType.BOOL*/, options: { "buf.validate.priv.field": { cel: [{ id: "float.finite", expression: "this.isNan() || this.isInf() ? 'value must be finite' : ''" }] } } } - ]); - } - create(value?: PartialMessage): FloatRules { - const message = globalThis.Object.create((this.messagePrototype!)); - message.less_than = { oneofKind: undefined }; - message.greater_than = { oneofKind: undefined }; - message.in = []; - message.not_in = []; - message.finite = false; - if (value !== undefined) - reflectionMergePartial(this, message, value); - return message; - } - internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: FloatRules): FloatRules { - let message = target ?? this.create(), end = reader.pos + length; - while (reader.pos < end) { - let [fieldNo, wireType] = reader.tag(); - switch (fieldNo) { - case /* optional float const */ 1: - message.const = reader.float(); - break; - case /* float lt */ 2: - message.less_than = { - oneofKind: "lt", - lt: reader.float() - }; - break; - case /* float lte */ 3: - message.less_than = { - oneofKind: "lte", - lte: reader.float() - }; - break; - case /* float gt */ 4: - message.greater_than = { - oneofKind: "gt", - gt: reader.float() - }; - break; - case /* float gte */ 5: - message.greater_than = { - oneofKind: "gte", - gte: reader.float() - }; - break; - case /* repeated float in */ 6: - if (wireType === WireType.LengthDelimited) - for (let e = reader.int32() + reader.pos; reader.pos < e;) - message.in.push(reader.float()); - else - message.in.push(reader.float()); - break; - case /* repeated float not_in */ 7: - if (wireType === WireType.LengthDelimited) - for (let e = reader.int32() + reader.pos; reader.pos < e;) - message.not_in.push(reader.float()); - else - message.not_in.push(reader.float()); - break; - case /* bool finite */ 8: - message.finite = reader.bool(); - break; - default: - let u = options.readUnknownField; - if (u === "throw") - throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); - let d = reader.skip(wireType); - if (u !== false) - (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); - } - } - return message; - } - internalBinaryWrite(message: FloatRules, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { - /* optional float const = 1; */ - if (message.const !== undefined) - writer.tag(1, WireType.Bit32).float(message.const); - /* float lt = 2; */ - if (message.less_than.oneofKind === "lt") - writer.tag(2, WireType.Bit32).float(message.less_than.lt); - /* float lte = 3; */ - if (message.less_than.oneofKind === "lte") - writer.tag(3, WireType.Bit32).float(message.less_than.lte); - /* float gt = 4; */ - if (message.greater_than.oneofKind === "gt") - writer.tag(4, WireType.Bit32).float(message.greater_than.gt); - /* float gte = 5; */ - if (message.greater_than.oneofKind === "gte") - writer.tag(5, WireType.Bit32).float(message.greater_than.gte); - /* repeated float in = 6; */ - if (message.in.length) { - writer.tag(6, WireType.LengthDelimited).fork(); - for (let i = 0; i < message.in.length; i++) - writer.float(message.in[i]); - writer.join(); - } - /* repeated float not_in = 7; */ - if (message.not_in.length) { - writer.tag(7, WireType.LengthDelimited).fork(); - for (let i = 0; i < message.not_in.length; i++) - writer.float(message.not_in[i]); - writer.join(); - } - /* bool finite = 8; */ - if (message.finite !== false) - writer.tag(8, WireType.Varint).bool(message.finite); - let u = options.writeUnknownFields; - if (u !== false) - (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); - return writer; - } -} -/** - * @generated MessageType for protobuf message buf.validate.FloatRules - */ -export const FloatRules = new FloatRules$Type(); -// @generated message type with reflection information, may provide speed optimized methods -class DoubleRules$Type extends MessageType { - constructor() { - super("buf.validate.DoubleRules", [ - { no: 1, name: "const", kind: "scalar", opt: true, T: 1 /*ScalarType.DOUBLE*/, options: { "buf.validate.priv.field": { cel: [{ id: "double.const", expression: "this != rules.const ? 'value must equal %s'.format([rules.const]) : ''" }] } } }, - { no: 2, name: "lt", kind: "scalar", oneof: "less_than", T: 1 /*ScalarType.DOUBLE*/, options: { "buf.validate.priv.field": { cel: [{ id: "double.lt", expression: "!has(rules.gte) && !has(rules.gt) && (this.isNan() || this >= rules.lt)? 'value must be less than %s'.format([rules.lt]) : ''" }] } } }, - { no: 3, name: "lte", kind: "scalar", oneof: "less_than", T: 1 /*ScalarType.DOUBLE*/, options: { "buf.validate.priv.field": { cel: [{ id: "double.lte", expression: "!has(rules.gte) && !has(rules.gt) && (this.isNan() || this > rules.lte)? 'value must be less than or equal to %s'.format([rules.lte]) : ''" }] } } }, - { no: 4, name: "gt", kind: "scalar", oneof: "greater_than", T: 1 /*ScalarType.DOUBLE*/, options: { "buf.validate.priv.field": { cel: [{ id: "double.gt", expression: "!has(rules.lt) && !has(rules.lte) && (this.isNan() || this <= rules.gt)? 'value must be greater than %s'.format([rules.gt]) : ''" }, { id: "double.gt_lt", expression: "has(rules.lt) && rules.lt >= rules.gt && (this.isNan() || this >= rules.lt || this <= rules.gt)? 'value must be greater than %s and less than %s'.format([rules.gt, rules.lt]) : ''" }, { id: "double.gt_lt_exclusive", expression: "has(rules.lt) && rules.lt < rules.gt && (this.isNan() || (rules.lt <= this && this <= rules.gt))? 'value must be greater than %s or less than %s'.format([rules.gt, rules.lt]) : ''" }, { id: "double.gt_lte", expression: "has(rules.lte) && rules.lte >= rules.gt && (this.isNan() || this > rules.lte || this <= rules.gt)? 'value must be greater than %s and less than or equal to %s'.format([rules.gt, rules.lte]) : ''" }, { id: "double.gt_lte_exclusive", expression: "has(rules.lte) && rules.lte < rules.gt && (this.isNan() || (rules.lte < this && this <= rules.gt))? 'value must be greater than %s or less than or equal to %s'.format([rules.gt, rules.lte]) : ''" }] } } }, - { no: 5, name: "gte", kind: "scalar", oneof: "greater_than", T: 1 /*ScalarType.DOUBLE*/, options: { "buf.validate.priv.field": { cel: [{ id: "double.gte", expression: "!has(rules.lt) && !has(rules.lte) && (this.isNan() || this < rules.gte)? 'value must be greater than or equal to %s'.format([rules.gte]) : ''" }, { id: "double.gte_lt", expression: "has(rules.lt) && rules.lt >= rules.gte && (this.isNan() || this >= rules.lt || this < rules.gte)? 'value must be greater than or equal to %s and less than %s'.format([rules.gte, rules.lt]) : ''" }, { id: "double.gte_lt_exclusive", expression: "has(rules.lt) && rules.lt < rules.gte && (this.isNan() || (rules.lt <= this && this < rules.gte))? 'value must be greater than or equal to %s or less than %s'.format([rules.gte, rules.lt]) : ''" }, { id: "double.gte_lte", expression: "has(rules.lte) && rules.lte >= rules.gte && (this.isNan() || this > rules.lte || this < rules.gte)? 'value must be greater than or equal to %s and less than or equal to %s'.format([rules.gte, rules.lte]) : ''" }, { id: "double.gte_lte_exclusive", expression: "has(rules.lte) && rules.lte < rules.gte && (this.isNan() || (rules.lte < this && this < rules.gte))? 'value must be greater than or equal to %s or less than or equal to %s'.format([rules.gte, rules.lte]) : ''" }] } } }, - { no: 6, name: "in", kind: "scalar", repeat: 1 /*RepeatType.PACKED*/, T: 1 /*ScalarType.DOUBLE*/, options: { "buf.validate.priv.field": { cel: [{ id: "double.in", expression: "!(this in dyn(rules)['in']) ? 'value must be in list %s'.format([dyn(rules)['in']]) : ''" }] } } }, - { no: 7, name: "not_in", kind: "scalar", localName: "not_in", repeat: 1 /*RepeatType.PACKED*/, T: 1 /*ScalarType.DOUBLE*/, options: { "buf.validate.priv.field": { cel: [{ id: "double.not_in", expression: "this in rules.not_in ? 'value must not be in list %s'.format([rules.not_in]) : ''" }] } } }, - { no: 8, name: "finite", kind: "scalar", T: 8 /*ScalarType.BOOL*/, options: { "buf.validate.priv.field": { cel: [{ id: "double.finite", expression: "this.isNan() || this.isInf() ? 'value must be finite' : ''" }] } } } - ]); - } - create(value?: PartialMessage): DoubleRules { - const message = globalThis.Object.create((this.messagePrototype!)); - message.less_than = { oneofKind: undefined }; - message.greater_than = { oneofKind: undefined }; - message.in = []; - message.not_in = []; - message.finite = false; - if (value !== undefined) - reflectionMergePartial(this, message, value); - return message; - } - internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: DoubleRules): DoubleRules { - let message = target ?? this.create(), end = reader.pos + length; - while (reader.pos < end) { - let [fieldNo, wireType] = reader.tag(); - switch (fieldNo) { - case /* optional double const */ 1: - message.const = reader.double(); - break; - case /* double lt */ 2: - message.less_than = { - oneofKind: "lt", - lt: reader.double() - }; - break; - case /* double lte */ 3: - message.less_than = { - oneofKind: "lte", - lte: reader.double() - }; - break; - case /* double gt */ 4: - message.greater_than = { - oneofKind: "gt", - gt: reader.double() - }; - break; - case /* double gte */ 5: - message.greater_than = { - oneofKind: "gte", - gte: reader.double() - }; - break; - case /* repeated double in */ 6: - if (wireType === WireType.LengthDelimited) - for (let e = reader.int32() + reader.pos; reader.pos < e;) - message.in.push(reader.double()); - else - message.in.push(reader.double()); - break; - case /* repeated double not_in */ 7: - if (wireType === WireType.LengthDelimited) - for (let e = reader.int32() + reader.pos; reader.pos < e;) - message.not_in.push(reader.double()); - else - message.not_in.push(reader.double()); - break; - case /* bool finite */ 8: - message.finite = reader.bool(); - break; - default: - let u = options.readUnknownField; - if (u === "throw") - throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); - let d = reader.skip(wireType); - if (u !== false) - (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); - } - } - return message; - } - internalBinaryWrite(message: DoubleRules, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { - /* optional double const = 1; */ - if (message.const !== undefined) - writer.tag(1, WireType.Bit64).double(message.const); - /* double lt = 2; */ - if (message.less_than.oneofKind === "lt") - writer.tag(2, WireType.Bit64).double(message.less_than.lt); - /* double lte = 3; */ - if (message.less_than.oneofKind === "lte") - writer.tag(3, WireType.Bit64).double(message.less_than.lte); - /* double gt = 4; */ - if (message.greater_than.oneofKind === "gt") - writer.tag(4, WireType.Bit64).double(message.greater_than.gt); - /* double gte = 5; */ - if (message.greater_than.oneofKind === "gte") - writer.tag(5, WireType.Bit64).double(message.greater_than.gte); - /* repeated double in = 6; */ - if (message.in.length) { - writer.tag(6, WireType.LengthDelimited).fork(); - for (let i = 0; i < message.in.length; i++) - writer.double(message.in[i]); - writer.join(); - } - /* repeated double not_in = 7; */ - if (message.not_in.length) { - writer.tag(7, WireType.LengthDelimited).fork(); - for (let i = 0; i < message.not_in.length; i++) - writer.double(message.not_in[i]); - writer.join(); - } - /* bool finite = 8; */ - if (message.finite !== false) - writer.tag(8, WireType.Varint).bool(message.finite); - let u = options.writeUnknownFields; - if (u !== false) - (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); - return writer; - } -} -/** - * @generated MessageType for protobuf message buf.validate.DoubleRules - */ -export const DoubleRules = new DoubleRules$Type(); -// @generated message type with reflection information, may provide speed optimized methods -class Int32Rules$Type extends MessageType { - constructor() { - super("buf.validate.Int32Rules", [ - { no: 1, name: "const", kind: "scalar", opt: true, T: 5 /*ScalarType.INT32*/, options: { "buf.validate.priv.field": { cel: [{ id: "int32.const", expression: "this != rules.const ? 'value must equal %s'.format([rules.const]) : ''" }] } } }, - { no: 2, name: "lt", kind: "scalar", oneof: "less_than", T: 5 /*ScalarType.INT32*/, options: { "buf.validate.priv.field": { cel: [{ id: "int32.lt", expression: "!has(rules.gte) && !has(rules.gt) && this >= rules.lt? 'value must be less than %s'.format([rules.lt]) : ''" }] } } }, - { no: 3, name: "lte", kind: "scalar", oneof: "less_than", T: 5 /*ScalarType.INT32*/, options: { "buf.validate.priv.field": { cel: [{ id: "int32.lte", expression: "!has(rules.gte) && !has(rules.gt) && this > rules.lte? 'value must be less than or equal to %s'.format([rules.lte]) : ''" }] } } }, - { no: 4, name: "gt", kind: "scalar", oneof: "greater_than", T: 5 /*ScalarType.INT32*/, options: { "buf.validate.priv.field": { cel: [{ id: "int32.gt", expression: "!has(rules.lt) && !has(rules.lte) && this <= rules.gt? 'value must be greater than %s'.format([rules.gt]) : ''" }, { id: "int32.gt_lt", expression: "has(rules.lt) && rules.lt >= rules.gt && (this >= rules.lt || this <= rules.gt)? 'value must be greater than %s and less than %s'.format([rules.gt, rules.lt]) : ''" }, { id: "int32.gt_lt_exclusive", expression: "has(rules.lt) && rules.lt < rules.gt && (rules.lt <= this && this <= rules.gt)? 'value must be greater than %s or less than %s'.format([rules.gt, rules.lt]) : ''" }, { id: "int32.gt_lte", expression: "has(rules.lte) && rules.lte >= rules.gt && (this > rules.lte || this <= rules.gt)? 'value must be greater than %s and less than or equal to %s'.format([rules.gt, rules.lte]) : ''" }, { id: "int32.gt_lte_exclusive", expression: "has(rules.lte) && rules.lte < rules.gt && (rules.lte < this && this <= rules.gt)? 'value must be greater than %s or less than or equal to %s'.format([rules.gt, rules.lte]) : ''" }] } } }, - { no: 5, name: "gte", kind: "scalar", oneof: "greater_than", T: 5 /*ScalarType.INT32*/, options: { "buf.validate.priv.field": { cel: [{ id: "int32.gte", expression: "!has(rules.lt) && !has(rules.lte) && this < rules.gte? 'value must be greater than or equal to %s'.format([rules.gte]) : ''" }, { id: "int32.gte_lt", expression: "has(rules.lt) && rules.lt >= rules.gte && (this >= rules.lt || this < rules.gte)? 'value must be greater than or equal to %s and less than %s'.format([rules.gte, rules.lt]) : ''" }, { id: "int32.gte_lt_exclusive", expression: "has(rules.lt) && rules.lt < rules.gte && (rules.lt <= this && this < rules.gte)? 'value must be greater than or equal to %s or less than %s'.format([rules.gte, rules.lt]) : ''" }, { id: "int32.gte_lte", expression: "has(rules.lte) && rules.lte >= rules.gte && (this > rules.lte || this < rules.gte)? 'value must be greater than or equal to %s and less than or equal to %s'.format([rules.gte, rules.lte]) : ''" }, { id: "int32.gte_lte_exclusive", expression: "has(rules.lte) && rules.lte < rules.gte && (rules.lte < this && this < rules.gte)? 'value must be greater than or equal to %s or less than or equal to %s'.format([rules.gte, rules.lte]) : ''" }] } } }, - { no: 6, name: "in", kind: "scalar", repeat: 1 /*RepeatType.PACKED*/, T: 5 /*ScalarType.INT32*/, options: { "buf.validate.priv.field": { cel: [{ id: "int32.in", expression: "!(this in dyn(rules)['in']) ? 'value must be in list %s'.format([dyn(rules)['in']]) : ''" }] } } }, - { no: 7, name: "not_in", kind: "scalar", localName: "not_in", repeat: 1 /*RepeatType.PACKED*/, T: 5 /*ScalarType.INT32*/, options: { "buf.validate.priv.field": { cel: [{ id: "int32.not_in", expression: "this in rules.not_in ? 'value must not be in list %s'.format([rules.not_in]) : ''" }] } } } - ]); - } - create(value?: PartialMessage): Int32Rules { - const message = globalThis.Object.create((this.messagePrototype!)); - message.less_than = { oneofKind: undefined }; - message.greater_than = { oneofKind: undefined }; - message.in = []; - message.not_in = []; - if (value !== undefined) - reflectionMergePartial(this, message, value); - return message; - } - internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Int32Rules): Int32Rules { - let message = target ?? this.create(), end = reader.pos + length; - while (reader.pos < end) { - let [fieldNo, wireType] = reader.tag(); - switch (fieldNo) { - case /* optional int32 const */ 1: - message.const = reader.int32(); - break; - case /* int32 lt */ 2: - message.less_than = { - oneofKind: "lt", - lt: reader.int32() - }; - break; - case /* int32 lte */ 3: - message.less_than = { - oneofKind: "lte", - lte: reader.int32() - }; - break; - case /* int32 gt */ 4: - message.greater_than = { - oneofKind: "gt", - gt: reader.int32() - }; - break; - case /* int32 gte */ 5: - message.greater_than = { - oneofKind: "gte", - gte: reader.int32() - }; - break; - case /* repeated int32 in */ 6: - if (wireType === WireType.LengthDelimited) - for (let e = reader.int32() + reader.pos; reader.pos < e;) - message.in.push(reader.int32()); - else - message.in.push(reader.int32()); - break; - case /* repeated int32 not_in */ 7: - if (wireType === WireType.LengthDelimited) - for (let e = reader.int32() + reader.pos; reader.pos < e;) - message.not_in.push(reader.int32()); - else - message.not_in.push(reader.int32()); - break; - default: - let u = options.readUnknownField; - if (u === "throw") - throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); - let d = reader.skip(wireType); - if (u !== false) - (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); - } - } - return message; - } - internalBinaryWrite(message: Int32Rules, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { - /* optional int32 const = 1; */ - if (message.const !== undefined) - writer.tag(1, WireType.Varint).int32(message.const); - /* int32 lt = 2; */ - if (message.less_than.oneofKind === "lt") - writer.tag(2, WireType.Varint).int32(message.less_than.lt); - /* int32 lte = 3; */ - if (message.less_than.oneofKind === "lte") - writer.tag(3, WireType.Varint).int32(message.less_than.lte); - /* int32 gt = 4; */ - if (message.greater_than.oneofKind === "gt") - writer.tag(4, WireType.Varint).int32(message.greater_than.gt); - /* int32 gte = 5; */ - if (message.greater_than.oneofKind === "gte") - writer.tag(5, WireType.Varint).int32(message.greater_than.gte); - /* repeated int32 in = 6; */ - if (message.in.length) { - writer.tag(6, WireType.LengthDelimited).fork(); - for (let i = 0; i < message.in.length; i++) - writer.int32(message.in[i]); - writer.join(); - } - /* repeated int32 not_in = 7; */ - if (message.not_in.length) { - writer.tag(7, WireType.LengthDelimited).fork(); - for (let i = 0; i < message.not_in.length; i++) - writer.int32(message.not_in[i]); - writer.join(); - } - let u = options.writeUnknownFields; - if (u !== false) - (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); - return writer; - } -} -/** - * @generated MessageType for protobuf message buf.validate.Int32Rules - */ -export const Int32Rules = new Int32Rules$Type(); -// @generated message type with reflection information, may provide speed optimized methods -class Int64Rules$Type extends MessageType { - constructor() { - super("buf.validate.Int64Rules", [ - { no: 1, name: "const", kind: "scalar", opt: true, T: 3 /*ScalarType.INT64*/, L: 0 /*LongType.BIGINT*/, options: { "buf.validate.priv.field": { cel: [{ id: "int64.const", expression: "this != rules.const ? 'value must equal %s'.format([rules.const]) : ''" }] } } }, - { no: 2, name: "lt", kind: "scalar", oneof: "less_than", T: 3 /*ScalarType.INT64*/, L: 0 /*LongType.BIGINT*/, options: { "buf.validate.priv.field": { cel: [{ id: "int64.lt", expression: "!has(rules.gte) && !has(rules.gt) && this >= rules.lt? 'value must be less than %s'.format([rules.lt]) : ''" }] } } }, - { no: 3, name: "lte", kind: "scalar", oneof: "less_than", T: 3 /*ScalarType.INT64*/, L: 0 /*LongType.BIGINT*/, options: { "buf.validate.priv.field": { cel: [{ id: "int64.lte", expression: "!has(rules.gte) && !has(rules.gt) && this > rules.lte? 'value must be less than or equal to %s'.format([rules.lte]) : ''" }] } } }, - { no: 4, name: "gt", kind: "scalar", oneof: "greater_than", T: 3 /*ScalarType.INT64*/, L: 0 /*LongType.BIGINT*/, options: { "buf.validate.priv.field": { cel: [{ id: "int64.gt", expression: "!has(rules.lt) && !has(rules.lte) && this <= rules.gt? 'value must be greater than %s'.format([rules.gt]) : ''" }, { id: "int64.gt_lt", expression: "has(rules.lt) && rules.lt >= rules.gt && (this >= rules.lt || this <= rules.gt)? 'value must be greater than %s and less than %s'.format([rules.gt, rules.lt]) : ''" }, { id: "int64.gt_lt_exclusive", expression: "has(rules.lt) && rules.lt < rules.gt && (rules.lt <= this && this <= rules.gt)? 'value must be greater than %s or less than %s'.format([rules.gt, rules.lt]) : ''" }, { id: "int64.gt_lte", expression: "has(rules.lte) && rules.lte >= rules.gt && (this > rules.lte || this <= rules.gt)? 'value must be greater than %s and less than or equal to %s'.format([rules.gt, rules.lte]) : ''" }, { id: "int64.gt_lte_exclusive", expression: "has(rules.lte) && rules.lte < rules.gt && (rules.lte < this && this <= rules.gt)? 'value must be greater than %s or less than or equal to %s'.format([rules.gt, rules.lte]) : ''" }] } } }, - { no: 5, name: "gte", kind: "scalar", oneof: "greater_than", T: 3 /*ScalarType.INT64*/, L: 0 /*LongType.BIGINT*/, options: { "buf.validate.priv.field": { cel: [{ id: "int64.gte", expression: "!has(rules.lt) && !has(rules.lte) && this < rules.gte? 'value must be greater than or equal to %s'.format([rules.gte]) : ''" }, { id: "int64.gte_lt", expression: "has(rules.lt) && rules.lt >= rules.gte && (this >= rules.lt || this < rules.gte)? 'value must be greater than or equal to %s and less than %s'.format([rules.gte, rules.lt]) : ''" }, { id: "int64.gte_lt_exclusive", expression: "has(rules.lt) && rules.lt < rules.gte && (rules.lt <= this && this < rules.gte)? 'value must be greater than or equal to %s or less than %s'.format([rules.gte, rules.lt]) : ''" }, { id: "int64.gte_lte", expression: "has(rules.lte) && rules.lte >= rules.gte && (this > rules.lte || this < rules.gte)? 'value must be greater than or equal to %s and less than or equal to %s'.format([rules.gte, rules.lte]) : ''" }, { id: "int64.gte_lte_exclusive", expression: "has(rules.lte) && rules.lte < rules.gte && (rules.lte < this && this < rules.gte)? 'value must be greater than or equal to %s or less than or equal to %s'.format([rules.gte, rules.lte]) : ''" }] } } }, - { no: 6, name: "in", kind: "scalar", repeat: 1 /*RepeatType.PACKED*/, T: 3 /*ScalarType.INT64*/, L: 0 /*LongType.BIGINT*/, options: { "buf.validate.priv.field": { cel: [{ id: "int64.in", expression: "!(this in dyn(rules)['in']) ? 'value must be in list %s'.format([dyn(rules)['in']]) : ''" }] } } }, - { no: 7, name: "not_in", kind: "scalar", localName: "not_in", repeat: 1 /*RepeatType.PACKED*/, T: 3 /*ScalarType.INT64*/, L: 0 /*LongType.BIGINT*/, options: { "buf.validate.priv.field": { cel: [{ id: "int64.not_in", expression: "this in rules.not_in ? 'value must not be in list %s'.format([rules.not_in]) : ''" }] } } } - ]); - } - create(value?: PartialMessage): Int64Rules { - const message = globalThis.Object.create((this.messagePrototype!)); - message.less_than = { oneofKind: undefined }; - message.greater_than = { oneofKind: undefined }; - message.in = []; - message.not_in = []; - if (value !== undefined) - reflectionMergePartial(this, message, value); - return message; - } - internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Int64Rules): Int64Rules { - let message = target ?? this.create(), end = reader.pos + length; - while (reader.pos < end) { - let [fieldNo, wireType] = reader.tag(); - switch (fieldNo) { - case /* optional int64 const */ 1: - message.const = reader.int64().toBigInt(); - break; - case /* int64 lt */ 2: - message.less_than = { - oneofKind: "lt", - lt: reader.int64().toBigInt() - }; - break; - case /* int64 lte */ 3: - message.less_than = { - oneofKind: "lte", - lte: reader.int64().toBigInt() - }; - break; - case /* int64 gt */ 4: - message.greater_than = { - oneofKind: "gt", - gt: reader.int64().toBigInt() - }; - break; - case /* int64 gte */ 5: - message.greater_than = { - oneofKind: "gte", - gte: reader.int64().toBigInt() - }; - break; - case /* repeated int64 in */ 6: - if (wireType === WireType.LengthDelimited) - for (let e = reader.int32() + reader.pos; reader.pos < e;) - message.in.push(reader.int64().toBigInt()); - else - message.in.push(reader.int64().toBigInt()); - break; - case /* repeated int64 not_in */ 7: - if (wireType === WireType.LengthDelimited) - for (let e = reader.int32() + reader.pos; reader.pos < e;) - message.not_in.push(reader.int64().toBigInt()); - else - message.not_in.push(reader.int64().toBigInt()); - break; - default: - let u = options.readUnknownField; - if (u === "throw") - throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); - let d = reader.skip(wireType); - if (u !== false) - (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); - } - } - return message; - } - internalBinaryWrite(message: Int64Rules, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { - /* optional int64 const = 1; */ - if (message.const !== undefined) - writer.tag(1, WireType.Varint).int64(message.const); - /* int64 lt = 2; */ - if (message.less_than.oneofKind === "lt") - writer.tag(2, WireType.Varint).int64(message.less_than.lt); - /* int64 lte = 3; */ - if (message.less_than.oneofKind === "lte") - writer.tag(3, WireType.Varint).int64(message.less_than.lte); - /* int64 gt = 4; */ - if (message.greater_than.oneofKind === "gt") - writer.tag(4, WireType.Varint).int64(message.greater_than.gt); - /* int64 gte = 5; */ - if (message.greater_than.oneofKind === "gte") - writer.tag(5, WireType.Varint).int64(message.greater_than.gte); - /* repeated int64 in = 6; */ - if (message.in.length) { - writer.tag(6, WireType.LengthDelimited).fork(); - for (let i = 0; i < message.in.length; i++) - writer.int64(message.in[i]); - writer.join(); - } - /* repeated int64 not_in = 7; */ - if (message.not_in.length) { - writer.tag(7, WireType.LengthDelimited).fork(); - for (let i = 0; i < message.not_in.length; i++) - writer.int64(message.not_in[i]); - writer.join(); - } - let u = options.writeUnknownFields; - if (u !== false) - (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); - return writer; - } -} -/** - * @generated MessageType for protobuf message buf.validate.Int64Rules - */ -export const Int64Rules = new Int64Rules$Type(); -// @generated message type with reflection information, may provide speed optimized methods -class UInt32Rules$Type extends MessageType { - constructor() { - super("buf.validate.UInt32Rules", [ - { no: 1, name: "const", kind: "scalar", opt: true, T: 13 /*ScalarType.UINT32*/, options: { "buf.validate.priv.field": { cel: [{ id: "uint32.const", expression: "this != rules.const ? 'value must equal %s'.format([rules.const]) : ''" }] } } }, - { no: 2, name: "lt", kind: "scalar", oneof: "less_than", T: 13 /*ScalarType.UINT32*/, options: { "buf.validate.priv.field": { cel: [{ id: "uint32.lt", expression: "!has(rules.gte) && !has(rules.gt) && this >= rules.lt? 'value must be less than %s'.format([rules.lt]) : ''" }] } } }, - { no: 3, name: "lte", kind: "scalar", oneof: "less_than", T: 13 /*ScalarType.UINT32*/, options: { "buf.validate.priv.field": { cel: [{ id: "uint32.lte", expression: "!has(rules.gte) && !has(rules.gt) && this > rules.lte? 'value must be less than or equal to %s'.format([rules.lte]) : ''" }] } } }, - { no: 4, name: "gt", kind: "scalar", oneof: "greater_than", T: 13 /*ScalarType.UINT32*/, options: { "buf.validate.priv.field": { cel: [{ id: "uint32.gt", expression: "!has(rules.lt) && !has(rules.lte) && this <= rules.gt? 'value must be greater than %s'.format([rules.gt]) : ''" }, { id: "uint32.gt_lt", expression: "has(rules.lt) && rules.lt >= rules.gt && (this >= rules.lt || this <= rules.gt)? 'value must be greater than %s and less than %s'.format([rules.gt, rules.lt]) : ''" }, { id: "uint32.gt_lt_exclusive", expression: "has(rules.lt) && rules.lt < rules.gt && (rules.lt <= this && this <= rules.gt)? 'value must be greater than %s or less than %s'.format([rules.gt, rules.lt]) : ''" }, { id: "uint32.gt_lte", expression: "has(rules.lte) && rules.lte >= rules.gt && (this > rules.lte || this <= rules.gt)? 'value must be greater than %s and less than or equal to %s'.format([rules.gt, rules.lte]) : ''" }, { id: "uint32.gt_lte_exclusive", expression: "has(rules.lte) && rules.lte < rules.gt && (rules.lte < this && this <= rules.gt)? 'value must be greater than %s or less than or equal to %s'.format([rules.gt, rules.lte]) : ''" }] } } }, - { no: 5, name: "gte", kind: "scalar", oneof: "greater_than", T: 13 /*ScalarType.UINT32*/, options: { "buf.validate.priv.field": { cel: [{ id: "uint32.gte", expression: "!has(rules.lt) && !has(rules.lte) && this < rules.gte? 'value must be greater than or equal to %s'.format([rules.gte]) : ''" }, { id: "uint32.gte_lt", expression: "has(rules.lt) && rules.lt >= rules.gte && (this >= rules.lt || this < rules.gte)? 'value must be greater than or equal to %s and less than %s'.format([rules.gte, rules.lt]) : ''" }, { id: "uint32.gte_lt_exclusive", expression: "has(rules.lt) && rules.lt < rules.gte && (rules.lt <= this && this < rules.gte)? 'value must be greater than or equal to %s or less than %s'.format([rules.gte, rules.lt]) : ''" }, { id: "uint32.gte_lte", expression: "has(rules.lte) && rules.lte >= rules.gte && (this > rules.lte || this < rules.gte)? 'value must be greater than or equal to %s and less than or equal to %s'.format([rules.gte, rules.lte]) : ''" }, { id: "uint32.gte_lte_exclusive", expression: "has(rules.lte) && rules.lte < rules.gte && (rules.lte < this && this < rules.gte)? 'value must be greater than or equal to %s or less than or equal to %s'.format([rules.gte, rules.lte]) : ''" }] } } }, - { no: 6, name: "in", kind: "scalar", repeat: 1 /*RepeatType.PACKED*/, T: 13 /*ScalarType.UINT32*/, options: { "buf.validate.priv.field": { cel: [{ id: "uint32.in", expression: "!(this in dyn(rules)['in']) ? 'value must be in list %s'.format([dyn(rules)['in']]) : ''" }] } } }, - { no: 7, name: "not_in", kind: "scalar", localName: "not_in", repeat: 1 /*RepeatType.PACKED*/, T: 13 /*ScalarType.UINT32*/, options: { "buf.validate.priv.field": { cel: [{ id: "uint32.not_in", expression: "this in rules.not_in ? 'value must not be in list %s'.format([rules.not_in]) : ''" }] } } } - ]); - } - create(value?: PartialMessage): UInt32Rules { - const message = globalThis.Object.create((this.messagePrototype!)); - message.less_than = { oneofKind: undefined }; - message.greater_than = { oneofKind: undefined }; - message.in = []; - message.not_in = []; - if (value !== undefined) - reflectionMergePartial(this, message, value); - return message; - } - internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: UInt32Rules): UInt32Rules { - let message = target ?? this.create(), end = reader.pos + length; - while (reader.pos < end) { - let [fieldNo, wireType] = reader.tag(); - switch (fieldNo) { - case /* optional uint32 const */ 1: - message.const = reader.uint32(); - break; - case /* uint32 lt */ 2: - message.less_than = { - oneofKind: "lt", - lt: reader.uint32() - }; - break; - case /* uint32 lte */ 3: - message.less_than = { - oneofKind: "lte", - lte: reader.uint32() - }; - break; - case /* uint32 gt */ 4: - message.greater_than = { - oneofKind: "gt", - gt: reader.uint32() - }; - break; - case /* uint32 gte */ 5: - message.greater_than = { - oneofKind: "gte", - gte: reader.uint32() - }; - break; - case /* repeated uint32 in */ 6: - if (wireType === WireType.LengthDelimited) - for (let e = reader.int32() + reader.pos; reader.pos < e;) - message.in.push(reader.uint32()); - else - message.in.push(reader.uint32()); - break; - case /* repeated uint32 not_in */ 7: - if (wireType === WireType.LengthDelimited) - for (let e = reader.int32() + reader.pos; reader.pos < e;) - message.not_in.push(reader.uint32()); - else - message.not_in.push(reader.uint32()); - break; - default: - let u = options.readUnknownField; - if (u === "throw") - throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); - let d = reader.skip(wireType); - if (u !== false) - (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); - } - } - return message; - } - internalBinaryWrite(message: UInt32Rules, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { - /* optional uint32 const = 1; */ - if (message.const !== undefined) - writer.tag(1, WireType.Varint).uint32(message.const); - /* uint32 lt = 2; */ - if (message.less_than.oneofKind === "lt") - writer.tag(2, WireType.Varint).uint32(message.less_than.lt); - /* uint32 lte = 3; */ - if (message.less_than.oneofKind === "lte") - writer.tag(3, WireType.Varint).uint32(message.less_than.lte); - /* uint32 gt = 4; */ - if (message.greater_than.oneofKind === "gt") - writer.tag(4, WireType.Varint).uint32(message.greater_than.gt); - /* uint32 gte = 5; */ - if (message.greater_than.oneofKind === "gte") - writer.tag(5, WireType.Varint).uint32(message.greater_than.gte); - /* repeated uint32 in = 6; */ - if (message.in.length) { - writer.tag(6, WireType.LengthDelimited).fork(); - for (let i = 0; i < message.in.length; i++) - writer.uint32(message.in[i]); - writer.join(); - } - /* repeated uint32 not_in = 7; */ - if (message.not_in.length) { - writer.tag(7, WireType.LengthDelimited).fork(); - for (let i = 0; i < message.not_in.length; i++) - writer.uint32(message.not_in[i]); - writer.join(); - } - let u = options.writeUnknownFields; - if (u !== false) - (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); - return writer; - } -} -/** - * @generated MessageType for protobuf message buf.validate.UInt32Rules - */ -export const UInt32Rules = new UInt32Rules$Type(); -// @generated message type with reflection information, may provide speed optimized methods -class UInt64Rules$Type extends MessageType { - constructor() { - super("buf.validate.UInt64Rules", [ - { no: 1, name: "const", kind: "scalar", opt: true, T: 4 /*ScalarType.UINT64*/, L: 0 /*LongType.BIGINT*/, options: { "buf.validate.priv.field": { cel: [{ id: "uint64.const", expression: "this != rules.const ? 'value must equal %s'.format([rules.const]) : ''" }] } } }, - { no: 2, name: "lt", kind: "scalar", oneof: "less_than", T: 4 /*ScalarType.UINT64*/, L: 0 /*LongType.BIGINT*/, options: { "buf.validate.priv.field": { cel: [{ id: "uint64.lt", expression: "!has(rules.gte) && !has(rules.gt) && this >= rules.lt? 'value must be less than %s'.format([rules.lt]) : ''" }] } } }, - { no: 3, name: "lte", kind: "scalar", oneof: "less_than", T: 4 /*ScalarType.UINT64*/, L: 0 /*LongType.BIGINT*/, options: { "buf.validate.priv.field": { cel: [{ id: "uint64.lte", expression: "!has(rules.gte) && !has(rules.gt) && this > rules.lte? 'value must be less than or equal to %s'.format([rules.lte]) : ''" }] } } }, - { no: 4, name: "gt", kind: "scalar", oneof: "greater_than", T: 4 /*ScalarType.UINT64*/, L: 0 /*LongType.BIGINT*/, options: { "buf.validate.priv.field": { cel: [{ id: "uint64.gt", expression: "!has(rules.lt) && !has(rules.lte) && this <= rules.gt? 'value must be greater than %s'.format([rules.gt]) : ''" }, { id: "uint64.gt_lt", expression: "has(rules.lt) && rules.lt >= rules.gt && (this >= rules.lt || this <= rules.gt)? 'value must be greater than %s and less than %s'.format([rules.gt, rules.lt]) : ''" }, { id: "uint64.gt_lt_exclusive", expression: "has(rules.lt) && rules.lt < rules.gt && (rules.lt <= this && this <= rules.gt)? 'value must be greater than %s or less than %s'.format([rules.gt, rules.lt]) : ''" }, { id: "uint64.gt_lte", expression: "has(rules.lte) && rules.lte >= rules.gt && (this > rules.lte || this <= rules.gt)? 'value must be greater than %s and less than or equal to %s'.format([rules.gt, rules.lte]) : ''" }, { id: "uint64.gt_lte_exclusive", expression: "has(rules.lte) && rules.lte < rules.gt && (rules.lte < this && this <= rules.gt)? 'value must be greater than %s or less than or equal to %s'.format([rules.gt, rules.lte]) : ''" }] } } }, - { no: 5, name: "gte", kind: "scalar", oneof: "greater_than", T: 4 /*ScalarType.UINT64*/, L: 0 /*LongType.BIGINT*/, options: { "buf.validate.priv.field": { cel: [{ id: "uint64.gte", expression: "!has(rules.lt) && !has(rules.lte) && this < rules.gte? 'value must be greater than or equal to %s'.format([rules.gte]) : ''" }, { id: "uint64.gte_lt", expression: "has(rules.lt) && rules.lt >= rules.gte && (this >= rules.lt || this < rules.gte)? 'value must be greater than or equal to %s and less than %s'.format([rules.gte, rules.lt]) : ''" }, { id: "uint64.gte_lt_exclusive", expression: "has(rules.lt) && rules.lt < rules.gte && (rules.lt <= this && this < rules.gte)? 'value must be greater than or equal to %s or less than %s'.format([rules.gte, rules.lt]) : ''" }, { id: "uint64.gte_lte", expression: "has(rules.lte) && rules.lte >= rules.gte && (this > rules.lte || this < rules.gte)? 'value must be greater than or equal to %s and less than or equal to %s'.format([rules.gte, rules.lte]) : ''" }, { id: "uint64.gte_lte_exclusive", expression: "has(rules.lte) && rules.lte < rules.gte && (rules.lte < this && this < rules.gte)? 'value must be greater than or equal to %s or less than or equal to %s'.format([rules.gte, rules.lte]) : ''" }] } } }, - { no: 6, name: "in", kind: "scalar", repeat: 1 /*RepeatType.PACKED*/, T: 4 /*ScalarType.UINT64*/, L: 0 /*LongType.BIGINT*/, options: { "buf.validate.priv.field": { cel: [{ id: "uint64.in", expression: "!(this in dyn(rules)['in']) ? 'value must be in list %s'.format([dyn(rules)['in']]) : ''" }] } } }, - { no: 7, name: "not_in", kind: "scalar", localName: "not_in", repeat: 1 /*RepeatType.PACKED*/, T: 4 /*ScalarType.UINT64*/, L: 0 /*LongType.BIGINT*/, options: { "buf.validate.priv.field": { cel: [{ id: "uint64.not_in", expression: "this in rules.not_in ? 'value must not be in list %s'.format([rules.not_in]) : ''" }] } } } - ]); - } - create(value?: PartialMessage): UInt64Rules { - const message = globalThis.Object.create((this.messagePrototype!)); - message.less_than = { oneofKind: undefined }; - message.greater_than = { oneofKind: undefined }; - message.in = []; - message.not_in = []; - if (value !== undefined) - reflectionMergePartial(this, message, value); - return message; - } - internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: UInt64Rules): UInt64Rules { - let message = target ?? this.create(), end = reader.pos + length; - while (reader.pos < end) { - let [fieldNo, wireType] = reader.tag(); - switch (fieldNo) { - case /* optional uint64 const */ 1: - message.const = reader.uint64().toBigInt(); - break; - case /* uint64 lt */ 2: - message.less_than = { - oneofKind: "lt", - lt: reader.uint64().toBigInt() - }; - break; - case /* uint64 lte */ 3: - message.less_than = { - oneofKind: "lte", - lte: reader.uint64().toBigInt() - }; - break; - case /* uint64 gt */ 4: - message.greater_than = { - oneofKind: "gt", - gt: reader.uint64().toBigInt() - }; - break; - case /* uint64 gte */ 5: - message.greater_than = { - oneofKind: "gte", - gte: reader.uint64().toBigInt() - }; - break; - case /* repeated uint64 in */ 6: - if (wireType === WireType.LengthDelimited) - for (let e = reader.int32() + reader.pos; reader.pos < e;) - message.in.push(reader.uint64().toBigInt()); - else - message.in.push(reader.uint64().toBigInt()); - break; - case /* repeated uint64 not_in */ 7: - if (wireType === WireType.LengthDelimited) - for (let e = reader.int32() + reader.pos; reader.pos < e;) - message.not_in.push(reader.uint64().toBigInt()); - else - message.not_in.push(reader.uint64().toBigInt()); - break; - default: - let u = options.readUnknownField; - if (u === "throw") - throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); - let d = reader.skip(wireType); - if (u !== false) - (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); - } - } - return message; - } - internalBinaryWrite(message: UInt64Rules, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { - /* optional uint64 const = 1; */ - if (message.const !== undefined) - writer.tag(1, WireType.Varint).uint64(message.const); - /* uint64 lt = 2; */ - if (message.less_than.oneofKind === "lt") - writer.tag(2, WireType.Varint).uint64(message.less_than.lt); - /* uint64 lte = 3; */ - if (message.less_than.oneofKind === "lte") - writer.tag(3, WireType.Varint).uint64(message.less_than.lte); - /* uint64 gt = 4; */ - if (message.greater_than.oneofKind === "gt") - writer.tag(4, WireType.Varint).uint64(message.greater_than.gt); - /* uint64 gte = 5; */ - if (message.greater_than.oneofKind === "gte") - writer.tag(5, WireType.Varint).uint64(message.greater_than.gte); - /* repeated uint64 in = 6; */ - if (message.in.length) { - writer.tag(6, WireType.LengthDelimited).fork(); - for (let i = 0; i < message.in.length; i++) - writer.uint64(message.in[i]); - writer.join(); - } - /* repeated uint64 not_in = 7; */ - if (message.not_in.length) { - writer.tag(7, WireType.LengthDelimited).fork(); - for (let i = 0; i < message.not_in.length; i++) - writer.uint64(message.not_in[i]); - writer.join(); - } - let u = options.writeUnknownFields; - if (u !== false) - (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); - return writer; - } -} -/** - * @generated MessageType for protobuf message buf.validate.UInt64Rules - */ -export const UInt64Rules = new UInt64Rules$Type(); -// @generated message type with reflection information, may provide speed optimized methods -class SInt32Rules$Type extends MessageType { - constructor() { - super("buf.validate.SInt32Rules", [ - { no: 1, name: "const", kind: "scalar", opt: true, T: 17 /*ScalarType.SINT32*/, options: { "buf.validate.priv.field": { cel: [{ id: "sint32.const", expression: "this != rules.const ? 'value must equal %s'.format([rules.const]) : ''" }] } } }, - { no: 2, name: "lt", kind: "scalar", oneof: "less_than", T: 17 /*ScalarType.SINT32*/, options: { "buf.validate.priv.field": { cel: [{ id: "sint32.lt", expression: "!has(rules.gte) && !has(rules.gt) && this >= rules.lt? 'value must be less than %s'.format([rules.lt]) : ''" }] } } }, - { no: 3, name: "lte", kind: "scalar", oneof: "less_than", T: 17 /*ScalarType.SINT32*/, options: { "buf.validate.priv.field": { cel: [{ id: "sint32.lte", expression: "!has(rules.gte) && !has(rules.gt) && this > rules.lte? 'value must be less than or equal to %s'.format([rules.lte]) : ''" }] } } }, - { no: 4, name: "gt", kind: "scalar", oneof: "greater_than", T: 17 /*ScalarType.SINT32*/, options: { "buf.validate.priv.field": { cel: [{ id: "sint32.gt", expression: "!has(rules.lt) && !has(rules.lte) && this <= rules.gt? 'value must be greater than %s'.format([rules.gt]) : ''" }, { id: "sint32.gt_lt", expression: "has(rules.lt) && rules.lt >= rules.gt && (this >= rules.lt || this <= rules.gt)? 'value must be greater than %s and less than %s'.format([rules.gt, rules.lt]) : ''" }, { id: "sint32.gt_lt_exclusive", expression: "has(rules.lt) && rules.lt < rules.gt && (rules.lt <= this && this <= rules.gt)? 'value must be greater than %s or less than %s'.format([rules.gt, rules.lt]) : ''" }, { id: "sint32.gt_lte", expression: "has(rules.lte) && rules.lte >= rules.gt && (this > rules.lte || this <= rules.gt)? 'value must be greater than %s and less than or equal to %s'.format([rules.gt, rules.lte]) : ''" }, { id: "sint32.gt_lte_exclusive", expression: "has(rules.lte) && rules.lte < rules.gt && (rules.lte < this && this <= rules.gt)? 'value must be greater than %s or less than or equal to %s'.format([rules.gt, rules.lte]) : ''" }] } } }, - { no: 5, name: "gte", kind: "scalar", oneof: "greater_than", T: 17 /*ScalarType.SINT32*/, options: { "buf.validate.priv.field": { cel: [{ id: "sint32.gte", expression: "!has(rules.lt) && !has(rules.lte) && this < rules.gte? 'value must be greater than or equal to %s'.format([rules.gte]) : ''" }, { id: "sint32.gte_lt", expression: "has(rules.lt) && rules.lt >= rules.gte && (this >= rules.lt || this < rules.gte)? 'value must be greater than or equal to %s and less than %s'.format([rules.gte, rules.lt]) : ''" }, { id: "sint32.gte_lt_exclusive", expression: "has(rules.lt) && rules.lt < rules.gte && (rules.lt <= this && this < rules.gte)? 'value must be greater than or equal to %s or less than %s'.format([rules.gte, rules.lt]) : ''" }, { id: "sint32.gte_lte", expression: "has(rules.lte) && rules.lte >= rules.gte && (this > rules.lte || this < rules.gte)? 'value must be greater than or equal to %s and less than or equal to %s'.format([rules.gte, rules.lte]) : ''" }, { id: "sint32.gte_lte_exclusive", expression: "has(rules.lte) && rules.lte < rules.gte && (rules.lte < this && this < rules.gte)? 'value must be greater than or equal to %s or less than or equal to %s'.format([rules.gte, rules.lte]) : ''" }] } } }, - { no: 6, name: "in", kind: "scalar", repeat: 1 /*RepeatType.PACKED*/, T: 17 /*ScalarType.SINT32*/, options: { "buf.validate.priv.field": { cel: [{ id: "sint32.in", expression: "!(this in dyn(rules)['in']) ? 'value must be in list %s'.format([dyn(rules)['in']]) : ''" }] } } }, - { no: 7, name: "not_in", kind: "scalar", localName: "not_in", repeat: 1 /*RepeatType.PACKED*/, T: 17 /*ScalarType.SINT32*/, options: { "buf.validate.priv.field": { cel: [{ id: "sint32.not_in", expression: "this in rules.not_in ? 'value must not be in list %s'.format([rules.not_in]) : ''" }] } } } - ]); - } - create(value?: PartialMessage): SInt32Rules { - const message = globalThis.Object.create((this.messagePrototype!)); - message.less_than = { oneofKind: undefined }; - message.greater_than = { oneofKind: undefined }; - message.in = []; - message.not_in = []; - if (value !== undefined) - reflectionMergePartial(this, message, value); - return message; - } - internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: SInt32Rules): SInt32Rules { - let message = target ?? this.create(), end = reader.pos + length; - while (reader.pos < end) { - let [fieldNo, wireType] = reader.tag(); - switch (fieldNo) { - case /* optional sint32 const */ 1: - message.const = reader.sint32(); - break; - case /* sint32 lt */ 2: - message.less_than = { - oneofKind: "lt", - lt: reader.sint32() - }; - break; - case /* sint32 lte */ 3: - message.less_than = { - oneofKind: "lte", - lte: reader.sint32() - }; - break; - case /* sint32 gt */ 4: - message.greater_than = { - oneofKind: "gt", - gt: reader.sint32() - }; - break; - case /* sint32 gte */ 5: - message.greater_than = { - oneofKind: "gte", - gte: reader.sint32() - }; - break; - case /* repeated sint32 in */ 6: - if (wireType === WireType.LengthDelimited) - for (let e = reader.int32() + reader.pos; reader.pos < e;) - message.in.push(reader.sint32()); - else - message.in.push(reader.sint32()); - break; - case /* repeated sint32 not_in */ 7: - if (wireType === WireType.LengthDelimited) - for (let e = reader.int32() + reader.pos; reader.pos < e;) - message.not_in.push(reader.sint32()); - else - message.not_in.push(reader.sint32()); - break; - default: - let u = options.readUnknownField; - if (u === "throw") - throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); - let d = reader.skip(wireType); - if (u !== false) - (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); - } - } - return message; - } - internalBinaryWrite(message: SInt32Rules, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { - /* optional sint32 const = 1; */ - if (message.const !== undefined) - writer.tag(1, WireType.Varint).sint32(message.const); - /* sint32 lt = 2; */ - if (message.less_than.oneofKind === "lt") - writer.tag(2, WireType.Varint).sint32(message.less_than.lt); - /* sint32 lte = 3; */ - if (message.less_than.oneofKind === "lte") - writer.tag(3, WireType.Varint).sint32(message.less_than.lte); - /* sint32 gt = 4; */ - if (message.greater_than.oneofKind === "gt") - writer.tag(4, WireType.Varint).sint32(message.greater_than.gt); - /* sint32 gte = 5; */ - if (message.greater_than.oneofKind === "gte") - writer.tag(5, WireType.Varint).sint32(message.greater_than.gte); - /* repeated sint32 in = 6; */ - if (message.in.length) { - writer.tag(6, WireType.LengthDelimited).fork(); - for (let i = 0; i < message.in.length; i++) - writer.sint32(message.in[i]); - writer.join(); - } - /* repeated sint32 not_in = 7; */ - if (message.not_in.length) { - writer.tag(7, WireType.LengthDelimited).fork(); - for (let i = 0; i < message.not_in.length; i++) - writer.sint32(message.not_in[i]); - writer.join(); - } - let u = options.writeUnknownFields; - if (u !== false) - (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); - return writer; - } -} -/** - * @generated MessageType for protobuf message buf.validate.SInt32Rules - */ -export const SInt32Rules = new SInt32Rules$Type(); -// @generated message type with reflection information, may provide speed optimized methods -class SInt64Rules$Type extends MessageType { - constructor() { - super("buf.validate.SInt64Rules", [ - { no: 1, name: "const", kind: "scalar", opt: true, T: 18 /*ScalarType.SINT64*/, L: 0 /*LongType.BIGINT*/, options: { "buf.validate.priv.field": { cel: [{ id: "sint64.const", expression: "this != rules.const ? 'value must equal %s'.format([rules.const]) : ''" }] } } }, - { no: 2, name: "lt", kind: "scalar", oneof: "less_than", T: 18 /*ScalarType.SINT64*/, L: 0 /*LongType.BIGINT*/, options: { "buf.validate.priv.field": { cel: [{ id: "sint64.lt", expression: "!has(rules.gte) && !has(rules.gt) && this >= rules.lt? 'value must be less than %s'.format([rules.lt]) : ''" }] } } }, - { no: 3, name: "lte", kind: "scalar", oneof: "less_than", T: 18 /*ScalarType.SINT64*/, L: 0 /*LongType.BIGINT*/, options: { "buf.validate.priv.field": { cel: [{ id: "sint64.lte", expression: "!has(rules.gte) && !has(rules.gt) && this > rules.lte? 'value must be less than or equal to %s'.format([rules.lte]) : ''" }] } } }, - { no: 4, name: "gt", kind: "scalar", oneof: "greater_than", T: 18 /*ScalarType.SINT64*/, L: 0 /*LongType.BIGINT*/, options: { "buf.validate.priv.field": { cel: [{ id: "sint64.gt", expression: "!has(rules.lt) && !has(rules.lte) && this <= rules.gt? 'value must be greater than %s'.format([rules.gt]) : ''" }, { id: "sint64.gt_lt", expression: "has(rules.lt) && rules.lt >= rules.gt && (this >= rules.lt || this <= rules.gt)? 'value must be greater than %s and less than %s'.format([rules.gt, rules.lt]) : ''" }, { id: "sint64.gt_lt_exclusive", expression: "has(rules.lt) && rules.lt < rules.gt && (rules.lt <= this && this <= rules.gt)? 'value must be greater than %s or less than %s'.format([rules.gt, rules.lt]) : ''" }, { id: "sint64.gt_lte", expression: "has(rules.lte) && rules.lte >= rules.gt && (this > rules.lte || this <= rules.gt)? 'value must be greater than %s and less than or equal to %s'.format([rules.gt, rules.lte]) : ''" }, { id: "sint64.gt_lte_exclusive", expression: "has(rules.lte) && rules.lte < rules.gt && (rules.lte < this && this <= rules.gt)? 'value must be greater than %s or less than or equal to %s'.format([rules.gt, rules.lte]) : ''" }] } } }, - { no: 5, name: "gte", kind: "scalar", oneof: "greater_than", T: 18 /*ScalarType.SINT64*/, L: 0 /*LongType.BIGINT*/, options: { "buf.validate.priv.field": { cel: [{ id: "sint64.gte", expression: "!has(rules.lt) && !has(rules.lte) && this < rules.gte? 'value must be greater than or equal to %s'.format([rules.gte]) : ''" }, { id: "sint64.gte_lt", expression: "has(rules.lt) && rules.lt >= rules.gte && (this >= rules.lt || this < rules.gte)? 'value must be greater than or equal to %s and less than %s'.format([rules.gte, rules.lt]) : ''" }, { id: "sint64.gte_lt_exclusive", expression: "has(rules.lt) && rules.lt < rules.gte && (rules.lt <= this && this < rules.gte)? 'value must be greater than or equal to %s or less than %s'.format([rules.gte, rules.lt]) : ''" }, { id: "sint64.gte_lte", expression: "has(rules.lte) && rules.lte >= rules.gte && (this > rules.lte || this < rules.gte)? 'value must be greater than or equal to %s and less than or equal to %s'.format([rules.gte, rules.lte]) : ''" }, { id: "sint64.gte_lte_exclusive", expression: "has(rules.lte) && rules.lte < rules.gte && (rules.lte < this && this < rules.gte)? 'value must be greater than or equal to %s or less than or equal to %s'.format([rules.gte, rules.lte]) : ''" }] } } }, - { no: 6, name: "in", kind: "scalar", repeat: 1 /*RepeatType.PACKED*/, T: 18 /*ScalarType.SINT64*/, L: 0 /*LongType.BIGINT*/, options: { "buf.validate.priv.field": { cel: [{ id: "sint64.in", expression: "!(this in dyn(rules)['in']) ? 'value must be in list %s'.format([dyn(rules)['in']]) : ''" }] } } }, - { no: 7, name: "not_in", kind: "scalar", localName: "not_in", repeat: 1 /*RepeatType.PACKED*/, T: 18 /*ScalarType.SINT64*/, L: 0 /*LongType.BIGINT*/, options: { "buf.validate.priv.field": { cel: [{ id: "sint64.not_in", expression: "this in rules.not_in ? 'value must not be in list %s'.format([rules.not_in]) : ''" }] } } } - ]); - } - create(value?: PartialMessage): SInt64Rules { - const message = globalThis.Object.create((this.messagePrototype!)); - message.less_than = { oneofKind: undefined }; - message.greater_than = { oneofKind: undefined }; - message.in = []; - message.not_in = []; - if (value !== undefined) - reflectionMergePartial(this, message, value); - return message; - } - internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: SInt64Rules): SInt64Rules { - let message = target ?? this.create(), end = reader.pos + length; - while (reader.pos < end) { - let [fieldNo, wireType] = reader.tag(); - switch (fieldNo) { - case /* optional sint64 const */ 1: - message.const = reader.sint64().toBigInt(); - break; - case /* sint64 lt */ 2: - message.less_than = { - oneofKind: "lt", - lt: reader.sint64().toBigInt() - }; - break; - case /* sint64 lte */ 3: - message.less_than = { - oneofKind: "lte", - lte: reader.sint64().toBigInt() - }; - break; - case /* sint64 gt */ 4: - message.greater_than = { - oneofKind: "gt", - gt: reader.sint64().toBigInt() - }; - break; - case /* sint64 gte */ 5: - message.greater_than = { - oneofKind: "gte", - gte: reader.sint64().toBigInt() - }; - break; - case /* repeated sint64 in */ 6: - if (wireType === WireType.LengthDelimited) - for (let e = reader.int32() + reader.pos; reader.pos < e;) - message.in.push(reader.sint64().toBigInt()); - else - message.in.push(reader.sint64().toBigInt()); - break; - case /* repeated sint64 not_in */ 7: - if (wireType === WireType.LengthDelimited) - for (let e = reader.int32() + reader.pos; reader.pos < e;) - message.not_in.push(reader.sint64().toBigInt()); - else - message.not_in.push(reader.sint64().toBigInt()); - break; - default: - let u = options.readUnknownField; - if (u === "throw") - throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); - let d = reader.skip(wireType); - if (u !== false) - (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); - } - } - return message; - } - internalBinaryWrite(message: SInt64Rules, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { - /* optional sint64 const = 1; */ - if (message.const !== undefined) - writer.tag(1, WireType.Varint).sint64(message.const); - /* sint64 lt = 2; */ - if (message.less_than.oneofKind === "lt") - writer.tag(2, WireType.Varint).sint64(message.less_than.lt); - /* sint64 lte = 3; */ - if (message.less_than.oneofKind === "lte") - writer.tag(3, WireType.Varint).sint64(message.less_than.lte); - /* sint64 gt = 4; */ - if (message.greater_than.oneofKind === "gt") - writer.tag(4, WireType.Varint).sint64(message.greater_than.gt); - /* sint64 gte = 5; */ - if (message.greater_than.oneofKind === "gte") - writer.tag(5, WireType.Varint).sint64(message.greater_than.gte); - /* repeated sint64 in = 6; */ - if (message.in.length) { - writer.tag(6, WireType.LengthDelimited).fork(); - for (let i = 0; i < message.in.length; i++) - writer.sint64(message.in[i]); - writer.join(); - } - /* repeated sint64 not_in = 7; */ - if (message.not_in.length) { - writer.tag(7, WireType.LengthDelimited).fork(); - for (let i = 0; i < message.not_in.length; i++) - writer.sint64(message.not_in[i]); - writer.join(); - } - let u = options.writeUnknownFields; - if (u !== false) - (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); - return writer; - } -} -/** - * @generated MessageType for protobuf message buf.validate.SInt64Rules - */ -export const SInt64Rules = new SInt64Rules$Type(); -// @generated message type with reflection information, may provide speed optimized methods -class Fixed32Rules$Type extends MessageType { - constructor() { - super("buf.validate.Fixed32Rules", [ - { no: 1, name: "const", kind: "scalar", opt: true, T: 7 /*ScalarType.FIXED32*/, options: { "buf.validate.priv.field": { cel: [{ id: "fixed32.const", expression: "this != rules.const ? 'value must equal %s'.format([rules.const]) : ''" }] } } }, - { no: 2, name: "lt", kind: "scalar", oneof: "less_than", T: 7 /*ScalarType.FIXED32*/, options: { "buf.validate.priv.field": { cel: [{ id: "fixed32.lt", expression: "!has(rules.gte) && !has(rules.gt) && this >= rules.lt? 'value must be less than %s'.format([rules.lt]) : ''" }] } } }, - { no: 3, name: "lte", kind: "scalar", oneof: "less_than", T: 7 /*ScalarType.FIXED32*/, options: { "buf.validate.priv.field": { cel: [{ id: "fixed32.lte", expression: "!has(rules.gte) && !has(rules.gt) && this > rules.lte? 'value must be less than or equal to %s'.format([rules.lte]) : ''" }] } } }, - { no: 4, name: "gt", kind: "scalar", oneof: "greater_than", T: 7 /*ScalarType.FIXED32*/, options: { "buf.validate.priv.field": { cel: [{ id: "fixed32.gt", expression: "!has(rules.lt) && !has(rules.lte) && this <= rules.gt? 'value must be greater than %s'.format([rules.gt]) : ''" }, { id: "fixed32.gt_lt", expression: "has(rules.lt) && rules.lt >= rules.gt && (this >= rules.lt || this <= rules.gt)? 'value must be greater than %s and less than %s'.format([rules.gt, rules.lt]) : ''" }, { id: "fixed32.gt_lt_exclusive", expression: "has(rules.lt) && rules.lt < rules.gt && (rules.lt <= this && this <= rules.gt)? 'value must be greater than %s or less than %s'.format([rules.gt, rules.lt]) : ''" }, { id: "fixed32.gt_lte", expression: "has(rules.lte) && rules.lte >= rules.gt && (this > rules.lte || this <= rules.gt)? 'value must be greater than %s and less than or equal to %s'.format([rules.gt, rules.lte]) : ''" }, { id: "fixed32.gt_lte_exclusive", expression: "has(rules.lte) && rules.lte < rules.gt && (rules.lte < this && this <= rules.gt)? 'value must be greater than %s or less than or equal to %s'.format([rules.gt, rules.lte]) : ''" }] } } }, - { no: 5, name: "gte", kind: "scalar", oneof: "greater_than", T: 7 /*ScalarType.FIXED32*/, options: { "buf.validate.priv.field": { cel: [{ id: "fixed32.gte", expression: "!has(rules.lt) && !has(rules.lte) && this < rules.gte? 'value must be greater than or equal to %s'.format([rules.gte]) : ''" }, { id: "fixed32.gte_lt", expression: "has(rules.lt) && rules.lt >= rules.gte && (this >= rules.lt || this < rules.gte)? 'value must be greater than or equal to %s and less than %s'.format([rules.gte, rules.lt]) : ''" }, { id: "fixed32.gte_lt_exclusive", expression: "has(rules.lt) && rules.lt < rules.gte && (rules.lt <= this && this < rules.gte)? 'value must be greater than or equal to %s or less than %s'.format([rules.gte, rules.lt]) : ''" }, { id: "fixed32.gte_lte", expression: "has(rules.lte) && rules.lte >= rules.gte && (this > rules.lte || this < rules.gte)? 'value must be greater than or equal to %s and less than or equal to %s'.format([rules.gte, rules.lte]) : ''" }, { id: "fixed32.gte_lte_exclusive", expression: "has(rules.lte) && rules.lte < rules.gte && (rules.lte < this && this < rules.gte)? 'value must be greater than or equal to %s or less than or equal to %s'.format([rules.gte, rules.lte]) : ''" }] } } }, - { no: 6, name: "in", kind: "scalar", repeat: 1 /*RepeatType.PACKED*/, T: 7 /*ScalarType.FIXED32*/, options: { "buf.validate.priv.field": { cel: [{ id: "fixed32.in", expression: "!(this in dyn(rules)['in']) ? 'value must be in list %s'.format([dyn(rules)['in']]) : ''" }] } } }, - { no: 7, name: "not_in", kind: "scalar", localName: "not_in", repeat: 1 /*RepeatType.PACKED*/, T: 7 /*ScalarType.FIXED32*/, options: { "buf.validate.priv.field": { cel: [{ id: "fixed32.not_in", expression: "this in rules.not_in ? 'value must not be in list %s'.format([rules.not_in]) : ''" }] } } } - ]); - } - create(value?: PartialMessage): Fixed32Rules { - const message = globalThis.Object.create((this.messagePrototype!)); - message.less_than = { oneofKind: undefined }; - message.greater_than = { oneofKind: undefined }; - message.in = []; - message.not_in = []; - if (value !== undefined) - reflectionMergePartial(this, message, value); - return message; - } - internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Fixed32Rules): Fixed32Rules { - let message = target ?? this.create(), end = reader.pos + length; - while (reader.pos < end) { - let [fieldNo, wireType] = reader.tag(); - switch (fieldNo) { - case /* optional fixed32 const */ 1: - message.const = reader.fixed32(); - break; - case /* fixed32 lt */ 2: - message.less_than = { - oneofKind: "lt", - lt: reader.fixed32() - }; - break; - case /* fixed32 lte */ 3: - message.less_than = { - oneofKind: "lte", - lte: reader.fixed32() - }; - break; - case /* fixed32 gt */ 4: - message.greater_than = { - oneofKind: "gt", - gt: reader.fixed32() - }; - break; - case /* fixed32 gte */ 5: - message.greater_than = { - oneofKind: "gte", - gte: reader.fixed32() - }; - break; - case /* repeated fixed32 in */ 6: - if (wireType === WireType.LengthDelimited) - for (let e = reader.int32() + reader.pos; reader.pos < e;) - message.in.push(reader.fixed32()); - else - message.in.push(reader.fixed32()); - break; - case /* repeated fixed32 not_in */ 7: - if (wireType === WireType.LengthDelimited) - for (let e = reader.int32() + reader.pos; reader.pos < e;) - message.not_in.push(reader.fixed32()); - else - message.not_in.push(reader.fixed32()); - break; - default: - let u = options.readUnknownField; - if (u === "throw") - throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); - let d = reader.skip(wireType); - if (u !== false) - (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); - } - } - return message; - } - internalBinaryWrite(message: Fixed32Rules, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { - /* optional fixed32 const = 1; */ - if (message.const !== undefined) - writer.tag(1, WireType.Bit32).fixed32(message.const); - /* fixed32 lt = 2; */ - if (message.less_than.oneofKind === "lt") - writer.tag(2, WireType.Bit32).fixed32(message.less_than.lt); - /* fixed32 lte = 3; */ - if (message.less_than.oneofKind === "lte") - writer.tag(3, WireType.Bit32).fixed32(message.less_than.lte); - /* fixed32 gt = 4; */ - if (message.greater_than.oneofKind === "gt") - writer.tag(4, WireType.Bit32).fixed32(message.greater_than.gt); - /* fixed32 gte = 5; */ - if (message.greater_than.oneofKind === "gte") - writer.tag(5, WireType.Bit32).fixed32(message.greater_than.gte); - /* repeated fixed32 in = 6; */ - if (message.in.length) { - writer.tag(6, WireType.LengthDelimited).fork(); - for (let i = 0; i < message.in.length; i++) - writer.fixed32(message.in[i]); - writer.join(); - } - /* repeated fixed32 not_in = 7; */ - if (message.not_in.length) { - writer.tag(7, WireType.LengthDelimited).fork(); - for (let i = 0; i < message.not_in.length; i++) - writer.fixed32(message.not_in[i]); - writer.join(); - } - let u = options.writeUnknownFields; - if (u !== false) - (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); - return writer; - } -} -/** - * @generated MessageType for protobuf message buf.validate.Fixed32Rules - */ -export const Fixed32Rules = new Fixed32Rules$Type(); -// @generated message type with reflection information, may provide speed optimized methods -class Fixed64Rules$Type extends MessageType { - constructor() { - super("buf.validate.Fixed64Rules", [ - { no: 1, name: "const", kind: "scalar", opt: true, T: 6 /*ScalarType.FIXED64*/, L: 0 /*LongType.BIGINT*/, options: { "buf.validate.priv.field": { cel: [{ id: "fixed64.const", expression: "this != rules.const ? 'value must equal %s'.format([rules.const]) : ''" }] } } }, - { no: 2, name: "lt", kind: "scalar", oneof: "less_than", T: 6 /*ScalarType.FIXED64*/, L: 0 /*LongType.BIGINT*/, options: { "buf.validate.priv.field": { cel: [{ id: "fixed64.lt", expression: "!has(rules.gte) && !has(rules.gt) && this >= rules.lt? 'value must be less than %s'.format([rules.lt]) : ''" }] } } }, - { no: 3, name: "lte", kind: "scalar", oneof: "less_than", T: 6 /*ScalarType.FIXED64*/, L: 0 /*LongType.BIGINT*/, options: { "buf.validate.priv.field": { cel: [{ id: "fixed64.lte", expression: "!has(rules.gte) && !has(rules.gt) && this > rules.lte? 'value must be less than or equal to %s'.format([rules.lte]) : ''" }] } } }, - { no: 4, name: "gt", kind: "scalar", oneof: "greater_than", T: 6 /*ScalarType.FIXED64*/, L: 0 /*LongType.BIGINT*/, options: { "buf.validate.priv.field": { cel: [{ id: "fixed64.gt", expression: "!has(rules.lt) && !has(rules.lte) && this <= rules.gt? 'value must be greater than %s'.format([rules.gt]) : ''" }, { id: "fixed64.gt_lt", expression: "has(rules.lt) && rules.lt >= rules.gt && (this >= rules.lt || this <= rules.gt)? 'value must be greater than %s and less than %s'.format([rules.gt, rules.lt]) : ''" }, { id: "fixed64.gt_lt_exclusive", expression: "has(rules.lt) && rules.lt < rules.gt && (rules.lt <= this && this <= rules.gt)? 'value must be greater than %s or less than %s'.format([rules.gt, rules.lt]) : ''" }, { id: "fixed64.gt_lte", expression: "has(rules.lte) && rules.lte >= rules.gt && (this > rules.lte || this <= rules.gt)? 'value must be greater than %s and less than or equal to %s'.format([rules.gt, rules.lte]) : ''" }, { id: "fixed64.gt_lte_exclusive", expression: "has(rules.lte) && rules.lte < rules.gt && (rules.lte < this && this <= rules.gt)? 'value must be greater than %s or less than or equal to %s'.format([rules.gt, rules.lte]) : ''" }] } } }, - { no: 5, name: "gte", kind: "scalar", oneof: "greater_than", T: 6 /*ScalarType.FIXED64*/, L: 0 /*LongType.BIGINT*/, options: { "buf.validate.priv.field": { cel: [{ id: "fixed64.gte", expression: "!has(rules.lt) && !has(rules.lte) && this < rules.gte? 'value must be greater than or equal to %s'.format([rules.gte]) : ''" }, { id: "fixed64.gte_lt", expression: "has(rules.lt) && rules.lt >= rules.gte && (this >= rules.lt || this < rules.gte)? 'value must be greater than or equal to %s and less than %s'.format([rules.gte, rules.lt]) : ''" }, { id: "fixed64.gte_lt_exclusive", expression: "has(rules.lt) && rules.lt < rules.gte && (rules.lt <= this && this < rules.gte)? 'value must be greater than or equal to %s or less than %s'.format([rules.gte, rules.lt]) : ''" }, { id: "fixed64.gte_lte", expression: "has(rules.lte) && rules.lte >= rules.gte && (this > rules.lte || this < rules.gte)? 'value must be greater than or equal to %s and less than or equal to %s'.format([rules.gte, rules.lte]) : ''" }, { id: "fixed64.gte_lte_exclusive", expression: "has(rules.lte) && rules.lte < rules.gte && (rules.lte < this && this < rules.gte)? 'value must be greater than or equal to %s or less than or equal to %s'.format([rules.gte, rules.lte]) : ''" }] } } }, - { no: 6, name: "in", kind: "scalar", repeat: 1 /*RepeatType.PACKED*/, T: 6 /*ScalarType.FIXED64*/, L: 0 /*LongType.BIGINT*/, options: { "buf.validate.priv.field": { cel: [{ id: "fixed64.in", expression: "!(this in dyn(rules)['in']) ? 'value must be in list %s'.format([dyn(rules)['in']]) : ''" }] } } }, - { no: 7, name: "not_in", kind: "scalar", localName: "not_in", repeat: 1 /*RepeatType.PACKED*/, T: 6 /*ScalarType.FIXED64*/, L: 0 /*LongType.BIGINT*/, options: { "buf.validate.priv.field": { cel: [{ id: "fixed64.not_in", expression: "this in rules.not_in ? 'value must not be in list %s'.format([rules.not_in]) : ''" }] } } } - ]); - } - create(value?: PartialMessage): Fixed64Rules { - const message = globalThis.Object.create((this.messagePrototype!)); - message.less_than = { oneofKind: undefined }; - message.greater_than = { oneofKind: undefined }; - message.in = []; - message.not_in = []; - if (value !== undefined) - reflectionMergePartial(this, message, value); - return message; - } - internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Fixed64Rules): Fixed64Rules { - let message = target ?? this.create(), end = reader.pos + length; - while (reader.pos < end) { - let [fieldNo, wireType] = reader.tag(); - switch (fieldNo) { - case /* optional fixed64 const */ 1: - message.const = reader.fixed64().toBigInt(); - break; - case /* fixed64 lt */ 2: - message.less_than = { - oneofKind: "lt", - lt: reader.fixed64().toBigInt() - }; - break; - case /* fixed64 lte */ 3: - message.less_than = { - oneofKind: "lte", - lte: reader.fixed64().toBigInt() - }; - break; - case /* fixed64 gt */ 4: - message.greater_than = { - oneofKind: "gt", - gt: reader.fixed64().toBigInt() - }; - break; - case /* fixed64 gte */ 5: - message.greater_than = { - oneofKind: "gte", - gte: reader.fixed64().toBigInt() - }; - break; - case /* repeated fixed64 in */ 6: - if (wireType === WireType.LengthDelimited) - for (let e = reader.int32() + reader.pos; reader.pos < e;) - message.in.push(reader.fixed64().toBigInt()); - else - message.in.push(reader.fixed64().toBigInt()); - break; - case /* repeated fixed64 not_in */ 7: - if (wireType === WireType.LengthDelimited) - for (let e = reader.int32() + reader.pos; reader.pos < e;) - message.not_in.push(reader.fixed64().toBigInt()); - else - message.not_in.push(reader.fixed64().toBigInt()); - break; - default: - let u = options.readUnknownField; - if (u === "throw") - throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); - let d = reader.skip(wireType); - if (u !== false) - (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); - } - } - return message; - } - internalBinaryWrite(message: Fixed64Rules, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { - /* optional fixed64 const = 1; */ - if (message.const !== undefined) - writer.tag(1, WireType.Bit64).fixed64(message.const); - /* fixed64 lt = 2; */ - if (message.less_than.oneofKind === "lt") - writer.tag(2, WireType.Bit64).fixed64(message.less_than.lt); - /* fixed64 lte = 3; */ - if (message.less_than.oneofKind === "lte") - writer.tag(3, WireType.Bit64).fixed64(message.less_than.lte); - /* fixed64 gt = 4; */ - if (message.greater_than.oneofKind === "gt") - writer.tag(4, WireType.Bit64).fixed64(message.greater_than.gt); - /* fixed64 gte = 5; */ - if (message.greater_than.oneofKind === "gte") - writer.tag(5, WireType.Bit64).fixed64(message.greater_than.gte); - /* repeated fixed64 in = 6; */ - if (message.in.length) { - writer.tag(6, WireType.LengthDelimited).fork(); - for (let i = 0; i < message.in.length; i++) - writer.fixed64(message.in[i]); - writer.join(); - } - /* repeated fixed64 not_in = 7; */ - if (message.not_in.length) { - writer.tag(7, WireType.LengthDelimited).fork(); - for (let i = 0; i < message.not_in.length; i++) - writer.fixed64(message.not_in[i]); - writer.join(); - } - let u = options.writeUnknownFields; - if (u !== false) - (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); - return writer; - } -} -/** - * @generated MessageType for protobuf message buf.validate.Fixed64Rules - */ -export const Fixed64Rules = new Fixed64Rules$Type(); -// @generated message type with reflection information, may provide speed optimized methods -class SFixed32Rules$Type extends MessageType { - constructor() { - super("buf.validate.SFixed32Rules", [ - { no: 1, name: "const", kind: "scalar", opt: true, T: 15 /*ScalarType.SFIXED32*/, options: { "buf.validate.priv.field": { cel: [{ id: "sfixed32.const", expression: "this != rules.const ? 'value must equal %s'.format([rules.const]) : ''" }] } } }, - { no: 2, name: "lt", kind: "scalar", oneof: "less_than", T: 15 /*ScalarType.SFIXED32*/, options: { "buf.validate.priv.field": { cel: [{ id: "sfixed32.lt", expression: "!has(rules.gte) && !has(rules.gt) && this >= rules.lt? 'value must be less than %s'.format([rules.lt]) : ''" }] } } }, - { no: 3, name: "lte", kind: "scalar", oneof: "less_than", T: 15 /*ScalarType.SFIXED32*/, options: { "buf.validate.priv.field": { cel: [{ id: "sfixed32.lte", expression: "!has(rules.gte) && !has(rules.gt) && this > rules.lte? 'value must be less than or equal to %s'.format([rules.lte]) : ''" }] } } }, - { no: 4, name: "gt", kind: "scalar", oneof: "greater_than", T: 15 /*ScalarType.SFIXED32*/, options: { "buf.validate.priv.field": { cel: [{ id: "sfixed32.gt", expression: "!has(rules.lt) && !has(rules.lte) && this <= rules.gt? 'value must be greater than %s'.format([rules.gt]) : ''" }, { id: "sfixed32.gt_lt", expression: "has(rules.lt) && rules.lt >= rules.gt && (this >= rules.lt || this <= rules.gt)? 'value must be greater than %s and less than %s'.format([rules.gt, rules.lt]) : ''" }, { id: "sfixed32.gt_lt_exclusive", expression: "has(rules.lt) && rules.lt < rules.gt && (rules.lt <= this && this <= rules.gt)? 'value must be greater than %s or less than %s'.format([rules.gt, rules.lt]) : ''" }, { id: "sfixed32.gt_lte", expression: "has(rules.lte) && rules.lte >= rules.gt && (this > rules.lte || this <= rules.gt)? 'value must be greater than %s and less than or equal to %s'.format([rules.gt, rules.lte]) : ''" }, { id: "sfixed32.gt_lte_exclusive", expression: "has(rules.lte) && rules.lte < rules.gt && (rules.lte < this && this <= rules.gt)? 'value must be greater than %s or less than or equal to %s'.format([rules.gt, rules.lte]) : ''" }] } } }, - { no: 5, name: "gte", kind: "scalar", oneof: "greater_than", T: 15 /*ScalarType.SFIXED32*/, options: { "buf.validate.priv.field": { cel: [{ id: "sfixed32.gte", expression: "!has(rules.lt) && !has(rules.lte) && this < rules.gte? 'value must be greater than or equal to %s'.format([rules.gte]) : ''" }, { id: "sfixed32.gte_lt", expression: "has(rules.lt) && rules.lt >= rules.gte && (this >= rules.lt || this < rules.gte)? 'value must be greater than or equal to %s and less than %s'.format([rules.gte, rules.lt]) : ''" }, { id: "sfixed32.gte_lt_exclusive", expression: "has(rules.lt) && rules.lt < rules.gte && (rules.lt <= this && this < rules.gte)? 'value must be greater than or equal to %s or less than %s'.format([rules.gte, rules.lt]) : ''" }, { id: "sfixed32.gte_lte", expression: "has(rules.lte) && rules.lte >= rules.gte && (this > rules.lte || this < rules.gte)? 'value must be greater than or equal to %s and less than or equal to %s'.format([rules.gte, rules.lte]) : ''" }, { id: "sfixed32.gte_lte_exclusive", expression: "has(rules.lte) && rules.lte < rules.gte && (rules.lte < this && this < rules.gte)? 'value must be greater than or equal to %s or less than or equal to %s'.format([rules.gte, rules.lte]) : ''" }] } } }, - { no: 6, name: "in", kind: "scalar", repeat: 1 /*RepeatType.PACKED*/, T: 15 /*ScalarType.SFIXED32*/, options: { "buf.validate.priv.field": { cel: [{ id: "sfixed32.in", expression: "!(this in dyn(rules)['in']) ? 'value must be in list %s'.format([dyn(rules)['in']]) : ''" }] } } }, - { no: 7, name: "not_in", kind: "scalar", localName: "not_in", repeat: 1 /*RepeatType.PACKED*/, T: 15 /*ScalarType.SFIXED32*/, options: { "buf.validate.priv.field": { cel: [{ id: "sfixed32.not_in", expression: "this in rules.not_in ? 'value must not be in list %s'.format([rules.not_in]) : ''" }] } } } - ]); - } - create(value?: PartialMessage): SFixed32Rules { - const message = globalThis.Object.create((this.messagePrototype!)); - message.less_than = { oneofKind: undefined }; - message.greater_than = { oneofKind: undefined }; - message.in = []; - message.not_in = []; - if (value !== undefined) - reflectionMergePartial(this, message, value); - return message; - } - internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: SFixed32Rules): SFixed32Rules { - let message = target ?? this.create(), end = reader.pos + length; - while (reader.pos < end) { - let [fieldNo, wireType] = reader.tag(); - switch (fieldNo) { - case /* optional sfixed32 const */ 1: - message.const = reader.sfixed32(); - break; - case /* sfixed32 lt */ 2: - message.less_than = { - oneofKind: "lt", - lt: reader.sfixed32() - }; - break; - case /* sfixed32 lte */ 3: - message.less_than = { - oneofKind: "lte", - lte: reader.sfixed32() - }; - break; - case /* sfixed32 gt */ 4: - message.greater_than = { - oneofKind: "gt", - gt: reader.sfixed32() - }; - break; - case /* sfixed32 gte */ 5: - message.greater_than = { - oneofKind: "gte", - gte: reader.sfixed32() - }; - break; - case /* repeated sfixed32 in */ 6: - if (wireType === WireType.LengthDelimited) - for (let e = reader.int32() + reader.pos; reader.pos < e;) - message.in.push(reader.sfixed32()); - else - message.in.push(reader.sfixed32()); - break; - case /* repeated sfixed32 not_in */ 7: - if (wireType === WireType.LengthDelimited) - for (let e = reader.int32() + reader.pos; reader.pos < e;) - message.not_in.push(reader.sfixed32()); - else - message.not_in.push(reader.sfixed32()); - break; - default: - let u = options.readUnknownField; - if (u === "throw") - throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); - let d = reader.skip(wireType); - if (u !== false) - (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); - } - } - return message; - } - internalBinaryWrite(message: SFixed32Rules, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { - /* optional sfixed32 const = 1; */ - if (message.const !== undefined) - writer.tag(1, WireType.Bit32).sfixed32(message.const); - /* sfixed32 lt = 2; */ - if (message.less_than.oneofKind === "lt") - writer.tag(2, WireType.Bit32).sfixed32(message.less_than.lt); - /* sfixed32 lte = 3; */ - if (message.less_than.oneofKind === "lte") - writer.tag(3, WireType.Bit32).sfixed32(message.less_than.lte); - /* sfixed32 gt = 4; */ - if (message.greater_than.oneofKind === "gt") - writer.tag(4, WireType.Bit32).sfixed32(message.greater_than.gt); - /* sfixed32 gte = 5; */ - if (message.greater_than.oneofKind === "gte") - writer.tag(5, WireType.Bit32).sfixed32(message.greater_than.gte); - /* repeated sfixed32 in = 6; */ - if (message.in.length) { - writer.tag(6, WireType.LengthDelimited).fork(); - for (let i = 0; i < message.in.length; i++) - writer.sfixed32(message.in[i]); - writer.join(); - } - /* repeated sfixed32 not_in = 7; */ - if (message.not_in.length) { - writer.tag(7, WireType.LengthDelimited).fork(); - for (let i = 0; i < message.not_in.length; i++) - writer.sfixed32(message.not_in[i]); - writer.join(); - } - let u = options.writeUnknownFields; - if (u !== false) - (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); - return writer; - } -} -/** - * @generated MessageType for protobuf message buf.validate.SFixed32Rules - */ -export const SFixed32Rules = new SFixed32Rules$Type(); -// @generated message type with reflection information, may provide speed optimized methods -class SFixed64Rules$Type extends MessageType { - constructor() { - super("buf.validate.SFixed64Rules", [ - { no: 1, name: "const", kind: "scalar", opt: true, T: 16 /*ScalarType.SFIXED64*/, L: 0 /*LongType.BIGINT*/, options: { "buf.validate.priv.field": { cel: [{ id: "sfixed64.const", expression: "this != rules.const ? 'value must equal %s'.format([rules.const]) : ''" }] } } }, - { no: 2, name: "lt", kind: "scalar", oneof: "less_than", T: 16 /*ScalarType.SFIXED64*/, L: 0 /*LongType.BIGINT*/, options: { "buf.validate.priv.field": { cel: [{ id: "sfixed64.lt", expression: "!has(rules.gte) && !has(rules.gt) && this >= rules.lt? 'value must be less than %s'.format([rules.lt]) : ''" }] } } }, - { no: 3, name: "lte", kind: "scalar", oneof: "less_than", T: 16 /*ScalarType.SFIXED64*/, L: 0 /*LongType.BIGINT*/, options: { "buf.validate.priv.field": { cel: [{ id: "sfixed64.lte", expression: "!has(rules.gte) && !has(rules.gt) && this > rules.lte? 'value must be less than or equal to %s'.format([rules.lte]) : ''" }] } } }, - { no: 4, name: "gt", kind: "scalar", oneof: "greater_than", T: 16 /*ScalarType.SFIXED64*/, L: 0 /*LongType.BIGINT*/, options: { "buf.validate.priv.field": { cel: [{ id: "sfixed64.gt", expression: "!has(rules.lt) && !has(rules.lte) && this <= rules.gt? 'value must be greater than %s'.format([rules.gt]) : ''" }, { id: "sfixed64.gt_lt", expression: "has(rules.lt) && rules.lt >= rules.gt && (this >= rules.lt || this <= rules.gt)? 'value must be greater than %s and less than %s'.format([rules.gt, rules.lt]) : ''" }, { id: "sfixed64.gt_lt_exclusive", expression: "has(rules.lt) && rules.lt < rules.gt && (rules.lt <= this && this <= rules.gt)? 'value must be greater than %s or less than %s'.format([rules.gt, rules.lt]) : ''" }, { id: "sfixed64.gt_lte", expression: "has(rules.lte) && rules.lte >= rules.gt && (this > rules.lte || this <= rules.gt)? 'value must be greater than %s and less than or equal to %s'.format([rules.gt, rules.lte]) : ''" }, { id: "sfixed64.gt_lte_exclusive", expression: "has(rules.lte) && rules.lte < rules.gt && (rules.lte < this && this <= rules.gt)? 'value must be greater than %s or less than or equal to %s'.format([rules.gt, rules.lte]) : ''" }] } } }, - { no: 5, name: "gte", kind: "scalar", oneof: "greater_than", T: 16 /*ScalarType.SFIXED64*/, L: 0 /*LongType.BIGINT*/, options: { "buf.validate.priv.field": { cel: [{ id: "sfixed64.gte", expression: "!has(rules.lt) && !has(rules.lte) && this < rules.gte? 'value must be greater than or equal to %s'.format([rules.gte]) : ''" }, { id: "sfixed64.gte_lt", expression: "has(rules.lt) && rules.lt >= rules.gte && (this >= rules.lt || this < rules.gte)? 'value must be greater than or equal to %s and less than %s'.format([rules.gte, rules.lt]) : ''" }, { id: "sfixed64.gte_lt_exclusive", expression: "has(rules.lt) && rules.lt < rules.gte && (rules.lt <= this && this < rules.gte)? 'value must be greater than or equal to %s or less than %s'.format([rules.gte, rules.lt]) : ''" }, { id: "sfixed64.gte_lte", expression: "has(rules.lte) && rules.lte >= rules.gte && (this > rules.lte || this < rules.gte)? 'value must be greater than or equal to %s and less than or equal to %s'.format([rules.gte, rules.lte]) : ''" }, { id: "sfixed64.gte_lte_exclusive", expression: "has(rules.lte) && rules.lte < rules.gte && (rules.lte < this && this < rules.gte)? 'value must be greater than or equal to %s or less than or equal to %s'.format([rules.gte, rules.lte]) : ''" }] } } }, - { no: 6, name: "in", kind: "scalar", repeat: 1 /*RepeatType.PACKED*/, T: 16 /*ScalarType.SFIXED64*/, L: 0 /*LongType.BIGINT*/, options: { "buf.validate.priv.field": { cel: [{ id: "sfixed64.in", expression: "!(this in dyn(rules)['in']) ? 'value must be in list %s'.format([dyn(rules)['in']]) : ''" }] } } }, - { no: 7, name: "not_in", kind: "scalar", localName: "not_in", repeat: 1 /*RepeatType.PACKED*/, T: 16 /*ScalarType.SFIXED64*/, L: 0 /*LongType.BIGINT*/, options: { "buf.validate.priv.field": { cel: [{ id: "sfixed64.not_in", expression: "this in rules.not_in ? 'value must not be in list %s'.format([rules.not_in]) : ''" }] } } } - ]); - } - create(value?: PartialMessage): SFixed64Rules { - const message = globalThis.Object.create((this.messagePrototype!)); - message.less_than = { oneofKind: undefined }; - message.greater_than = { oneofKind: undefined }; - message.in = []; - message.not_in = []; - if (value !== undefined) - reflectionMergePartial(this, message, value); - return message; - } - internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: SFixed64Rules): SFixed64Rules { - let message = target ?? this.create(), end = reader.pos + length; - while (reader.pos < end) { - let [fieldNo, wireType] = reader.tag(); - switch (fieldNo) { - case /* optional sfixed64 const */ 1: - message.const = reader.sfixed64().toBigInt(); - break; - case /* sfixed64 lt */ 2: - message.less_than = { - oneofKind: "lt", - lt: reader.sfixed64().toBigInt() - }; - break; - case /* sfixed64 lte */ 3: - message.less_than = { - oneofKind: "lte", - lte: reader.sfixed64().toBigInt() - }; - break; - case /* sfixed64 gt */ 4: - message.greater_than = { - oneofKind: "gt", - gt: reader.sfixed64().toBigInt() - }; - break; - case /* sfixed64 gte */ 5: - message.greater_than = { - oneofKind: "gte", - gte: reader.sfixed64().toBigInt() - }; - break; - case /* repeated sfixed64 in */ 6: - if (wireType === WireType.LengthDelimited) - for (let e = reader.int32() + reader.pos; reader.pos < e;) - message.in.push(reader.sfixed64().toBigInt()); - else - message.in.push(reader.sfixed64().toBigInt()); - break; - case /* repeated sfixed64 not_in */ 7: - if (wireType === WireType.LengthDelimited) - for (let e = reader.int32() + reader.pos; reader.pos < e;) - message.not_in.push(reader.sfixed64().toBigInt()); - else - message.not_in.push(reader.sfixed64().toBigInt()); - break; - default: - let u = options.readUnknownField; - if (u === "throw") - throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); - let d = reader.skip(wireType); - if (u !== false) - (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); - } - } - return message; - } - internalBinaryWrite(message: SFixed64Rules, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { - /* optional sfixed64 const = 1; */ - if (message.const !== undefined) - writer.tag(1, WireType.Bit64).sfixed64(message.const); - /* sfixed64 lt = 2; */ - if (message.less_than.oneofKind === "lt") - writer.tag(2, WireType.Bit64).sfixed64(message.less_than.lt); - /* sfixed64 lte = 3; */ - if (message.less_than.oneofKind === "lte") - writer.tag(3, WireType.Bit64).sfixed64(message.less_than.lte); - /* sfixed64 gt = 4; */ - if (message.greater_than.oneofKind === "gt") - writer.tag(4, WireType.Bit64).sfixed64(message.greater_than.gt); - /* sfixed64 gte = 5; */ - if (message.greater_than.oneofKind === "gte") - writer.tag(5, WireType.Bit64).sfixed64(message.greater_than.gte); - /* repeated sfixed64 in = 6; */ - if (message.in.length) { - writer.tag(6, WireType.LengthDelimited).fork(); - for (let i = 0; i < message.in.length; i++) - writer.sfixed64(message.in[i]); - writer.join(); - } - /* repeated sfixed64 not_in = 7; */ - if (message.not_in.length) { - writer.tag(7, WireType.LengthDelimited).fork(); - for (let i = 0; i < message.not_in.length; i++) - writer.sfixed64(message.not_in[i]); - writer.join(); - } - let u = options.writeUnknownFields; - if (u !== false) - (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); - return writer; - } -} -/** - * @generated MessageType for protobuf message buf.validate.SFixed64Rules - */ -export const SFixed64Rules = new SFixed64Rules$Type(); -// @generated message type with reflection information, may provide speed optimized methods -class BoolRules$Type extends MessageType { - constructor() { - super("buf.validate.BoolRules", [ - { no: 1, name: "const", kind: "scalar", opt: true, T: 8 /*ScalarType.BOOL*/, options: { "buf.validate.priv.field": { cel: [{ id: "bool.const", expression: "this != rules.const ? 'value must equal %s'.format([rules.const]) : ''" }] } } } - ]); - } - create(value?: PartialMessage): BoolRules { - const message = globalThis.Object.create((this.messagePrototype!)); - if (value !== undefined) - reflectionMergePartial(this, message, value); - return message; - } - internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: BoolRules): BoolRules { - let message = target ?? this.create(), end = reader.pos + length; - while (reader.pos < end) { - let [fieldNo, wireType] = reader.tag(); - switch (fieldNo) { - case /* optional bool const */ 1: - message.const = reader.bool(); - break; - default: - let u = options.readUnknownField; - if (u === "throw") - throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); - let d = reader.skip(wireType); - if (u !== false) - (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); - } - } - return message; - } - internalBinaryWrite(message: BoolRules, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { - /* optional bool const = 1; */ - if (message.const !== undefined) - writer.tag(1, WireType.Varint).bool(message.const); - let u = options.writeUnknownFields; - if (u !== false) - (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); - return writer; - } -} -/** - * @generated MessageType for protobuf message buf.validate.BoolRules - */ -export const BoolRules = new BoolRules$Type(); -// @generated message type with reflection information, may provide speed optimized methods -class StringRules$Type extends MessageType { - constructor() { - super("buf.validate.StringRules", [ - { no: 1, name: "const", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "buf.validate.priv.field": { cel: [{ id: "string.const", expression: "this != rules.const ? 'value must equal `%s`'.format([rules.const]) : ''" }] } } }, - { no: 19, name: "len", kind: "scalar", opt: true, T: 4 /*ScalarType.UINT64*/, L: 0 /*LongType.BIGINT*/, options: { "buf.validate.priv.field": { cel: [{ id: "string.len", expression: "uint(this.size()) != rules.len ? 'value length must be %s characters'.format([rules.len]) : ''" }] } } }, - { no: 2, name: "min_len", kind: "scalar", localName: "min_len", opt: true, T: 4 /*ScalarType.UINT64*/, L: 0 /*LongType.BIGINT*/, options: { "buf.validate.priv.field": { cel: [{ id: "string.min_len", expression: "uint(this.size()) < rules.min_len ? 'value length must be at least %s characters'.format([rules.min_len]) : ''" }] } } }, - { no: 3, name: "max_len", kind: "scalar", localName: "max_len", opt: true, T: 4 /*ScalarType.UINT64*/, L: 0 /*LongType.BIGINT*/, options: { "buf.validate.priv.field": { cel: [{ id: "string.max_len", expression: "uint(this.size()) > rules.max_len ? 'value length must be at most %s characters'.format([rules.max_len]) : ''" }] } } }, - { no: 20, name: "len_bytes", kind: "scalar", localName: "len_bytes", opt: true, T: 4 /*ScalarType.UINT64*/, L: 0 /*LongType.BIGINT*/, options: { "buf.validate.priv.field": { cel: [{ id: "string.len_bytes", expression: "uint(bytes(this).size()) != rules.len_bytes ? 'value length must be %s bytes'.format([rules.len_bytes]) : ''" }] } } }, - { no: 4, name: "min_bytes", kind: "scalar", localName: "min_bytes", opt: true, T: 4 /*ScalarType.UINT64*/, L: 0 /*LongType.BIGINT*/, options: { "buf.validate.priv.field": { cel: [{ id: "string.min_bytes", expression: "uint(bytes(this).size()) < rules.min_bytes ? 'value length must be at least %s bytes'.format([rules.min_bytes]) : ''" }] } } }, - { no: 5, name: "max_bytes", kind: "scalar", localName: "max_bytes", opt: true, T: 4 /*ScalarType.UINT64*/, L: 0 /*LongType.BIGINT*/, options: { "buf.validate.priv.field": { cel: [{ id: "string.max_bytes", expression: "uint(bytes(this).size()) > rules.max_bytes ? 'value length must be at most %s bytes'.format([rules.max_bytes]) : ''" }] } } }, - { no: 6, name: "pattern", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "buf.validate.priv.field": { cel: [{ id: "string.pattern", expression: "!this.matches(rules.pattern) ? 'value does not match regex pattern `%s`'.format([rules.pattern]) : ''" }] } } }, - { no: 7, name: "prefix", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "buf.validate.priv.field": { cel: [{ id: "string.prefix", expression: "!this.startsWith(rules.prefix) ? 'value does not have prefix `%s`'.format([rules.prefix]) : ''" }] } } }, - { no: 8, name: "suffix", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "buf.validate.priv.field": { cel: [{ id: "string.suffix", expression: "!this.endsWith(rules.suffix) ? 'value does not have suffix `%s`'.format([rules.suffix]) : ''" }] } } }, - { no: 9, name: "contains", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "buf.validate.priv.field": { cel: [{ id: "string.contains", expression: "!this.contains(rules.contains) ? 'value does not contain substring `%s`'.format([rules.contains]) : ''" }] } } }, - { no: 23, name: "not_contains", kind: "scalar", localName: "not_contains", opt: true, T: 9 /*ScalarType.STRING*/, options: { "buf.validate.priv.field": { cel: [{ id: "string.not_contains", expression: "this.contains(rules.not_contains) ? 'value contains substring `%s`'.format([rules.not_contains]) : ''" }] } } }, - { no: 10, name: "in", kind: "scalar", repeat: 2 /*RepeatType.UNPACKED*/, T: 9 /*ScalarType.STRING*/, options: { "buf.validate.priv.field": { cel: [{ id: "string.in", expression: "!(this in dyn(rules)['in']) ? 'value must be in list %s'.format([dyn(rules)['in']]) : ''" }] } } }, - { no: 11, name: "not_in", kind: "scalar", localName: "not_in", repeat: 2 /*RepeatType.UNPACKED*/, T: 9 /*ScalarType.STRING*/, options: { "buf.validate.priv.field": { cel: [{ id: "string.not_in", expression: "this in rules.not_in ? 'value must not be in list %s'.format([rules.not_in]) : ''" }] } } }, - { no: 12, name: "email", kind: "scalar", oneof: "well_known", T: 8 /*ScalarType.BOOL*/, options: { "buf.validate.priv.field": { cel: [{ id: "string.email", message: "value must be a valid email address", expression: "this.isEmail()" }] } } }, - { no: 13, name: "hostname", kind: "scalar", oneof: "well_known", T: 8 /*ScalarType.BOOL*/, options: { "buf.validate.priv.field": { cel: [{ id: "string.hostname", message: "value must be a valid hostname", expression: "this.isHostname()" }] } } }, - { no: 14, name: "ip", kind: "scalar", oneof: "well_known", T: 8 /*ScalarType.BOOL*/, options: { "buf.validate.priv.field": { cel: [{ id: "string.ip", message: "value must be a valid IP address", expression: "this.isIp()" }] } } }, - { no: 15, name: "ipv4", kind: "scalar", oneof: "well_known", T: 8 /*ScalarType.BOOL*/, options: { "buf.validate.priv.field": { cel: [{ id: "string.ipv4", message: "value must be a valid IPv4 address", expression: "this.isIp(4)" }] } } }, - { no: 16, name: "ipv6", kind: "scalar", oneof: "well_known", T: 8 /*ScalarType.BOOL*/, options: { "buf.validate.priv.field": { cel: [{ id: "string.ipv6", message: "value must be a valid IPv6 address", expression: "this.isIp(6)" }] } } }, - { no: 17, name: "uri", kind: "scalar", oneof: "well_known", T: 8 /*ScalarType.BOOL*/, options: { "buf.validate.priv.field": { cel: [{ id: "string.uri", message: "value must be a valid URI", expression: "this.isUri()" }] } } }, - { no: 18, name: "uri_ref", kind: "scalar", localName: "uri_ref", oneof: "well_known", T: 8 /*ScalarType.BOOL*/, options: { "buf.validate.priv.field": { cel: [{ id: "string.uri_ref", message: "value must be a valid URI", expression: "this.isUriRef()" }] } } }, - { no: 21, name: "address", kind: "scalar", oneof: "well_known", T: 8 /*ScalarType.BOOL*/, options: { "buf.validate.priv.field": { cel: [{ id: "string.address", message: "value must be a valid hostname, or ip address", expression: "this.isHostname() || this.isIp()" }] } } }, - { no: 22, name: "uuid", kind: "scalar", oneof: "well_known", T: 8 /*ScalarType.BOOL*/, options: { "buf.validate.priv.field": { cel: [{ id: "string.uuid", expression: "!this.matches('^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$') ? 'value must be a valid UUID' : ''" }] } } }, - { no: 26, name: "ip_with_prefixlen", kind: "scalar", localName: "ip_with_prefixlen", oneof: "well_known", T: 8 /*ScalarType.BOOL*/, options: { "buf.validate.priv.field": { cel: [{ id: "string.ip_with_prefixlen", message: "value must be a valid IP prefix", expression: "this.isIpPrefix()" }] } } }, - { no: 27, name: "ipv4_with_prefixlen", kind: "scalar", localName: "ipv4_with_prefixlen", oneof: "well_known", T: 8 /*ScalarType.BOOL*/, options: { "buf.validate.priv.field": { cel: [{ id: "string.ipv4_with_prefixlen", message: "value must be a valid IPv4 address with prefix length", expression: "this.isIpPrefix(4)" }] } } }, - { no: 28, name: "ipv6_with_prefixlen", kind: "scalar", localName: "ipv6_with_prefixlen", oneof: "well_known", T: 8 /*ScalarType.BOOL*/, options: { "buf.validate.priv.field": { cel: [{ id: "string.ipv6_with_prefixlen", message: "value must be a valid IPv6 address with prefix length", expression: "this.isIpPrefix(6)" }] } } }, - { no: 29, name: "ip_prefix", kind: "scalar", localName: "ip_prefix", oneof: "well_known", T: 8 /*ScalarType.BOOL*/, options: { "buf.validate.priv.field": { cel: [{ id: "string.ip_prefix", message: "value must be a valid IP prefix", expression: "this.isIpPrefix(true)" }] } } }, - { no: 30, name: "ipv4_prefix", kind: "scalar", localName: "ipv4_prefix", oneof: "well_known", T: 8 /*ScalarType.BOOL*/, options: { "buf.validate.priv.field": { cel: [{ id: "string.ipv4_prefix", message: "value must be a valid IPv4 prefix", expression: "this.isIpPrefix(4, true)" }] } } }, - { no: 31, name: "ipv6_prefix", kind: "scalar", localName: "ipv6_prefix", oneof: "well_known", T: 8 /*ScalarType.BOOL*/, options: { "buf.validate.priv.field": { cel: [{ id: "string.ipv6_prefix", message: "value must be a valid IPv6 prefix", expression: "this.isIpPrefix(6, true)" }] } } }, - { no: 24, name: "well_known_regex", kind: "enum", localName: "well_known_regex", oneof: "well_known", T: () => ["buf.validate.KnownRegex", KnownRegex], options: { "buf.validate.priv.field": { cel: [{ id: "string.well_known_regex.header_name", expression: "rules.well_known_regex == 1 && !this.matches(!has(rules.strict) || rules.strict ?'^:?[0-9a-zA-Z!#$%&\\'*+-.^_|~\\x60]+$' :'^[^\\u0000\\u000A\\u000D]+$') ? 'value must be a valid HTTP header name' : ''" }, { id: "string.well_known_regex.header_value", expression: "rules.well_known_regex == 2 && !this.matches(!has(rules.strict) || rules.strict ?'^[^\\u0000-\\u0008\\u000A-\\u001F\\u007F]*$' :'^[^\\u0000\\u000A\\u000D]*$') ? 'value must be a valid HTTP header value' : ''" }] } } }, - { no: 25, name: "strict", kind: "scalar", opt: true, T: 8 /*ScalarType.BOOL*/ } - ]); - } - create(value?: PartialMessage): StringRules { - const message = globalThis.Object.create((this.messagePrototype!)); - message.in = []; - message.not_in = []; - message.well_known = { oneofKind: undefined }; - if (value !== undefined) - reflectionMergePartial(this, message, value); - return message; - } - internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: StringRules): StringRules { - let message = target ?? this.create(), end = reader.pos + length; - while (reader.pos < end) { - let [fieldNo, wireType] = reader.tag(); - switch (fieldNo) { - case /* optional string const */ 1: - message.const = reader.string(); - break; - case /* optional uint64 len */ 19: - message.len = reader.uint64().toBigInt(); - break; - case /* optional uint64 min_len */ 2: - message.min_len = reader.uint64().toBigInt(); - break; - case /* optional uint64 max_len */ 3: - message.max_len = reader.uint64().toBigInt(); - break; - case /* optional uint64 len_bytes */ 20: - message.len_bytes = reader.uint64().toBigInt(); - break; - case /* optional uint64 min_bytes */ 4: - message.min_bytes = reader.uint64().toBigInt(); - break; - case /* optional uint64 max_bytes */ 5: - message.max_bytes = reader.uint64().toBigInt(); - break; - case /* optional string pattern */ 6: - message.pattern = reader.string(); - break; - case /* optional string prefix */ 7: - message.prefix = reader.string(); - break; - case /* optional string suffix */ 8: - message.suffix = reader.string(); - break; - case /* optional string contains */ 9: - message.contains = reader.string(); - break; - case /* optional string not_contains */ 23: - message.not_contains = reader.string(); - break; - case /* repeated string in */ 10: - message.in.push(reader.string()); - break; - case /* repeated string not_in */ 11: - message.not_in.push(reader.string()); - break; - case /* bool email */ 12: - message.well_known = { - oneofKind: "email", - email: reader.bool() - }; - break; - case /* bool hostname */ 13: - message.well_known = { - oneofKind: "hostname", - hostname: reader.bool() - }; - break; - case /* bool ip */ 14: - message.well_known = { - oneofKind: "ip", - ip: reader.bool() - }; - break; - case /* bool ipv4 */ 15: - message.well_known = { - oneofKind: "ipv4", - ipv4: reader.bool() - }; - break; - case /* bool ipv6 */ 16: - message.well_known = { - oneofKind: "ipv6", - ipv6: reader.bool() - }; - break; - case /* bool uri */ 17: - message.well_known = { - oneofKind: "uri", - uri: reader.bool() - }; - break; - case /* bool uri_ref */ 18: - message.well_known = { - oneofKind: "uri_ref", - uri_ref: reader.bool() - }; - break; - case /* bool address */ 21: - message.well_known = { - oneofKind: "address", - address: reader.bool() - }; - break; - case /* bool uuid */ 22: - message.well_known = { - oneofKind: "uuid", - uuid: reader.bool() - }; - break; - case /* bool ip_with_prefixlen */ 26: - message.well_known = { - oneofKind: "ip_with_prefixlen", - ip_with_prefixlen: reader.bool() - }; - break; - case /* bool ipv4_with_prefixlen */ 27: - message.well_known = { - oneofKind: "ipv4_with_prefixlen", - ipv4_with_prefixlen: reader.bool() - }; - break; - case /* bool ipv6_with_prefixlen */ 28: - message.well_known = { - oneofKind: "ipv6_with_prefixlen", - ipv6_with_prefixlen: reader.bool() - }; - break; - case /* bool ip_prefix */ 29: - message.well_known = { - oneofKind: "ip_prefix", - ip_prefix: reader.bool() - }; - break; - case /* bool ipv4_prefix */ 30: - message.well_known = { - oneofKind: "ipv4_prefix", - ipv4_prefix: reader.bool() - }; - break; - case /* bool ipv6_prefix */ 31: - message.well_known = { - oneofKind: "ipv6_prefix", - ipv6_prefix: reader.bool() - }; - break; - case /* buf.validate.KnownRegex well_known_regex */ 24: - message.well_known = { - oneofKind: "well_known_regex", - well_known_regex: reader.int32() - }; - break; - case /* optional bool strict */ 25: - message.strict = reader.bool(); - break; - default: - let u = options.readUnknownField; - if (u === "throw") - throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); - let d = reader.skip(wireType); - if (u !== false) - (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); - } - } - return message; - } - internalBinaryWrite(message: StringRules, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { - /* optional string const = 1; */ - if (message.const !== undefined) - writer.tag(1, WireType.LengthDelimited).string(message.const); - /* optional uint64 len = 19; */ - if (message.len !== undefined) - writer.tag(19, WireType.Varint).uint64(message.len); - /* optional uint64 min_len = 2; */ - if (message.min_len !== undefined) - writer.tag(2, WireType.Varint).uint64(message.min_len); - /* optional uint64 max_len = 3; */ - if (message.max_len !== undefined) - writer.tag(3, WireType.Varint).uint64(message.max_len); - /* optional uint64 len_bytes = 20; */ - if (message.len_bytes !== undefined) - writer.tag(20, WireType.Varint).uint64(message.len_bytes); - /* optional uint64 min_bytes = 4; */ - if (message.min_bytes !== undefined) - writer.tag(4, WireType.Varint).uint64(message.min_bytes); - /* optional uint64 max_bytes = 5; */ - if (message.max_bytes !== undefined) - writer.tag(5, WireType.Varint).uint64(message.max_bytes); - /* optional string pattern = 6; */ - if (message.pattern !== undefined) - writer.tag(6, WireType.LengthDelimited).string(message.pattern); - /* optional string prefix = 7; */ - if (message.prefix !== undefined) - writer.tag(7, WireType.LengthDelimited).string(message.prefix); - /* optional string suffix = 8; */ - if (message.suffix !== undefined) - writer.tag(8, WireType.LengthDelimited).string(message.suffix); - /* optional string contains = 9; */ - if (message.contains !== undefined) - writer.tag(9, WireType.LengthDelimited).string(message.contains); - /* optional string not_contains = 23; */ - if (message.not_contains !== undefined) - writer.tag(23, WireType.LengthDelimited).string(message.not_contains); - /* repeated string in = 10; */ - for (let i = 0; i < message.in.length; i++) - writer.tag(10, WireType.LengthDelimited).string(message.in[i]); - /* repeated string not_in = 11; */ - for (let i = 0; i < message.not_in.length; i++) - writer.tag(11, WireType.LengthDelimited).string(message.not_in[i]); - /* bool email = 12; */ - if (message.well_known.oneofKind === "email") - writer.tag(12, WireType.Varint).bool(message.well_known.email); - /* bool hostname = 13; */ - if (message.well_known.oneofKind === "hostname") - writer.tag(13, WireType.Varint).bool(message.well_known.hostname); - /* bool ip = 14; */ - if (message.well_known.oneofKind === "ip") - writer.tag(14, WireType.Varint).bool(message.well_known.ip); - /* bool ipv4 = 15; */ - if (message.well_known.oneofKind === "ipv4") - writer.tag(15, WireType.Varint).bool(message.well_known.ipv4); - /* bool ipv6 = 16; */ - if (message.well_known.oneofKind === "ipv6") - writer.tag(16, WireType.Varint).bool(message.well_known.ipv6); - /* bool uri = 17; */ - if (message.well_known.oneofKind === "uri") - writer.tag(17, WireType.Varint).bool(message.well_known.uri); - /* bool uri_ref = 18; */ - if (message.well_known.oneofKind === "uri_ref") - writer.tag(18, WireType.Varint).bool(message.well_known.uri_ref); - /* bool address = 21; */ - if (message.well_known.oneofKind === "address") - writer.tag(21, WireType.Varint).bool(message.well_known.address); - /* bool uuid = 22; */ - if (message.well_known.oneofKind === "uuid") - writer.tag(22, WireType.Varint).bool(message.well_known.uuid); - /* bool ip_with_prefixlen = 26; */ - if (message.well_known.oneofKind === "ip_with_prefixlen") - writer.tag(26, WireType.Varint).bool(message.well_known.ip_with_prefixlen); - /* bool ipv4_with_prefixlen = 27; */ - if (message.well_known.oneofKind === "ipv4_with_prefixlen") - writer.tag(27, WireType.Varint).bool(message.well_known.ipv4_with_prefixlen); - /* bool ipv6_with_prefixlen = 28; */ - if (message.well_known.oneofKind === "ipv6_with_prefixlen") - writer.tag(28, WireType.Varint).bool(message.well_known.ipv6_with_prefixlen); - /* bool ip_prefix = 29; */ - if (message.well_known.oneofKind === "ip_prefix") - writer.tag(29, WireType.Varint).bool(message.well_known.ip_prefix); - /* bool ipv4_prefix = 30; */ - if (message.well_known.oneofKind === "ipv4_prefix") - writer.tag(30, WireType.Varint).bool(message.well_known.ipv4_prefix); - /* bool ipv6_prefix = 31; */ - if (message.well_known.oneofKind === "ipv6_prefix") - writer.tag(31, WireType.Varint).bool(message.well_known.ipv6_prefix); - /* buf.validate.KnownRegex well_known_regex = 24; */ - if (message.well_known.oneofKind === "well_known_regex") - writer.tag(24, WireType.Varint).int32(message.well_known.well_known_regex); - /* optional bool strict = 25; */ - if (message.strict !== undefined) - writer.tag(25, WireType.Varint).bool(message.strict); - let u = options.writeUnknownFields; - if (u !== false) - (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); - return writer; - } -} -/** - * @generated MessageType for protobuf message buf.validate.StringRules - */ -export const StringRules = new StringRules$Type(); -// @generated message type with reflection information, may provide speed optimized methods -class BytesRules$Type extends MessageType { - constructor() { - super("buf.validate.BytesRules", [ - { no: 1, name: "const", kind: "scalar", opt: true, T: 12 /*ScalarType.BYTES*/, options: { "buf.validate.priv.field": { cel: [{ id: "bytes.const", expression: "this != rules.const ? 'value must be %x'.format([rules.const]) : ''" }] } } }, - { no: 13, name: "len", kind: "scalar", opt: true, T: 4 /*ScalarType.UINT64*/, L: 0 /*LongType.BIGINT*/, options: { "buf.validate.priv.field": { cel: [{ id: "bytes.len", expression: "uint(this.size()) != rules.len ? 'value length must be %s bytes'.format([rules.len]) : ''" }] } } }, - { no: 2, name: "min_len", kind: "scalar", localName: "min_len", opt: true, T: 4 /*ScalarType.UINT64*/, L: 0 /*LongType.BIGINT*/, options: { "buf.validate.priv.field": { cel: [{ id: "bytes.min_len", expression: "uint(this.size()) < rules.min_len ? 'value length must be at least %s bytes'.format([rules.min_len]) : ''" }] } } }, - { no: 3, name: "max_len", kind: "scalar", localName: "max_len", opt: true, T: 4 /*ScalarType.UINT64*/, L: 0 /*LongType.BIGINT*/, options: { "buf.validate.priv.field": { cel: [{ id: "bytes.max_len", expression: "uint(this.size()) > rules.max_len ? 'value must be at most %s bytes'.format([rules.max_len]) : ''" }] } } }, - { no: 4, name: "pattern", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "buf.validate.priv.field": { cel: [{ id: "bytes.pattern", expression: "!string(this).matches(rules.pattern) ? 'value must match regex pattern `%s`'.format([rules.pattern]) : ''" }] } } }, - { no: 5, name: "prefix", kind: "scalar", opt: true, T: 12 /*ScalarType.BYTES*/, options: { "buf.validate.priv.field": { cel: [{ id: "bytes.prefix", expression: "!this.startsWith(rules.prefix) ? 'value does not have prefix %x'.format([rules.prefix]) : ''" }] } } }, - { no: 6, name: "suffix", kind: "scalar", opt: true, T: 12 /*ScalarType.BYTES*/, options: { "buf.validate.priv.field": { cel: [{ id: "bytes.suffix", expression: "!this.endsWith(rules.suffix) ? 'value does not have suffix %x'.format([rules.suffix]) : ''" }] } } }, - { no: 7, name: "contains", kind: "scalar", opt: true, T: 12 /*ScalarType.BYTES*/, options: { "buf.validate.priv.field": { cel: [{ id: "bytes.contains", expression: "!this.contains(rules.contains) ? 'value does not contain %x'.format([rules.contains]) : ''" }] } } }, - { no: 8, name: "in", kind: "scalar", repeat: 2 /*RepeatType.UNPACKED*/, T: 12 /*ScalarType.BYTES*/, options: { "buf.validate.priv.field": { cel: [{ id: "bytes.in", expression: "dyn(rules)['in'].size() > 0 && !(this in dyn(rules)['in']) ? 'value must be in list %s'.format([dyn(rules)['in']]) : ''" }] } } }, - { no: 9, name: "not_in", kind: "scalar", localName: "not_in", repeat: 2 /*RepeatType.UNPACKED*/, T: 12 /*ScalarType.BYTES*/, options: { "buf.validate.priv.field": { cel: [{ id: "bytes.not_in", expression: "this in rules.not_in ? 'value must not be in list %s'.format([rules.not_in]) : ''" }] } } }, - { no: 10, name: "ip", kind: "scalar", oneof: "well_known", T: 8 /*ScalarType.BOOL*/, options: { "buf.validate.priv.field": { cel: [{ id: "bytes.ip", expression: "this.size() != 4 && this.size() != 16 ? 'value must be a valid IP address' : ''" }] } } }, - { no: 11, name: "ipv4", kind: "scalar", oneof: "well_known", T: 8 /*ScalarType.BOOL*/, options: { "buf.validate.priv.field": { cel: [{ id: "bytes.ipv4", expression: "this.size() != 4 ? 'value must be a valid IPv4 address' : ''" }] } } }, - { no: 12, name: "ipv6", kind: "scalar", oneof: "well_known", T: 8 /*ScalarType.BOOL*/, options: { "buf.validate.priv.field": { cel: [{ id: "bytes.ipv6", expression: "this.size() != 16 ? 'value must be a valid IPv6 address' : ''" }] } } } - ]); - } - create(value?: PartialMessage): BytesRules { - const message = globalThis.Object.create((this.messagePrototype!)); - message.in = []; - message.not_in = []; - message.well_known = { oneofKind: undefined }; - if (value !== undefined) - reflectionMergePartial(this, message, value); - return message; - } - internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: BytesRules): BytesRules { - let message = target ?? this.create(), end = reader.pos + length; - while (reader.pos < end) { - let [fieldNo, wireType] = reader.tag(); - switch (fieldNo) { - case /* optional bytes const */ 1: - message.const = reader.bytes(); - break; - case /* optional uint64 len */ 13: - message.len = reader.uint64().toBigInt(); - break; - case /* optional uint64 min_len */ 2: - message.min_len = reader.uint64().toBigInt(); - break; - case /* optional uint64 max_len */ 3: - message.max_len = reader.uint64().toBigInt(); - break; - case /* optional string pattern */ 4: - message.pattern = reader.string(); - break; - case /* optional bytes prefix */ 5: - message.prefix = reader.bytes(); - break; - case /* optional bytes suffix */ 6: - message.suffix = reader.bytes(); - break; - case /* optional bytes contains */ 7: - message.contains = reader.bytes(); - break; - case /* repeated bytes in */ 8: - message.in.push(reader.bytes()); - break; - case /* repeated bytes not_in */ 9: - message.not_in.push(reader.bytes()); - break; - case /* bool ip */ 10: - message.well_known = { - oneofKind: "ip", - ip: reader.bool() - }; - break; - case /* bool ipv4 */ 11: - message.well_known = { - oneofKind: "ipv4", - ipv4: reader.bool() - }; - break; - case /* bool ipv6 */ 12: - message.well_known = { - oneofKind: "ipv6", - ipv6: reader.bool() - }; - break; - default: - let u = options.readUnknownField; - if (u === "throw") - throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); - let d = reader.skip(wireType); - if (u !== false) - (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); - } - } - return message; - } - internalBinaryWrite(message: BytesRules, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { - /* optional bytes const = 1; */ - if (message.const !== undefined) - writer.tag(1, WireType.LengthDelimited).bytes(message.const); - /* optional uint64 len = 13; */ - if (message.len !== undefined) - writer.tag(13, WireType.Varint).uint64(message.len); - /* optional uint64 min_len = 2; */ - if (message.min_len !== undefined) - writer.tag(2, WireType.Varint).uint64(message.min_len); - /* optional uint64 max_len = 3; */ - if (message.max_len !== undefined) - writer.tag(3, WireType.Varint).uint64(message.max_len); - /* optional string pattern = 4; */ - if (message.pattern !== undefined) - writer.tag(4, WireType.LengthDelimited).string(message.pattern); - /* optional bytes prefix = 5; */ - if (message.prefix !== undefined) - writer.tag(5, WireType.LengthDelimited).bytes(message.prefix); - /* optional bytes suffix = 6; */ - if (message.suffix !== undefined) - writer.tag(6, WireType.LengthDelimited).bytes(message.suffix); - /* optional bytes contains = 7; */ - if (message.contains !== undefined) - writer.tag(7, WireType.LengthDelimited).bytes(message.contains); - /* repeated bytes in = 8; */ - for (let i = 0; i < message.in.length; i++) - writer.tag(8, WireType.LengthDelimited).bytes(message.in[i]); - /* repeated bytes not_in = 9; */ - for (let i = 0; i < message.not_in.length; i++) - writer.tag(9, WireType.LengthDelimited).bytes(message.not_in[i]); - /* bool ip = 10; */ - if (message.well_known.oneofKind === "ip") - writer.tag(10, WireType.Varint).bool(message.well_known.ip); - /* bool ipv4 = 11; */ - if (message.well_known.oneofKind === "ipv4") - writer.tag(11, WireType.Varint).bool(message.well_known.ipv4); - /* bool ipv6 = 12; */ - if (message.well_known.oneofKind === "ipv6") - writer.tag(12, WireType.Varint).bool(message.well_known.ipv6); - let u = options.writeUnknownFields; - if (u !== false) - (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); - return writer; - } -} -/** - * @generated MessageType for protobuf message buf.validate.BytesRules - */ -export const BytesRules = new BytesRules$Type(); -// @generated message type with reflection information, may provide speed optimized methods -class EnumRules$Type extends MessageType { - constructor() { - super("buf.validate.EnumRules", [ - { no: 1, name: "const", kind: "scalar", opt: true, T: 5 /*ScalarType.INT32*/, options: { "buf.validate.priv.field": { cel: [{ id: "enum.const", expression: "this != rules.const ? 'value must equal %s'.format([rules.const]) : ''" }] } } }, - { no: 2, name: "defined_only", kind: "scalar", localName: "defined_only", opt: true, T: 8 /*ScalarType.BOOL*/ }, - { no: 3, name: "in", kind: "scalar", repeat: 1 /*RepeatType.PACKED*/, T: 5 /*ScalarType.INT32*/, options: { "buf.validate.priv.field": { cel: [{ id: "enum.in", expression: "!(this in dyn(rules)['in']) ? 'value must be in list %s'.format([dyn(rules)['in']]) : ''" }] } } }, - { no: 4, name: "not_in", kind: "scalar", localName: "not_in", repeat: 1 /*RepeatType.PACKED*/, T: 5 /*ScalarType.INT32*/, options: { "buf.validate.priv.field": { cel: [{ id: "enum.not_in", expression: "this in rules.not_in ? 'value must not be in list %s'.format([rules.not_in]) : ''" }] } } } - ]); - } - create(value?: PartialMessage): EnumRules { - const message = globalThis.Object.create((this.messagePrototype!)); - message.in = []; - message.not_in = []; - if (value !== undefined) - reflectionMergePartial(this, message, value); - return message; - } - internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: EnumRules): EnumRules { - let message = target ?? this.create(), end = reader.pos + length; - while (reader.pos < end) { - let [fieldNo, wireType] = reader.tag(); - switch (fieldNo) { - case /* optional int32 const */ 1: - message.const = reader.int32(); - break; - case /* optional bool defined_only */ 2: - message.defined_only = reader.bool(); - break; - case /* repeated int32 in */ 3: - if (wireType === WireType.LengthDelimited) - for (let e = reader.int32() + reader.pos; reader.pos < e;) - message.in.push(reader.int32()); - else - message.in.push(reader.int32()); - break; - case /* repeated int32 not_in */ 4: - if (wireType === WireType.LengthDelimited) - for (let e = reader.int32() + reader.pos; reader.pos < e;) - message.not_in.push(reader.int32()); - else - message.not_in.push(reader.int32()); - break; - default: - let u = options.readUnknownField; - if (u === "throw") - throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); - let d = reader.skip(wireType); - if (u !== false) - (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); - } - } - return message; - } - internalBinaryWrite(message: EnumRules, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { - /* optional int32 const = 1; */ - if (message.const !== undefined) - writer.tag(1, WireType.Varint).int32(message.const); - /* optional bool defined_only = 2; */ - if (message.defined_only !== undefined) - writer.tag(2, WireType.Varint).bool(message.defined_only); - /* repeated int32 in = 3; */ - if (message.in.length) { - writer.tag(3, WireType.LengthDelimited).fork(); - for (let i = 0; i < message.in.length; i++) - writer.int32(message.in[i]); - writer.join(); - } - /* repeated int32 not_in = 4; */ - if (message.not_in.length) { - writer.tag(4, WireType.LengthDelimited).fork(); - for (let i = 0; i < message.not_in.length; i++) - writer.int32(message.not_in[i]); - writer.join(); - } - let u = options.writeUnknownFields; - if (u !== false) - (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); - return writer; - } -} -/** - * @generated MessageType for protobuf message buf.validate.EnumRules - */ -export const EnumRules = new EnumRules$Type(); -// @generated message type with reflection information, may provide speed optimized methods -class RepeatedRules$Type extends MessageType { - constructor() { - super("buf.validate.RepeatedRules", [ - { no: 1, name: "min_items", kind: "scalar", localName: "min_items", opt: true, T: 4 /*ScalarType.UINT64*/, L: 0 /*LongType.BIGINT*/, options: { "buf.validate.priv.field": { cel: [{ id: "repeated.min_items", expression: "uint(this.size()) < rules.min_items ? 'value must contain at least %d item(s)'.format([rules.min_items]) : ''" }] } } }, - { no: 2, name: "max_items", kind: "scalar", localName: "max_items", opt: true, T: 4 /*ScalarType.UINT64*/, L: 0 /*LongType.BIGINT*/, options: { "buf.validate.priv.field": { cel: [{ id: "repeated.max_items", expression: "uint(this.size()) > rules.max_items ? 'value must contain no more than %s item(s)'.format([rules.max_items]) : ''" }] } } }, - { no: 3, name: "unique", kind: "scalar", opt: true, T: 8 /*ScalarType.BOOL*/, options: { "buf.validate.priv.field": { cel: [{ id: "repeated.unique", message: "repeated value must contain unique items", expression: "this.unique()" }] } } }, - { no: 4, name: "items", kind: "message", T: () => FieldConstraints } - ]); - } - create(value?: PartialMessage): RepeatedRules { - const message = globalThis.Object.create((this.messagePrototype!)); - if (value !== undefined) - reflectionMergePartial(this, message, value); - return message; - } - internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: RepeatedRules): RepeatedRules { - let message = target ?? this.create(), end = reader.pos + length; - while (reader.pos < end) { - let [fieldNo, wireType] = reader.tag(); - switch (fieldNo) { - case /* optional uint64 min_items */ 1: - message.min_items = reader.uint64().toBigInt(); - break; - case /* optional uint64 max_items */ 2: - message.max_items = reader.uint64().toBigInt(); - break; - case /* optional bool unique */ 3: - message.unique = reader.bool(); - break; - case /* optional buf.validate.FieldConstraints items */ 4: - message.items = FieldConstraints.internalBinaryRead(reader, reader.uint32(), options, message.items); - break; - default: - let u = options.readUnknownField; - if (u === "throw") - throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); - let d = reader.skip(wireType); - if (u !== false) - (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); - } - } - return message; - } - internalBinaryWrite(message: RepeatedRules, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { - /* optional uint64 min_items = 1; */ - if (message.min_items !== undefined) - writer.tag(1, WireType.Varint).uint64(message.min_items); - /* optional uint64 max_items = 2; */ - if (message.max_items !== undefined) - writer.tag(2, WireType.Varint).uint64(message.max_items); - /* optional bool unique = 3; */ - if (message.unique !== undefined) - writer.tag(3, WireType.Varint).bool(message.unique); - /* optional buf.validate.FieldConstraints items = 4; */ - if (message.items) - FieldConstraints.internalBinaryWrite(message.items, writer.tag(4, WireType.LengthDelimited).fork(), options).join(); - let u = options.writeUnknownFields; - if (u !== false) - (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); - return writer; - } -} -/** - * @generated MessageType for protobuf message buf.validate.RepeatedRules - */ -export const RepeatedRules = new RepeatedRules$Type(); -// @generated message type with reflection information, may provide speed optimized methods -class MapRules$Type extends MessageType { - constructor() { - super("buf.validate.MapRules", [ - { no: 1, name: "min_pairs", kind: "scalar", localName: "min_pairs", opt: true, T: 4 /*ScalarType.UINT64*/, L: 0 /*LongType.BIGINT*/, options: { "buf.validate.priv.field": { cel: [{ id: "map.min_pairs", expression: "uint(this.size()) < rules.min_pairs ? 'map must be at least %d entries'.format([rules.min_pairs]) : ''" }] } } }, - { no: 2, name: "max_pairs", kind: "scalar", localName: "max_pairs", opt: true, T: 4 /*ScalarType.UINT64*/, L: 0 /*LongType.BIGINT*/, options: { "buf.validate.priv.field": { cel: [{ id: "map.max_pairs", expression: "uint(this.size()) > rules.max_pairs ? 'map must be at most %d entries'.format([rules.max_pairs]) : ''" }] } } }, - { no: 4, name: "keys", kind: "message", T: () => FieldConstraints }, - { no: 5, name: "values", kind: "message", T: () => FieldConstraints } - ]); - } - create(value?: PartialMessage): MapRules { - const message = globalThis.Object.create((this.messagePrototype!)); - if (value !== undefined) - reflectionMergePartial(this, message, value); - return message; - } - internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: MapRules): MapRules { - let message = target ?? this.create(), end = reader.pos + length; - while (reader.pos < end) { - let [fieldNo, wireType] = reader.tag(); - switch (fieldNo) { - case /* optional uint64 min_pairs */ 1: - message.min_pairs = reader.uint64().toBigInt(); - break; - case /* optional uint64 max_pairs */ 2: - message.max_pairs = reader.uint64().toBigInt(); - break; - case /* optional buf.validate.FieldConstraints keys */ 4: - message.keys = FieldConstraints.internalBinaryRead(reader, reader.uint32(), options, message.keys); - break; - case /* optional buf.validate.FieldConstraints values */ 5: - message.values = FieldConstraints.internalBinaryRead(reader, reader.uint32(), options, message.values); - break; - default: - let u = options.readUnknownField; - if (u === "throw") - throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); - let d = reader.skip(wireType); - if (u !== false) - (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); - } - } - return message; - } - internalBinaryWrite(message: MapRules, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { - /* optional uint64 min_pairs = 1; */ - if (message.min_pairs !== undefined) - writer.tag(1, WireType.Varint).uint64(message.min_pairs); - /* optional uint64 max_pairs = 2; */ - if (message.max_pairs !== undefined) - writer.tag(2, WireType.Varint).uint64(message.max_pairs); - /* optional buf.validate.FieldConstraints keys = 4; */ - if (message.keys) - FieldConstraints.internalBinaryWrite(message.keys, writer.tag(4, WireType.LengthDelimited).fork(), options).join(); - /* optional buf.validate.FieldConstraints values = 5; */ - if (message.values) - FieldConstraints.internalBinaryWrite(message.values, writer.tag(5, WireType.LengthDelimited).fork(), options).join(); - let u = options.writeUnknownFields; - if (u !== false) - (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); - return writer; - } -} -/** - * @generated MessageType for protobuf message buf.validate.MapRules - */ -export const MapRules = new MapRules$Type(); -// @generated message type with reflection information, may provide speed optimized methods -class AnyRules$Type extends MessageType { - constructor() { - super("buf.validate.AnyRules", [ - { no: 2, name: "in", kind: "scalar", repeat: 2 /*RepeatType.UNPACKED*/, T: 9 /*ScalarType.STRING*/ }, - { no: 3, name: "not_in", kind: "scalar", localName: "not_in", repeat: 2 /*RepeatType.UNPACKED*/, T: 9 /*ScalarType.STRING*/ } - ]); - } - create(value?: PartialMessage): AnyRules { - const message = globalThis.Object.create((this.messagePrototype!)); - message.in = []; - message.not_in = []; - if (value !== undefined) - reflectionMergePartial(this, message, value); - return message; - } - internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: AnyRules): AnyRules { - let message = target ?? this.create(), end = reader.pos + length; - while (reader.pos < end) { - let [fieldNo, wireType] = reader.tag(); - switch (fieldNo) { - case /* repeated string in */ 2: - message.in.push(reader.string()); - break; - case /* repeated string not_in */ 3: - message.not_in.push(reader.string()); - break; - default: - let u = options.readUnknownField; - if (u === "throw") - throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); - let d = reader.skip(wireType); - if (u !== false) - (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); - } - } - return message; - } - internalBinaryWrite(message: AnyRules, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { - /* repeated string in = 2; */ - for (let i = 0; i < message.in.length; i++) - writer.tag(2, WireType.LengthDelimited).string(message.in[i]); - /* repeated string not_in = 3; */ - for (let i = 0; i < message.not_in.length; i++) - writer.tag(3, WireType.LengthDelimited).string(message.not_in[i]); - let u = options.writeUnknownFields; - if (u !== false) - (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); - return writer; - } -} -/** - * @generated MessageType for protobuf message buf.validate.AnyRules - */ -export const AnyRules = new AnyRules$Type(); -// @generated message type with reflection information, may provide speed optimized methods -class DurationRules$Type extends MessageType { - constructor() { - super("buf.validate.DurationRules", [ - { no: 2, name: "const", kind: "message", T: () => Duration, options: { "buf.validate.priv.field": { cel: [{ id: "duration.const", expression: "this != rules.const ? 'value must equal %s'.format([rules.const]) : ''" }] } } }, - { no: 3, name: "lt", kind: "message", oneof: "less_than", T: () => Duration, options: { "buf.validate.priv.field": { cel: [{ id: "duration.lt", expression: "!has(rules.gte) && !has(rules.gt) && this >= rules.lt? 'value must be less than %s'.format([rules.lt]) : ''" }] } } }, - { no: 4, name: "lte", kind: "message", oneof: "less_than", T: () => Duration, options: { "buf.validate.priv.field": { cel: [{ id: "duration.lte", expression: "!has(rules.gte) && !has(rules.gt) && this > rules.lte? 'value must be less than or equal to %s'.format([rules.lte]) : ''" }] } } }, - { no: 5, name: "gt", kind: "message", oneof: "greater_than", T: () => Duration, options: { "buf.validate.priv.field": { cel: [{ id: "duration.gt", expression: "!has(rules.lt) && !has(rules.lte) && this <= rules.gt? 'value must be greater than %s'.format([rules.gt]) : ''" }, { id: "duration.gt_lt", expression: "has(rules.lt) && rules.lt >= rules.gt && (this >= rules.lt || this <= rules.gt)? 'value must be greater than %s and less than %s'.format([rules.gt, rules.lt]) : ''" }, { id: "duration.gt_lt_exclusive", expression: "has(rules.lt) && rules.lt < rules.gt && (rules.lt <= this && this <= rules.gt)? 'value must be greater than %s or less than %s'.format([rules.gt, rules.lt]) : ''" }, { id: "duration.gt_lte", expression: "has(rules.lte) && rules.lte >= rules.gt && (this > rules.lte || this <= rules.gt)? 'value must be greater than %s and less than or equal to %s'.format([rules.gt, rules.lte]) : ''" }, { id: "duration.gt_lte_exclusive", expression: "has(rules.lte) && rules.lte < rules.gt && (rules.lte < this && this <= rules.gt)? 'value must be greater than %s or less than or equal to %s'.format([rules.gt, rules.lte]) : ''" }] } } }, - { no: 6, name: "gte", kind: "message", oneof: "greater_than", T: () => Duration, options: { "buf.validate.priv.field": { cel: [{ id: "duration.gte", expression: "!has(rules.lt) && !has(rules.lte) && this < rules.gte? 'value must be greater than or equal to %s'.format([rules.gte]) : ''" }, { id: "duration.gte_lt", expression: "has(rules.lt) && rules.lt >= rules.gte && (this >= rules.lt || this < rules.gte)? 'value must be greater than or equal to %s and less than %s'.format([rules.gte, rules.lt]) : ''" }, { id: "duration.gte_lt_exclusive", expression: "has(rules.lt) && rules.lt < rules.gte && (rules.lt <= this && this < rules.gte)? 'value must be greater than or equal to %s or less than %s'.format([rules.gte, rules.lt]) : ''" }, { id: "duration.gte_lte", expression: "has(rules.lte) && rules.lte >= rules.gte && (this > rules.lte || this < rules.gte)? 'value must be greater than or equal to %s and less than or equal to %s'.format([rules.gte, rules.lte]) : ''" }, { id: "duration.gte_lte_exclusive", expression: "has(rules.lte) && rules.lte < rules.gte && (rules.lte < this && this < rules.gte)? 'value must be greater than or equal to %s or less than or equal to %s'.format([rules.gte, rules.lte]) : ''" }] } } }, - { no: 7, name: "in", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => Duration, options: { "buf.validate.priv.field": { cel: [{ id: "duration.in", expression: "!(this in dyn(rules)['in']) ? 'value must be in list %s'.format([dyn(rules)['in']]) : ''" }] } } }, - { no: 8, name: "not_in", kind: "message", localName: "not_in", repeat: 1 /*RepeatType.PACKED*/, T: () => Duration, options: { "buf.validate.priv.field": { cel: [{ id: "duration.not_in", expression: "this in rules.not_in ? 'value must not be in list %s'.format([rules.not_in]) : ''" }] } } } - ]); - } - create(value?: PartialMessage): DurationRules { - const message = globalThis.Object.create((this.messagePrototype!)); - message.less_than = { oneofKind: undefined }; - message.greater_than = { oneofKind: undefined }; - message.in = []; - message.not_in = []; - if (value !== undefined) - reflectionMergePartial(this, message, value); - return message; - } - internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: DurationRules): DurationRules { - let message = target ?? this.create(), end = reader.pos + length; - while (reader.pos < end) { - let [fieldNo, wireType] = reader.tag(); - switch (fieldNo) { - case /* optional google.protobuf.Duration const */ 2: - message.const = Duration.internalBinaryRead(reader, reader.uint32(), options, message.const); - break; - case /* google.protobuf.Duration lt */ 3: - message.less_than = { - oneofKind: "lt", - lt: Duration.internalBinaryRead(reader, reader.uint32(), options, (message.less_than as any).lt) - }; - break; - case /* google.protobuf.Duration lte */ 4: - message.less_than = { - oneofKind: "lte", - lte: Duration.internalBinaryRead(reader, reader.uint32(), options, (message.less_than as any).lte) - }; - break; - case /* google.protobuf.Duration gt */ 5: - message.greater_than = { - oneofKind: "gt", - gt: Duration.internalBinaryRead(reader, reader.uint32(), options, (message.greater_than as any).gt) - }; - break; - case /* google.protobuf.Duration gte */ 6: - message.greater_than = { - oneofKind: "gte", - gte: Duration.internalBinaryRead(reader, reader.uint32(), options, (message.greater_than as any).gte) - }; - break; - case /* repeated google.protobuf.Duration in */ 7: - message.in.push(Duration.internalBinaryRead(reader, reader.uint32(), options)); - break; - case /* repeated google.protobuf.Duration not_in */ 8: - message.not_in.push(Duration.internalBinaryRead(reader, reader.uint32(), options)); - break; - default: - let u = options.readUnknownField; - if (u === "throw") - throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); - let d = reader.skip(wireType); - if (u !== false) - (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); - } - } - return message; - } - internalBinaryWrite(message: DurationRules, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { - /* optional google.protobuf.Duration const = 2; */ - if (message.const) - Duration.internalBinaryWrite(message.const, writer.tag(2, WireType.LengthDelimited).fork(), options).join(); - /* google.protobuf.Duration lt = 3; */ - if (message.less_than.oneofKind === "lt") - Duration.internalBinaryWrite(message.less_than.lt, writer.tag(3, WireType.LengthDelimited).fork(), options).join(); - /* google.protobuf.Duration lte = 4; */ - if (message.less_than.oneofKind === "lte") - Duration.internalBinaryWrite(message.less_than.lte, writer.tag(4, WireType.LengthDelimited).fork(), options).join(); - /* google.protobuf.Duration gt = 5; */ - if (message.greater_than.oneofKind === "gt") - Duration.internalBinaryWrite(message.greater_than.gt, writer.tag(5, WireType.LengthDelimited).fork(), options).join(); - /* google.protobuf.Duration gte = 6; */ - if (message.greater_than.oneofKind === "gte") - Duration.internalBinaryWrite(message.greater_than.gte, writer.tag(6, WireType.LengthDelimited).fork(), options).join(); - /* repeated google.protobuf.Duration in = 7; */ - for (let i = 0; i < message.in.length; i++) - Duration.internalBinaryWrite(message.in[i], writer.tag(7, WireType.LengthDelimited).fork(), options).join(); - /* repeated google.protobuf.Duration not_in = 8; */ - for (let i = 0; i < message.not_in.length; i++) - Duration.internalBinaryWrite(message.not_in[i], writer.tag(8, WireType.LengthDelimited).fork(), options).join(); - let u = options.writeUnknownFields; - if (u !== false) - (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); - return writer; - } -} -/** - * @generated MessageType for protobuf message buf.validate.DurationRules - */ -export const DurationRules = new DurationRules$Type(); -// @generated message type with reflection information, may provide speed optimized methods -class TimestampRules$Type extends MessageType { - constructor() { - super("buf.validate.TimestampRules", [ - { no: 2, name: "const", kind: "message", T: () => Timestamp, options: { "buf.validate.priv.field": { cel: [{ id: "timestamp.const", expression: "this != rules.const ? 'value must equal %s'.format([rules.const]) : ''" }] } } }, - { no: 3, name: "lt", kind: "message", oneof: "less_than", T: () => Timestamp, options: { "buf.validate.priv.field": { cel: [{ id: "timestamp.lt", expression: "!has(rules.gte) && !has(rules.gt) && this >= rules.lt? 'value must be less than %s'.format([rules.lt]) : ''" }] } } }, - { no: 4, name: "lte", kind: "message", oneof: "less_than", T: () => Timestamp, options: { "buf.validate.priv.field": { cel: [{ id: "timestamp.lte", expression: "!has(rules.gte) && !has(rules.gt) && this > rules.lte? 'value must be less than or equal to %s'.format([rules.lte]) : ''" }] } } }, - { no: 7, name: "lt_now", kind: "scalar", localName: "lt_now", oneof: "less_than", T: 8 /*ScalarType.BOOL*/, options: { "buf.validate.priv.field": { cel: [{ id: "timestamp.lt_now", expression: "this > now ? 'value must be less than now' : ''" }] } } }, - { no: 5, name: "gt", kind: "message", oneof: "greater_than", T: () => Timestamp, options: { "buf.validate.priv.field": { cel: [{ id: "timestamp.gt", expression: "!has(rules.lt) && !has(rules.lte) && this <= rules.gt? 'value must be greater than %s'.format([rules.gt]) : ''" }, { id: "timestamp.gt_lt", expression: "has(rules.lt) && rules.lt >= rules.gt && (this >= rules.lt || this <= rules.gt)? 'value must be greater than %s and less than %s'.format([rules.gt, rules.lt]) : ''" }, { id: "timestamp.gt_lt_exclusive", expression: "has(rules.lt) && rules.lt < rules.gt && (rules.lt <= this && this <= rules.gt)? 'value must be greater than %s or less than %s'.format([rules.gt, rules.lt]) : ''" }, { id: "timestamp.gt_lte", expression: "has(rules.lte) && rules.lte >= rules.gt && (this > rules.lte || this <= rules.gt)? 'value must be greater than %s and less than or equal to %s'.format([rules.gt, rules.lte]) : ''" }, { id: "timestamp.gt_lte_exclusive", expression: "has(rules.lte) && rules.lte < rules.gt && (rules.lte < this && this <= rules.gt)? 'value must be greater than %s or less than or equal to %s'.format([rules.gt, rules.lte]) : ''" }] } } }, - { no: 6, name: "gte", kind: "message", oneof: "greater_than", T: () => Timestamp, options: { "buf.validate.priv.field": { cel: [{ id: "timestamp.gte", expression: "!has(rules.lt) && !has(rules.lte) && this < rules.gte? 'value must be greater than or equal to %s'.format([rules.gte]) : ''" }, { id: "timestamp.gte_lt", expression: "has(rules.lt) && rules.lt >= rules.gte && (this >= rules.lt || this < rules.gte)? 'value must be greater than or equal to %s and less than %s'.format([rules.gte, rules.lt]) : ''" }, { id: "timestamp.gte_lt_exclusive", expression: "has(rules.lt) && rules.lt < rules.gte && (rules.lt <= this && this < rules.gte)? 'value must be greater than or equal to %s or less than %s'.format([rules.gte, rules.lt]) : ''" }, { id: "timestamp.gte_lte", expression: "has(rules.lte) && rules.lte >= rules.gte && (this > rules.lte || this < rules.gte)? 'value must be greater than or equal to %s and less than or equal to %s'.format([rules.gte, rules.lte]) : ''" }, { id: "timestamp.gte_lte_exclusive", expression: "has(rules.lte) && rules.lte < rules.gte && (rules.lte < this && this < rules.gte)? 'value must be greater than or equal to %s or less than or equal to %s'.format([rules.gte, rules.lte]) : ''" }] } } }, - { no: 8, name: "gt_now", kind: "scalar", localName: "gt_now", oneof: "greater_than", T: 8 /*ScalarType.BOOL*/, options: { "buf.validate.priv.field": { cel: [{ id: "timestamp.gt_now", expression: "this < now ? 'value must be greater than now' : ''" }] } } }, - { no: 9, name: "within", kind: "message", T: () => Duration, options: { "buf.validate.priv.field": { cel: [{ id: "timestamp.within", expression: "this < now-rules.within || this > now+rules.within ? 'value must be within %s of now'.format([rules.within]) : ''" }] } } } - ]); - } - create(value?: PartialMessage): TimestampRules { - const message = globalThis.Object.create((this.messagePrototype!)); - message.less_than = { oneofKind: undefined }; - message.greater_than = { oneofKind: undefined }; - if (value !== undefined) - reflectionMergePartial(this, message, value); - return message; - } - internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: TimestampRules): TimestampRules { - let message = target ?? this.create(), end = reader.pos + length; - while (reader.pos < end) { - let [fieldNo, wireType] = reader.tag(); - switch (fieldNo) { - case /* optional google.protobuf.Timestamp const */ 2: - message.const = Timestamp.internalBinaryRead(reader, reader.uint32(), options, message.const); - break; - case /* google.protobuf.Timestamp lt */ 3: - message.less_than = { - oneofKind: "lt", - lt: Timestamp.internalBinaryRead(reader, reader.uint32(), options, (message.less_than as any).lt) - }; - break; - case /* google.protobuf.Timestamp lte */ 4: - message.less_than = { - oneofKind: "lte", - lte: Timestamp.internalBinaryRead(reader, reader.uint32(), options, (message.less_than as any).lte) - }; - break; - case /* bool lt_now */ 7: - message.less_than = { - oneofKind: "lt_now", - lt_now: reader.bool() - }; - break; - case /* google.protobuf.Timestamp gt */ 5: - message.greater_than = { - oneofKind: "gt", - gt: Timestamp.internalBinaryRead(reader, reader.uint32(), options, (message.greater_than as any).gt) - }; - break; - case /* google.protobuf.Timestamp gte */ 6: - message.greater_than = { - oneofKind: "gte", - gte: Timestamp.internalBinaryRead(reader, reader.uint32(), options, (message.greater_than as any).gte) - }; - break; - case /* bool gt_now */ 8: - message.greater_than = { - oneofKind: "gt_now", - gt_now: reader.bool() - }; - break; - case /* optional google.protobuf.Duration within */ 9: - message.within = Duration.internalBinaryRead(reader, reader.uint32(), options, message.within); - break; - default: - let u = options.readUnknownField; - if (u === "throw") - throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); - let d = reader.skip(wireType); - if (u !== false) - (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); - } - } - return message; - } - internalBinaryWrite(message: TimestampRules, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { - /* optional google.protobuf.Timestamp const = 2; */ - if (message.const) - Timestamp.internalBinaryWrite(message.const, writer.tag(2, WireType.LengthDelimited).fork(), options).join(); - /* google.protobuf.Timestamp lt = 3; */ - if (message.less_than.oneofKind === "lt") - Timestamp.internalBinaryWrite(message.less_than.lt, writer.tag(3, WireType.LengthDelimited).fork(), options).join(); - /* google.protobuf.Timestamp lte = 4; */ - if (message.less_than.oneofKind === "lte") - Timestamp.internalBinaryWrite(message.less_than.lte, writer.tag(4, WireType.LengthDelimited).fork(), options).join(); - /* bool lt_now = 7; */ - if (message.less_than.oneofKind === "lt_now") - writer.tag(7, WireType.Varint).bool(message.less_than.lt_now); - /* google.protobuf.Timestamp gt = 5; */ - if (message.greater_than.oneofKind === "gt") - Timestamp.internalBinaryWrite(message.greater_than.gt, writer.tag(5, WireType.LengthDelimited).fork(), options).join(); - /* google.protobuf.Timestamp gte = 6; */ - if (message.greater_than.oneofKind === "gte") - Timestamp.internalBinaryWrite(message.greater_than.gte, writer.tag(6, WireType.LengthDelimited).fork(), options).join(); - /* bool gt_now = 8; */ - if (message.greater_than.oneofKind === "gt_now") - writer.tag(8, WireType.Varint).bool(message.greater_than.gt_now); - /* optional google.protobuf.Duration within = 9; */ - if (message.within) - Duration.internalBinaryWrite(message.within, writer.tag(9, WireType.LengthDelimited).fork(), options).join(); - let u = options.writeUnknownFields; - if (u !== false) - (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); - return writer; - } -} -/** - * @generated MessageType for protobuf message buf.validate.TimestampRules - */ -export const TimestampRules = new TimestampRules$Type(); diff --git a/src/google/api/annotations_grpc_pb.js b/src/google/api/annotations_grpc_pb.js deleted file mode 100644 index 97b3a24..0000000 --- a/src/google/api/annotations_grpc_pb.js +++ /dev/null @@ -1 +0,0 @@ -// GENERATED CODE -- NO SERVICES IN PROTO \ No newline at end of file diff --git a/src/google/api/annotations_pb.js b/src/google/api/annotations_pb.js deleted file mode 100644 index 53c05ed..0000000 --- a/src/google/api/annotations_pb.js +++ /dev/null @@ -1,54 +0,0 @@ -// source: google/api/annotations.proto -/** - * @fileoverview - * @enhanceable - * @suppress {missingRequire} reports error on implicit type usages. - * @suppress {messageConventions} JS Compiler reports an error if a variable or - * field starts with 'MSG_' and isn't a translatable message. - * @public - */ -// GENERATED CODE -- DO NOT EDIT! -/* eslint-disable */ -// @ts-nocheck - -var jspb = require('google-protobuf'); -var goog = jspb; -var global = - (typeof globalThis !== 'undefined' && globalThis) || - (typeof window !== 'undefined' && window) || - (typeof global !== 'undefined' && global) || - (typeof self !== 'undefined' && self) || - (function () { return this; }).call(null) || - Function('return this')(); - -var google_api_http_pb = require('../../google/api/http_pb.js'); -goog.object.extend(proto, google_api_http_pb); -var google_protobuf_descriptor_pb = require('google-protobuf/google/protobuf/descriptor_pb.js'); -goog.object.extend(proto, google_protobuf_descriptor_pb); -goog.exportSymbol('proto.google.api.http', null, global); - -/** - * A tuple of {field number, class constructor} for the extension - * field named `http`. - * @type {!jspb.ExtensionFieldInfo} - */ -proto.google.api.http = new jspb.ExtensionFieldInfo( - 72295728, - {http: 0}, - google_api_http_pb.HttpRule, - /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( - google_api_http_pb.HttpRule.toObject), - 0); - -google_protobuf_descriptor_pb.MethodOptions.extensionsBinary[72295728] = new jspb.ExtensionFieldBinaryInfo( - proto.google.api.http, - jspb.BinaryReader.prototype.readMessage, - jspb.BinaryWriter.prototype.writeMessage, - google_api_http_pb.HttpRule.serializeBinaryToWriter, - google_api_http_pb.HttpRule.deserializeBinaryFromReader, - false); -// This registers the extension field with the extended class, so that -// toObject() will function correctly. -google_protobuf_descriptor_pb.MethodOptions.extensions[72295728] = proto.google.api.http; - -goog.object.extend(exports, proto.google.api); diff --git a/src/google/api/http_grpc_pb.js b/src/google/api/http_grpc_pb.js deleted file mode 100644 index 97b3a24..0000000 --- a/src/google/api/http_grpc_pb.js +++ /dev/null @@ -1 +0,0 @@ -// GENERATED CODE -- NO SERVICES IN PROTO \ No newline at end of file diff --git a/src/google/api/http_pb.ts b/src/google/api/http_pb.d.ts similarity index 60% rename from src/google/api/http_pb.ts rename to src/google/api/http_pb.d.ts index 05e4a01..2e73beb 100644 --- a/src/google/api/http_pb.ts +++ b/src/google/api/http_pb.d.ts @@ -1,4 +1,5 @@ -// @generated by protobuf-ts 2.9.3 with parameter add_pb_suffix,client_grpc1,generate_dependencies,keep_enum_prefix,ts_nocheck,use_proto_field_name +/* eslint-disable */ +// @generated by protobuf-ts 2.9.3 with parameter add_pb_suffix,client_grpc1,generate_dependencies,keep_enum_prefix,ts_nocheck,use_proto_field_name,output_javascript,output_legacy_commonjs,eslint_disable // @generated from protobuf file "google/api/http.proto" (package "google.api", syntax proto3) // tslint:disable // @ts-nocheck @@ -19,12 +20,9 @@ // import type { BinaryWriteOptions } from "@protobuf-ts/runtime"; import type { IBinaryWriter } from "@protobuf-ts/runtime"; -import { WireType } from "@protobuf-ts/runtime"; import type { BinaryReadOptions } from "@protobuf-ts/runtime"; import type { IBinaryReader } from "@protobuf-ts/runtime"; -import { UnknownFieldHandler } from "@protobuf-ts/runtime"; import type { PartialMessage } from "@protobuf-ts/runtime"; -import { reflectionMergePartial } from "@protobuf-ts/runtime"; import { MessageType } from "@protobuf-ts/runtime"; /** * Defines the HTTP configuration for an API service. It contains a list of @@ -448,245 +446,34 @@ export interface CustomHttpPattern { */ path: string; } -// @generated message type with reflection information, may provide speed optimized methods -class Http$Type extends MessageType { - constructor() { - super("google.api.Http", [ - { no: 1, name: "rules", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => HttpRule }, - { no: 2, name: "fully_decode_reserved_expansion", kind: "scalar", localName: "fully_decode_reserved_expansion", T: 8 /*ScalarType.BOOL*/ } - ]); - } - create(value?: PartialMessage): Http { - const message = globalThis.Object.create((this.messagePrototype!)); - message.rules = []; - message.fully_decode_reserved_expansion = false; - if (value !== undefined) - reflectionMergePartial(this, message, value); - return message; - } - internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Http): Http { - let message = target ?? this.create(), end = reader.pos + length; - while (reader.pos < end) { - let [fieldNo, wireType] = reader.tag(); - switch (fieldNo) { - case /* repeated google.api.HttpRule rules */ 1: - message.rules.push(HttpRule.internalBinaryRead(reader, reader.uint32(), options)); - break; - case /* bool fully_decode_reserved_expansion */ 2: - message.fully_decode_reserved_expansion = reader.bool(); - break; - default: - let u = options.readUnknownField; - if (u === "throw") - throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); - let d = reader.skip(wireType); - if (u !== false) - (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); - } - } - return message; - } - internalBinaryWrite(message: Http, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { - /* repeated google.api.HttpRule rules = 1; */ - for (let i = 0; i < message.rules.length; i++) - HttpRule.internalBinaryWrite(message.rules[i], writer.tag(1, WireType.LengthDelimited).fork(), options).join(); - /* bool fully_decode_reserved_expansion = 2; */ - if (message.fully_decode_reserved_expansion !== false) - writer.tag(2, WireType.Varint).bool(message.fully_decode_reserved_expansion); - let u = options.writeUnknownFields; - if (u !== false) - (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); - return writer; - } +declare class Http$Type extends MessageType { + constructor(); + create(value?: PartialMessage): Http; + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Http): Http; + internalBinaryWrite(message: Http, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter; } /** * @generated MessageType for protobuf message google.api.Http */ -export const Http = new Http$Type(); -// @generated message type with reflection information, may provide speed optimized methods -class HttpRule$Type extends MessageType { - constructor() { - super("google.api.HttpRule", [ - { no: 1, name: "selector", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, - { no: 2, name: "get", kind: "scalar", oneof: "pattern", T: 9 /*ScalarType.STRING*/ }, - { no: 3, name: "put", kind: "scalar", oneof: "pattern", T: 9 /*ScalarType.STRING*/ }, - { no: 4, name: "post", kind: "scalar", oneof: "pattern", T: 9 /*ScalarType.STRING*/ }, - { no: 5, name: "delete", kind: "scalar", oneof: "pattern", T: 9 /*ScalarType.STRING*/ }, - { no: 6, name: "patch", kind: "scalar", oneof: "pattern", T: 9 /*ScalarType.STRING*/ }, - { no: 8, name: "custom", kind: "message", oneof: "pattern", T: () => CustomHttpPattern }, - { no: 7, name: "body", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, - { no: 12, name: "response_body", kind: "scalar", localName: "response_body", T: 9 /*ScalarType.STRING*/ }, - { no: 11, name: "additional_bindings", kind: "message", localName: "additional_bindings", repeat: 1 /*RepeatType.PACKED*/, T: () => HttpRule } - ]); - } - create(value?: PartialMessage): HttpRule { - const message = globalThis.Object.create((this.messagePrototype!)); - message.selector = ""; - message.pattern = { oneofKind: undefined }; - message.body = ""; - message.response_body = ""; - message.additional_bindings = []; - if (value !== undefined) - reflectionMergePartial(this, message, value); - return message; - } - internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: HttpRule): HttpRule { - let message = target ?? this.create(), end = reader.pos + length; - while (reader.pos < end) { - let [fieldNo, wireType] = reader.tag(); - switch (fieldNo) { - case /* string selector */ 1: - message.selector = reader.string(); - break; - case /* string get */ 2: - message.pattern = { - oneofKind: "get", - get: reader.string() - }; - break; - case /* string put */ 3: - message.pattern = { - oneofKind: "put", - put: reader.string() - }; - break; - case /* string post */ 4: - message.pattern = { - oneofKind: "post", - post: reader.string() - }; - break; - case /* string delete */ 5: - message.pattern = { - oneofKind: "delete", - delete: reader.string() - }; - break; - case /* string patch */ 6: - message.pattern = { - oneofKind: "patch", - patch: reader.string() - }; - break; - case /* google.api.CustomHttpPattern custom */ 8: - message.pattern = { - oneofKind: "custom", - custom: CustomHttpPattern.internalBinaryRead(reader, reader.uint32(), options, (message.pattern as any).custom) - }; - break; - case /* string body */ 7: - message.body = reader.string(); - break; - case /* string response_body */ 12: - message.response_body = reader.string(); - break; - case /* repeated google.api.HttpRule additional_bindings */ 11: - message.additional_bindings.push(HttpRule.internalBinaryRead(reader, reader.uint32(), options)); - break; - default: - let u = options.readUnknownField; - if (u === "throw") - throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); - let d = reader.skip(wireType); - if (u !== false) - (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); - } - } - return message; - } - internalBinaryWrite(message: HttpRule, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { - /* string selector = 1; */ - if (message.selector !== "") - writer.tag(1, WireType.LengthDelimited).string(message.selector); - /* string get = 2; */ - if (message.pattern.oneofKind === "get") - writer.tag(2, WireType.LengthDelimited).string(message.pattern.get); - /* string put = 3; */ - if (message.pattern.oneofKind === "put") - writer.tag(3, WireType.LengthDelimited).string(message.pattern.put); - /* string post = 4; */ - if (message.pattern.oneofKind === "post") - writer.tag(4, WireType.LengthDelimited).string(message.pattern.post); - /* string delete = 5; */ - if (message.pattern.oneofKind === "delete") - writer.tag(5, WireType.LengthDelimited).string(message.pattern.delete); - /* string patch = 6; */ - if (message.pattern.oneofKind === "patch") - writer.tag(6, WireType.LengthDelimited).string(message.pattern.patch); - /* google.api.CustomHttpPattern custom = 8; */ - if (message.pattern.oneofKind === "custom") - CustomHttpPattern.internalBinaryWrite(message.pattern.custom, writer.tag(8, WireType.LengthDelimited).fork(), options).join(); - /* string body = 7; */ - if (message.body !== "") - writer.tag(7, WireType.LengthDelimited).string(message.body); - /* string response_body = 12; */ - if (message.response_body !== "") - writer.tag(12, WireType.LengthDelimited).string(message.response_body); - /* repeated google.api.HttpRule additional_bindings = 11; */ - for (let i = 0; i < message.additional_bindings.length; i++) - HttpRule.internalBinaryWrite(message.additional_bindings[i], writer.tag(11, WireType.LengthDelimited).fork(), options).join(); - let u = options.writeUnknownFields; - if (u !== false) - (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); - return writer; - } +export declare const Http: Http$Type; +declare class HttpRule$Type extends MessageType { + constructor(); + create(value?: PartialMessage): HttpRule; + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: HttpRule): HttpRule; + internalBinaryWrite(message: HttpRule, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter; } /** * @generated MessageType for protobuf message google.api.HttpRule */ -export const HttpRule = new HttpRule$Type(); -// @generated message type with reflection information, may provide speed optimized methods -class CustomHttpPattern$Type extends MessageType { - constructor() { - super("google.api.CustomHttpPattern", [ - { no: 1, name: "kind", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, - { no: 2, name: "path", kind: "scalar", T: 9 /*ScalarType.STRING*/ } - ]); - } - create(value?: PartialMessage): CustomHttpPattern { - const message = globalThis.Object.create((this.messagePrototype!)); - message.kind = ""; - message.path = ""; - if (value !== undefined) - reflectionMergePartial(this, message, value); - return message; - } - internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: CustomHttpPattern): CustomHttpPattern { - let message = target ?? this.create(), end = reader.pos + length; - while (reader.pos < end) { - let [fieldNo, wireType] = reader.tag(); - switch (fieldNo) { - case /* string kind */ 1: - message.kind = reader.string(); - break; - case /* string path */ 2: - message.path = reader.string(); - break; - default: - let u = options.readUnknownField; - if (u === "throw") - throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); - let d = reader.skip(wireType); - if (u !== false) - (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); - } - } - return message; - } - internalBinaryWrite(message: CustomHttpPattern, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { - /* string kind = 1; */ - if (message.kind !== "") - writer.tag(1, WireType.LengthDelimited).string(message.kind); - /* string path = 2; */ - if (message.path !== "") - writer.tag(2, WireType.LengthDelimited).string(message.path); - let u = options.writeUnknownFields; - if (u !== false) - (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); - return writer; - } +export declare const HttpRule: HttpRule$Type; +declare class CustomHttpPattern$Type extends MessageType { + constructor(); + create(value?: PartialMessage): CustomHttpPattern; + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: CustomHttpPattern): CustomHttpPattern; + internalBinaryWrite(message: CustomHttpPattern, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter; } /** * @generated MessageType for protobuf message google.api.CustomHttpPattern */ -export const CustomHttpPattern = new CustomHttpPattern$Type(); +export declare const CustomHttpPattern: CustomHttpPattern$Type; +export {}; diff --git a/src/google/api/http_pb.js b/src/google/api/http_pb.js index 9fc6ee7..5624bf5 100644 --- a/src/google/api/http_pb.js +++ b/src/google/api/http_pb.js @@ -1,1012 +1,269 @@ -// source: google/api/http.proto -/** - * @fileoverview - * @enhanceable - * @suppress {missingRequire} reports error on implicit type usages. - * @suppress {messageConventions} JS Compiler reports an error if a variable or - * field starts with 'MSG_' and isn't a translatable message. - * @public - */ -// GENERATED CODE -- DO NOT EDIT! /* eslint-disable */ +// @generated by protobuf-ts 2.9.3 with parameter add_pb_suffix,client_grpc1,generate_dependencies,keep_enum_prefix,ts_nocheck,use_proto_field_name,output_javascript,output_legacy_commonjs,eslint_disable +// @generated from protobuf file "google/api/http.proto" (package "google.api", syntax proto3) +// tslint:disable // @ts-nocheck - -var jspb = require('google-protobuf'); -var goog = jspb; -var global = - (typeof globalThis !== 'undefined' && globalThis) || - (typeof window !== 'undefined' && window) || - (typeof global !== 'undefined' && global) || - (typeof self !== 'undefined' && self) || - (function () { return this; }).call(null) || - Function('return this')(); - -goog.exportSymbol('proto.google.api.CustomHttpPattern', null, global); -goog.exportSymbol('proto.google.api.Http', null, global); -goog.exportSymbol('proto.google.api.HttpRule', null, global); -goog.exportSymbol('proto.google.api.HttpRule.PatternCase', null, global); -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.google.api.Http = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.google.api.Http.repeatedFields_, null); -}; -goog.inherits(proto.google.api.Http, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.google.api.Http.displayName = 'proto.google.api.Http'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.google.api.HttpRule = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.google.api.HttpRule.repeatedFields_, proto.google.api.HttpRule.oneofGroups_); -}; -goog.inherits(proto.google.api.HttpRule, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.google.api.HttpRule.displayName = 'proto.google.api.HttpRule'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.google.api.CustomHttpPattern = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.google.api.CustomHttpPattern, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.google.api.CustomHttpPattern.displayName = 'proto.google.api.CustomHttpPattern'; -} - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.google.api.Http.repeatedFields_ = [1]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.google.api.Http.prototype.toObject = function(opt_includeInstance) { - return proto.google.api.Http.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.google.api.Http} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.google.api.Http.toObject = function(includeInstance, msg) { - var f, obj = { - rulesList: jspb.Message.toObjectList(msg.getRulesList(), - proto.google.api.HttpRule.toObject, includeInstance), - fullyDecodeReservedExpansion: jspb.Message.getBooleanFieldWithDefault(msg, 2, false) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.google.api.Http} - */ -proto.google.api.Http.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.google.api.Http; - return proto.google.api.Http.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.google.api.Http} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.google.api.Http} - */ -proto.google.api.Http.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; +// +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.CustomHttpPattern = exports.HttpRule = exports.Http = void 0; +const runtime_1 = require("@protobuf-ts/runtime"); +const runtime_2 = require("@protobuf-ts/runtime"); +const runtime_3 = require("@protobuf-ts/runtime"); +const runtime_4 = require("@protobuf-ts/runtime"); +// @generated message type with reflection information, may provide speed optimized methods +class Http$Type extends runtime_4.MessageType { + constructor() { + super("google.api.Http", [ + { no: 1, name: "rules", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => exports.HttpRule }, + { no: 2, name: "fully_decode_reserved_expansion", kind: "scalar", localName: "fully_decode_reserved_expansion", T: 8 /*ScalarType.BOOL*/ } + ]); } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.google.api.HttpRule; - reader.readMessage(value,proto.google.api.HttpRule.deserializeBinaryFromReader); - msg.addRules(value); - break; - case 2: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setFullyDecodeReservedExpansion(value); - break; - default: - reader.skipField(); - break; + create(value) { + const message = globalThis.Object.create((this.messagePrototype)); + message.rules = []; + message.fully_decode_reserved_expansion = false; + if (value !== undefined) + runtime_3.reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader, length, options, target) { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* repeated google.api.HttpRule rules */ 1: + message.rules.push(exports.HttpRule.internalBinaryRead(reader, reader.uint32(), options)); + break; + case /* bool fully_decode_reserved_expansion */ 2: + message.fully_decode_reserved_expansion = reader.bool(); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? runtime_2.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message, writer, options) { + /* repeated google.api.HttpRule rules = 1; */ + for (let i = 0; i < message.rules.length; i++) + exports.HttpRule.internalBinaryWrite(message.rules[i], writer.tag(1, runtime_1.WireType.LengthDelimited).fork(), options).join(); + /* bool fully_decode_reserved_expansion = 2; */ + if (message.fully_decode_reserved_expansion !== false) + writer.tag(2, runtime_1.WireType.Varint).bool(message.fully_decode_reserved_expansion); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.google.api.Http.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.google.api.Http.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.google.api.Http} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.google.api.Http.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getRulesList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 1, - f, - proto.google.api.HttpRule.serializeBinaryToWriter - ); - } - f = message.getFullyDecodeReservedExpansion(); - if (f) { - writer.writeBool( - 2, - f - ); - } -}; - - -/** - * repeated HttpRule rules = 1; - * @return {!Array} - */ -proto.google.api.Http.prototype.getRulesList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.google.api.HttpRule, 1)); -}; - - -/** - * @param {!Array} value - * @return {!proto.google.api.Http} returns this -*/ -proto.google.api.Http.prototype.setRulesList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 1, value); -}; - - -/** - * @param {!proto.google.api.HttpRule=} opt_value - * @param {number=} opt_index - * @return {!proto.google.api.HttpRule} - */ -proto.google.api.Http.prototype.addRules = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.google.api.HttpRule, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.google.api.Http} returns this - */ -proto.google.api.Http.prototype.clearRulesList = function() { - return this.setRulesList([]); -}; - - -/** - * optional bool fully_decode_reserved_expansion = 2; - * @return {boolean} - */ -proto.google.api.Http.prototype.getFullyDecodeReservedExpansion = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.google.api.Http} returns this - */ -proto.google.api.Http.prototype.setFullyDecodeReservedExpansion = function(value) { - return jspb.Message.setProto3BooleanField(this, 2, value); -}; - - - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.google.api.HttpRule.repeatedFields_ = [11]; - -/** - * Oneof group definitions for this message. Each group defines the field - * numbers belonging to that group. When of these fields' value is set, all - * other fields in the group are cleared. During deserialization, if multiple - * fields are encountered for a group, only the last value seen will be kept. - * @private {!Array>} - * @const - */ -proto.google.api.HttpRule.oneofGroups_ = [[2,3,4,5,6,8]]; - -/** - * @enum {number} - */ -proto.google.api.HttpRule.PatternCase = { - PATTERN_NOT_SET: 0, - GET: 2, - PUT: 3, - POST: 4, - DELETE: 5, - PATCH: 6, - CUSTOM: 8 -}; - -/** - * @return {proto.google.api.HttpRule.PatternCase} - */ -proto.google.api.HttpRule.prototype.getPatternCase = function() { - return /** @type {proto.google.api.HttpRule.PatternCase} */(jspb.Message.computeOneofCase(this, proto.google.api.HttpRule.oneofGroups_[0])); -}; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.google.api.HttpRule.prototype.toObject = function(opt_includeInstance) { - return proto.google.api.HttpRule.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.google.api.HttpRule} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.google.api.HttpRule.toObject = function(includeInstance, msg) { - var f, obj = { - selector: jspb.Message.getFieldWithDefault(msg, 1, ""), - get: jspb.Message.getFieldWithDefault(msg, 2, ""), - put: jspb.Message.getFieldWithDefault(msg, 3, ""), - post: jspb.Message.getFieldWithDefault(msg, 4, ""), - pb_delete: jspb.Message.getFieldWithDefault(msg, 5, ""), - patch: jspb.Message.getFieldWithDefault(msg, 6, ""), - custom: (f = msg.getCustom()) && proto.google.api.CustomHttpPattern.toObject(includeInstance, f), - body: jspb.Message.getFieldWithDefault(msg, 7, ""), - responseBody: jspb.Message.getFieldWithDefault(msg, 12, ""), - additionalBindingsList: jspb.Message.toObjectList(msg.getAdditionalBindingsList(), - proto.google.api.HttpRule.toObject, includeInstance) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; } - - /** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.google.api.HttpRule} - */ -proto.google.api.HttpRule.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.google.api.HttpRule; - return proto.google.api.HttpRule.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.google.api.HttpRule} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.google.api.HttpRule} - */ -proto.google.api.HttpRule.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; + * @generated MessageType for protobuf message google.api.Http + */ +exports.Http = new Http$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class HttpRule$Type extends runtime_4.MessageType { + constructor() { + super("google.api.HttpRule", [ + { no: 1, name: "selector", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, + { no: 2, name: "get", kind: "scalar", oneof: "pattern", T: 9 /*ScalarType.STRING*/ }, + { no: 3, name: "put", kind: "scalar", oneof: "pattern", T: 9 /*ScalarType.STRING*/ }, + { no: 4, name: "post", kind: "scalar", oneof: "pattern", T: 9 /*ScalarType.STRING*/ }, + { no: 5, name: "delete", kind: "scalar", oneof: "pattern", T: 9 /*ScalarType.STRING*/ }, + { no: 6, name: "patch", kind: "scalar", oneof: "pattern", T: 9 /*ScalarType.STRING*/ }, + { no: 8, name: "custom", kind: "message", oneof: "pattern", T: () => exports.CustomHttpPattern }, + { no: 7, name: "body", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, + { no: 12, name: "response_body", kind: "scalar", localName: "response_body", T: 9 /*ScalarType.STRING*/ }, + { no: 11, name: "additional_bindings", kind: "message", localName: "additional_bindings", repeat: 1 /*RepeatType.PACKED*/, T: () => exports.HttpRule } + ]); } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setSelector(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setGet(value); - break; - case 3: - var value = /** @type {string} */ (reader.readString()); - msg.setPut(value); - break; - case 4: - var value = /** @type {string} */ (reader.readString()); - msg.setPost(value); - break; - case 5: - var value = /** @type {string} */ (reader.readString()); - msg.setDelete(value); - break; - case 6: - var value = /** @type {string} */ (reader.readString()); - msg.setPatch(value); - break; - case 8: - var value = new proto.google.api.CustomHttpPattern; - reader.readMessage(value,proto.google.api.CustomHttpPattern.deserializeBinaryFromReader); - msg.setCustom(value); - break; - case 7: - var value = /** @type {string} */ (reader.readString()); - msg.setBody(value); - break; - case 12: - var value = /** @type {string} */ (reader.readString()); - msg.setResponseBody(value); - break; - case 11: - var value = new proto.google.api.HttpRule; - reader.readMessage(value,proto.google.api.HttpRule.deserializeBinaryFromReader); - msg.addAdditionalBindings(value); - break; - default: - reader.skipField(); - break; + create(value) { + const message = globalThis.Object.create((this.messagePrototype)); + message.selector = ""; + message.pattern = { oneofKind: undefined }; + message.body = ""; + message.response_body = ""; + message.additional_bindings = []; + if (value !== undefined) + runtime_3.reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader, length, options, target) { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* string selector */ 1: + message.selector = reader.string(); + break; + case /* string get */ 2: + message.pattern = { + oneofKind: "get", + get: reader.string() + }; + break; + case /* string put */ 3: + message.pattern = { + oneofKind: "put", + put: reader.string() + }; + break; + case /* string post */ 4: + message.pattern = { + oneofKind: "post", + post: reader.string() + }; + break; + case /* string delete */ 5: + message.pattern = { + oneofKind: "delete", + delete: reader.string() + }; + break; + case /* string patch */ 6: + message.pattern = { + oneofKind: "patch", + patch: reader.string() + }; + break; + case /* google.api.CustomHttpPattern custom */ 8: + message.pattern = { + oneofKind: "custom", + custom: exports.CustomHttpPattern.internalBinaryRead(reader, reader.uint32(), options, message.pattern.custom) + }; + break; + case /* string body */ 7: + message.body = reader.string(); + break; + case /* string response_body */ 12: + message.response_body = reader.string(); + break; + case /* repeated google.api.HttpRule additional_bindings */ 11: + message.additional_bindings.push(exports.HttpRule.internalBinaryRead(reader, reader.uint32(), options)); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? runtime_2.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message, writer, options) { + /* string selector = 1; */ + if (message.selector !== "") + writer.tag(1, runtime_1.WireType.LengthDelimited).string(message.selector); + /* string get = 2; */ + if (message.pattern.oneofKind === "get") + writer.tag(2, runtime_1.WireType.LengthDelimited).string(message.pattern.get); + /* string put = 3; */ + if (message.pattern.oneofKind === "put") + writer.tag(3, runtime_1.WireType.LengthDelimited).string(message.pattern.put); + /* string post = 4; */ + if (message.pattern.oneofKind === "post") + writer.tag(4, runtime_1.WireType.LengthDelimited).string(message.pattern.post); + /* string delete = 5; */ + if (message.pattern.oneofKind === "delete") + writer.tag(5, runtime_1.WireType.LengthDelimited).string(message.pattern.delete); + /* string patch = 6; */ + if (message.pattern.oneofKind === "patch") + writer.tag(6, runtime_1.WireType.LengthDelimited).string(message.pattern.patch); + /* google.api.CustomHttpPattern custom = 8; */ + if (message.pattern.oneofKind === "custom") + exports.CustomHttpPattern.internalBinaryWrite(message.pattern.custom, writer.tag(8, runtime_1.WireType.LengthDelimited).fork(), options).join(); + /* string body = 7; */ + if (message.body !== "") + writer.tag(7, runtime_1.WireType.LengthDelimited).string(message.body); + /* string response_body = 12; */ + if (message.response_body !== "") + writer.tag(12, runtime_1.WireType.LengthDelimited).string(message.response_body); + /* repeated google.api.HttpRule additional_bindings = 11; */ + for (let i = 0; i < message.additional_bindings.length; i++) + exports.HttpRule.internalBinaryWrite(message.additional_bindings[i], writer.tag(11, runtime_1.WireType.LengthDelimited).fork(), options).join(); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.google.api.HttpRule.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.google.api.HttpRule.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.google.api.HttpRule} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.google.api.HttpRule.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getSelector(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = /** @type {string} */ (jspb.Message.getField(message, 2)); - if (f != null) { - writer.writeString( - 2, - f - ); - } - f = /** @type {string} */ (jspb.Message.getField(message, 3)); - if (f != null) { - writer.writeString( - 3, - f - ); - } - f = /** @type {string} */ (jspb.Message.getField(message, 4)); - if (f != null) { - writer.writeString( - 4, - f - ); - } - f = /** @type {string} */ (jspb.Message.getField(message, 5)); - if (f != null) { - writer.writeString( - 5, - f - ); - } - f = /** @type {string} */ (jspb.Message.getField(message, 6)); - if (f != null) { - writer.writeString( - 6, - f - ); - } - f = message.getCustom(); - if (f != null) { - writer.writeMessage( - 8, - f, - proto.google.api.CustomHttpPattern.serializeBinaryToWriter - ); - } - f = message.getBody(); - if (f.length > 0) { - writer.writeString( - 7, - f - ); - } - f = message.getResponseBody(); - if (f.length > 0) { - writer.writeString( - 12, - f - ); - } - f = message.getAdditionalBindingsList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 11, - f, - proto.google.api.HttpRule.serializeBinaryToWriter - ); - } -}; - - -/** - * optional string selector = 1; - * @return {string} - */ -proto.google.api.HttpRule.prototype.getSelector = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.google.api.HttpRule} returns this - */ -proto.google.api.HttpRule.prototype.setSelector = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - -/** - * optional string get = 2; - * @return {string} - */ -proto.google.api.HttpRule.prototype.getGet = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * @param {string} value - * @return {!proto.google.api.HttpRule} returns this - */ -proto.google.api.HttpRule.prototype.setGet = function(value) { - return jspb.Message.setOneofField(this, 2, proto.google.api.HttpRule.oneofGroups_[0], value); -}; - - -/** - * Clears the field making it undefined. - * @return {!proto.google.api.HttpRule} returns this - */ -proto.google.api.HttpRule.prototype.clearGet = function() { - return jspb.Message.setOneofField(this, 2, proto.google.api.HttpRule.oneofGroups_[0], undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.google.api.HttpRule.prototype.hasGet = function() { - return jspb.Message.getField(this, 2) != null; -}; - - -/** - * optional string put = 3; - * @return {string} - */ -proto.google.api.HttpRule.prototype.getPut = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); -}; - - -/** - * @param {string} value - * @return {!proto.google.api.HttpRule} returns this - */ -proto.google.api.HttpRule.prototype.setPut = function(value) { - return jspb.Message.setOneofField(this, 3, proto.google.api.HttpRule.oneofGroups_[0], value); -}; - - -/** - * Clears the field making it undefined. - * @return {!proto.google.api.HttpRule} returns this - */ -proto.google.api.HttpRule.prototype.clearPut = function() { - return jspb.Message.setOneofField(this, 3, proto.google.api.HttpRule.oneofGroups_[0], undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.google.api.HttpRule.prototype.hasPut = function() { - return jspb.Message.getField(this, 3) != null; -}; - - -/** - * optional string post = 4; - * @return {string} - */ -proto.google.api.HttpRule.prototype.getPost = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); -}; - - -/** - * @param {string} value - * @return {!proto.google.api.HttpRule} returns this - */ -proto.google.api.HttpRule.prototype.setPost = function(value) { - return jspb.Message.setOneofField(this, 4, proto.google.api.HttpRule.oneofGroups_[0], value); -}; - - -/** - * Clears the field making it undefined. - * @return {!proto.google.api.HttpRule} returns this - */ -proto.google.api.HttpRule.prototype.clearPost = function() { - return jspb.Message.setOneofField(this, 4, proto.google.api.HttpRule.oneofGroups_[0], undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.google.api.HttpRule.prototype.hasPost = function() { - return jspb.Message.getField(this, 4) != null; -}; - - -/** - * optional string delete = 5; - * @return {string} - */ -proto.google.api.HttpRule.prototype.getDelete = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); -}; - - -/** - * @param {string} value - * @return {!proto.google.api.HttpRule} returns this - */ -proto.google.api.HttpRule.prototype.setDelete = function(value) { - return jspb.Message.setOneofField(this, 5, proto.google.api.HttpRule.oneofGroups_[0], value); -}; - - -/** - * Clears the field making it undefined. - * @return {!proto.google.api.HttpRule} returns this - */ -proto.google.api.HttpRule.prototype.clearDelete = function() { - return jspb.Message.setOneofField(this, 5, proto.google.api.HttpRule.oneofGroups_[0], undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.google.api.HttpRule.prototype.hasDelete = function() { - return jspb.Message.getField(this, 5) != null; -}; - - -/** - * optional string patch = 6; - * @return {string} - */ -proto.google.api.HttpRule.prototype.getPatch = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, "")); -}; - - -/** - * @param {string} value - * @return {!proto.google.api.HttpRule} returns this - */ -proto.google.api.HttpRule.prototype.setPatch = function(value) { - return jspb.Message.setOneofField(this, 6, proto.google.api.HttpRule.oneofGroups_[0], value); -}; - - -/** - * Clears the field making it undefined. - * @return {!proto.google.api.HttpRule} returns this - */ -proto.google.api.HttpRule.prototype.clearPatch = function() { - return jspb.Message.setOneofField(this, 6, proto.google.api.HttpRule.oneofGroups_[0], undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.google.api.HttpRule.prototype.hasPatch = function() { - return jspb.Message.getField(this, 6) != null; -}; - - -/** - * optional CustomHttpPattern custom = 8; - * @return {?proto.google.api.CustomHttpPattern} - */ -proto.google.api.HttpRule.prototype.getCustom = function() { - return /** @type{?proto.google.api.CustomHttpPattern} */ ( - jspb.Message.getWrapperField(this, proto.google.api.CustomHttpPattern, 8)); -}; - - -/** - * @param {?proto.google.api.CustomHttpPattern|undefined} value - * @return {!proto.google.api.HttpRule} returns this -*/ -proto.google.api.HttpRule.prototype.setCustom = function(value) { - return jspb.Message.setOneofWrapperField(this, 8, proto.google.api.HttpRule.oneofGroups_[0], value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.google.api.HttpRule} returns this - */ -proto.google.api.HttpRule.prototype.clearCustom = function() { - return this.setCustom(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.google.api.HttpRule.prototype.hasCustom = function() { - return jspb.Message.getField(this, 8) != null; -}; - - -/** - * optional string body = 7; - * @return {string} - */ -proto.google.api.HttpRule.prototype.getBody = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, "")); -}; - - -/** - * @param {string} value - * @return {!proto.google.api.HttpRule} returns this - */ -proto.google.api.HttpRule.prototype.setBody = function(value) { - return jspb.Message.setProto3StringField(this, 7, value); -}; - - -/** - * optional string response_body = 12; - * @return {string} - */ -proto.google.api.HttpRule.prototype.getResponseBody = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 12, "")); -}; - - -/** - * @param {string} value - * @return {!proto.google.api.HttpRule} returns this - */ -proto.google.api.HttpRule.prototype.setResponseBody = function(value) { - return jspb.Message.setProto3StringField(this, 12, value); -}; - - -/** - * repeated HttpRule additional_bindings = 11; - * @return {!Array} - */ -proto.google.api.HttpRule.prototype.getAdditionalBindingsList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.google.api.HttpRule, 11)); -}; - - -/** - * @param {!Array} value - * @return {!proto.google.api.HttpRule} returns this -*/ -proto.google.api.HttpRule.prototype.setAdditionalBindingsList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 11, value); -}; - - -/** - * @param {!proto.google.api.HttpRule=} opt_value - * @param {number=} opt_index - * @return {!proto.google.api.HttpRule} - */ -proto.google.api.HttpRule.prototype.addAdditionalBindings = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 11, opt_value, proto.google.api.HttpRule, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.google.api.HttpRule} returns this - */ -proto.google.api.HttpRule.prototype.clearAdditionalBindingsList = function() { - return this.setAdditionalBindingsList([]); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.google.api.CustomHttpPattern.prototype.toObject = function(opt_includeInstance) { - return proto.google.api.CustomHttpPattern.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.google.api.CustomHttpPattern} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.google.api.CustomHttpPattern.toObject = function(includeInstance, msg) { - var f, obj = { - kind: jspb.Message.getFieldWithDefault(msg, 1, ""), - path: jspb.Message.getFieldWithDefault(msg, 2, "") - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; } - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.google.api.CustomHttpPattern} - */ -proto.google.api.CustomHttpPattern.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.google.api.CustomHttpPattern; - return proto.google.api.CustomHttpPattern.deserializeBinaryFromReader(msg, reader); -}; - - /** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.google.api.CustomHttpPattern} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.google.api.CustomHttpPattern} + * @generated MessageType for protobuf message google.api.HttpRule */ -proto.google.api.CustomHttpPattern.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; +exports.HttpRule = new HttpRule$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class CustomHttpPattern$Type extends runtime_4.MessageType { + constructor() { + super("google.api.CustomHttpPattern", [ + { no: 1, name: "kind", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, + { no: 2, name: "path", kind: "scalar", T: 9 /*ScalarType.STRING*/ } + ]); } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setKind(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setPath(value); - break; - default: - reader.skipField(); - break; + create(value) { + const message = globalThis.Object.create((this.messagePrototype)); + message.kind = ""; + message.path = ""; + if (value !== undefined) + runtime_3.reflectionMergePartial(this, message, value); + return message; } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.google.api.CustomHttpPattern.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.google.api.CustomHttpPattern.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.google.api.CustomHttpPattern} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.google.api.CustomHttpPattern.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getKind(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getPath(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } -}; - - -/** - * optional string kind = 1; - * @return {string} - */ -proto.google.api.CustomHttpPattern.prototype.getKind = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.google.api.CustomHttpPattern} returns this - */ -proto.google.api.CustomHttpPattern.prototype.setKind = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - -/** - * optional string path = 2; - * @return {string} - */ -proto.google.api.CustomHttpPattern.prototype.getPath = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - + internalBinaryRead(reader, length, options, target) { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* string kind */ 1: + message.kind = reader.string(); + break; + case /* string path */ 2: + message.path = reader.string(); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? runtime_2.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message, writer, options) { + /* string kind = 1; */ + if (message.kind !== "") + writer.tag(1, runtime_1.WireType.LengthDelimited).string(message.kind); + /* string path = 2; */ + if (message.path !== "") + writer.tag(2, runtime_1.WireType.LengthDelimited).string(message.path); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} /** - * @param {string} value - * @return {!proto.google.api.CustomHttpPattern} returns this + * @generated MessageType for protobuf message google.api.CustomHttpPattern */ -proto.google.api.CustomHttpPattern.prototype.setPath = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); -}; - - -goog.object.extend(exports, proto.google.api); +exports.CustomHttpPattern = new CustomHttpPattern$Type(); diff --git a/src/google/protobuf/any_pb.ts b/src/google/protobuf/any_pb.d.ts similarity index 58% rename from src/google/protobuf/any_pb.ts rename to src/google/protobuf/any_pb.d.ts index cccdf83..95db01b 100644 --- a/src/google/protobuf/any_pb.ts +++ b/src/google/protobuf/any_pb.d.ts @@ -1,4 +1,5 @@ -// @generated by protobuf-ts 2.9.3 with parameter add_pb_suffix,client_grpc1,generate_dependencies,keep_enum_prefix,ts_nocheck,use_proto_field_name +/* eslint-disable */ +// @generated by protobuf-ts 2.9.3 with parameter add_pb_suffix,client_grpc1,generate_dependencies,keep_enum_prefix,ts_nocheck,use_proto_field_name,output_javascript,output_legacy_commonjs,eslint_disable // @generated from protobuf file "google/protobuf/any.proto" (package "google.protobuf", syntax proto3) // tslint:disable // @ts-nocheck @@ -35,15 +36,9 @@ // import type { BinaryWriteOptions } from "@protobuf-ts/runtime"; import type { IBinaryWriter } from "@protobuf-ts/runtime"; -import { WireType } from "@protobuf-ts/runtime"; import type { IBinaryReader } from "@protobuf-ts/runtime"; -import { UnknownFieldHandler } from "@protobuf-ts/runtime"; import type { PartialMessage } from "@protobuf-ts/runtime"; -import { reflectionMergePartial } from "@protobuf-ts/runtime"; -import { isJsonObject } from "@protobuf-ts/runtime"; -import { typeofJsonValue } from "@protobuf-ts/runtime"; import type { JsonValue } from "@protobuf-ts/runtime"; -import { jsonWriteOptions } from "@protobuf-ts/runtime"; import type { JsonReadOptions } from "@protobuf-ts/runtime"; import type { JsonWriteOptions } from "@protobuf-ts/runtime"; import type { BinaryReadOptions } from "@protobuf-ts/runtime"; @@ -181,42 +176,22 @@ export interface Any { */ value: Uint8Array; } -// @generated message type with reflection information, may provide speed optimized methods -class Any$Type extends MessageType { - constructor() { - super("google.protobuf.Any", [ - { no: 1, name: "type_url", kind: "scalar", localName: "type_url", T: 9 /*ScalarType.STRING*/ }, - { no: 2, name: "value", kind: "scalar", T: 12 /*ScalarType.BYTES*/ } - ]); - } +declare class Any$Type extends MessageType { + constructor(); /** * Pack the message into a new `Any`. * * Uses 'type.googleapis.com/full.type.name' as the type URL. */ - pack(message: T, type: IMessageType): Any { - return { - type_url: this.typeNameToUrl(type.typeName), value: type.toBinary(message), - }; - } + pack(message: T, type: IMessageType): Any; /** * Unpack the message from the `Any`. */ - unpack(any: Any, type: IMessageType, options?: Partial): T { - if (!this.contains(any, type)) - throw new Error("Cannot unpack google.protobuf.Any with type_url '" + any.type_url + "' as " + type.typeName + "."); - return type.fromBinary(any.value, options); - } + unpack(any: Any, type: IMessageType, options?: Partial): T; /** * Does the given `Any` contain a packed message of the given type? */ - contains(any: Any, type: IMessageType | string): boolean { - if (!any.type_url.length) - return false; - let wants = typeof type == "string" ? type : type.typeName; - let has = this.typeUrlToName(any.type_url); - return wants === has; - } + contains(any: Any, type: IMessageType | string): boolean; /** * Convert the message to canonical JSON value. * @@ -226,102 +201,16 @@ class Any$Type extends MessageType { * The `typeRegistry` option is also required to read * `google.protobuf.Any` from JSON format. */ - internalJsonWrite(any: Any, options: JsonWriteOptions): JsonValue { - if (any.type_url === "") - return {}; - let typeName = this.typeUrlToName(any.type_url); - let opt = jsonWriteOptions(options); - let type = opt.typeRegistry?.find(t => t.typeName === typeName); - if (!type) - throw new globalThis.Error("Unable to convert google.protobuf.Any with typeUrl '" + any.type_url + "' to JSON. The specified type " + typeName + " is not available in the type registry."); - let value = type.fromBinary(any.value, { readUnknownField: false }); - let json = type.internalJsonWrite(value, opt); - if (typeName.startsWith("google.protobuf.") || !isJsonObject(json)) - json = { value: json }; - json["@type"] = any.type_url; - return json; - } - internalJsonRead(json: JsonValue, options: JsonReadOptions, target?: Any): Any { - if (!isJsonObject(json)) - throw new globalThis.Error("Unable to parse google.protobuf.Any from JSON " + typeofJsonValue(json) + "."); - if (typeof json["@type"] != "string" || json["@type"] == "") - return this.create(); - let typeName = this.typeUrlToName(json["@type"]); - let type = options?.typeRegistry?.find(t => t.typeName == typeName); - if (!type) - throw new globalThis.Error("Unable to parse google.protobuf.Any from JSON. The specified type " + typeName + " is not available in the type registry."); - let value; - if (typeName.startsWith("google.protobuf.") && json.hasOwnProperty("value")) - value = type.fromJson(json["value"], options); - else { - let copy = Object.assign({}, json); - delete copy["@type"]; - value = type.fromJson(copy, options); - } - if (target === undefined) - target = this.create(); - target.type_url = json["@type"]; - target.value = type.toBinary(value); - return target; - } - typeNameToUrl(name: string): string { - if (!name.length) - throw new Error("invalid type name: " + name); - return "type.googleapis.com/" + name; - } - typeUrlToName(url: string): string { - if (!url.length) - throw new Error("invalid type url: " + url); - let slash = url.lastIndexOf("/"); - let name = slash > 0 ? url.substring(slash + 1) : url; - if (!name.length) - throw new Error("invalid type url: " + url); - return name; - } - create(value?: PartialMessage): Any { - const message = globalThis.Object.create((this.messagePrototype!)); - message.type_url = ""; - message.value = new Uint8Array(0); - if (value !== undefined) - reflectionMergePartial(this, message, value); - return message; - } - internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Any): Any { - let message = target ?? this.create(), end = reader.pos + length; - while (reader.pos < end) { - let [fieldNo, wireType] = reader.tag(); - switch (fieldNo) { - case /* string type_url */ 1: - message.type_url = reader.string(); - break; - case /* bytes value */ 2: - message.value = reader.bytes(); - break; - default: - let u = options.readUnknownField; - if (u === "throw") - throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); - let d = reader.skip(wireType); - if (u !== false) - (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); - } - } - return message; - } - internalBinaryWrite(message: Any, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { - /* string type_url = 1; */ - if (message.type_url !== "") - writer.tag(1, WireType.LengthDelimited).string(message.type_url); - /* bytes value = 2; */ - if (message.value.length) - writer.tag(2, WireType.LengthDelimited).bytes(message.value); - let u = options.writeUnknownFields; - if (u !== false) - (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); - return writer; - } + internalJsonWrite(any: Any, options: JsonWriteOptions): JsonValue; + internalJsonRead(json: JsonValue, options: JsonReadOptions, target?: Any): Any; + typeNameToUrl(name: string): string; + typeUrlToName(url: string): string; + create(value?: PartialMessage): Any; + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Any): Any; + internalBinaryWrite(message: Any, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter; } /** * @generated MessageType for protobuf message google.protobuf.Any */ -export const Any = new Any$Type(); +export declare const Any: Any$Type; +export {}; diff --git a/src/google/protobuf/any_pb.js b/src/google/protobuf/any_pb.js new file mode 100644 index 0000000..6e86f1c --- /dev/null +++ b/src/google/protobuf/any_pb.js @@ -0,0 +1,190 @@ +/* eslint-disable */ +// @generated by protobuf-ts 2.9.3 with parameter add_pb_suffix,client_grpc1,generate_dependencies,keep_enum_prefix,ts_nocheck,use_proto_field_name,output_javascript,output_legacy_commonjs,eslint_disable +// @generated from protobuf file "google/protobuf/any.proto" (package "google.protobuf", syntax proto3) +// tslint:disable +// @ts-nocheck +// +// Protocol Buffers - Google's data interchange format +// Copyright 2008 Google Inc. All rights reserved. +// https://developers.google.com/protocol-buffers/ +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.Any = void 0; +const runtime_1 = require("@protobuf-ts/runtime"); +const runtime_2 = require("@protobuf-ts/runtime"); +const runtime_3 = require("@protobuf-ts/runtime"); +const runtime_4 = require("@protobuf-ts/runtime"); +const runtime_5 = require("@protobuf-ts/runtime"); +const runtime_6 = require("@protobuf-ts/runtime"); +const runtime_7 = require("@protobuf-ts/runtime"); +// @generated message type with reflection information, may provide speed optimized methods +class Any$Type extends runtime_7.MessageType { + constructor() { + super("google.protobuf.Any", [ + { no: 1, name: "type_url", kind: "scalar", localName: "type_url", T: 9 /*ScalarType.STRING*/ }, + { no: 2, name: "value", kind: "scalar", T: 12 /*ScalarType.BYTES*/ } + ]); + } + /** + * Pack the message into a new `Any`. + * + * Uses 'type.googleapis.com/full.type.name' as the type URL. + */ + pack(message, type) { + return { + type_url: this.typeNameToUrl(type.typeName), value: type.toBinary(message), + }; + } + /** + * Unpack the message from the `Any`. + */ + unpack(any, type, options) { + if (!this.contains(any, type)) + throw new Error("Cannot unpack google.protobuf.Any with type_url '" + any.type_url + "' as " + type.typeName + "."); + return type.fromBinary(any.value, options); + } + /** + * Does the given `Any` contain a packed message of the given type? + */ + contains(any, type) { + if (!any.type_url.length) + return false; + let wants = typeof type == "string" ? type : type.typeName; + let has = this.typeUrlToName(any.type_url); + return wants === has; + } + /** + * Convert the message to canonical JSON value. + * + * You have to provide the `typeRegistry` option so that the + * packed message can be converted to JSON. + * + * The `typeRegistry` option is also required to read + * `google.protobuf.Any` from JSON format. + */ + internalJsonWrite(any, options) { + if (any.type_url === "") + return {}; + let typeName = this.typeUrlToName(any.type_url); + let opt = runtime_6.jsonWriteOptions(options); + let type = opt.typeRegistry?.find(t => t.typeName === typeName); + if (!type) + throw new globalThis.Error("Unable to convert google.protobuf.Any with typeUrl '" + any.type_url + "' to JSON. The specified type " + typeName + " is not available in the type registry."); + let value = type.fromBinary(any.value, { readUnknownField: false }); + let json = type.internalJsonWrite(value, opt); + if (typeName.startsWith("google.protobuf.") || !runtime_4.isJsonObject(json)) + json = { value: json }; + json["@type"] = any.type_url; + return json; + } + internalJsonRead(json, options, target) { + if (!runtime_4.isJsonObject(json)) + throw new globalThis.Error("Unable to parse google.protobuf.Any from JSON " + runtime_5.typeofJsonValue(json) + "."); + if (typeof json["@type"] != "string" || json["@type"] == "") + return this.create(); + let typeName = this.typeUrlToName(json["@type"]); + let type = options?.typeRegistry?.find(t => t.typeName == typeName); + if (!type) + throw new globalThis.Error("Unable to parse google.protobuf.Any from JSON. The specified type " + typeName + " is not available in the type registry."); + let value; + if (typeName.startsWith("google.protobuf.") && json.hasOwnProperty("value")) + value = type.fromJson(json["value"], options); + else { + let copy = Object.assign({}, json); + delete copy["@type"]; + value = type.fromJson(copy, options); + } + if (target === undefined) + target = this.create(); + target.type_url = json["@type"]; + target.value = type.toBinary(value); + return target; + } + typeNameToUrl(name) { + if (!name.length) + throw new Error("invalid type name: " + name); + return "type.googleapis.com/" + name; + } + typeUrlToName(url) { + if (!url.length) + throw new Error("invalid type url: " + url); + let slash = url.lastIndexOf("/"); + let name = slash > 0 ? url.substring(slash + 1) : url; + if (!name.length) + throw new Error("invalid type url: " + url); + return name; + } + create(value) { + const message = globalThis.Object.create((this.messagePrototype)); + message.type_url = ""; + message.value = new Uint8Array(0); + if (value !== undefined) + runtime_3.reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader, length, options, target) { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* string type_url */ 1: + message.type_url = reader.string(); + break; + case /* bytes value */ 2: + message.value = reader.bytes(); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? runtime_2.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message, writer, options) { + /* string type_url = 1; */ + if (message.type_url !== "") + writer.tag(1, runtime_1.WireType.LengthDelimited).string(message.type_url); + /* bytes value = 2; */ + if (message.value.length) + writer.tag(2, runtime_1.WireType.LengthDelimited).bytes(message.value); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message google.protobuf.Any + */ +exports.Any = new Any$Type(); diff --git a/src/google/protobuf/descriptor_pb.d.ts b/src/google/protobuf/descriptor_pb.d.ts new file mode 100644 index 0000000..a792698 --- /dev/null +++ b/src/google/protobuf/descriptor_pb.d.ts @@ -0,0 +1,2307 @@ +/* eslint-disable */ +// @generated by protobuf-ts 2.9.3 with parameter add_pb_suffix,client_grpc1,generate_dependencies,keep_enum_prefix,ts_nocheck,use_proto_field_name,output_javascript,output_legacy_commonjs,eslint_disable +// @generated from protobuf file "google/protobuf/descriptor.proto" (package "google.protobuf", syntax proto2) +// tslint:disable +// @ts-nocheck +// +// Protocol Buffers - Google's data interchange format +// Copyright 2008 Google Inc. All rights reserved. +// https://developers.google.com/protocol-buffers/ +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// +// Author: kenton@google.com (Kenton Varda) +// Based on original Protocol Buffers design by +// Sanjay Ghemawat, Jeff Dean, and others. +// +// The messages in this file describe the definitions found in .proto files. +// A valid .proto file can be translated directly to a FileDescriptorProto +// without any other information (e.g. without reading its imports). +// +import type { BinaryWriteOptions } from "@protobuf-ts/runtime"; +import type { IBinaryWriter } from "@protobuf-ts/runtime"; +import type { BinaryReadOptions } from "@protobuf-ts/runtime"; +import type { IBinaryReader } from "@protobuf-ts/runtime"; +import type { PartialMessage } from "@protobuf-ts/runtime"; +import { MessageType } from "@protobuf-ts/runtime"; +/** + * The protocol compiler can output a FileDescriptorSet containing the .proto + * files it parses. + * + * @generated from protobuf message google.protobuf.FileDescriptorSet + */ +export interface FileDescriptorSet { + /** + * @generated from protobuf field: repeated google.protobuf.FileDescriptorProto file = 1; + */ + file: FileDescriptorProto[]; +} +/** + * Describes a complete .proto file. + * + * @generated from protobuf message google.protobuf.FileDescriptorProto + */ +export interface FileDescriptorProto { + /** + * @generated from protobuf field: optional string name = 1; + */ + name?: string; + /** + * @generated from protobuf field: optional string package = 2; + */ + package?: string; + /** + * Names of files imported by this file. + * + * @generated from protobuf field: repeated string dependency = 3; + */ + dependency: string[]; + /** + * Indexes of the public imported files in the dependency list above. + * + * @generated from protobuf field: repeated int32 public_dependency = 10; + */ + public_dependency: number[]; + /** + * Indexes of the weak imported files in the dependency list. + * For Google-internal migration only. Do not use. + * + * @generated from protobuf field: repeated int32 weak_dependency = 11; + */ + weak_dependency: number[]; + /** + * All top-level definitions in this file. + * + * @generated from protobuf field: repeated google.protobuf.DescriptorProto message_type = 4; + */ + message_type: DescriptorProto[]; + /** + * @generated from protobuf field: repeated google.protobuf.EnumDescriptorProto enum_type = 5; + */ + enum_type: EnumDescriptorProto[]; + /** + * @generated from protobuf field: repeated google.protobuf.ServiceDescriptorProto service = 6; + */ + service: ServiceDescriptorProto[]; + /** + * @generated from protobuf field: repeated google.protobuf.FieldDescriptorProto extension = 7; + */ + extension: FieldDescriptorProto[]; + /** + * @generated from protobuf field: optional google.protobuf.FileOptions options = 8; + */ + options?: FileOptions; + /** + * This field contains optional information about the original source code. + * You may safely remove this entire field without harming runtime + * functionality of the descriptors -- the information is needed only by + * development tools. + * + * @generated from protobuf field: optional google.protobuf.SourceCodeInfo source_code_info = 9; + */ + source_code_info?: SourceCodeInfo; + /** + * The syntax of the proto file. + * The supported values are "proto2", "proto3", and "editions". + * + * If `edition` is present, this value must be "editions". + * + * @generated from protobuf field: optional string syntax = 12; + */ + syntax?: string; + /** + * The edition of the proto file. + * + * @generated from protobuf field: optional google.protobuf.Edition edition = 14; + */ + edition?: Edition; +} +/** + * Describes a message type. + * + * @generated from protobuf message google.protobuf.DescriptorProto + */ +export interface DescriptorProto { + /** + * @generated from protobuf field: optional string name = 1; + */ + name?: string; + /** + * @generated from protobuf field: repeated google.protobuf.FieldDescriptorProto field = 2; + */ + field: FieldDescriptorProto[]; + /** + * @generated from protobuf field: repeated google.protobuf.FieldDescriptorProto extension = 6; + */ + extension: FieldDescriptorProto[]; + /** + * @generated from protobuf field: repeated google.protobuf.DescriptorProto nested_type = 3; + */ + nested_type: DescriptorProto[]; + /** + * @generated from protobuf field: repeated google.protobuf.EnumDescriptorProto enum_type = 4; + */ + enum_type: EnumDescriptorProto[]; + /** + * @generated from protobuf field: repeated google.protobuf.DescriptorProto.ExtensionRange extension_range = 5; + */ + extension_range: DescriptorProto_ExtensionRange[]; + /** + * @generated from protobuf field: repeated google.protobuf.OneofDescriptorProto oneof_decl = 8; + */ + oneof_decl: OneofDescriptorProto[]; + /** + * @generated from protobuf field: optional google.protobuf.MessageOptions options = 7; + */ + options?: MessageOptions; + /** + * @generated from protobuf field: repeated google.protobuf.DescriptorProto.ReservedRange reserved_range = 9; + */ + reserved_range: DescriptorProto_ReservedRange[]; + /** + * Reserved field names, which may not be used by fields in the same message. + * A given name may only be reserved once. + * + * @generated from protobuf field: repeated string reserved_name = 10; + */ + reserved_name: string[]; +} +/** + * @generated from protobuf message google.protobuf.DescriptorProto.ExtensionRange + */ +export interface DescriptorProto_ExtensionRange { + /** + * @generated from protobuf field: optional int32 start = 1; + */ + start?: number; + /** + * @generated from protobuf field: optional int32 end = 2; + */ + end?: number; + /** + * @generated from protobuf field: optional google.protobuf.ExtensionRangeOptions options = 3; + */ + options?: ExtensionRangeOptions; +} +/** + * Range of reserved tag numbers. Reserved tag numbers may not be used by + * fields or extension ranges in the same message. Reserved ranges may + * not overlap. + * + * @generated from protobuf message google.protobuf.DescriptorProto.ReservedRange + */ +export interface DescriptorProto_ReservedRange { + /** + * @generated from protobuf field: optional int32 start = 1; + */ + start?: number; + /** + * @generated from protobuf field: optional int32 end = 2; + */ + end?: number; +} +/** + * @generated from protobuf message google.protobuf.ExtensionRangeOptions + */ +export interface ExtensionRangeOptions { + /** + * The parser stores options it doesn't recognize here. See above. + * + * @generated from protobuf field: repeated google.protobuf.UninterpretedOption uninterpreted_option = 999; + */ + uninterpreted_option: UninterpretedOption[]; + /** + * For external users: DO NOT USE. We are in the process of open sourcing + * extension declaration and executing internal cleanups before it can be + * used externally. + * + * @generated from protobuf field: repeated google.protobuf.ExtensionRangeOptions.Declaration declaration = 2; + */ + declaration: ExtensionRangeOptions_Declaration[]; + /** + * Any features defined in the specific edition. + * + * @generated from protobuf field: optional google.protobuf.FeatureSet features = 50; + */ + features?: FeatureSet; + /** + * The verification state of the range. + * TODO: flip the default to DECLARATION once all empty ranges + * are marked as UNVERIFIED. + * + * @generated from protobuf field: optional google.protobuf.ExtensionRangeOptions.VerificationState verification = 3; + */ + verification?: ExtensionRangeOptions_VerificationState; +} +/** + * @generated from protobuf message google.protobuf.ExtensionRangeOptions.Declaration + */ +export interface ExtensionRangeOptions_Declaration { + /** + * The extension number declared within the extension range. + * + * @generated from protobuf field: optional int32 number = 1; + */ + number?: number; + /** + * The fully-qualified name of the extension field. There must be a leading + * dot in front of the full name. + * + * @generated from protobuf field: optional string full_name = 2; + */ + full_name?: string; + /** + * The fully-qualified type name of the extension field. Unlike + * Metadata.type, Declaration.type must have a leading dot for messages + * and enums. + * + * @generated from protobuf field: optional string type = 3; + */ + type?: string; + /** + * If true, indicates that the number is reserved in the extension range, + * and any extension field with the number will fail to compile. Set this + * when a declared extension field is deleted. + * + * @generated from protobuf field: optional bool reserved = 5; + */ + reserved?: boolean; + /** + * If true, indicates that the extension must be defined as repeated. + * Otherwise the extension must be defined as optional. + * + * @generated from protobuf field: optional bool repeated = 6; + */ + repeated?: boolean; +} +/** + * The verification state of the extension range. + * + * @generated from protobuf enum google.protobuf.ExtensionRangeOptions.VerificationState + */ +export declare enum ExtensionRangeOptions_VerificationState { + /** + * All the extensions of the range must be declared. + * + * @generated from protobuf enum value: DECLARATION = 0; + */ + DECLARATION = 0, + /** + * @generated from protobuf enum value: UNVERIFIED = 1; + */ + UNVERIFIED = 1 +} +/** + * Describes a field within a message. + * + * @generated from protobuf message google.protobuf.FieldDescriptorProto + */ +export interface FieldDescriptorProto { + /** + * @generated from protobuf field: optional string name = 1; + */ + name?: string; + /** + * @generated from protobuf field: optional int32 number = 3; + */ + number?: number; + /** + * @generated from protobuf field: optional google.protobuf.FieldDescriptorProto.Label label = 4; + */ + label?: FieldDescriptorProto_Label; + /** + * If type_name is set, this need not be set. If both this and type_name + * are set, this must be one of TYPE_ENUM, TYPE_MESSAGE or TYPE_GROUP. + * + * @generated from protobuf field: optional google.protobuf.FieldDescriptorProto.Type type = 5; + */ + type?: FieldDescriptorProto_Type; + /** + * For message and enum types, this is the name of the type. If the name + * starts with a '.', it is fully-qualified. Otherwise, C++-like scoping + * rules are used to find the type (i.e. first the nested types within this + * message are searched, then within the parent, on up to the root + * namespace). + * + * @generated from protobuf field: optional string type_name = 6; + */ + type_name?: string; + /** + * For extensions, this is the name of the type being extended. It is + * resolved in the same manner as type_name. + * + * @generated from protobuf field: optional string extendee = 2; + */ + extendee?: string; + /** + * For numeric types, contains the original text representation of the value. + * For booleans, "true" or "false". + * For strings, contains the default text contents (not escaped in any way). + * For bytes, contains the C escaped value. All bytes >= 128 are escaped. + * + * @generated from protobuf field: optional string default_value = 7; + */ + default_value?: string; + /** + * If set, gives the index of a oneof in the containing type's oneof_decl + * list. This field is a member of that oneof. + * + * @generated from protobuf field: optional int32 oneof_index = 9; + */ + oneof_index?: number; + /** + * JSON name of this field. The value is set by protocol compiler. If the + * user has set a "json_name" option on this field, that option's value + * will be used. Otherwise, it's deduced from the field's name by converting + * it to camelCase. + * + * @generated from protobuf field: optional string json_name = 10; + */ + json_name?: string; + /** + * @generated from protobuf field: optional google.protobuf.FieldOptions options = 8; + */ + options?: FieldOptions; + /** + * If true, this is a proto3 "optional". When a proto3 field is optional, it + * tracks presence regardless of field type. + * + * When proto3_optional is true, this field must be belong to a oneof to + * signal to old proto3 clients that presence is tracked for this field. This + * oneof is known as a "synthetic" oneof, and this field must be its sole + * member (each proto3 optional field gets its own synthetic oneof). Synthetic + * oneofs exist in the descriptor only, and do not generate any API. Synthetic + * oneofs must be ordered after all "real" oneofs. + * + * For message fields, proto3_optional doesn't create any semantic change, + * since non-repeated message fields always track presence. However it still + * indicates the semantic detail of whether the user wrote "optional" or not. + * This can be useful for round-tripping the .proto file. For consistency we + * give message fields a synthetic oneof also, even though it is not required + * to track presence. This is especially important because the parser can't + * tell if a field is a message or an enum, so it must always create a + * synthetic oneof. + * + * Proto2 optional fields do not set this flag, because they already indicate + * optional with `LABEL_OPTIONAL`. + * + * @generated from protobuf field: optional bool proto3_optional = 17; + */ + proto3_optional?: boolean; +} +/** + * @generated from protobuf enum google.protobuf.FieldDescriptorProto.Type + */ +export declare enum FieldDescriptorProto_Type { + /** + * @generated synthetic value - protobuf-ts requires all enums to have a 0 value + */ + UNSPECIFIED$ = 0, + /** + * 0 is reserved for errors. + * Order is weird for historical reasons. + * + * @generated from protobuf enum value: TYPE_DOUBLE = 1; + */ + TYPE_DOUBLE = 1, + /** + * @generated from protobuf enum value: TYPE_FLOAT = 2; + */ + TYPE_FLOAT = 2, + /** + * Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT64 if + * negative values are likely. + * + * @generated from protobuf enum value: TYPE_INT64 = 3; + */ + TYPE_INT64 = 3, + /** + * @generated from protobuf enum value: TYPE_UINT64 = 4; + */ + TYPE_UINT64 = 4, + /** + * Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT32 if + * negative values are likely. + * + * @generated from protobuf enum value: TYPE_INT32 = 5; + */ + TYPE_INT32 = 5, + /** + * @generated from protobuf enum value: TYPE_FIXED64 = 6; + */ + TYPE_FIXED64 = 6, + /** + * @generated from protobuf enum value: TYPE_FIXED32 = 7; + */ + TYPE_FIXED32 = 7, + /** + * @generated from protobuf enum value: TYPE_BOOL = 8; + */ + TYPE_BOOL = 8, + /** + * @generated from protobuf enum value: TYPE_STRING = 9; + */ + TYPE_STRING = 9, + /** + * Tag-delimited aggregate. + * Group type is deprecated and not supported after google.protobuf. However, Proto3 + * implementations should still be able to parse the group wire format and + * treat group fields as unknown fields. In Editions, the group wire format + * can be enabled via the `message_encoding` feature. + * + * @generated from protobuf enum value: TYPE_GROUP = 10; + */ + TYPE_GROUP = 10, + /** + * Length-delimited aggregate. + * + * @generated from protobuf enum value: TYPE_MESSAGE = 11; + */ + TYPE_MESSAGE = 11, + /** + * New in version 2. + * + * @generated from protobuf enum value: TYPE_BYTES = 12; + */ + TYPE_BYTES = 12, + /** + * @generated from protobuf enum value: TYPE_UINT32 = 13; + */ + TYPE_UINT32 = 13, + /** + * @generated from protobuf enum value: TYPE_ENUM = 14; + */ + TYPE_ENUM = 14, + /** + * @generated from protobuf enum value: TYPE_SFIXED32 = 15; + */ + TYPE_SFIXED32 = 15, + /** + * @generated from protobuf enum value: TYPE_SFIXED64 = 16; + */ + TYPE_SFIXED64 = 16, + /** + * Uses ZigZag encoding. + * + * @generated from protobuf enum value: TYPE_SINT32 = 17; + */ + TYPE_SINT32 = 17, + /** + * Uses ZigZag encoding. + * + * @generated from protobuf enum value: TYPE_SINT64 = 18; + */ + TYPE_SINT64 = 18 +} +/** + * @generated from protobuf enum google.protobuf.FieldDescriptorProto.Label + */ +export declare enum FieldDescriptorProto_Label { + /** + * @generated synthetic value - protobuf-ts requires all enums to have a 0 value + */ + UNSPECIFIED$ = 0, + /** + * 0 is reserved for errors + * + * @generated from protobuf enum value: LABEL_OPTIONAL = 1; + */ + LABEL_OPTIONAL = 1, + /** + * @generated from protobuf enum value: LABEL_REPEATED = 3; + */ + LABEL_REPEATED = 3, + /** + * The required label is only allowed in google.protobuf. In proto3 and Editions + * it's explicitly prohibited. In Editions, the `field_presence` feature + * can be used to get this behavior. + * + * @generated from protobuf enum value: LABEL_REQUIRED = 2; + */ + LABEL_REQUIRED = 2 +} +/** + * Describes a oneof. + * + * @generated from protobuf message google.protobuf.OneofDescriptorProto + */ +export interface OneofDescriptorProto { + /** + * @generated from protobuf field: optional string name = 1; + */ + name?: string; + /** + * @generated from protobuf field: optional google.protobuf.OneofOptions options = 2; + */ + options?: OneofOptions; +} +/** + * Describes an enum type. + * + * @generated from protobuf message google.protobuf.EnumDescriptorProto + */ +export interface EnumDescriptorProto { + /** + * @generated from protobuf field: optional string name = 1; + */ + name?: string; + /** + * @generated from protobuf field: repeated google.protobuf.EnumValueDescriptorProto value = 2; + */ + value: EnumValueDescriptorProto[]; + /** + * @generated from protobuf field: optional google.protobuf.EnumOptions options = 3; + */ + options?: EnumOptions; + /** + * Range of reserved numeric values. Reserved numeric values may not be used + * by enum values in the same enum declaration. Reserved ranges may not + * overlap. + * + * @generated from protobuf field: repeated google.protobuf.EnumDescriptorProto.EnumReservedRange reserved_range = 4; + */ + reserved_range: EnumDescriptorProto_EnumReservedRange[]; + /** + * Reserved enum value names, which may not be reused. A given name may only + * be reserved once. + * + * @generated from protobuf field: repeated string reserved_name = 5; + */ + reserved_name: string[]; +} +/** + * Range of reserved numeric values. Reserved values may not be used by + * entries in the same enum. Reserved ranges may not overlap. + * + * Note that this is distinct from DescriptorProto.ReservedRange in that it + * is inclusive such that it can appropriately represent the entire int32 + * domain. + * + * @generated from protobuf message google.protobuf.EnumDescriptorProto.EnumReservedRange + */ +export interface EnumDescriptorProto_EnumReservedRange { + /** + * @generated from protobuf field: optional int32 start = 1; + */ + start?: number; + /** + * @generated from protobuf field: optional int32 end = 2; + */ + end?: number; +} +/** + * Describes a value within an enum. + * + * @generated from protobuf message google.protobuf.EnumValueDescriptorProto + */ +export interface EnumValueDescriptorProto { + /** + * @generated from protobuf field: optional string name = 1; + */ + name?: string; + /** + * @generated from protobuf field: optional int32 number = 2; + */ + number?: number; + /** + * @generated from protobuf field: optional google.protobuf.EnumValueOptions options = 3; + */ + options?: EnumValueOptions; +} +/** + * Describes a service. + * + * @generated from protobuf message google.protobuf.ServiceDescriptorProto + */ +export interface ServiceDescriptorProto { + /** + * @generated from protobuf field: optional string name = 1; + */ + name?: string; + /** + * @generated from protobuf field: repeated google.protobuf.MethodDescriptorProto method = 2; + */ + method: MethodDescriptorProto[]; + /** + * @generated from protobuf field: optional google.protobuf.ServiceOptions options = 3; + */ + options?: ServiceOptions; +} +/** + * Describes a method of a service. + * + * @generated from protobuf message google.protobuf.MethodDescriptorProto + */ +export interface MethodDescriptorProto { + /** + * @generated from protobuf field: optional string name = 1; + */ + name?: string; + /** + * Input and output type names. These are resolved in the same way as + * FieldDescriptorProto.type_name, but must refer to a message type. + * + * @generated from protobuf field: optional string input_type = 2; + */ + input_type?: string; + /** + * @generated from protobuf field: optional string output_type = 3; + */ + output_type?: string; + /** + * @generated from protobuf field: optional google.protobuf.MethodOptions options = 4; + */ + options?: MethodOptions; + /** + * Identifies if client streams multiple client messages + * + * @generated from protobuf field: optional bool client_streaming = 5; + */ + client_streaming?: boolean; + /** + * Identifies if server streams multiple server messages + * + * @generated from protobuf field: optional bool server_streaming = 6; + */ + server_streaming?: boolean; +} +/** + * @generated from protobuf message google.protobuf.FileOptions + */ +export interface FileOptions { + /** + * Sets the Java package where classes generated from this .proto will be + * placed. By default, the proto package is used, but this is often + * inappropriate because proto packages do not normally start with backwards + * domain names. + * + * @generated from protobuf field: optional string java_package = 1; + */ + java_package?: string; + /** + * Controls the name of the wrapper Java class generated for the .proto file. + * That class will always contain the .proto file's getDescriptor() method as + * well as any top-level extensions defined in the .proto file. + * If java_multiple_files is disabled, then all the other classes from the + * .proto file will be nested inside the single wrapper outer class. + * + * @generated from protobuf field: optional string java_outer_classname = 8; + */ + java_outer_classname?: string; + /** + * If enabled, then the Java code generator will generate a separate .java + * file for each top-level message, enum, and service defined in the .proto + * file. Thus, these types will *not* be nested inside the wrapper class + * named by java_outer_classname. However, the wrapper class will still be + * generated to contain the file's getDescriptor() method as well as any + * top-level extensions defined in the file. + * + * @generated from protobuf field: optional bool java_multiple_files = 10; + */ + java_multiple_files?: boolean; + /** + * This option does nothing. + * + * @deprecated + * @generated from protobuf field: optional bool java_generate_equals_and_hash = 20 [deprecated = true]; + */ + java_generate_equals_and_hash?: boolean; + /** + * If set true, then the Java2 code generator will generate code that + * throws an exception whenever an attempt is made to assign a non-UTF-8 + * byte sequence to a string field. + * Message reflection will do the same. + * However, an extension field still accepts non-UTF-8 byte sequences. + * This option has no effect on when used with the lite runtime. + * + * @generated from protobuf field: optional bool java_string_check_utf8 = 27; + */ + java_string_check_utf8?: boolean; + /** + * @generated from protobuf field: optional google.protobuf.FileOptions.OptimizeMode optimize_for = 9; + */ + optimize_for?: FileOptions_OptimizeMode; + /** + * Sets the Go package where structs generated from this .proto will be + * placed. If omitted, the Go package will be derived from the following: + * - The basename of the package import path, if provided. + * - Otherwise, the package statement in the .proto file, if present. + * - Otherwise, the basename of the .proto file, without extension. + * + * @generated from protobuf field: optional string go_package = 11; + */ + go_package?: string; + /** + * Should generic services be generated in each language? "Generic" services + * are not specific to any particular RPC system. They are generated by the + * main code generators in each language (without additional plugins). + * Generic services were the only kind of service generation supported by + * early versions of google.protobuf. + * + * Generic services are now considered deprecated in favor of using plugins + * that generate code specific to your particular RPC system. Therefore, + * these default to false. Old code which depends on generic services should + * explicitly set them to true. + * + * @generated from protobuf field: optional bool cc_generic_services = 16; + */ + cc_generic_services?: boolean; + /** + * @generated from protobuf field: optional bool java_generic_services = 17; + */ + java_generic_services?: boolean; + /** + * @generated from protobuf field: optional bool py_generic_services = 18; + */ + py_generic_services?: boolean; + /** + * @generated from protobuf field: optional bool php_generic_services = 42; + */ + php_generic_services?: boolean; + /** + * Is this file deprecated? + * Depending on the target platform, this can emit Deprecated annotations + * for everything in the file, or it will be completely ignored; in the very + * least, this is a formalization for deprecating files. + * + * @generated from protobuf field: optional bool deprecated = 23; + */ + deprecated?: boolean; + /** + * Enables the use of arenas for the proto messages in this file. This applies + * only to generated classes for C++. + * + * @generated from protobuf field: optional bool cc_enable_arenas = 31; + */ + cc_enable_arenas?: boolean; + /** + * Sets the objective c class prefix which is prepended to all objective c + * generated classes from this .proto. There is no default. + * + * @generated from protobuf field: optional string objc_class_prefix = 36; + */ + objc_class_prefix?: string; + /** + * Namespace for generated classes; defaults to the package. + * + * @generated from protobuf field: optional string csharp_namespace = 37; + */ + csharp_namespace?: string; + /** + * By default Swift generators will take the proto package and CamelCase it + * replacing '.' with underscore and use that to prefix the types/symbols + * defined. When this options is provided, they will use this value instead + * to prefix the types/symbols defined. + * + * @generated from protobuf field: optional string swift_prefix = 39; + */ + swift_prefix?: string; + /** + * Sets the php class prefix which is prepended to all php generated classes + * from this .proto. Default is empty. + * + * @generated from protobuf field: optional string php_class_prefix = 40; + */ + php_class_prefix?: string; + /** + * Use this option to change the namespace of php generated classes. Default + * is empty. When this option is empty, the package name will be used for + * determining the namespace. + * + * @generated from protobuf field: optional string php_namespace = 41; + */ + php_namespace?: string; + /** + * Use this option to change the namespace of php generated metadata classes. + * Default is empty. When this option is empty, the proto file name will be + * used for determining the namespace. + * + * @generated from protobuf field: optional string php_metadata_namespace = 44; + */ + php_metadata_namespace?: string; + /** + * Use this option to change the package of ruby generated classes. Default + * is empty. When this option is not set, the package name will be used for + * determining the ruby package. + * + * @generated from protobuf field: optional string ruby_package = 45; + */ + ruby_package?: string; + /** + * Any features defined in the specific edition. + * + * @generated from protobuf field: optional google.protobuf.FeatureSet features = 50; + */ + features?: FeatureSet; + /** + * The parser stores options it doesn't recognize here. + * See the documentation for the "Options" section above. + * + * @generated from protobuf field: repeated google.protobuf.UninterpretedOption uninterpreted_option = 999; + */ + uninterpreted_option: UninterpretedOption[]; +} +/** + * Generated classes can be optimized for speed or code size. + * + * @generated from protobuf enum google.protobuf.FileOptions.OptimizeMode + */ +export declare enum FileOptions_OptimizeMode { + /** + * @generated synthetic value - protobuf-ts requires all enums to have a 0 value + */ + UNSPECIFIED$ = 0, + /** + * Generate complete code for parsing, serialization, + * + * @generated from protobuf enum value: SPEED = 1; + */ + SPEED = 1, + /** + * etc. + * + * Use ReflectionOps to implement these methods. + * + * @generated from protobuf enum value: CODE_SIZE = 2; + */ + CODE_SIZE = 2, + /** + * Generate code using MessageLite and the lite runtime. + * + * @generated from protobuf enum value: LITE_RUNTIME = 3; + */ + LITE_RUNTIME = 3 +} +/** + * @generated from protobuf message google.protobuf.MessageOptions + */ +export interface MessageOptions { + /** + * Set true to use the old proto1 MessageSet wire format for extensions. + * This is provided for backwards-compatibility with the MessageSet wire + * format. You should not use this for any other reason: It's less + * efficient, has fewer features, and is more complicated. + * + * The message must be defined exactly as follows: + * message Foo { + * option message_set_wire_format = true; + * extensions 4 to max; + * } + * Note that the message cannot have any defined fields; MessageSets only + * have extensions. + * + * All extensions of your type must be singular messages; e.g. they cannot + * be int32s, enums, or repeated messages. + * + * Because this is an option, the above two restrictions are not enforced by + * the protocol compiler. + * + * @generated from protobuf field: optional bool message_set_wire_format = 1; + */ + message_set_wire_format?: boolean; + /** + * Disables the generation of the standard "descriptor()" accessor, which can + * conflict with a field of the same name. This is meant to make migration + * from proto1 easier; new code should avoid fields named "descriptor". + * + * @generated from protobuf field: optional bool no_standard_descriptor_accessor = 2; + */ + no_standard_descriptor_accessor?: boolean; + /** + * Is this message deprecated? + * Depending on the target platform, this can emit Deprecated annotations + * for the message, or it will be completely ignored; in the very least, + * this is a formalization for deprecating messages. + * + * @generated from protobuf field: optional bool deprecated = 3; + */ + deprecated?: boolean; + /** + * NOTE: Do not set the option in .proto files. Always use the maps syntax + * instead. The option should only be implicitly set by the proto compiler + * parser. + * + * Whether the message is an automatically generated map entry type for the + * maps field. + * + * For maps fields: + * map map_field = 1; + * The parsed descriptor looks like: + * message MapFieldEntry { + * option map_entry = true; + * optional KeyType key = 1; + * optional ValueType value = 2; + * } + * repeated MapFieldEntry map_field = 1; + * + * Implementations may choose not to generate the map_entry=true message, but + * use a native map in the target language to hold the keys and values. + * The reflection APIs in such implementations still need to work as + * if the field is a repeated message field. + * + * @generated from protobuf field: optional bool map_entry = 7; + */ + map_entry?: boolean; + /** + * Enable the legacy handling of JSON field name conflicts. This lowercases + * and strips underscored from the fields before comparison in proto3 only. + * The new behavior takes `json_name` into account and applies to proto2 as + * well. + * + * This should only be used as a temporary measure against broken builds due + * to the change in behavior for JSON field name conflicts. + * + * TODO This is legacy behavior we plan to remove once downstream + * teams have had time to migrate. + * + * @deprecated + * @generated from protobuf field: optional bool deprecated_legacy_json_field_conflicts = 11 [deprecated = true]; + */ + deprecated_legacy_json_field_conflicts?: boolean; + /** + * Any features defined in the specific edition. + * + * @generated from protobuf field: optional google.protobuf.FeatureSet features = 12; + */ + features?: FeatureSet; + /** + * The parser stores options it doesn't recognize here. See above. + * + * @generated from protobuf field: repeated google.protobuf.UninterpretedOption uninterpreted_option = 999; + */ + uninterpreted_option: UninterpretedOption[]; +} +/** + * @generated from protobuf message google.protobuf.FieldOptions + */ +export interface FieldOptions { + /** + * The ctype option instructs the C++ code generator to use a different + * representation of the field than it normally would. See the specific + * options below. This option is only implemented to support use of + * [ctype=CORD] and [ctype=STRING] (the default) on non-repeated fields of + * type "bytes" in the open source release -- sorry, we'll try to include + * other types in a future version! + * + * @generated from protobuf field: optional google.protobuf.FieldOptions.CType ctype = 1; + */ + ctype?: FieldOptions_CType; + /** + * The packed option can be enabled for repeated primitive fields to enable + * a more efficient representation on the wire. Rather than repeatedly + * writing the tag and type for each element, the entire array is encoded as + * a single length-delimited blob. In proto3, only explicit setting it to + * false will avoid using packed encoding. This option is prohibited in + * Editions, but the `repeated_field_encoding` feature can be used to control + * the behavior. + * + * @generated from protobuf field: optional bool packed = 2; + */ + packed?: boolean; + /** + * The jstype option determines the JavaScript type used for values of the + * field. The option is permitted only for 64 bit integral and fixed types + * (int64, uint64, sint64, fixed64, sfixed64). A field with jstype JS_STRING + * is represented as JavaScript string, which avoids loss of precision that + * can happen when a large value is converted to a floating point JavaScript. + * Specifying JS_NUMBER for the jstype causes the generated JavaScript code to + * use the JavaScript "number" type. The behavior of the default option + * JS_NORMAL is implementation dependent. + * + * This option is an enum to permit additional types to be added, e.g. + * goog.math.Integer. + * + * @generated from protobuf field: optional google.protobuf.FieldOptions.JSType jstype = 6; + */ + jstype?: FieldOptions_JSType; + /** + * Should this field be parsed lazily? Lazy applies only to message-type + * fields. It means that when the outer message is initially parsed, the + * inner message's contents will not be parsed but instead stored in encoded + * form. The inner message will actually be parsed when it is first accessed. + * + * This is only a hint. Implementations are free to choose whether to use + * eager or lazy parsing regardless of the value of this option. However, + * setting this option true suggests that the protocol author believes that + * using lazy parsing on this field is worth the additional bookkeeping + * overhead typically needed to implement it. + * + * This option does not affect the public interface of any generated code; + * all method signatures remain the same. Furthermore, thread-safety of the + * interface is not affected by this option; const methods remain safe to + * call from multiple threads concurrently, while non-const methods continue + * to require exclusive access. + * + * Note that implementations may choose not to check required fields within + * a lazy sub-message. That is, calling IsInitialized() on the outer message + * may return true even if the inner message has missing required fields. + * This is necessary because otherwise the inner message would have to be + * parsed in order to perform the check, defeating the purpose of lazy + * parsing. An implementation which chooses not to check required fields + * must be consistent about it. That is, for any particular sub-message, the + * implementation must either *always* check its required fields, or *never* + * check its required fields, regardless of whether or not the message has + * been parsed. + * + * As of May 2022, lazy verifies the contents of the byte stream during + * parsing. An invalid byte stream will cause the overall parsing to fail. + * + * @generated from protobuf field: optional bool lazy = 5; + */ + lazy?: boolean; + /** + * unverified_lazy does no correctness checks on the byte stream. This should + * only be used where lazy with verification is prohibitive for performance + * reasons. + * + * @generated from protobuf field: optional bool unverified_lazy = 15; + */ + unverified_lazy?: boolean; + /** + * Is this field deprecated? + * Depending on the target platform, this can emit Deprecated annotations + * for accessors, or it will be completely ignored; in the very least, this + * is a formalization for deprecating fields. + * + * @generated from protobuf field: optional bool deprecated = 3; + */ + deprecated?: boolean; + /** + * For Google-internal migration only. Do not use. + * + * @generated from protobuf field: optional bool weak = 10; + */ + weak?: boolean; + /** + * Indicate that the field value should not be printed out when using debug + * formats, e.g. when the field contains sensitive credentials. + * + * @generated from protobuf field: optional bool debug_redact = 16; + */ + debug_redact?: boolean; + /** + * @generated from protobuf field: optional google.protobuf.FieldOptions.OptionRetention retention = 17; + */ + retention?: FieldOptions_OptionRetention; + /** + * @generated from protobuf field: repeated google.protobuf.FieldOptions.OptionTargetType targets = 19; + */ + targets: FieldOptions_OptionTargetType[]; + /** + * @generated from protobuf field: repeated google.protobuf.FieldOptions.EditionDefault edition_defaults = 20; + */ + edition_defaults: FieldOptions_EditionDefault[]; + /** + * Any features defined in the specific edition. + * + * @generated from protobuf field: optional google.protobuf.FeatureSet features = 21; + */ + features?: FeatureSet; + /** + * The parser stores options it doesn't recognize here. See above. + * + * @generated from protobuf field: repeated google.protobuf.UninterpretedOption uninterpreted_option = 999; + */ + uninterpreted_option: UninterpretedOption[]; +} +/** + * @generated from protobuf message google.protobuf.FieldOptions.EditionDefault + */ +export interface FieldOptions_EditionDefault { + /** + * @generated from protobuf field: optional google.protobuf.Edition edition = 3; + */ + edition?: Edition; + /** + * @generated from protobuf field: optional string value = 2; + */ + value?: string; +} +/** + * @generated from protobuf enum google.protobuf.FieldOptions.CType + */ +export declare enum FieldOptions_CType { + /** + * Default mode. + * + * @generated from protobuf enum value: STRING = 0; + */ + STRING = 0, + /** + * The option [ctype=CORD] may be applied to a non-repeated field of type + * "bytes". It indicates that in C++, the data should be stored in a Cord + * instead of a string. For very large strings, this may reduce memory + * fragmentation. It may also allow better performance when parsing from a + * Cord, or when parsing with aliasing enabled, as the parsed Cord may then + * alias the original buffer. + * + * @generated from protobuf enum value: CORD = 1; + */ + CORD = 1, + /** + * @generated from protobuf enum value: STRING_PIECE = 2; + */ + STRING_PIECE = 2 +} +/** + * @generated from protobuf enum google.protobuf.FieldOptions.JSType + */ +export declare enum FieldOptions_JSType { + /** + * Use the default type. + * + * @generated from protobuf enum value: JS_NORMAL = 0; + */ + JS_NORMAL = 0, + /** + * Use JavaScript strings. + * + * @generated from protobuf enum value: JS_STRING = 1; + */ + JS_STRING = 1, + /** + * Use JavaScript numbers. + * + * @generated from protobuf enum value: JS_NUMBER = 2; + */ + JS_NUMBER = 2 +} +/** + * If set to RETENTION_SOURCE, the option will be omitted from the binary. + * Note: as of January 2023, support for this is in progress and does not yet + * have an effect (b/264593489). + * + * @generated from protobuf enum google.protobuf.FieldOptions.OptionRetention + */ +export declare enum FieldOptions_OptionRetention { + /** + * @generated from protobuf enum value: RETENTION_UNKNOWN = 0; + */ + RETENTION_UNKNOWN = 0, + /** + * @generated from protobuf enum value: RETENTION_RUNTIME = 1; + */ + RETENTION_RUNTIME = 1, + /** + * @generated from protobuf enum value: RETENTION_SOURCE = 2; + */ + RETENTION_SOURCE = 2 +} +/** + * This indicates the types of entities that the field may apply to when used + * as an option. If it is unset, then the field may be freely used as an + * option on any kind of entity. Note: as of January 2023, support for this is + * in progress and does not yet have an effect (b/264593489). + * + * @generated from protobuf enum google.protobuf.FieldOptions.OptionTargetType + */ +export declare enum FieldOptions_OptionTargetType { + /** + * @generated from protobuf enum value: TARGET_TYPE_UNKNOWN = 0; + */ + TARGET_TYPE_UNKNOWN = 0, + /** + * @generated from protobuf enum value: TARGET_TYPE_FILE = 1; + */ + TARGET_TYPE_FILE = 1, + /** + * @generated from protobuf enum value: TARGET_TYPE_EXTENSION_RANGE = 2; + */ + TARGET_TYPE_EXTENSION_RANGE = 2, + /** + * @generated from protobuf enum value: TARGET_TYPE_MESSAGE = 3; + */ + TARGET_TYPE_MESSAGE = 3, + /** + * @generated from protobuf enum value: TARGET_TYPE_FIELD = 4; + */ + TARGET_TYPE_FIELD = 4, + /** + * @generated from protobuf enum value: TARGET_TYPE_ONEOF = 5; + */ + TARGET_TYPE_ONEOF = 5, + /** + * @generated from protobuf enum value: TARGET_TYPE_ENUM = 6; + */ + TARGET_TYPE_ENUM = 6, + /** + * @generated from protobuf enum value: TARGET_TYPE_ENUM_ENTRY = 7; + */ + TARGET_TYPE_ENUM_ENTRY = 7, + /** + * @generated from protobuf enum value: TARGET_TYPE_SERVICE = 8; + */ + TARGET_TYPE_SERVICE = 8, + /** + * @generated from protobuf enum value: TARGET_TYPE_METHOD = 9; + */ + TARGET_TYPE_METHOD = 9 +} +/** + * @generated from protobuf message google.protobuf.OneofOptions + */ +export interface OneofOptions { + /** + * Any features defined in the specific edition. + * + * @generated from protobuf field: optional google.protobuf.FeatureSet features = 1; + */ + features?: FeatureSet; + /** + * The parser stores options it doesn't recognize here. See above. + * + * @generated from protobuf field: repeated google.protobuf.UninterpretedOption uninterpreted_option = 999; + */ + uninterpreted_option: UninterpretedOption[]; +} +/** + * @generated from protobuf message google.protobuf.EnumOptions + */ +export interface EnumOptions { + /** + * Set this option to true to allow mapping different tag names to the same + * value. + * + * @generated from protobuf field: optional bool allow_alias = 2; + */ + allow_alias?: boolean; + /** + * Is this enum deprecated? + * Depending on the target platform, this can emit Deprecated annotations + * for the enum, or it will be completely ignored; in the very least, this + * is a formalization for deprecating enums. + * + * @generated from protobuf field: optional bool deprecated = 3; + */ + deprecated?: boolean; + /** + * Enable the legacy handling of JSON field name conflicts. This lowercases + * and strips underscored from the fields before comparison in proto3 only. + * The new behavior takes `json_name` into account and applies to proto2 as + * well. + * TODO Remove this legacy behavior once downstream teams have + * had time to migrate. + * + * @deprecated + * @generated from protobuf field: optional bool deprecated_legacy_json_field_conflicts = 6 [deprecated = true]; + */ + deprecated_legacy_json_field_conflicts?: boolean; + /** + * Any features defined in the specific edition. + * + * @generated from protobuf field: optional google.protobuf.FeatureSet features = 7; + */ + features?: FeatureSet; + /** + * The parser stores options it doesn't recognize here. See above. + * + * @generated from protobuf field: repeated google.protobuf.UninterpretedOption uninterpreted_option = 999; + */ + uninterpreted_option: UninterpretedOption[]; +} +/** + * @generated from protobuf message google.protobuf.EnumValueOptions + */ +export interface EnumValueOptions { + /** + * Is this enum value deprecated? + * Depending on the target platform, this can emit Deprecated annotations + * for the enum value, or it will be completely ignored; in the very least, + * this is a formalization for deprecating enum values. + * + * @generated from protobuf field: optional bool deprecated = 1; + */ + deprecated?: boolean; + /** + * Any features defined in the specific edition. + * + * @generated from protobuf field: optional google.protobuf.FeatureSet features = 2; + */ + features?: FeatureSet; + /** + * Indicate that fields annotated with this enum value should not be printed + * out when using debug formats, e.g. when the field contains sensitive + * credentials. + * + * @generated from protobuf field: optional bool debug_redact = 3; + */ + debug_redact?: boolean; + /** + * The parser stores options it doesn't recognize here. See above. + * + * @generated from protobuf field: repeated google.protobuf.UninterpretedOption uninterpreted_option = 999; + */ + uninterpreted_option: UninterpretedOption[]; +} +/** + * @generated from protobuf message google.protobuf.ServiceOptions + */ +export interface ServiceOptions { + /** + * Any features defined in the specific edition. + * + * @generated from protobuf field: optional google.protobuf.FeatureSet features = 34; + */ + features?: FeatureSet; + /** + * Is this service deprecated? + * Depending on the target platform, this can emit Deprecated annotations + * for the service, or it will be completely ignored; in the very least, + * this is a formalization for deprecating services. + * + * @generated from protobuf field: optional bool deprecated = 33; + */ + deprecated?: boolean; + /** + * The parser stores options it doesn't recognize here. See above. + * + * @generated from protobuf field: repeated google.protobuf.UninterpretedOption uninterpreted_option = 999; + */ + uninterpreted_option: UninterpretedOption[]; +} +/** + * @generated from protobuf message google.protobuf.MethodOptions + */ +export interface MethodOptions { + /** + * Is this method deprecated? + * Depending on the target platform, this can emit Deprecated annotations + * for the method, or it will be completely ignored; in the very least, + * this is a formalization for deprecating methods. + * + * @generated from protobuf field: optional bool deprecated = 33; + */ + deprecated?: boolean; + /** + * @generated from protobuf field: optional google.protobuf.MethodOptions.IdempotencyLevel idempotency_level = 34; + */ + idempotency_level?: MethodOptions_IdempotencyLevel; + /** + * Any features defined in the specific edition. + * + * @generated from protobuf field: optional google.protobuf.FeatureSet features = 35; + */ + features?: FeatureSet; + /** + * The parser stores options it doesn't recognize here. See above. + * + * @generated from protobuf field: repeated google.protobuf.UninterpretedOption uninterpreted_option = 999; + */ + uninterpreted_option: UninterpretedOption[]; +} +/** + * Is this method side-effect-free (or safe in HTTP parlance), or idempotent, + * or neither? HTTP based RPC implementation may choose GET verb for safe + * methods, and PUT verb for idempotent methods instead of the default POST. + * + * @generated from protobuf enum google.protobuf.MethodOptions.IdempotencyLevel + */ +export declare enum MethodOptions_IdempotencyLevel { + /** + * @generated from protobuf enum value: IDEMPOTENCY_UNKNOWN = 0; + */ + IDEMPOTENCY_UNKNOWN = 0, + /** + * implies idempotent + * + * @generated from protobuf enum value: NO_SIDE_EFFECTS = 1; + */ + NO_SIDE_EFFECTS = 1, + /** + * idempotent, but may have side effects + * + * @generated from protobuf enum value: IDEMPOTENT = 2; + */ + IDEMPOTENT = 2 +} +/** + * A message representing a option the parser does not recognize. This only + * appears in options protos created by the compiler::Parser class. + * DescriptorPool resolves these when building Descriptor objects. Therefore, + * options protos in descriptor objects (e.g. returned by Descriptor::options(), + * or produced by Descriptor::CopyTo()) will never have UninterpretedOptions + * in them. + * + * @generated from protobuf message google.protobuf.UninterpretedOption + */ +export interface UninterpretedOption { + /** + * @generated from protobuf field: repeated google.protobuf.UninterpretedOption.NamePart name = 2; + */ + name: UninterpretedOption_NamePart[]; + /** + * The value of the uninterpreted option, in whatever type the tokenizer + * identified it as during parsing. Exactly one of these should be set. + * + * @generated from protobuf field: optional string identifier_value = 3; + */ + identifier_value?: string; + /** + * @generated from protobuf field: optional uint64 positive_int_value = 4; + */ + positive_int_value?: bigint; + /** + * @generated from protobuf field: optional int64 negative_int_value = 5; + */ + negative_int_value?: bigint; + /** + * @generated from protobuf field: optional double double_value = 6; + */ + double_value?: number; + /** + * @generated from protobuf field: optional bytes string_value = 7; + */ + string_value?: Uint8Array; + /** + * @generated from protobuf field: optional string aggregate_value = 8; + */ + aggregate_value?: string; +} +/** + * The name of the uninterpreted option. Each string represents a segment in + * a dot-separated name. is_extension is true iff a segment represents an + * extension (denoted with parentheses in options specs in .proto files). + * E.g.,{ ["foo", false], ["bar.baz", true], ["moo", false] } represents + * "foo.(bar.baz).moo". + * + * @generated from protobuf message google.protobuf.UninterpretedOption.NamePart + */ +export interface UninterpretedOption_NamePart { + /** + * @generated from protobuf field: string name_part = 1; + */ + name_part: string; + /** + * @generated from protobuf field: bool is_extension = 2; + */ + is_extension: boolean; +} +/** + * TODO Enums in C++ gencode (and potentially other languages) are + * not well scoped. This means that each of the feature enums below can clash + * with each other. The short names we've chosen maximize call-site + * readability, but leave us very open to this scenario. A future feature will + * be designed and implemented to handle this, hopefully before we ever hit a + * conflict here. + * + * @generated from protobuf message google.protobuf.FeatureSet + */ +export interface FeatureSet { + /** + * @generated from protobuf field: optional google.protobuf.FeatureSet.FieldPresence field_presence = 1; + */ + field_presence?: FeatureSet_FieldPresence; + /** + * @generated from protobuf field: optional google.protobuf.FeatureSet.EnumType enum_type = 2; + */ + enum_type?: FeatureSet_EnumType; + /** + * @generated from protobuf field: optional google.protobuf.FeatureSet.RepeatedFieldEncoding repeated_field_encoding = 3; + */ + repeated_field_encoding?: FeatureSet_RepeatedFieldEncoding; + /** + * @generated from protobuf field: optional google.protobuf.FeatureSet.Utf8Validation utf8_validation = 4; + */ + utf8_validation?: FeatureSet_Utf8Validation; + /** + * @generated from protobuf field: optional google.protobuf.FeatureSet.MessageEncoding message_encoding = 5; + */ + message_encoding?: FeatureSet_MessageEncoding; + /** + * @generated from protobuf field: optional google.protobuf.FeatureSet.JsonFormat json_format = 6; + */ + json_format?: FeatureSet_JsonFormat; +} +/** + * @generated from protobuf enum google.protobuf.FeatureSet.FieldPresence + */ +export declare enum FeatureSet_FieldPresence { + /** + * @generated from protobuf enum value: FIELD_PRESENCE_UNKNOWN = 0; + */ + FIELD_PRESENCE_UNKNOWN = 0, + /** + * @generated from protobuf enum value: EXPLICIT = 1; + */ + EXPLICIT = 1, + /** + * @generated from protobuf enum value: IMPLICIT = 2; + */ + IMPLICIT = 2, + /** + * @generated from protobuf enum value: LEGACY_REQUIRED = 3; + */ + LEGACY_REQUIRED = 3 +} +/** + * @generated from protobuf enum google.protobuf.FeatureSet.EnumType + */ +export declare enum FeatureSet_EnumType { + /** + * @generated from protobuf enum value: ENUM_TYPE_UNKNOWN = 0; + */ + ENUM_TYPE_UNKNOWN = 0, + /** + * @generated from protobuf enum value: OPEN = 1; + */ + OPEN = 1, + /** + * @generated from protobuf enum value: CLOSED = 2; + */ + CLOSED = 2 +} +/** + * @generated from protobuf enum google.protobuf.FeatureSet.RepeatedFieldEncoding + */ +export declare enum FeatureSet_RepeatedFieldEncoding { + /** + * @generated from protobuf enum value: REPEATED_FIELD_ENCODING_UNKNOWN = 0; + */ + REPEATED_FIELD_ENCODING_UNKNOWN = 0, + /** + * @generated from protobuf enum value: PACKED = 1; + */ + PACKED = 1, + /** + * @generated from protobuf enum value: EXPANDED = 2; + */ + EXPANDED = 2 +} +/** + * @generated from protobuf enum google.protobuf.FeatureSet.Utf8Validation + */ +export declare enum FeatureSet_Utf8Validation { + /** + * @generated from protobuf enum value: UTF8_VALIDATION_UNKNOWN = 0; + */ + UTF8_VALIDATION_UNKNOWN = 0, + /** + * @generated from protobuf enum value: NONE = 1; + */ + NONE = 1, + /** + * @generated from protobuf enum value: VERIFY = 2; + */ + VERIFY = 2 +} +/** + * @generated from protobuf enum google.protobuf.FeatureSet.MessageEncoding + */ +export declare enum FeatureSet_MessageEncoding { + /** + * @generated from protobuf enum value: MESSAGE_ENCODING_UNKNOWN = 0; + */ + MESSAGE_ENCODING_UNKNOWN = 0, + /** + * @generated from protobuf enum value: LENGTH_PREFIXED = 1; + */ + LENGTH_PREFIXED = 1, + /** + * @generated from protobuf enum value: DELIMITED = 2; + */ + DELIMITED = 2 +} +/** + * @generated from protobuf enum google.protobuf.FeatureSet.JsonFormat + */ +export declare enum FeatureSet_JsonFormat { + /** + * @generated from protobuf enum value: JSON_FORMAT_UNKNOWN = 0; + */ + JSON_FORMAT_UNKNOWN = 0, + /** + * @generated from protobuf enum value: ALLOW = 1; + */ + ALLOW = 1, + /** + * @generated from protobuf enum value: LEGACY_BEST_EFFORT = 2; + */ + LEGACY_BEST_EFFORT = 2 +} +/** + * A compiled specification for the defaults of a set of features. These + * messages are generated from FeatureSet extensions and can be used to seed + * feature resolution. The resolution with this object becomes a simple search + * for the closest matching edition, followed by proto merges. + * + * @generated from protobuf message google.protobuf.FeatureSetDefaults + */ +export interface FeatureSetDefaults { + /** + * @generated from protobuf field: repeated google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault defaults = 1; + */ + defaults: FeatureSetDefaults_FeatureSetEditionDefault[]; + /** + * The minimum supported edition (inclusive) when this was constructed. + * Editions before this will not have defaults. + * + * @generated from protobuf field: optional google.protobuf.Edition minimum_edition = 4; + */ + minimum_edition?: Edition; + /** + * The maximum known edition (inclusive) when this was constructed. Editions + * after this will not have reliable defaults. + * + * @generated from protobuf field: optional google.protobuf.Edition maximum_edition = 5; + */ + maximum_edition?: Edition; +} +/** + * A map from every known edition with a unique set of defaults to its + * defaults. Not all editions may be contained here. For a given edition, + * the defaults at the closest matching edition ordered at or before it should + * be used. This field must be in strict ascending order by edition. + * + * @generated from protobuf message google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + */ +export interface FeatureSetDefaults_FeatureSetEditionDefault { + /** + * @generated from protobuf field: optional google.protobuf.Edition edition = 3; + */ + edition?: Edition; + /** + * @generated from protobuf field: optional google.protobuf.FeatureSet features = 2; + */ + features?: FeatureSet; +} +/** + * Encapsulates information about the original source file from which a + * FileDescriptorProto was generated. + * + * @generated from protobuf message google.protobuf.SourceCodeInfo + */ +export interface SourceCodeInfo { + /** + * A Location identifies a piece of source code in a .proto file which + * corresponds to a particular definition. This information is intended + * to be useful to IDEs, code indexers, documentation generators, and similar + * tools. + * + * For example, say we have a file like: + * message Foo { + * optional string foo = 1; + * } + * Let's look at just the field definition: + * optional string foo = 1; + * ^ ^^ ^^ ^ ^^^ + * a bc de f ghi + * We have the following locations: + * span path represents + * [a,i) [ 4, 0, 2, 0 ] The whole field definition. + * [a,b) [ 4, 0, 2, 0, 4 ] The label (optional). + * [c,d) [ 4, 0, 2, 0, 5 ] The type (string). + * [e,f) [ 4, 0, 2, 0, 1 ] The name (foo). + * [g,h) [ 4, 0, 2, 0, 3 ] The number (1). + * + * Notes: + * - A location may refer to a repeated field itself (i.e. not to any + * particular index within it). This is used whenever a set of elements are + * logically enclosed in a single code segment. For example, an entire + * extend block (possibly containing multiple extension definitions) will + * have an outer location whose path refers to the "extensions" repeated + * field without an index. + * - Multiple locations may have the same path. This happens when a single + * logical declaration is spread out across multiple places. The most + * obvious example is the "extend" block again -- there may be multiple + * extend blocks in the same scope, each of which will have the same path. + * - A location's span is not always a subset of its parent's span. For + * example, the "extendee" of an extension declaration appears at the + * beginning of the "extend" block and is shared by all extensions within + * the block. + * - Just because a location's span is a subset of some other location's span + * does not mean that it is a descendant. For example, a "group" defines + * both a type and a field in a single declaration. Thus, the locations + * corresponding to the type and field and their components will overlap. + * - Code which tries to interpret locations should probably be designed to + * ignore those that it doesn't understand, as more types of locations could + * be recorded in the future. + * + * @generated from protobuf field: repeated google.protobuf.SourceCodeInfo.Location location = 1; + */ + location: SourceCodeInfo_Location[]; +} +/** + * @generated from protobuf message google.protobuf.SourceCodeInfo.Location + */ +export interface SourceCodeInfo_Location { + /** + * Identifies which part of the FileDescriptorProto was defined at this + * location. + * + * Each element is a field number or an index. They form a path from + * the root FileDescriptorProto to the place where the definition occurs. + * For example, this path: + * [ 4, 3, 2, 7, 1 ] + * refers to: + * file.message_type(3) // 4, 3 + * .field(7) // 2, 7 + * .name() // 1 + * This is because FileDescriptorProto.message_type has field number 4: + * repeated DescriptorProto message_type = 4; + * and DescriptorProto.field has field number 2: + * repeated FieldDescriptorProto field = 2; + * and FieldDescriptorProto.name has field number 1: + * optional string name = 1; + * + * Thus, the above path gives the location of a field name. If we removed + * the last element: + * [ 4, 3, 2, 7 ] + * this path refers to the whole field declaration (from the beginning + * of the label to the terminating semicolon). + * + * @generated from protobuf field: repeated int32 path = 1 [packed = true]; + */ + path: number[]; + /** + * Always has exactly three or four elements: start line, start column, + * end line (optional, otherwise assumed same as start line), end column. + * These are packed into a single field for efficiency. Note that line + * and column numbers are zero-based -- typically you will want to add + * 1 to each before displaying to a user. + * + * @generated from protobuf field: repeated int32 span = 2 [packed = true]; + */ + span: number[]; + /** + * If this SourceCodeInfo represents a complete declaration, these are any + * comments appearing before and after the declaration which appear to be + * attached to the declaration. + * + * A series of line comments appearing on consecutive lines, with no other + * tokens appearing on those lines, will be treated as a single comment. + * + * leading_detached_comments will keep paragraphs of comments that appear + * before (but not connected to) the current element. Each paragraph, + * separated by empty lines, will be one comment element in the repeated + * field. + * + * Only the comment content is provided; comment markers (e.g. //) are + * stripped out. For block comments, leading whitespace and an asterisk + * will be stripped from the beginning of each line other than the first. + * Newlines are included in the output. + * + * Examples: + * + * optional int32 foo = 1; // Comment attached to foo. + * // Comment attached to bar. + * optional int32 bar = 2; + * + * optional string baz = 3; + * // Comment attached to baz. + * // Another line attached to baz. + * + * // Comment attached to moo. + * // + * // Another line attached to moo. + * optional double moo = 4; + * + * // Detached comment for corge. This is not leading or trailing comments + * // to moo or corge because there are blank lines separating it from + * // both. + * + * // Detached comment for corge paragraph 2. + * + * optional string corge = 5; + * /* Block comment attached + * * to corge. Leading asterisks + * * will be removed. *\/ + * /* Block comment attached to + * * grault. *\/ + * optional int32 grault = 6; + * + * // ignored detached comments. + * + * @generated from protobuf field: optional string leading_comments = 3; + */ + leading_comments?: string; + /** + * @generated from protobuf field: optional string trailing_comments = 4; + */ + trailing_comments?: string; + /** + * @generated from protobuf field: repeated string leading_detached_comments = 6; + */ + leading_detached_comments: string[]; +} +/** + * Describes the relationship between generated code and its original source + * file. A GeneratedCodeInfo message is associated with only one generated + * source file, but may contain references to different source .proto files. + * + * @generated from protobuf message google.protobuf.GeneratedCodeInfo + */ +export interface GeneratedCodeInfo { + /** + * An Annotation connects some span of text in generated code to an element + * of its generating .proto file. + * + * @generated from protobuf field: repeated google.protobuf.GeneratedCodeInfo.Annotation annotation = 1; + */ + annotation: GeneratedCodeInfo_Annotation[]; +} +/** + * @generated from protobuf message google.protobuf.GeneratedCodeInfo.Annotation + */ +export interface GeneratedCodeInfo_Annotation { + /** + * Identifies the element in the original source .proto file. This field + * is formatted the same as SourceCodeInfo.Location.path. + * + * @generated from protobuf field: repeated int32 path = 1 [packed = true]; + */ + path: number[]; + /** + * Identifies the filesystem path to the original source .proto. + * + * @generated from protobuf field: optional string source_file = 2; + */ + source_file?: string; + /** + * Identifies the starting offset in bytes in the generated code + * that relates to the identified object. + * + * @generated from protobuf field: optional int32 begin = 3; + */ + begin?: number; + /** + * Identifies the ending offset in bytes in the generated code that + * relates to the identified object. The end offset should be one past + * the last relevant byte (so the length of the text = end - begin). + * + * @generated from protobuf field: optional int32 end = 4; + */ + end?: number; + /** + * @generated from protobuf field: optional google.protobuf.GeneratedCodeInfo.Annotation.Semantic semantic = 5; + */ + semantic?: GeneratedCodeInfo_Annotation_Semantic; +} +/** + * Represents the identified object's effect on the element in the original + * .proto file. + * + * @generated from protobuf enum google.protobuf.GeneratedCodeInfo.Annotation.Semantic + */ +export declare enum GeneratedCodeInfo_Annotation_Semantic { + /** + * There is no effect or the effect is indescribable. + * + * @generated from protobuf enum value: NONE = 0; + */ + NONE = 0, + /** + * The element is set or otherwise mutated. + * + * @generated from protobuf enum value: SET = 1; + */ + SET = 1, + /** + * An alias to the element is returned. + * + * @generated from protobuf enum value: ALIAS = 2; + */ + ALIAS = 2 +} +/** + * The full set of known editions. + * + * @generated from protobuf enum google.protobuf.Edition + */ +export declare enum Edition { + /** + * A placeholder for an unknown edition value. + * + * @generated from protobuf enum value: EDITION_UNKNOWN = 0; + */ + EDITION_UNKNOWN = 0, + /** + * Legacy syntax "editions". These pre-date editions, but behave much like + * distinct editions. These can't be used to specify the edition of proto + * files, but feature definitions must supply proto2/proto3 defaults for + * backwards compatibility. + * + * @generated from protobuf enum value: EDITION_PROTO2 = 998; + */ + EDITION_PROTO2 = 998, + /** + * @generated from protobuf enum value: EDITION_PROTO3 = 999; + */ + EDITION_PROTO3 = 999, + /** + * Editions that have been released. The specific values are arbitrary and + * should not be depended on, but they will always be time-ordered for easy + * comparison. + * + * @generated from protobuf enum value: EDITION_2023 = 1000; + */ + EDITION_2023 = 1000, + /** + * Placeholder editions for testing feature resolution. These should not be + * used or relyed on outside of tests. + * + * @generated from protobuf enum value: EDITION_1_TEST_ONLY = 1; + */ + EDITION_1_TEST_ONLY = 1, + /** + * @generated from protobuf enum value: EDITION_2_TEST_ONLY = 2; + */ + EDITION_2_TEST_ONLY = 2, + /** + * @generated from protobuf enum value: EDITION_99997_TEST_ONLY = 99997; + */ + EDITION_99997_TEST_ONLY = 99997, + /** + * @generated from protobuf enum value: EDITION_99998_TEST_ONLY = 99998; + */ + EDITION_99998_TEST_ONLY = 99998, + /** + * @generated from protobuf enum value: EDITION_99999_TEST_ONLY = 99999; + */ + EDITION_99999_TEST_ONLY = 99999 +} +declare class FileDescriptorSet$Type extends MessageType { + constructor(); + create(value?: PartialMessage): FileDescriptorSet; + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: FileDescriptorSet): FileDescriptorSet; + internalBinaryWrite(message: FileDescriptorSet, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter; +} +/** + * @generated MessageType for protobuf message google.protobuf.FileDescriptorSet + */ +export declare const FileDescriptorSet: FileDescriptorSet$Type; +declare class FileDescriptorProto$Type extends MessageType { + constructor(); + create(value?: PartialMessage): FileDescriptorProto; + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: FileDescriptorProto): FileDescriptorProto; + internalBinaryWrite(message: FileDescriptorProto, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter; +} +/** + * @generated MessageType for protobuf message google.protobuf.FileDescriptorProto + */ +export declare const FileDescriptorProto: FileDescriptorProto$Type; +declare class DescriptorProto$Type extends MessageType { + constructor(); + create(value?: PartialMessage): DescriptorProto; + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: DescriptorProto): DescriptorProto; + internalBinaryWrite(message: DescriptorProto, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter; +} +/** + * @generated MessageType for protobuf message google.protobuf.DescriptorProto + */ +export declare const DescriptorProto: DescriptorProto$Type; +declare class DescriptorProto_ExtensionRange$Type extends MessageType { + constructor(); + create(value?: PartialMessage): DescriptorProto_ExtensionRange; + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: DescriptorProto_ExtensionRange): DescriptorProto_ExtensionRange; + internalBinaryWrite(message: DescriptorProto_ExtensionRange, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter; +} +/** + * @generated MessageType for protobuf message google.protobuf.DescriptorProto.ExtensionRange + */ +export declare const DescriptorProto_ExtensionRange: DescriptorProto_ExtensionRange$Type; +declare class DescriptorProto_ReservedRange$Type extends MessageType { + constructor(); + create(value?: PartialMessage): DescriptorProto_ReservedRange; + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: DescriptorProto_ReservedRange): DescriptorProto_ReservedRange; + internalBinaryWrite(message: DescriptorProto_ReservedRange, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter; +} +/** + * @generated MessageType for protobuf message google.protobuf.DescriptorProto.ReservedRange + */ +export declare const DescriptorProto_ReservedRange: DescriptorProto_ReservedRange$Type; +declare class ExtensionRangeOptions$Type extends MessageType { + constructor(); + create(value?: PartialMessage): ExtensionRangeOptions; + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ExtensionRangeOptions): ExtensionRangeOptions; + internalBinaryWrite(message: ExtensionRangeOptions, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter; +} +/** + * @generated MessageType for protobuf message google.protobuf.ExtensionRangeOptions + */ +export declare const ExtensionRangeOptions: ExtensionRangeOptions$Type; +declare class ExtensionRangeOptions_Declaration$Type extends MessageType { + constructor(); + create(value?: PartialMessage): ExtensionRangeOptions_Declaration; + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ExtensionRangeOptions_Declaration): ExtensionRangeOptions_Declaration; + internalBinaryWrite(message: ExtensionRangeOptions_Declaration, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter; +} +/** + * @generated MessageType for protobuf message google.protobuf.ExtensionRangeOptions.Declaration + */ +export declare const ExtensionRangeOptions_Declaration: ExtensionRangeOptions_Declaration$Type; +declare class FieldDescriptorProto$Type extends MessageType { + constructor(); + create(value?: PartialMessage): FieldDescriptorProto; + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: FieldDescriptorProto): FieldDescriptorProto; + internalBinaryWrite(message: FieldDescriptorProto, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter; +} +/** + * @generated MessageType for protobuf message google.protobuf.FieldDescriptorProto + */ +export declare const FieldDescriptorProto: FieldDescriptorProto$Type; +declare class OneofDescriptorProto$Type extends MessageType { + constructor(); + create(value?: PartialMessage): OneofDescriptorProto; + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: OneofDescriptorProto): OneofDescriptorProto; + internalBinaryWrite(message: OneofDescriptorProto, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter; +} +/** + * @generated MessageType for protobuf message google.protobuf.OneofDescriptorProto + */ +export declare const OneofDescriptorProto: OneofDescriptorProto$Type; +declare class EnumDescriptorProto$Type extends MessageType { + constructor(); + create(value?: PartialMessage): EnumDescriptorProto; + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: EnumDescriptorProto): EnumDescriptorProto; + internalBinaryWrite(message: EnumDescriptorProto, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter; +} +/** + * @generated MessageType for protobuf message google.protobuf.EnumDescriptorProto + */ +export declare const EnumDescriptorProto: EnumDescriptorProto$Type; +declare class EnumDescriptorProto_EnumReservedRange$Type extends MessageType { + constructor(); + create(value?: PartialMessage): EnumDescriptorProto_EnumReservedRange; + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: EnumDescriptorProto_EnumReservedRange): EnumDescriptorProto_EnumReservedRange; + internalBinaryWrite(message: EnumDescriptorProto_EnumReservedRange, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter; +} +/** + * @generated MessageType for protobuf message google.protobuf.EnumDescriptorProto.EnumReservedRange + */ +export declare const EnumDescriptorProto_EnumReservedRange: EnumDescriptorProto_EnumReservedRange$Type; +declare class EnumValueDescriptorProto$Type extends MessageType { + constructor(); + create(value?: PartialMessage): EnumValueDescriptorProto; + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: EnumValueDescriptorProto): EnumValueDescriptorProto; + internalBinaryWrite(message: EnumValueDescriptorProto, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter; +} +/** + * @generated MessageType for protobuf message google.protobuf.EnumValueDescriptorProto + */ +export declare const EnumValueDescriptorProto: EnumValueDescriptorProto$Type; +declare class ServiceDescriptorProto$Type extends MessageType { + constructor(); + create(value?: PartialMessage): ServiceDescriptorProto; + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ServiceDescriptorProto): ServiceDescriptorProto; + internalBinaryWrite(message: ServiceDescriptorProto, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter; +} +/** + * @generated MessageType for protobuf message google.protobuf.ServiceDescriptorProto + */ +export declare const ServiceDescriptorProto: ServiceDescriptorProto$Type; +declare class MethodDescriptorProto$Type extends MessageType { + constructor(); + create(value?: PartialMessage): MethodDescriptorProto; + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: MethodDescriptorProto): MethodDescriptorProto; + internalBinaryWrite(message: MethodDescriptorProto, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter; +} +/** + * @generated MessageType for protobuf message google.protobuf.MethodDescriptorProto + */ +export declare const MethodDescriptorProto: MethodDescriptorProto$Type; +declare class FileOptions$Type extends MessageType { + constructor(); + create(value?: PartialMessage): FileOptions; + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: FileOptions): FileOptions; + internalBinaryWrite(message: FileOptions, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter; +} +/** + * @generated MessageType for protobuf message google.protobuf.FileOptions + */ +export declare const FileOptions: FileOptions$Type; +declare class MessageOptions$Type extends MessageType { + constructor(); + create(value?: PartialMessage): MessageOptions; + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: MessageOptions): MessageOptions; + internalBinaryWrite(message: MessageOptions, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter; +} +/** + * @generated MessageType for protobuf message google.protobuf.MessageOptions + */ +export declare const MessageOptions: MessageOptions$Type; +declare class FieldOptions$Type extends MessageType { + constructor(); + create(value?: PartialMessage): FieldOptions; + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: FieldOptions): FieldOptions; + internalBinaryWrite(message: FieldOptions, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter; +} +/** + * @generated MessageType for protobuf message google.protobuf.FieldOptions + */ +export declare const FieldOptions: FieldOptions$Type; +declare class FieldOptions_EditionDefault$Type extends MessageType { + constructor(); + create(value?: PartialMessage): FieldOptions_EditionDefault; + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: FieldOptions_EditionDefault): FieldOptions_EditionDefault; + internalBinaryWrite(message: FieldOptions_EditionDefault, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter; +} +/** + * @generated MessageType for protobuf message google.protobuf.FieldOptions.EditionDefault + */ +export declare const FieldOptions_EditionDefault: FieldOptions_EditionDefault$Type; +declare class OneofOptions$Type extends MessageType { + constructor(); + create(value?: PartialMessage): OneofOptions; + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: OneofOptions): OneofOptions; + internalBinaryWrite(message: OneofOptions, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter; +} +/** + * @generated MessageType for protobuf message google.protobuf.OneofOptions + */ +export declare const OneofOptions: OneofOptions$Type; +declare class EnumOptions$Type extends MessageType { + constructor(); + create(value?: PartialMessage): EnumOptions; + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: EnumOptions): EnumOptions; + internalBinaryWrite(message: EnumOptions, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter; +} +/** + * @generated MessageType for protobuf message google.protobuf.EnumOptions + */ +export declare const EnumOptions: EnumOptions$Type; +declare class EnumValueOptions$Type extends MessageType { + constructor(); + create(value?: PartialMessage): EnumValueOptions; + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: EnumValueOptions): EnumValueOptions; + internalBinaryWrite(message: EnumValueOptions, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter; +} +/** + * @generated MessageType for protobuf message google.protobuf.EnumValueOptions + */ +export declare const EnumValueOptions: EnumValueOptions$Type; +declare class ServiceOptions$Type extends MessageType { + constructor(); + create(value?: PartialMessage): ServiceOptions; + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ServiceOptions): ServiceOptions; + internalBinaryWrite(message: ServiceOptions, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter; +} +/** + * @generated MessageType for protobuf message google.protobuf.ServiceOptions + */ +export declare const ServiceOptions: ServiceOptions$Type; +declare class MethodOptions$Type extends MessageType { + constructor(); + create(value?: PartialMessage): MethodOptions; + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: MethodOptions): MethodOptions; + internalBinaryWrite(message: MethodOptions, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter; +} +/** + * @generated MessageType for protobuf message google.protobuf.MethodOptions + */ +export declare const MethodOptions: MethodOptions$Type; +declare class UninterpretedOption$Type extends MessageType { + constructor(); + create(value?: PartialMessage): UninterpretedOption; + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: UninterpretedOption): UninterpretedOption; + internalBinaryWrite(message: UninterpretedOption, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter; +} +/** + * @generated MessageType for protobuf message google.protobuf.UninterpretedOption + */ +export declare const UninterpretedOption: UninterpretedOption$Type; +declare class UninterpretedOption_NamePart$Type extends MessageType { + constructor(); + create(value?: PartialMessage): UninterpretedOption_NamePart; + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: UninterpretedOption_NamePart): UninterpretedOption_NamePart; + internalBinaryWrite(message: UninterpretedOption_NamePart, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter; +} +/** + * @generated MessageType for protobuf message google.protobuf.UninterpretedOption.NamePart + */ +export declare const UninterpretedOption_NamePart: UninterpretedOption_NamePart$Type; +declare class FeatureSet$Type extends MessageType { + constructor(); + create(value?: PartialMessage): FeatureSet; + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: FeatureSet): FeatureSet; + internalBinaryWrite(message: FeatureSet, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter; +} +/** + * @generated MessageType for protobuf message google.protobuf.FeatureSet + */ +export declare const FeatureSet: FeatureSet$Type; +declare class FeatureSetDefaults$Type extends MessageType { + constructor(); + create(value?: PartialMessage): FeatureSetDefaults; + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: FeatureSetDefaults): FeatureSetDefaults; + internalBinaryWrite(message: FeatureSetDefaults, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter; +} +/** + * @generated MessageType for protobuf message google.protobuf.FeatureSetDefaults + */ +export declare const FeatureSetDefaults: FeatureSetDefaults$Type; +declare class FeatureSetDefaults_FeatureSetEditionDefault$Type extends MessageType { + constructor(); + create(value?: PartialMessage): FeatureSetDefaults_FeatureSetEditionDefault; + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: FeatureSetDefaults_FeatureSetEditionDefault): FeatureSetDefaults_FeatureSetEditionDefault; + internalBinaryWrite(message: FeatureSetDefaults_FeatureSetEditionDefault, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter; +} +/** + * @generated MessageType for protobuf message google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + */ +export declare const FeatureSetDefaults_FeatureSetEditionDefault: FeatureSetDefaults_FeatureSetEditionDefault$Type; +declare class SourceCodeInfo$Type extends MessageType { + constructor(); + create(value?: PartialMessage): SourceCodeInfo; + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: SourceCodeInfo): SourceCodeInfo; + internalBinaryWrite(message: SourceCodeInfo, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter; +} +/** + * @generated MessageType for protobuf message google.protobuf.SourceCodeInfo + */ +export declare const SourceCodeInfo: SourceCodeInfo$Type; +declare class SourceCodeInfo_Location$Type extends MessageType { + constructor(); + create(value?: PartialMessage): SourceCodeInfo_Location; + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: SourceCodeInfo_Location): SourceCodeInfo_Location; + internalBinaryWrite(message: SourceCodeInfo_Location, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter; +} +/** + * @generated MessageType for protobuf message google.protobuf.SourceCodeInfo.Location + */ +export declare const SourceCodeInfo_Location: SourceCodeInfo_Location$Type; +declare class GeneratedCodeInfo$Type extends MessageType { + constructor(); + create(value?: PartialMessage): GeneratedCodeInfo; + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: GeneratedCodeInfo): GeneratedCodeInfo; + internalBinaryWrite(message: GeneratedCodeInfo, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter; +} +/** + * @generated MessageType for protobuf message google.protobuf.GeneratedCodeInfo + */ +export declare const GeneratedCodeInfo: GeneratedCodeInfo$Type; +declare class GeneratedCodeInfo_Annotation$Type extends MessageType { + constructor(); + create(value?: PartialMessage): GeneratedCodeInfo_Annotation; + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: GeneratedCodeInfo_Annotation): GeneratedCodeInfo_Annotation; + internalBinaryWrite(message: GeneratedCodeInfo_Annotation, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter; +} +/** + * @generated MessageType for protobuf message google.protobuf.GeneratedCodeInfo.Annotation + */ +export declare const GeneratedCodeInfo_Annotation: GeneratedCodeInfo_Annotation$Type; +export {}; diff --git a/src/google/protobuf/descriptor_pb.ts b/src/google/protobuf/descriptor_pb.js similarity index 50% rename from src/google/protobuf/descriptor_pb.ts rename to src/google/protobuf/descriptor_pb.js index 2192514..fd855be 100644 --- a/src/google/protobuf/descriptor_pb.ts +++ b/src/google/protobuf/descriptor_pb.js @@ -1,4 +1,5 @@ -// @generated by protobuf-ts 2.9.3 with parameter add_pb_suffix,client_grpc1,generate_dependencies,keep_enum_prefix,ts_nocheck,use_proto_field_name +/* eslint-disable */ +// @generated by protobuf-ts 2.9.3 with parameter add_pb_suffix,client_grpc1,generate_dependencies,keep_enum_prefix,ts_nocheck,use_proto_field_name,output_javascript,output_legacy_commonjs,eslint_disable // @generated from protobuf file "google/protobuf/descriptor.proto" (package "google.protobuf", syntax proto2) // tslint:disable // @ts-nocheck @@ -42,433 +43,85 @@ // A valid .proto file can be translated directly to a FileDescriptorProto // without any other information (e.g. without reading its imports). // -import type { BinaryWriteOptions } from "@protobuf-ts/runtime"; -import type { IBinaryWriter } from "@protobuf-ts/runtime"; -import { WireType } from "@protobuf-ts/runtime"; -import type { BinaryReadOptions } from "@protobuf-ts/runtime"; -import type { IBinaryReader } from "@protobuf-ts/runtime"; -import { UnknownFieldHandler } from "@protobuf-ts/runtime"; -import type { PartialMessage } from "@protobuf-ts/runtime"; -import { reflectionMergePartial } from "@protobuf-ts/runtime"; -import { MessageType } from "@protobuf-ts/runtime"; -/** - * The protocol compiler can output a FileDescriptorSet containing the .proto - * files it parses. - * - * @generated from protobuf message google.protobuf.FileDescriptorSet - */ -export interface FileDescriptorSet { - /** - * @generated from protobuf field: repeated google.protobuf.FileDescriptorProto file = 1; - */ - file: FileDescriptorProto[]; -} -/** - * Describes a complete .proto file. - * - * @generated from protobuf message google.protobuf.FileDescriptorProto - */ -export interface FileDescriptorProto { - /** - * @generated from protobuf field: optional string name = 1; - */ - name?: string; // file name, relative to root of source tree - /** - * @generated from protobuf field: optional string package = 2; - */ - package?: string; // e.g. "foo", "foo.bar", etc. - /** - * Names of files imported by this file. - * - * @generated from protobuf field: repeated string dependency = 3; - */ - dependency: string[]; - /** - * Indexes of the public imported files in the dependency list above. - * - * @generated from protobuf field: repeated int32 public_dependency = 10; - */ - public_dependency: number[]; - /** - * Indexes of the weak imported files in the dependency list. - * For Google-internal migration only. Do not use. - * - * @generated from protobuf field: repeated int32 weak_dependency = 11; - */ - weak_dependency: number[]; - /** - * All top-level definitions in this file. - * - * @generated from protobuf field: repeated google.protobuf.DescriptorProto message_type = 4; - */ - message_type: DescriptorProto[]; - /** - * @generated from protobuf field: repeated google.protobuf.EnumDescriptorProto enum_type = 5; - */ - enum_type: EnumDescriptorProto[]; - /** - * @generated from protobuf field: repeated google.protobuf.ServiceDescriptorProto service = 6; - */ - service: ServiceDescriptorProto[]; - /** - * @generated from protobuf field: repeated google.protobuf.FieldDescriptorProto extension = 7; - */ - extension: FieldDescriptorProto[]; - /** - * @generated from protobuf field: optional google.protobuf.FileOptions options = 8; - */ - options?: FileOptions; - /** - * This field contains optional information about the original source code. - * You may safely remove this entire field without harming runtime - * functionality of the descriptors -- the information is needed only by - * development tools. - * - * @generated from protobuf field: optional google.protobuf.SourceCodeInfo source_code_info = 9; - */ - source_code_info?: SourceCodeInfo; - /** - * The syntax of the proto file. - * The supported values are "proto2", "proto3", and "editions". - * - * If `edition` is present, this value must be "editions". - * - * @generated from protobuf field: optional string syntax = 12; - */ - syntax?: string; - /** - * The edition of the proto file. - * - * @generated from protobuf field: optional google.protobuf.Edition edition = 14; - */ - edition?: Edition; -} -/** - * Describes a message type. - * - * @generated from protobuf message google.protobuf.DescriptorProto - */ -export interface DescriptorProto { - /** - * @generated from protobuf field: optional string name = 1; - */ - name?: string; - /** - * @generated from protobuf field: repeated google.protobuf.FieldDescriptorProto field = 2; - */ - field: FieldDescriptorProto[]; - /** - * @generated from protobuf field: repeated google.protobuf.FieldDescriptorProto extension = 6; - */ - extension: FieldDescriptorProto[]; - /** - * @generated from protobuf field: repeated google.protobuf.DescriptorProto nested_type = 3; - */ - nested_type: DescriptorProto[]; - /** - * @generated from protobuf field: repeated google.protobuf.EnumDescriptorProto enum_type = 4; - */ - enum_type: EnumDescriptorProto[]; - /** - * @generated from protobuf field: repeated google.protobuf.DescriptorProto.ExtensionRange extension_range = 5; - */ - extension_range: DescriptorProto_ExtensionRange[]; - /** - * @generated from protobuf field: repeated google.protobuf.OneofDescriptorProto oneof_decl = 8; - */ - oneof_decl: OneofDescriptorProto[]; - /** - * @generated from protobuf field: optional google.protobuf.MessageOptions options = 7; - */ - options?: MessageOptions; - /** - * @generated from protobuf field: repeated google.protobuf.DescriptorProto.ReservedRange reserved_range = 9; - */ - reserved_range: DescriptorProto_ReservedRange[]; - /** - * Reserved field names, which may not be used by fields in the same message. - * A given name may only be reserved once. - * - * @generated from protobuf field: repeated string reserved_name = 10; - */ - reserved_name: string[]; -} -/** - * @generated from protobuf message google.protobuf.DescriptorProto.ExtensionRange - */ -export interface DescriptorProto_ExtensionRange { - /** - * @generated from protobuf field: optional int32 start = 1; - */ - start?: number; // Inclusive. - /** - * @generated from protobuf field: optional int32 end = 2; - */ - end?: number; // Exclusive. - /** - * @generated from protobuf field: optional google.protobuf.ExtensionRangeOptions options = 3; - */ - options?: ExtensionRangeOptions; -} -/** - * Range of reserved tag numbers. Reserved tag numbers may not be used by - * fields or extension ranges in the same message. Reserved ranges may - * not overlap. - * - * @generated from protobuf message google.protobuf.DescriptorProto.ReservedRange - */ -export interface DescriptorProto_ReservedRange { - /** - * @generated from protobuf field: optional int32 start = 1; - */ - start?: number; // Inclusive. - /** - * @generated from protobuf field: optional int32 end = 2; - */ - end?: number; // Exclusive. -} -/** - * @generated from protobuf message google.protobuf.ExtensionRangeOptions - */ -export interface ExtensionRangeOptions { - /** - * The parser stores options it doesn't recognize here. See above. - * - * @generated from protobuf field: repeated google.protobuf.UninterpretedOption uninterpreted_option = 999; - */ - uninterpreted_option: UninterpretedOption[]; - /** - * For external users: DO NOT USE. We are in the process of open sourcing - * extension declaration and executing internal cleanups before it can be - * used externally. - * - * @generated from protobuf field: repeated google.protobuf.ExtensionRangeOptions.Declaration declaration = 2; - */ - declaration: ExtensionRangeOptions_Declaration[]; - /** - * Any features defined in the specific edition. - * - * @generated from protobuf field: optional google.protobuf.FeatureSet features = 50; - */ - features?: FeatureSet; - /** - * The verification state of the range. - * TODO: flip the default to DECLARATION once all empty ranges - * are marked as UNVERIFIED. - * - * @generated from protobuf field: optional google.protobuf.ExtensionRangeOptions.VerificationState verification = 3; - */ - verification?: ExtensionRangeOptions_VerificationState; -} -/** - * @generated from protobuf message google.protobuf.ExtensionRangeOptions.Declaration - */ -export interface ExtensionRangeOptions_Declaration { - /** - * The extension number declared within the extension range. - * - * @generated from protobuf field: optional int32 number = 1; - */ - number?: number; - /** - * The fully-qualified name of the extension field. There must be a leading - * dot in front of the full name. - * - * @generated from protobuf field: optional string full_name = 2; - */ - full_name?: string; - /** - * The fully-qualified type name of the extension field. Unlike - * Metadata.type, Declaration.type must have a leading dot for messages - * and enums. - * - * @generated from protobuf field: optional string type = 3; - */ - type?: string; - /** - * If true, indicates that the number is reserved in the extension range, - * and any extension field with the number will fail to compile. Set this - * when a declared extension field is deleted. - * - * @generated from protobuf field: optional bool reserved = 5; - */ - reserved?: boolean; - /** - * If true, indicates that the extension must be defined as repeated. - * Otherwise the extension must be defined as optional. - * - * @generated from protobuf field: optional bool repeated = 6; - */ - repeated?: boolean; -} +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.GeneratedCodeInfo_Annotation = exports.GeneratedCodeInfo = exports.SourceCodeInfo_Location = exports.SourceCodeInfo = exports.FeatureSetDefaults_FeatureSetEditionDefault = exports.FeatureSetDefaults = exports.FeatureSet = exports.UninterpretedOption_NamePart = exports.UninterpretedOption = exports.MethodOptions = exports.ServiceOptions = exports.EnumValueOptions = exports.EnumOptions = exports.OneofOptions = exports.FieldOptions_EditionDefault = exports.FieldOptions = exports.MessageOptions = exports.FileOptions = exports.MethodDescriptorProto = exports.ServiceDescriptorProto = exports.EnumValueDescriptorProto = exports.EnumDescriptorProto_EnumReservedRange = exports.EnumDescriptorProto = exports.OneofDescriptorProto = exports.FieldDescriptorProto = exports.ExtensionRangeOptions_Declaration = exports.ExtensionRangeOptions = exports.DescriptorProto_ReservedRange = exports.DescriptorProto_ExtensionRange = exports.DescriptorProto = exports.FileDescriptorProto = exports.FileDescriptorSet = exports.Edition = exports.GeneratedCodeInfo_Annotation_Semantic = exports.FeatureSet_JsonFormat = exports.FeatureSet_MessageEncoding = exports.FeatureSet_Utf8Validation = exports.FeatureSet_RepeatedFieldEncoding = exports.FeatureSet_EnumType = exports.FeatureSet_FieldPresence = exports.MethodOptions_IdempotencyLevel = exports.FieldOptions_OptionTargetType = exports.FieldOptions_OptionRetention = exports.FieldOptions_JSType = exports.FieldOptions_CType = exports.FileOptions_OptimizeMode = exports.FieldDescriptorProto_Label = exports.FieldDescriptorProto_Type = exports.ExtensionRangeOptions_VerificationState = void 0; +const runtime_1 = require("@protobuf-ts/runtime"); +const runtime_2 = require("@protobuf-ts/runtime"); +const runtime_3 = require("@protobuf-ts/runtime"); +const runtime_4 = require("@protobuf-ts/runtime"); /** * The verification state of the extension range. * * @generated from protobuf enum google.protobuf.ExtensionRangeOptions.VerificationState */ -export enum ExtensionRangeOptions_VerificationState { +var ExtensionRangeOptions_VerificationState; +(function (ExtensionRangeOptions_VerificationState) { /** * All the extensions of the range must be declared. * * @generated from protobuf enum value: DECLARATION = 0; */ - DECLARATION = 0, + ExtensionRangeOptions_VerificationState[ExtensionRangeOptions_VerificationState["DECLARATION"] = 0] = "DECLARATION"; /** * @generated from protobuf enum value: UNVERIFIED = 1; */ - UNVERIFIED = 1 -} -/** - * Describes a field within a message. - * - * @generated from protobuf message google.protobuf.FieldDescriptorProto - */ -export interface FieldDescriptorProto { - /** - * @generated from protobuf field: optional string name = 1; - */ - name?: string; - /** - * @generated from protobuf field: optional int32 number = 3; - */ - number?: number; - /** - * @generated from protobuf field: optional google.protobuf.FieldDescriptorProto.Label label = 4; - */ - label?: FieldDescriptorProto_Label; - /** - * If type_name is set, this need not be set. If both this and type_name - * are set, this must be one of TYPE_ENUM, TYPE_MESSAGE or TYPE_GROUP. - * - * @generated from protobuf field: optional google.protobuf.FieldDescriptorProto.Type type = 5; - */ - type?: FieldDescriptorProto_Type; - /** - * For message and enum types, this is the name of the type. If the name - * starts with a '.', it is fully-qualified. Otherwise, C++-like scoping - * rules are used to find the type (i.e. first the nested types within this - * message are searched, then within the parent, on up to the root - * namespace). - * - * @generated from protobuf field: optional string type_name = 6; - */ - type_name?: string; - /** - * For extensions, this is the name of the type being extended. It is - * resolved in the same manner as type_name. - * - * @generated from protobuf field: optional string extendee = 2; - */ - extendee?: string; - /** - * For numeric types, contains the original text representation of the value. - * For booleans, "true" or "false". - * For strings, contains the default text contents (not escaped in any way). - * For bytes, contains the C escaped value. All bytes >= 128 are escaped. - * - * @generated from protobuf field: optional string default_value = 7; - */ - default_value?: string; - /** - * If set, gives the index of a oneof in the containing type's oneof_decl - * list. This field is a member of that oneof. - * - * @generated from protobuf field: optional int32 oneof_index = 9; - */ - oneof_index?: number; - /** - * JSON name of this field. The value is set by protocol compiler. If the - * user has set a "json_name" option on this field, that option's value - * will be used. Otherwise, it's deduced from the field's name by converting - * it to camelCase. - * - * @generated from protobuf field: optional string json_name = 10; - */ - json_name?: string; - /** - * @generated from protobuf field: optional google.protobuf.FieldOptions options = 8; - */ - options?: FieldOptions; - /** - * If true, this is a proto3 "optional". When a proto3 field is optional, it - * tracks presence regardless of field type. - * - * When proto3_optional is true, this field must be belong to a oneof to - * signal to old proto3 clients that presence is tracked for this field. This - * oneof is known as a "synthetic" oneof, and this field must be its sole - * member (each proto3 optional field gets its own synthetic oneof). Synthetic - * oneofs exist in the descriptor only, and do not generate any API. Synthetic - * oneofs must be ordered after all "real" oneofs. - * - * For message fields, proto3_optional doesn't create any semantic change, - * since non-repeated message fields always track presence. However it still - * indicates the semantic detail of whether the user wrote "optional" or not. - * This can be useful for round-tripping the .proto file. For consistency we - * give message fields a synthetic oneof also, even though it is not required - * to track presence. This is especially important because the parser can't - * tell if a field is a message or an enum, so it must always create a - * synthetic oneof. - * - * Proto2 optional fields do not set this flag, because they already indicate - * optional with `LABEL_OPTIONAL`. - * - * @generated from protobuf field: optional bool proto3_optional = 17; - */ - proto3_optional?: boolean; -} + ExtensionRangeOptions_VerificationState[ExtensionRangeOptions_VerificationState["UNVERIFIED"] = 1] = "UNVERIFIED"; +})(ExtensionRangeOptions_VerificationState = exports.ExtensionRangeOptions_VerificationState || (exports.ExtensionRangeOptions_VerificationState = {})); /** * @generated from protobuf enum google.protobuf.FieldDescriptorProto.Type */ -export enum FieldDescriptorProto_Type { +var FieldDescriptorProto_Type; +(function (FieldDescriptorProto_Type) { /** * @generated synthetic value - protobuf-ts requires all enums to have a 0 value */ - UNSPECIFIED$ = 0, + FieldDescriptorProto_Type[FieldDescriptorProto_Type["UNSPECIFIED$"] = 0] = "UNSPECIFIED$"; /** * 0 is reserved for errors. * Order is weird for historical reasons. * * @generated from protobuf enum value: TYPE_DOUBLE = 1; */ - TYPE_DOUBLE = 1, + FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_DOUBLE"] = 1] = "TYPE_DOUBLE"; /** * @generated from protobuf enum value: TYPE_FLOAT = 2; */ - TYPE_FLOAT = 2, + FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_FLOAT"] = 2] = "TYPE_FLOAT"; /** * Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT64 if * negative values are likely. * * @generated from protobuf enum value: TYPE_INT64 = 3; */ - TYPE_INT64 = 3, + FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_INT64"] = 3] = "TYPE_INT64"; /** * @generated from protobuf enum value: TYPE_UINT64 = 4; */ - TYPE_UINT64 = 4, + FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_UINT64"] = 4] = "TYPE_UINT64"; /** * Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT32 if * negative values are likely. * * @generated from protobuf enum value: TYPE_INT32 = 5; */ - TYPE_INT32 = 5, + FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_INT32"] = 5] = "TYPE_INT32"; /** * @generated from protobuf enum value: TYPE_FIXED64 = 6; */ - TYPE_FIXED64 = 6, + FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_FIXED64"] = 6] = "TYPE_FIXED64"; /** * @generated from protobuf enum value: TYPE_FIXED32 = 7; */ - TYPE_FIXED32 = 7, + FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_FIXED32"] = 7] = "TYPE_FIXED32"; /** * @generated from protobuf enum value: TYPE_BOOL = 8; */ - TYPE_BOOL = 8, + FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_BOOL"] = 8] = "TYPE_BOOL"; /** * @generated from protobuf enum value: TYPE_STRING = 9; */ - TYPE_STRING = 9, + FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_STRING"] = 9] = "TYPE_STRING"; /** * Tag-delimited aggregate. * Group type is deprecated and not supported after google.protobuf. However, Proto3 @@ -478,714 +131,119 @@ export enum FieldDescriptorProto_Type { * * @generated from protobuf enum value: TYPE_GROUP = 10; */ - TYPE_GROUP = 10, + FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_GROUP"] = 10] = "TYPE_GROUP"; /** * Length-delimited aggregate. * * @generated from protobuf enum value: TYPE_MESSAGE = 11; */ - TYPE_MESSAGE = 11, + FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_MESSAGE"] = 11] = "TYPE_MESSAGE"; /** * New in version 2. * * @generated from protobuf enum value: TYPE_BYTES = 12; */ - TYPE_BYTES = 12, - /** - * @generated from protobuf enum value: TYPE_UINT32 = 13; - */ - TYPE_UINT32 = 13, - /** - * @generated from protobuf enum value: TYPE_ENUM = 14; - */ - TYPE_ENUM = 14, - /** - * @generated from protobuf enum value: TYPE_SFIXED32 = 15; - */ - TYPE_SFIXED32 = 15, - /** - * @generated from protobuf enum value: TYPE_SFIXED64 = 16; - */ - TYPE_SFIXED64 = 16, - /** - * Uses ZigZag encoding. - * - * @generated from protobuf enum value: TYPE_SINT32 = 17; - */ - TYPE_SINT32 = 17, - /** - * Uses ZigZag encoding. - * - * @generated from protobuf enum value: TYPE_SINT64 = 18; - */ - TYPE_SINT64 = 18 -} -/** - * @generated from protobuf enum google.protobuf.FieldDescriptorProto.Label - */ -export enum FieldDescriptorProto_Label { - /** - * @generated synthetic value - protobuf-ts requires all enums to have a 0 value - */ - UNSPECIFIED$ = 0, - /** - * 0 is reserved for errors - * - * @generated from protobuf enum value: LABEL_OPTIONAL = 1; - */ - LABEL_OPTIONAL = 1, - /** - * @generated from protobuf enum value: LABEL_REPEATED = 3; - */ - LABEL_REPEATED = 3, - /** - * The required label is only allowed in google.protobuf. In proto3 and Editions - * it's explicitly prohibited. In Editions, the `field_presence` feature - * can be used to get this behavior. - * - * @generated from protobuf enum value: LABEL_REQUIRED = 2; - */ - LABEL_REQUIRED = 2 -} -/** - * Describes a oneof. - * - * @generated from protobuf message google.protobuf.OneofDescriptorProto - */ -export interface OneofDescriptorProto { - /** - * @generated from protobuf field: optional string name = 1; - */ - name?: string; - /** - * @generated from protobuf field: optional google.protobuf.OneofOptions options = 2; - */ - options?: OneofOptions; -} -/** - * Describes an enum type. - * - * @generated from protobuf message google.protobuf.EnumDescriptorProto - */ -export interface EnumDescriptorProto { - /** - * @generated from protobuf field: optional string name = 1; - */ - name?: string; - /** - * @generated from protobuf field: repeated google.protobuf.EnumValueDescriptorProto value = 2; - */ - value: EnumValueDescriptorProto[]; - /** - * @generated from protobuf field: optional google.protobuf.EnumOptions options = 3; - */ - options?: EnumOptions; - /** - * Range of reserved numeric values. Reserved numeric values may not be used - * by enum values in the same enum declaration. Reserved ranges may not - * overlap. - * - * @generated from protobuf field: repeated google.protobuf.EnumDescriptorProto.EnumReservedRange reserved_range = 4; - */ - reserved_range: EnumDescriptorProto_EnumReservedRange[]; - /** - * Reserved enum value names, which may not be reused. A given name may only - * be reserved once. - * - * @generated from protobuf field: repeated string reserved_name = 5; - */ - reserved_name: string[]; -} -/** - * Range of reserved numeric values. Reserved values may not be used by - * entries in the same enum. Reserved ranges may not overlap. - * - * Note that this is distinct from DescriptorProto.ReservedRange in that it - * is inclusive such that it can appropriately represent the entire int32 - * domain. - * - * @generated from protobuf message google.protobuf.EnumDescriptorProto.EnumReservedRange - */ -export interface EnumDescriptorProto_EnumReservedRange { - /** - * @generated from protobuf field: optional int32 start = 1; - */ - start?: number; // Inclusive. - /** - * @generated from protobuf field: optional int32 end = 2; - */ - end?: number; // Inclusive. -} -/** - * Describes a value within an enum. - * - * @generated from protobuf message google.protobuf.EnumValueDescriptorProto - */ -export interface EnumValueDescriptorProto { - /** - * @generated from protobuf field: optional string name = 1; - */ - name?: string; - /** - * @generated from protobuf field: optional int32 number = 2; - */ - number?: number; - /** - * @generated from protobuf field: optional google.protobuf.EnumValueOptions options = 3; - */ - options?: EnumValueOptions; -} -/** - * Describes a service. - * - * @generated from protobuf message google.protobuf.ServiceDescriptorProto - */ -export interface ServiceDescriptorProto { - /** - * @generated from protobuf field: optional string name = 1; - */ - name?: string; - /** - * @generated from protobuf field: repeated google.protobuf.MethodDescriptorProto method = 2; - */ - method: MethodDescriptorProto[]; - /** - * @generated from protobuf field: optional google.protobuf.ServiceOptions options = 3; - */ - options?: ServiceOptions; -} -/** - * Describes a method of a service. - * - * @generated from protobuf message google.protobuf.MethodDescriptorProto - */ -export interface MethodDescriptorProto { - /** - * @generated from protobuf field: optional string name = 1; - */ - name?: string; - /** - * Input and output type names. These are resolved in the same way as - * FieldDescriptorProto.type_name, but must refer to a message type. - * - * @generated from protobuf field: optional string input_type = 2; - */ - input_type?: string; - /** - * @generated from protobuf field: optional string output_type = 3; - */ - output_type?: string; - /** - * @generated from protobuf field: optional google.protobuf.MethodOptions options = 4; - */ - options?: MethodOptions; - /** - * Identifies if client streams multiple client messages - * - * @generated from protobuf field: optional bool client_streaming = 5; - */ - client_streaming?: boolean; - /** - * Identifies if server streams multiple server messages - * - * @generated from protobuf field: optional bool server_streaming = 6; - */ - server_streaming?: boolean; -} -// =================================================================== -// Options - -// Each of the definitions above may have "options" attached. These are -// just annotations which may cause code to be generated slightly differently -// or may contain hints for code that manipulates protocol messages. -// -// Clients may define custom options as extensions of the *Options messages. -// These extensions may not yet be known at parsing time, so the parser cannot -// store the values in them. Instead it stores them in a field in the *Options -// message called uninterpreted_option. This field must have the same name -// across all *Options messages. We then use this field to populate the -// extensions when we build a descriptor, at which point all protos have been -// parsed and so all extensions are known. -// -// Extension numbers for custom options may be chosen as follows: -// * For options which will only be used within a single application or -// organization, or for experimental options, use field numbers 50000 -// through 99999. It is up to you to ensure that you do not use the -// same number for multiple options. -// * For options which will be published and used publicly by multiple -// independent entities, e-mail protobuf-global-extension-registry@google.com -// to reserve extension numbers. Simply provide your project name (e.g. -// Objective-C plugin) and your project website (if available) -- there's no -// need to explain how you intend to use them. Usually you only need one -// extension number. You can declare multiple options with only one extension -// number by putting them in a sub-message. See the Custom Options section of -// the docs for examples: -// https://developers.google.com/protocol-buffers/docs/proto#options -// If this turns out to be popular, a web service will be set up -// to automatically assign option numbers. - -/** - * @generated from protobuf message google.protobuf.FileOptions - */ -export interface FileOptions { - /** - * Sets the Java package where classes generated from this .proto will be - * placed. By default, the proto package is used, but this is often - * inappropriate because proto packages do not normally start with backwards - * domain names. - * - * @generated from protobuf field: optional string java_package = 1; - */ - java_package?: string; - /** - * Controls the name of the wrapper Java class generated for the .proto file. - * That class will always contain the .proto file's getDescriptor() method as - * well as any top-level extensions defined in the .proto file. - * If java_multiple_files is disabled, then all the other classes from the - * .proto file will be nested inside the single wrapper outer class. - * - * @generated from protobuf field: optional string java_outer_classname = 8; - */ - java_outer_classname?: string; - /** - * If enabled, then the Java code generator will generate a separate .java - * file for each top-level message, enum, and service defined in the .proto - * file. Thus, these types will *not* be nested inside the wrapper class - * named by java_outer_classname. However, the wrapper class will still be - * generated to contain the file's getDescriptor() method as well as any - * top-level extensions defined in the file. - * - * @generated from protobuf field: optional bool java_multiple_files = 10; - */ - java_multiple_files?: boolean; - /** - * This option does nothing. - * - * @deprecated - * @generated from protobuf field: optional bool java_generate_equals_and_hash = 20 [deprecated = true]; - */ - java_generate_equals_and_hash?: boolean; - /** - * If set true, then the Java2 code generator will generate code that - * throws an exception whenever an attempt is made to assign a non-UTF-8 - * byte sequence to a string field. - * Message reflection will do the same. - * However, an extension field still accepts non-UTF-8 byte sequences. - * This option has no effect on when used with the lite runtime. - * - * @generated from protobuf field: optional bool java_string_check_utf8 = 27; - */ - java_string_check_utf8?: boolean; - /** - * @generated from protobuf field: optional google.protobuf.FileOptions.OptimizeMode optimize_for = 9; - */ - optimize_for?: FileOptions_OptimizeMode; - /** - * Sets the Go package where structs generated from this .proto will be - * placed. If omitted, the Go package will be derived from the following: - * - The basename of the package import path, if provided. - * - Otherwise, the package statement in the .proto file, if present. - * - Otherwise, the basename of the .proto file, without extension. - * - * @generated from protobuf field: optional string go_package = 11; - */ - go_package?: string; - /** - * Should generic services be generated in each language? "Generic" services - * are not specific to any particular RPC system. They are generated by the - * main code generators in each language (without additional plugins). - * Generic services were the only kind of service generation supported by - * early versions of google.protobuf. - * - * Generic services are now considered deprecated in favor of using plugins - * that generate code specific to your particular RPC system. Therefore, - * these default to false. Old code which depends on generic services should - * explicitly set them to true. - * - * @generated from protobuf field: optional bool cc_generic_services = 16; - */ - cc_generic_services?: boolean; - /** - * @generated from protobuf field: optional bool java_generic_services = 17; - */ - java_generic_services?: boolean; - /** - * @generated from protobuf field: optional bool py_generic_services = 18; - */ - py_generic_services?: boolean; - /** - * @generated from protobuf field: optional bool php_generic_services = 42; - */ - php_generic_services?: boolean; - /** - * Is this file deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for everything in the file, or it will be completely ignored; in the very - * least, this is a formalization for deprecating files. - * - * @generated from protobuf field: optional bool deprecated = 23; - */ - deprecated?: boolean; - /** - * Enables the use of arenas for the proto messages in this file. This applies - * only to generated classes for C++. - * - * @generated from protobuf field: optional bool cc_enable_arenas = 31; - */ - cc_enable_arenas?: boolean; - /** - * Sets the objective c class prefix which is prepended to all objective c - * generated classes from this .proto. There is no default. - * - * @generated from protobuf field: optional string objc_class_prefix = 36; - */ - objc_class_prefix?: string; - /** - * Namespace for generated classes; defaults to the package. - * - * @generated from protobuf field: optional string csharp_namespace = 37; - */ - csharp_namespace?: string; - /** - * By default Swift generators will take the proto package and CamelCase it - * replacing '.' with underscore and use that to prefix the types/symbols - * defined. When this options is provided, they will use this value instead - * to prefix the types/symbols defined. - * - * @generated from protobuf field: optional string swift_prefix = 39; - */ - swift_prefix?: string; - /** - * Sets the php class prefix which is prepended to all php generated classes - * from this .proto. Default is empty. - * - * @generated from protobuf field: optional string php_class_prefix = 40; - */ - php_class_prefix?: string; - /** - * Use this option to change the namespace of php generated classes. Default - * is empty. When this option is empty, the package name will be used for - * determining the namespace. - * - * @generated from protobuf field: optional string php_namespace = 41; - */ - php_namespace?: string; - /** - * Use this option to change the namespace of php generated metadata classes. - * Default is empty. When this option is empty, the proto file name will be - * used for determining the namespace. - * - * @generated from protobuf field: optional string php_metadata_namespace = 44; - */ - php_metadata_namespace?: string; - /** - * Use this option to change the package of ruby generated classes. Default - * is empty. When this option is not set, the package name will be used for - * determining the ruby package. - * - * @generated from protobuf field: optional string ruby_package = 45; - */ - ruby_package?: string; - /** - * Any features defined in the specific edition. - * - * @generated from protobuf field: optional google.protobuf.FeatureSet features = 50; - */ - features?: FeatureSet; - /** - * The parser stores options it doesn't recognize here. - * See the documentation for the "Options" section above. - * - * @generated from protobuf field: repeated google.protobuf.UninterpretedOption uninterpreted_option = 999; - */ - uninterpreted_option: UninterpretedOption[]; -} -/** - * Generated classes can be optimized for speed or code size. - * - * @generated from protobuf enum google.protobuf.FileOptions.OptimizeMode - */ -export enum FileOptions_OptimizeMode { - /** - * @generated synthetic value - protobuf-ts requires all enums to have a 0 value - */ - UNSPECIFIED$ = 0, - /** - * Generate complete code for parsing, serialization, - * - * @generated from protobuf enum value: SPEED = 1; - */ - SPEED = 1, - /** - * etc. - * - * Use ReflectionOps to implement these methods. - * - * @generated from protobuf enum value: CODE_SIZE = 2; - */ - CODE_SIZE = 2, - /** - * Generate code using MessageLite and the lite runtime. - * - * @generated from protobuf enum value: LITE_RUNTIME = 3; - */ - LITE_RUNTIME = 3 -} -/** - * @generated from protobuf message google.protobuf.MessageOptions - */ -export interface MessageOptions { - /** - * Set true to use the old proto1 MessageSet wire format for extensions. - * This is provided for backwards-compatibility with the MessageSet wire - * format. You should not use this for any other reason: It's less - * efficient, has fewer features, and is more complicated. - * - * The message must be defined exactly as follows: - * message Foo { - * option message_set_wire_format = true; - * extensions 4 to max; - * } - * Note that the message cannot have any defined fields; MessageSets only - * have extensions. - * - * All extensions of your type must be singular messages; e.g. they cannot - * be int32s, enums, or repeated messages. - * - * Because this is an option, the above two restrictions are not enforced by - * the protocol compiler. - * - * @generated from protobuf field: optional bool message_set_wire_format = 1; - */ - message_set_wire_format?: boolean; - /** - * Disables the generation of the standard "descriptor()" accessor, which can - * conflict with a field of the same name. This is meant to make migration - * from proto1 easier; new code should avoid fields named "descriptor". - * - * @generated from protobuf field: optional bool no_standard_descriptor_accessor = 2; - */ - no_standard_descriptor_accessor?: boolean; - /** - * Is this message deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the message, or it will be completely ignored; in the very least, - * this is a formalization for deprecating messages. - * - * @generated from protobuf field: optional bool deprecated = 3; - */ - deprecated?: boolean; + FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_BYTES"] = 12] = "TYPE_BYTES"; /** - * NOTE: Do not set the option in .proto files. Always use the maps syntax - * instead. The option should only be implicitly set by the proto compiler - * parser. - * - * Whether the message is an automatically generated map entry type for the - * maps field. - * - * For maps fields: - * map map_field = 1; - * The parsed descriptor looks like: - * message MapFieldEntry { - * option map_entry = true; - * optional KeyType key = 1; - * optional ValueType value = 2; - * } - * repeated MapFieldEntry map_field = 1; - * - * Implementations may choose not to generate the map_entry=true message, but - * use a native map in the target language to hold the keys and values. - * The reflection APIs in such implementations still need to work as - * if the field is a repeated message field. - * - * @generated from protobuf field: optional bool map_entry = 7; - */ - map_entry?: boolean; - /** - * Enable the legacy handling of JSON field name conflicts. This lowercases - * and strips underscored from the fields before comparison in proto3 only. - * The new behavior takes `json_name` into account and applies to proto2 as - * well. - * - * This should only be used as a temporary measure against broken builds due - * to the change in behavior for JSON field name conflicts. - * - * TODO This is legacy behavior we plan to remove once downstream - * teams have had time to migrate. - * - * @deprecated - * @generated from protobuf field: optional bool deprecated_legacy_json_field_conflicts = 11 [deprecated = true]; - */ - deprecated_legacy_json_field_conflicts?: boolean; - /** - * Any features defined in the specific edition. - * - * @generated from protobuf field: optional google.protobuf.FeatureSet features = 12; - */ - features?: FeatureSet; - /** - * The parser stores options it doesn't recognize here. See above. - * - * @generated from protobuf field: repeated google.protobuf.UninterpretedOption uninterpreted_option = 999; - */ - uninterpreted_option: UninterpretedOption[]; -} -/** - * @generated from protobuf message google.protobuf.FieldOptions - */ -export interface FieldOptions { - /** - * The ctype option instructs the C++ code generator to use a different - * representation of the field than it normally would. See the specific - * options below. This option is only implemented to support use of - * [ctype=CORD] and [ctype=STRING] (the default) on non-repeated fields of - * type "bytes" in the open source release -- sorry, we'll try to include - * other types in a future version! - * - * @generated from protobuf field: optional google.protobuf.FieldOptions.CType ctype = 1; + * @generated from protobuf enum value: TYPE_UINT32 = 13; */ - ctype?: FieldOptions_CType; + FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_UINT32"] = 13] = "TYPE_UINT32"; /** - * The packed option can be enabled for repeated primitive fields to enable - * a more efficient representation on the wire. Rather than repeatedly - * writing the tag and type for each element, the entire array is encoded as - * a single length-delimited blob. In proto3, only explicit setting it to - * false will avoid using packed encoding. This option is prohibited in - * Editions, but the `repeated_field_encoding` feature can be used to control - * the behavior. - * - * @generated from protobuf field: optional bool packed = 2; + * @generated from protobuf enum value: TYPE_ENUM = 14; */ - packed?: boolean; + FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_ENUM"] = 14] = "TYPE_ENUM"; /** - * The jstype option determines the JavaScript type used for values of the - * field. The option is permitted only for 64 bit integral and fixed types - * (int64, uint64, sint64, fixed64, sfixed64). A field with jstype JS_STRING - * is represented as JavaScript string, which avoids loss of precision that - * can happen when a large value is converted to a floating point JavaScript. - * Specifying JS_NUMBER for the jstype causes the generated JavaScript code to - * use the JavaScript "number" type. The behavior of the default option - * JS_NORMAL is implementation dependent. - * - * This option is an enum to permit additional types to be added, e.g. - * goog.math.Integer. - * - * @generated from protobuf field: optional google.protobuf.FieldOptions.JSType jstype = 6; + * @generated from protobuf enum value: TYPE_SFIXED32 = 15; */ - jstype?: FieldOptions_JSType; + FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_SFIXED32"] = 15] = "TYPE_SFIXED32"; /** - * Should this field be parsed lazily? Lazy applies only to message-type - * fields. It means that when the outer message is initially parsed, the - * inner message's contents will not be parsed but instead stored in encoded - * form. The inner message will actually be parsed when it is first accessed. - * - * This is only a hint. Implementations are free to choose whether to use - * eager or lazy parsing regardless of the value of this option. However, - * setting this option true suggests that the protocol author believes that - * using lazy parsing on this field is worth the additional bookkeeping - * overhead typically needed to implement it. - * - * This option does not affect the public interface of any generated code; - * all method signatures remain the same. Furthermore, thread-safety of the - * interface is not affected by this option; const methods remain safe to - * call from multiple threads concurrently, while non-const methods continue - * to require exclusive access. - * - * Note that implementations may choose not to check required fields within - * a lazy sub-message. That is, calling IsInitialized() on the outer message - * may return true even if the inner message has missing required fields. - * This is necessary because otherwise the inner message would have to be - * parsed in order to perform the check, defeating the purpose of lazy - * parsing. An implementation which chooses not to check required fields - * must be consistent about it. That is, for any particular sub-message, the - * implementation must either *always* check its required fields, or *never* - * check its required fields, regardless of whether or not the message has - * been parsed. - * - * As of May 2022, lazy verifies the contents of the byte stream during - * parsing. An invalid byte stream will cause the overall parsing to fail. - * - * @generated from protobuf field: optional bool lazy = 5; + * @generated from protobuf enum value: TYPE_SFIXED64 = 16; */ - lazy?: boolean; + FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_SFIXED64"] = 16] = "TYPE_SFIXED64"; /** - * unverified_lazy does no correctness checks on the byte stream. This should - * only be used where lazy with verification is prohibitive for performance - * reasons. + * Uses ZigZag encoding. * - * @generated from protobuf field: optional bool unverified_lazy = 15; + * @generated from protobuf enum value: TYPE_SINT32 = 17; */ - unverified_lazy?: boolean; + FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_SINT32"] = 17] = "TYPE_SINT32"; /** - * Is this field deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for accessors, or it will be completely ignored; in the very least, this - * is a formalization for deprecating fields. + * Uses ZigZag encoding. * - * @generated from protobuf field: optional bool deprecated = 3; + * @generated from protobuf enum value: TYPE_SINT64 = 18; */ - deprecated?: boolean; + FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_SINT64"] = 18] = "TYPE_SINT64"; +})(FieldDescriptorProto_Type = exports.FieldDescriptorProto_Type || (exports.FieldDescriptorProto_Type = {})); +/** + * @generated from protobuf enum google.protobuf.FieldDescriptorProto.Label + */ +var FieldDescriptorProto_Label; +(function (FieldDescriptorProto_Label) { /** - * For Google-internal migration only. Do not use. - * - * @generated from protobuf field: optional bool weak = 10; + * @generated synthetic value - protobuf-ts requires all enums to have a 0 value */ - weak?: boolean; + FieldDescriptorProto_Label[FieldDescriptorProto_Label["UNSPECIFIED$"] = 0] = "UNSPECIFIED$"; /** - * Indicate that the field value should not be printed out when using debug - * formats, e.g. when the field contains sensitive credentials. + * 0 is reserved for errors * - * @generated from protobuf field: optional bool debug_redact = 16; + * @generated from protobuf enum value: LABEL_OPTIONAL = 1; */ - debug_redact?: boolean; + FieldDescriptorProto_Label[FieldDescriptorProto_Label["LABEL_OPTIONAL"] = 1] = "LABEL_OPTIONAL"; /** - * @generated from protobuf field: optional google.protobuf.FieldOptions.OptionRetention retention = 17; + * @generated from protobuf enum value: LABEL_REPEATED = 3; */ - retention?: FieldOptions_OptionRetention; + FieldDescriptorProto_Label[FieldDescriptorProto_Label["LABEL_REPEATED"] = 3] = "LABEL_REPEATED"; /** - * @generated from protobuf field: repeated google.protobuf.FieldOptions.OptionTargetType targets = 19; + * The required label is only allowed in google.protobuf. In proto3 and Editions + * it's explicitly prohibited. In Editions, the `field_presence` feature + * can be used to get this behavior. + * + * @generated from protobuf enum value: LABEL_REQUIRED = 2; */ - targets: FieldOptions_OptionTargetType[]; + FieldDescriptorProto_Label[FieldDescriptorProto_Label["LABEL_REQUIRED"] = 2] = "LABEL_REQUIRED"; +})(FieldDescriptorProto_Label = exports.FieldDescriptorProto_Label || (exports.FieldDescriptorProto_Label = {})); +/** + * Generated classes can be optimized for speed or code size. + * + * @generated from protobuf enum google.protobuf.FileOptions.OptimizeMode + */ +var FileOptions_OptimizeMode; +(function (FileOptions_OptimizeMode) { /** - * @generated from protobuf field: repeated google.protobuf.FieldOptions.EditionDefault edition_defaults = 20; + * @generated synthetic value - protobuf-ts requires all enums to have a 0 value */ - edition_defaults: FieldOptions_EditionDefault[]; + FileOptions_OptimizeMode[FileOptions_OptimizeMode["UNSPECIFIED$"] = 0] = "UNSPECIFIED$"; /** - * Any features defined in the specific edition. + * Generate complete code for parsing, serialization, * - * @generated from protobuf field: optional google.protobuf.FeatureSet features = 21; + * @generated from protobuf enum value: SPEED = 1; */ - features?: FeatureSet; + FileOptions_OptimizeMode[FileOptions_OptimizeMode["SPEED"] = 1] = "SPEED"; /** - * The parser stores options it doesn't recognize here. See above. + * etc. * - * @generated from protobuf field: repeated google.protobuf.UninterpretedOption uninterpreted_option = 999; - */ - uninterpreted_option: UninterpretedOption[]; -} -/** - * @generated from protobuf message google.protobuf.FieldOptions.EditionDefault - */ -export interface FieldOptions_EditionDefault { - /** - * @generated from protobuf field: optional google.protobuf.Edition edition = 3; + * Use ReflectionOps to implement these methods. + * + * @generated from protobuf enum value: CODE_SIZE = 2; */ - edition?: Edition; + FileOptions_OptimizeMode[FileOptions_OptimizeMode["CODE_SIZE"] = 2] = "CODE_SIZE"; /** - * @generated from protobuf field: optional string value = 2; + * Generate code using MessageLite and the lite runtime. + * + * @generated from protobuf enum value: LITE_RUNTIME = 3; */ - value?: string; // Textproto value. -} + FileOptions_OptimizeMode[FileOptions_OptimizeMode["LITE_RUNTIME"] = 3] = "LITE_RUNTIME"; +})(FileOptions_OptimizeMode = exports.FileOptions_OptimizeMode || (exports.FileOptions_OptimizeMode = {})); /** * @generated from protobuf enum google.protobuf.FieldOptions.CType */ -export enum FieldOptions_CType { +var FieldOptions_CType; +(function (FieldOptions_CType) { /** * Default mode. * * @generated from protobuf enum value: STRING = 0; */ - STRING = 0, + FieldOptions_CType[FieldOptions_CType["STRING"] = 0] = "STRING"; /** * The option [ctype=CORD] may be applied to a non-repeated field of type * "bytes". It indicates that in C++, the data should be stored in a Cord @@ -1196,35 +254,36 @@ export enum FieldOptions_CType { * * @generated from protobuf enum value: CORD = 1; */ - CORD = 1, + FieldOptions_CType[FieldOptions_CType["CORD"] = 1] = "CORD"; /** * @generated from protobuf enum value: STRING_PIECE = 2; */ - STRING_PIECE = 2 -} + FieldOptions_CType[FieldOptions_CType["STRING_PIECE"] = 2] = "STRING_PIECE"; +})(FieldOptions_CType = exports.FieldOptions_CType || (exports.FieldOptions_CType = {})); /** * @generated from protobuf enum google.protobuf.FieldOptions.JSType */ -export enum FieldOptions_JSType { +var FieldOptions_JSType; +(function (FieldOptions_JSType) { /** * Use the default type. * * @generated from protobuf enum value: JS_NORMAL = 0; */ - JS_NORMAL = 0, + FieldOptions_JSType[FieldOptions_JSType["JS_NORMAL"] = 0] = "JS_NORMAL"; /** * Use JavaScript strings. * * @generated from protobuf enum value: JS_STRING = 1; */ - JS_STRING = 1, + FieldOptions_JSType[FieldOptions_JSType["JS_STRING"] = 1] = "JS_STRING"; /** * Use JavaScript numbers. * * @generated from protobuf enum value: JS_NUMBER = 2; */ - JS_NUMBER = 2 -} + FieldOptions_JSType[FieldOptions_JSType["JS_NUMBER"] = 2] = "JS_NUMBER"; +})(FieldOptions_JSType = exports.FieldOptions_JSType || (exports.FieldOptions_JSType = {})); /** * If set to RETENTION_SOURCE, the option will be omitted from the binary. * Note: as of January 2023, support for this is in progress and does not yet @@ -1232,20 +291,21 @@ export enum FieldOptions_JSType { * * @generated from protobuf enum google.protobuf.FieldOptions.OptionRetention */ -export enum FieldOptions_OptionRetention { +var FieldOptions_OptionRetention; +(function (FieldOptions_OptionRetention) { /** * @generated from protobuf enum value: RETENTION_UNKNOWN = 0; */ - RETENTION_UNKNOWN = 0, + FieldOptions_OptionRetention[FieldOptions_OptionRetention["RETENTION_UNKNOWN"] = 0] = "RETENTION_UNKNOWN"; /** * @generated from protobuf enum value: RETENTION_RUNTIME = 1; */ - RETENTION_RUNTIME = 1, + FieldOptions_OptionRetention[FieldOptions_OptionRetention["RETENTION_RUNTIME"] = 1] = "RETENTION_RUNTIME"; /** * @generated from protobuf enum value: RETENTION_SOURCE = 2; */ - RETENTION_SOURCE = 2 -} + FieldOptions_OptionRetention[FieldOptions_OptionRetention["RETENTION_SOURCE"] = 2] = "RETENTION_SOURCE"; +})(FieldOptions_OptionRetention = exports.FieldOptions_OptionRetention || (exports.FieldOptions_OptionRetention = {})); /** * This indicates the types of entities that the field may apply to when used * as an option. If it is unset, then the field may be freely used as an @@ -1254,210 +314,49 @@ export enum FieldOptions_OptionRetention { * * @generated from protobuf enum google.protobuf.FieldOptions.OptionTargetType */ -export enum FieldOptions_OptionTargetType { +var FieldOptions_OptionTargetType; +(function (FieldOptions_OptionTargetType) { /** * @generated from protobuf enum value: TARGET_TYPE_UNKNOWN = 0; */ - TARGET_TYPE_UNKNOWN = 0, + FieldOptions_OptionTargetType[FieldOptions_OptionTargetType["TARGET_TYPE_UNKNOWN"] = 0] = "TARGET_TYPE_UNKNOWN"; /** * @generated from protobuf enum value: TARGET_TYPE_FILE = 1; */ - TARGET_TYPE_FILE = 1, + FieldOptions_OptionTargetType[FieldOptions_OptionTargetType["TARGET_TYPE_FILE"] = 1] = "TARGET_TYPE_FILE"; /** * @generated from protobuf enum value: TARGET_TYPE_EXTENSION_RANGE = 2; */ - TARGET_TYPE_EXTENSION_RANGE = 2, + FieldOptions_OptionTargetType[FieldOptions_OptionTargetType["TARGET_TYPE_EXTENSION_RANGE"] = 2] = "TARGET_TYPE_EXTENSION_RANGE"; /** * @generated from protobuf enum value: TARGET_TYPE_MESSAGE = 3; */ - TARGET_TYPE_MESSAGE = 3, + FieldOptions_OptionTargetType[FieldOptions_OptionTargetType["TARGET_TYPE_MESSAGE"] = 3] = "TARGET_TYPE_MESSAGE"; /** * @generated from protobuf enum value: TARGET_TYPE_FIELD = 4; */ - TARGET_TYPE_FIELD = 4, + FieldOptions_OptionTargetType[FieldOptions_OptionTargetType["TARGET_TYPE_FIELD"] = 4] = "TARGET_TYPE_FIELD"; /** * @generated from protobuf enum value: TARGET_TYPE_ONEOF = 5; */ - TARGET_TYPE_ONEOF = 5, + FieldOptions_OptionTargetType[FieldOptions_OptionTargetType["TARGET_TYPE_ONEOF"] = 5] = "TARGET_TYPE_ONEOF"; /** * @generated from protobuf enum value: TARGET_TYPE_ENUM = 6; */ - TARGET_TYPE_ENUM = 6, + FieldOptions_OptionTargetType[FieldOptions_OptionTargetType["TARGET_TYPE_ENUM"] = 6] = "TARGET_TYPE_ENUM"; /** * @generated from protobuf enum value: TARGET_TYPE_ENUM_ENTRY = 7; */ - TARGET_TYPE_ENUM_ENTRY = 7, + FieldOptions_OptionTargetType[FieldOptions_OptionTargetType["TARGET_TYPE_ENUM_ENTRY"] = 7] = "TARGET_TYPE_ENUM_ENTRY"; /** * @generated from protobuf enum value: TARGET_TYPE_SERVICE = 8; */ - TARGET_TYPE_SERVICE = 8, + FieldOptions_OptionTargetType[FieldOptions_OptionTargetType["TARGET_TYPE_SERVICE"] = 8] = "TARGET_TYPE_SERVICE"; /** * @generated from protobuf enum value: TARGET_TYPE_METHOD = 9; */ - TARGET_TYPE_METHOD = 9 -} -/** - * @generated from protobuf message google.protobuf.OneofOptions - */ -export interface OneofOptions { - /** - * Any features defined in the specific edition. - * - * @generated from protobuf field: optional google.protobuf.FeatureSet features = 1; - */ - features?: FeatureSet; - /** - * The parser stores options it doesn't recognize here. See above. - * - * @generated from protobuf field: repeated google.protobuf.UninterpretedOption uninterpreted_option = 999; - */ - uninterpreted_option: UninterpretedOption[]; -} -/** - * @generated from protobuf message google.protobuf.EnumOptions - */ -export interface EnumOptions { - /** - * Set this option to true to allow mapping different tag names to the same - * value. - * - * @generated from protobuf field: optional bool allow_alias = 2; - */ - allow_alias?: boolean; - /** - * Is this enum deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the enum, or it will be completely ignored; in the very least, this - * is a formalization for deprecating enums. - * - * @generated from protobuf field: optional bool deprecated = 3; - */ - deprecated?: boolean; - /** - * Enable the legacy handling of JSON field name conflicts. This lowercases - * and strips underscored from the fields before comparison in proto3 only. - * The new behavior takes `json_name` into account and applies to proto2 as - * well. - * TODO Remove this legacy behavior once downstream teams have - * had time to migrate. - * - * @deprecated - * @generated from protobuf field: optional bool deprecated_legacy_json_field_conflicts = 6 [deprecated = true]; - */ - deprecated_legacy_json_field_conflicts?: boolean; - /** - * Any features defined in the specific edition. - * - * @generated from protobuf field: optional google.protobuf.FeatureSet features = 7; - */ - features?: FeatureSet; - /** - * The parser stores options it doesn't recognize here. See above. - * - * @generated from protobuf field: repeated google.protobuf.UninterpretedOption uninterpreted_option = 999; - */ - uninterpreted_option: UninterpretedOption[]; -} -/** - * @generated from protobuf message google.protobuf.EnumValueOptions - */ -export interface EnumValueOptions { - /** - * Is this enum value deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the enum value, or it will be completely ignored; in the very least, - * this is a formalization for deprecating enum values. - * - * @generated from protobuf field: optional bool deprecated = 1; - */ - deprecated?: boolean; - /** - * Any features defined in the specific edition. - * - * @generated from protobuf field: optional google.protobuf.FeatureSet features = 2; - */ - features?: FeatureSet; - /** - * Indicate that fields annotated with this enum value should not be printed - * out when using debug formats, e.g. when the field contains sensitive - * credentials. - * - * @generated from protobuf field: optional bool debug_redact = 3; - */ - debug_redact?: boolean; - /** - * The parser stores options it doesn't recognize here. See above. - * - * @generated from protobuf field: repeated google.protobuf.UninterpretedOption uninterpreted_option = 999; - */ - uninterpreted_option: UninterpretedOption[]; -} -/** - * @generated from protobuf message google.protobuf.ServiceOptions - */ -export interface ServiceOptions { - /** - * Any features defined in the specific edition. - * - * @generated from protobuf field: optional google.protobuf.FeatureSet features = 34; - */ - features?: FeatureSet; - // Note: Field numbers 1 through 32 are reserved for Google's internal RPC - // framework. We apologize for hoarding these numbers to ourselves, but - // we were already using them long before we decided to release Protocol - // Buffers. - - /** - * Is this service deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the service, or it will be completely ignored; in the very least, - * this is a formalization for deprecating services. - * - * @generated from protobuf field: optional bool deprecated = 33; - */ - deprecated?: boolean; - /** - * The parser stores options it doesn't recognize here. See above. - * - * @generated from protobuf field: repeated google.protobuf.UninterpretedOption uninterpreted_option = 999; - */ - uninterpreted_option: UninterpretedOption[]; -} -/** - * @generated from protobuf message google.protobuf.MethodOptions - */ -export interface MethodOptions { - // Note: Field numbers 1 through 32 are reserved for Google's internal RPC - // framework. We apologize for hoarding these numbers to ourselves, but - // we were already using them long before we decided to release Protocol - // Buffers. - - /** - * Is this method deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the method, or it will be completely ignored; in the very least, - * this is a formalization for deprecating methods. - * - * @generated from protobuf field: optional bool deprecated = 33; - */ - deprecated?: boolean; - /** - * @generated from protobuf field: optional google.protobuf.MethodOptions.IdempotencyLevel idempotency_level = 34; - */ - idempotency_level?: MethodOptions_IdempotencyLevel; - /** - * Any features defined in the specific edition. - * - * @generated from protobuf field: optional google.protobuf.FeatureSet features = 35; - */ - features?: FeatureSet; - /** - * The parser stores options it doesn't recognize here. See above. - * - * @generated from protobuf field: repeated google.protobuf.UninterpretedOption uninterpreted_option = 999; - */ - uninterpreted_option: UninterpretedOption[]; -} + FieldOptions_OptionTargetType[FieldOptions_OptionTargetType["TARGET_TYPE_METHOD"] = 9] = "TARGET_TYPE_METHOD"; +})(FieldOptions_OptionTargetType = exports.FieldOptions_OptionTargetType || (exports.FieldOptions_OptionTargetType = {})); /** * Is this method side-effect-free (or safe in HTTP parlance), or idempotent, * or neither? HTTP based RPC implementation may choose GET verb for safe @@ -1465,530 +364,177 @@ export interface MethodOptions { * * @generated from protobuf enum google.protobuf.MethodOptions.IdempotencyLevel */ -export enum MethodOptions_IdempotencyLevel { +var MethodOptions_IdempotencyLevel; +(function (MethodOptions_IdempotencyLevel) { /** * @generated from protobuf enum value: IDEMPOTENCY_UNKNOWN = 0; */ - IDEMPOTENCY_UNKNOWN = 0, + MethodOptions_IdempotencyLevel[MethodOptions_IdempotencyLevel["IDEMPOTENCY_UNKNOWN"] = 0] = "IDEMPOTENCY_UNKNOWN"; /** * implies idempotent * * @generated from protobuf enum value: NO_SIDE_EFFECTS = 1; */ - NO_SIDE_EFFECTS = 1, + MethodOptions_IdempotencyLevel[MethodOptions_IdempotencyLevel["NO_SIDE_EFFECTS"] = 1] = "NO_SIDE_EFFECTS"; /** * idempotent, but may have side effects * * @generated from protobuf enum value: IDEMPOTENT = 2; */ - IDEMPOTENT = 2 -} -/** - * A message representing a option the parser does not recognize. This only - * appears in options protos created by the compiler::Parser class. - * DescriptorPool resolves these when building Descriptor objects. Therefore, - * options protos in descriptor objects (e.g. returned by Descriptor::options(), - * or produced by Descriptor::CopyTo()) will never have UninterpretedOptions - * in them. - * - * @generated from protobuf message google.protobuf.UninterpretedOption - */ -export interface UninterpretedOption { - /** - * @generated from protobuf field: repeated google.protobuf.UninterpretedOption.NamePart name = 2; - */ - name: UninterpretedOption_NamePart[]; - /** - * The value of the uninterpreted option, in whatever type the tokenizer - * identified it as during parsing. Exactly one of these should be set. - * - * @generated from protobuf field: optional string identifier_value = 3; - */ - identifier_value?: string; - /** - * @generated from protobuf field: optional uint64 positive_int_value = 4; - */ - positive_int_value?: bigint; - /** - * @generated from protobuf field: optional int64 negative_int_value = 5; - */ - negative_int_value?: bigint; - /** - * @generated from protobuf field: optional double double_value = 6; - */ - double_value?: number; - /** - * @generated from protobuf field: optional bytes string_value = 7; - */ - string_value?: Uint8Array; - /** - * @generated from protobuf field: optional string aggregate_value = 8; - */ - aggregate_value?: string; -} -/** - * The name of the uninterpreted option. Each string represents a segment in - * a dot-separated name. is_extension is true iff a segment represents an - * extension (denoted with parentheses in options specs in .proto files). - * E.g.,{ ["foo", false], ["bar.baz", true], ["moo", false] } represents - * "foo.(bar.baz).moo". - * - * @generated from protobuf message google.protobuf.UninterpretedOption.NamePart - */ -export interface UninterpretedOption_NamePart { - /** - * @generated from protobuf field: string name_part = 1; - */ - name_part: string; - /** - * @generated from protobuf field: bool is_extension = 2; - */ - is_extension: boolean; -} -// =================================================================== -// Features - -/** - * TODO Enums in C++ gencode (and potentially other languages) are - * not well scoped. This means that each of the feature enums below can clash - * with each other. The short names we've chosen maximize call-site - * readability, but leave us very open to this scenario. A future feature will - * be designed and implemented to handle this, hopefully before we ever hit a - * conflict here. - * - * @generated from protobuf message google.protobuf.FeatureSet - */ -export interface FeatureSet { - /** - * @generated from protobuf field: optional google.protobuf.FeatureSet.FieldPresence field_presence = 1; - */ - field_presence?: FeatureSet_FieldPresence; - /** - * @generated from protobuf field: optional google.protobuf.FeatureSet.EnumType enum_type = 2; - */ - enum_type?: FeatureSet_EnumType; - /** - * @generated from protobuf field: optional google.protobuf.FeatureSet.RepeatedFieldEncoding repeated_field_encoding = 3; - */ - repeated_field_encoding?: FeatureSet_RepeatedFieldEncoding; - /** - * @generated from protobuf field: optional google.protobuf.FeatureSet.Utf8Validation utf8_validation = 4; - */ - utf8_validation?: FeatureSet_Utf8Validation; - /** - * @generated from protobuf field: optional google.protobuf.FeatureSet.MessageEncoding message_encoding = 5; - */ - message_encoding?: FeatureSet_MessageEncoding; - /** - * @generated from protobuf field: optional google.protobuf.FeatureSet.JsonFormat json_format = 6; - */ - json_format?: FeatureSet_JsonFormat; -} + MethodOptions_IdempotencyLevel[MethodOptions_IdempotencyLevel["IDEMPOTENT"] = 2] = "IDEMPOTENT"; +})(MethodOptions_IdempotencyLevel = exports.MethodOptions_IdempotencyLevel || (exports.MethodOptions_IdempotencyLevel = {})); /** * @generated from protobuf enum google.protobuf.FeatureSet.FieldPresence */ -export enum FeatureSet_FieldPresence { +var FeatureSet_FieldPresence; +(function (FeatureSet_FieldPresence) { /** * @generated from protobuf enum value: FIELD_PRESENCE_UNKNOWN = 0; */ - FIELD_PRESENCE_UNKNOWN = 0, + FeatureSet_FieldPresence[FeatureSet_FieldPresence["FIELD_PRESENCE_UNKNOWN"] = 0] = "FIELD_PRESENCE_UNKNOWN"; /** * @generated from protobuf enum value: EXPLICIT = 1; */ - EXPLICIT = 1, + FeatureSet_FieldPresence[FeatureSet_FieldPresence["EXPLICIT"] = 1] = "EXPLICIT"; /** * @generated from protobuf enum value: IMPLICIT = 2; */ - IMPLICIT = 2, + FeatureSet_FieldPresence[FeatureSet_FieldPresence["IMPLICIT"] = 2] = "IMPLICIT"; /** * @generated from protobuf enum value: LEGACY_REQUIRED = 3; */ - LEGACY_REQUIRED = 3 -} + FeatureSet_FieldPresence[FeatureSet_FieldPresence["LEGACY_REQUIRED"] = 3] = "LEGACY_REQUIRED"; +})(FeatureSet_FieldPresence = exports.FeatureSet_FieldPresence || (exports.FeatureSet_FieldPresence = {})); /** * @generated from protobuf enum google.protobuf.FeatureSet.EnumType */ -export enum FeatureSet_EnumType { +var FeatureSet_EnumType; +(function (FeatureSet_EnumType) { /** * @generated from protobuf enum value: ENUM_TYPE_UNKNOWN = 0; */ - ENUM_TYPE_UNKNOWN = 0, + FeatureSet_EnumType[FeatureSet_EnumType["ENUM_TYPE_UNKNOWN"] = 0] = "ENUM_TYPE_UNKNOWN"; /** * @generated from protobuf enum value: OPEN = 1; */ - OPEN = 1, + FeatureSet_EnumType[FeatureSet_EnumType["OPEN"] = 1] = "OPEN"; /** * @generated from protobuf enum value: CLOSED = 2; */ - CLOSED = 2 -} + FeatureSet_EnumType[FeatureSet_EnumType["CLOSED"] = 2] = "CLOSED"; +})(FeatureSet_EnumType = exports.FeatureSet_EnumType || (exports.FeatureSet_EnumType = {})); /** * @generated from protobuf enum google.protobuf.FeatureSet.RepeatedFieldEncoding */ -export enum FeatureSet_RepeatedFieldEncoding { +var FeatureSet_RepeatedFieldEncoding; +(function (FeatureSet_RepeatedFieldEncoding) { /** * @generated from protobuf enum value: REPEATED_FIELD_ENCODING_UNKNOWN = 0; */ - REPEATED_FIELD_ENCODING_UNKNOWN = 0, + FeatureSet_RepeatedFieldEncoding[FeatureSet_RepeatedFieldEncoding["REPEATED_FIELD_ENCODING_UNKNOWN"] = 0] = "REPEATED_FIELD_ENCODING_UNKNOWN"; /** * @generated from protobuf enum value: PACKED = 1; */ - PACKED = 1, + FeatureSet_RepeatedFieldEncoding[FeatureSet_RepeatedFieldEncoding["PACKED"] = 1] = "PACKED"; /** * @generated from protobuf enum value: EXPANDED = 2; */ - EXPANDED = 2 -} + FeatureSet_RepeatedFieldEncoding[FeatureSet_RepeatedFieldEncoding["EXPANDED"] = 2] = "EXPANDED"; +})(FeatureSet_RepeatedFieldEncoding = exports.FeatureSet_RepeatedFieldEncoding || (exports.FeatureSet_RepeatedFieldEncoding = {})); /** * @generated from protobuf enum google.protobuf.FeatureSet.Utf8Validation */ -export enum FeatureSet_Utf8Validation { +var FeatureSet_Utf8Validation; +(function (FeatureSet_Utf8Validation) { /** * @generated from protobuf enum value: UTF8_VALIDATION_UNKNOWN = 0; */ - UTF8_VALIDATION_UNKNOWN = 0, + FeatureSet_Utf8Validation[FeatureSet_Utf8Validation["UTF8_VALIDATION_UNKNOWN"] = 0] = "UTF8_VALIDATION_UNKNOWN"; /** * @generated from protobuf enum value: NONE = 1; */ - NONE = 1, + FeatureSet_Utf8Validation[FeatureSet_Utf8Validation["NONE"] = 1] = "NONE"; /** * @generated from protobuf enum value: VERIFY = 2; */ - VERIFY = 2 -} + FeatureSet_Utf8Validation[FeatureSet_Utf8Validation["VERIFY"] = 2] = "VERIFY"; +})(FeatureSet_Utf8Validation = exports.FeatureSet_Utf8Validation || (exports.FeatureSet_Utf8Validation = {})); /** * @generated from protobuf enum google.protobuf.FeatureSet.MessageEncoding */ -export enum FeatureSet_MessageEncoding { +var FeatureSet_MessageEncoding; +(function (FeatureSet_MessageEncoding) { /** * @generated from protobuf enum value: MESSAGE_ENCODING_UNKNOWN = 0; */ - MESSAGE_ENCODING_UNKNOWN = 0, + FeatureSet_MessageEncoding[FeatureSet_MessageEncoding["MESSAGE_ENCODING_UNKNOWN"] = 0] = "MESSAGE_ENCODING_UNKNOWN"; /** * @generated from protobuf enum value: LENGTH_PREFIXED = 1; */ - LENGTH_PREFIXED = 1, + FeatureSet_MessageEncoding[FeatureSet_MessageEncoding["LENGTH_PREFIXED"] = 1] = "LENGTH_PREFIXED"; /** * @generated from protobuf enum value: DELIMITED = 2; */ - DELIMITED = 2 -} + FeatureSet_MessageEncoding[FeatureSet_MessageEncoding["DELIMITED"] = 2] = "DELIMITED"; +})(FeatureSet_MessageEncoding = exports.FeatureSet_MessageEncoding || (exports.FeatureSet_MessageEncoding = {})); /** * @generated from protobuf enum google.protobuf.FeatureSet.JsonFormat */ -export enum FeatureSet_JsonFormat { +var FeatureSet_JsonFormat; +(function (FeatureSet_JsonFormat) { /** * @generated from protobuf enum value: JSON_FORMAT_UNKNOWN = 0; */ - JSON_FORMAT_UNKNOWN = 0, + FeatureSet_JsonFormat[FeatureSet_JsonFormat["JSON_FORMAT_UNKNOWN"] = 0] = "JSON_FORMAT_UNKNOWN"; /** * @generated from protobuf enum value: ALLOW = 1; */ - ALLOW = 1, + FeatureSet_JsonFormat[FeatureSet_JsonFormat["ALLOW"] = 1] = "ALLOW"; /** * @generated from protobuf enum value: LEGACY_BEST_EFFORT = 2; */ - LEGACY_BEST_EFFORT = 2 -} -/** - * A compiled specification for the defaults of a set of features. These - * messages are generated from FeatureSet extensions and can be used to seed - * feature resolution. The resolution with this object becomes a simple search - * for the closest matching edition, followed by proto merges. - * - * @generated from protobuf message google.protobuf.FeatureSetDefaults - */ -export interface FeatureSetDefaults { - /** - * @generated from protobuf field: repeated google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault defaults = 1; - */ - defaults: FeatureSetDefaults_FeatureSetEditionDefault[]; - /** - * The minimum supported edition (inclusive) when this was constructed. - * Editions before this will not have defaults. - * - * @generated from protobuf field: optional google.protobuf.Edition minimum_edition = 4; - */ - minimum_edition?: Edition; - /** - * The maximum known edition (inclusive) when this was constructed. Editions - * after this will not have reliable defaults. - * - * @generated from protobuf field: optional google.protobuf.Edition maximum_edition = 5; - */ - maximum_edition?: Edition; -} -/** - * A map from every known edition with a unique set of defaults to its - * defaults. Not all editions may be contained here. For a given edition, - * the defaults at the closest matching edition ordered at or before it should - * be used. This field must be in strict ascending order by edition. - * - * @generated from protobuf message google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault - */ -export interface FeatureSetDefaults_FeatureSetEditionDefault { - /** - * @generated from protobuf field: optional google.protobuf.Edition edition = 3; - */ - edition?: Edition; - /** - * @generated from protobuf field: optional google.protobuf.FeatureSet features = 2; - */ - features?: FeatureSet; -} -// =================================================================== -// Optional source code info - -/** - * Encapsulates information about the original source file from which a - * FileDescriptorProto was generated. - * - * @generated from protobuf message google.protobuf.SourceCodeInfo - */ -export interface SourceCodeInfo { - /** - * A Location identifies a piece of source code in a .proto file which - * corresponds to a particular definition. This information is intended - * to be useful to IDEs, code indexers, documentation generators, and similar - * tools. - * - * For example, say we have a file like: - * message Foo { - * optional string foo = 1; - * } - * Let's look at just the field definition: - * optional string foo = 1; - * ^ ^^ ^^ ^ ^^^ - * a bc de f ghi - * We have the following locations: - * span path represents - * [a,i) [ 4, 0, 2, 0 ] The whole field definition. - * [a,b) [ 4, 0, 2, 0, 4 ] The label (optional). - * [c,d) [ 4, 0, 2, 0, 5 ] The type (string). - * [e,f) [ 4, 0, 2, 0, 1 ] The name (foo). - * [g,h) [ 4, 0, 2, 0, 3 ] The number (1). - * - * Notes: - * - A location may refer to a repeated field itself (i.e. not to any - * particular index within it). This is used whenever a set of elements are - * logically enclosed in a single code segment. For example, an entire - * extend block (possibly containing multiple extension definitions) will - * have an outer location whose path refers to the "extensions" repeated - * field without an index. - * - Multiple locations may have the same path. This happens when a single - * logical declaration is spread out across multiple places. The most - * obvious example is the "extend" block again -- there may be multiple - * extend blocks in the same scope, each of which will have the same path. - * - A location's span is not always a subset of its parent's span. For - * example, the "extendee" of an extension declaration appears at the - * beginning of the "extend" block and is shared by all extensions within - * the block. - * - Just because a location's span is a subset of some other location's span - * does not mean that it is a descendant. For example, a "group" defines - * both a type and a field in a single declaration. Thus, the locations - * corresponding to the type and field and their components will overlap. - * - Code which tries to interpret locations should probably be designed to - * ignore those that it doesn't understand, as more types of locations could - * be recorded in the future. - * - * @generated from protobuf field: repeated google.protobuf.SourceCodeInfo.Location location = 1; - */ - location: SourceCodeInfo_Location[]; -} -/** - * @generated from protobuf message google.protobuf.SourceCodeInfo.Location - */ -export interface SourceCodeInfo_Location { - /** - * Identifies which part of the FileDescriptorProto was defined at this - * location. - * - * Each element is a field number or an index. They form a path from - * the root FileDescriptorProto to the place where the definition occurs. - * For example, this path: - * [ 4, 3, 2, 7, 1 ] - * refers to: - * file.message_type(3) // 4, 3 - * .field(7) // 2, 7 - * .name() // 1 - * This is because FileDescriptorProto.message_type has field number 4: - * repeated DescriptorProto message_type = 4; - * and DescriptorProto.field has field number 2: - * repeated FieldDescriptorProto field = 2; - * and FieldDescriptorProto.name has field number 1: - * optional string name = 1; - * - * Thus, the above path gives the location of a field name. If we removed - * the last element: - * [ 4, 3, 2, 7 ] - * this path refers to the whole field declaration (from the beginning - * of the label to the terminating semicolon). - * - * @generated from protobuf field: repeated int32 path = 1 [packed = true]; - */ - path: number[]; - /** - * Always has exactly three or four elements: start line, start column, - * end line (optional, otherwise assumed same as start line), end column. - * These are packed into a single field for efficiency. Note that line - * and column numbers are zero-based -- typically you will want to add - * 1 to each before displaying to a user. - * - * @generated from protobuf field: repeated int32 span = 2 [packed = true]; - */ - span: number[]; - /** - * If this SourceCodeInfo represents a complete declaration, these are any - * comments appearing before and after the declaration which appear to be - * attached to the declaration. - * - * A series of line comments appearing on consecutive lines, with no other - * tokens appearing on those lines, will be treated as a single comment. - * - * leading_detached_comments will keep paragraphs of comments that appear - * before (but not connected to) the current element. Each paragraph, - * separated by empty lines, will be one comment element in the repeated - * field. - * - * Only the comment content is provided; comment markers (e.g. //) are - * stripped out. For block comments, leading whitespace and an asterisk - * will be stripped from the beginning of each line other than the first. - * Newlines are included in the output. - * - * Examples: - * - * optional int32 foo = 1; // Comment attached to foo. - * // Comment attached to bar. - * optional int32 bar = 2; - * - * optional string baz = 3; - * // Comment attached to baz. - * // Another line attached to baz. - * - * // Comment attached to moo. - * // - * // Another line attached to moo. - * optional double moo = 4; - * - * // Detached comment for corge. This is not leading or trailing comments - * // to moo or corge because there are blank lines separating it from - * // both. - * - * // Detached comment for corge paragraph 2. - * - * optional string corge = 5; - * /* Block comment attached - * * to corge. Leading asterisks - * * will be removed. *\/ - * /* Block comment attached to - * * grault. *\/ - * optional int32 grault = 6; - * - * // ignored detached comments. - * - * @generated from protobuf field: optional string leading_comments = 3; - */ - leading_comments?: string; - /** - * @generated from protobuf field: optional string trailing_comments = 4; - */ - trailing_comments?: string; - /** - * @generated from protobuf field: repeated string leading_detached_comments = 6; - */ - leading_detached_comments: string[]; -} -/** - * Describes the relationship between generated code and its original source - * file. A GeneratedCodeInfo message is associated with only one generated - * source file, but may contain references to different source .proto files. - * - * @generated from protobuf message google.protobuf.GeneratedCodeInfo - */ -export interface GeneratedCodeInfo { - /** - * An Annotation connects some span of text in generated code to an element - * of its generating .proto file. - * - * @generated from protobuf field: repeated google.protobuf.GeneratedCodeInfo.Annotation annotation = 1; - */ - annotation: GeneratedCodeInfo_Annotation[]; -} -/** - * @generated from protobuf message google.protobuf.GeneratedCodeInfo.Annotation - */ -export interface GeneratedCodeInfo_Annotation { - /** - * Identifies the element in the original source .proto file. This field - * is formatted the same as SourceCodeInfo.Location.path. - * - * @generated from protobuf field: repeated int32 path = 1 [packed = true]; - */ - path: number[]; - /** - * Identifies the filesystem path to the original source .proto. - * - * @generated from protobuf field: optional string source_file = 2; - */ - source_file?: string; - /** - * Identifies the starting offset in bytes in the generated code - * that relates to the identified object. - * - * @generated from protobuf field: optional int32 begin = 3; - */ - begin?: number; - /** - * Identifies the ending offset in bytes in the generated code that - * relates to the identified object. The end offset should be one past - * the last relevant byte (so the length of the text = end - begin). - * - * @generated from protobuf field: optional int32 end = 4; - */ - end?: number; - /** - * @generated from protobuf field: optional google.protobuf.GeneratedCodeInfo.Annotation.Semantic semantic = 5; - */ - semantic?: GeneratedCodeInfo_Annotation_Semantic; -} + FeatureSet_JsonFormat[FeatureSet_JsonFormat["LEGACY_BEST_EFFORT"] = 2] = "LEGACY_BEST_EFFORT"; +})(FeatureSet_JsonFormat = exports.FeatureSet_JsonFormat || (exports.FeatureSet_JsonFormat = {})); /** * Represents the identified object's effect on the element in the original * .proto file. * * @generated from protobuf enum google.protobuf.GeneratedCodeInfo.Annotation.Semantic */ -export enum GeneratedCodeInfo_Annotation_Semantic { +var GeneratedCodeInfo_Annotation_Semantic; +(function (GeneratedCodeInfo_Annotation_Semantic) { /** * There is no effect or the effect is indescribable. * * @generated from protobuf enum value: NONE = 0; */ - NONE = 0, + GeneratedCodeInfo_Annotation_Semantic[GeneratedCodeInfo_Annotation_Semantic["NONE"] = 0] = "NONE"; /** * The element is set or otherwise mutated. * * @generated from protobuf enum value: SET = 1; */ - SET = 1, + GeneratedCodeInfo_Annotation_Semantic[GeneratedCodeInfo_Annotation_Semantic["SET"] = 1] = "SET"; /** * An alias to the element is returned. * * @generated from protobuf enum value: ALIAS = 2; */ - ALIAS = 2 -} + GeneratedCodeInfo_Annotation_Semantic[GeneratedCodeInfo_Annotation_Semantic["ALIAS"] = 2] = "ALIAS"; +})(GeneratedCodeInfo_Annotation_Semantic = exports.GeneratedCodeInfo_Annotation_Semantic || (exports.GeneratedCodeInfo_Annotation_Semantic = {})); /** * The full set of known editions. * * @generated from protobuf enum google.protobuf.Edition */ -export enum Edition { +var Edition; +(function (Edition) { /** * A placeholder for an unknown edition value. * * @generated from protobuf enum value: EDITION_UNKNOWN = 0; */ - EDITION_UNKNOWN = 0, + Edition[Edition["EDITION_UNKNOWN"] = 0] = "EDITION_UNKNOWN"; /** * Legacy syntax "editions". These pre-date editions, but behave much like * distinct editions. These can't be used to specify the edition of proto @@ -1997,11 +543,11 @@ export enum Edition { * * @generated from protobuf enum value: EDITION_PROTO2 = 998; */ - EDITION_PROTO2 = 998, + Edition[Edition["EDITION_PROTO2"] = 998] = "EDITION_PROTO2"; /** * @generated from protobuf enum value: EDITION_PROTO3 = 999; */ - EDITION_PROTO3 = 999, + Edition[Edition["EDITION_PROTO3"] = 999] = "EDITION_PROTO3"; /** * Editions that have been released. The specific values are arbitrary and * should not be depended on, but they will always be time-ordered for easy @@ -2009,52 +555,52 @@ export enum Edition { * * @generated from protobuf enum value: EDITION_2023 = 1000; */ - EDITION_2023 = 1000, + Edition[Edition["EDITION_2023"] = 1000] = "EDITION_2023"; /** * Placeholder editions for testing feature resolution. These should not be * used or relyed on outside of tests. * * @generated from protobuf enum value: EDITION_1_TEST_ONLY = 1; */ - EDITION_1_TEST_ONLY = 1, + Edition[Edition["EDITION_1_TEST_ONLY"] = 1] = "EDITION_1_TEST_ONLY"; /** * @generated from protobuf enum value: EDITION_2_TEST_ONLY = 2; */ - EDITION_2_TEST_ONLY = 2, + Edition[Edition["EDITION_2_TEST_ONLY"] = 2] = "EDITION_2_TEST_ONLY"; /** * @generated from protobuf enum value: EDITION_99997_TEST_ONLY = 99997; */ - EDITION_99997_TEST_ONLY = 99997, + Edition[Edition["EDITION_99997_TEST_ONLY"] = 99997] = "EDITION_99997_TEST_ONLY"; /** * @generated from protobuf enum value: EDITION_99998_TEST_ONLY = 99998; */ - EDITION_99998_TEST_ONLY = 99998, + Edition[Edition["EDITION_99998_TEST_ONLY"] = 99998] = "EDITION_99998_TEST_ONLY"; /** * @generated from protobuf enum value: EDITION_99999_TEST_ONLY = 99999; */ - EDITION_99999_TEST_ONLY = 99999 -} + Edition[Edition["EDITION_99999_TEST_ONLY"] = 99999] = "EDITION_99999_TEST_ONLY"; +})(Edition = exports.Edition || (exports.Edition = {})); // @generated message type with reflection information, may provide speed optimized methods -class FileDescriptorSet$Type extends MessageType { +class FileDescriptorSet$Type extends runtime_4.MessageType { constructor() { super("google.protobuf.FileDescriptorSet", [ - { no: 1, name: "file", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => FileDescriptorProto } + { no: 1, name: "file", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => exports.FileDescriptorProto } ]); } - create(value?: PartialMessage): FileDescriptorSet { - const message = globalThis.Object.create((this.messagePrototype!)); + create(value) { + const message = globalThis.Object.create((this.messagePrototype)); message.file = []; if (value !== undefined) - reflectionMergePartial(this, message, value); + runtime_3.reflectionMergePartial(this, message, value); return message; } - internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: FileDescriptorSet): FileDescriptorSet { + internalBinaryRead(reader, length, options, target) { let message = target ?? this.create(), end = reader.pos + length; while (reader.pos < end) { let [fieldNo, wireType] = reader.tag(); switch (fieldNo) { case /* repeated google.protobuf.FileDescriptorProto file */ 1: - message.file.push(FileDescriptorProto.internalBinaryRead(reader, reader.uint32(), options)); + message.file.push(exports.FileDescriptorProto.internalBinaryRead(reader, reader.uint32(), options)); break; default: let u = options.readUnknownField; @@ -2062,27 +608,27 @@ class FileDescriptorSet$Type extends MessageType { throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); let d = reader.skip(wireType); if (u !== false) - (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + (u === true ? runtime_2.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); } } return message; } - internalBinaryWrite(message: FileDescriptorSet, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + internalBinaryWrite(message, writer, options) { /* repeated google.protobuf.FileDescriptorProto file = 1; */ for (let i = 0; i < message.file.length; i++) - FileDescriptorProto.internalBinaryWrite(message.file[i], writer.tag(1, WireType.LengthDelimited).fork(), options).join(); + exports.FileDescriptorProto.internalBinaryWrite(message.file[i], writer.tag(1, runtime_1.WireType.LengthDelimited).fork(), options).join(); let u = options.writeUnknownFields; if (u !== false) - (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + (u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); return writer; } } /** * @generated MessageType for protobuf message google.protobuf.FileDescriptorSet */ -export const FileDescriptorSet = new FileDescriptorSet$Type(); +exports.FileDescriptorSet = new FileDescriptorSet$Type(); // @generated message type with reflection information, may provide speed optimized methods -class FileDescriptorProto$Type extends MessageType { +class FileDescriptorProto$Type extends runtime_4.MessageType { constructor() { super("google.protobuf.FileDescriptorProto", [ { no: 1, name: "name", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ }, @@ -2090,18 +636,18 @@ class FileDescriptorProto$Type extends MessageType { { no: 3, name: "dependency", kind: "scalar", repeat: 2 /*RepeatType.UNPACKED*/, T: 9 /*ScalarType.STRING*/ }, { no: 10, name: "public_dependency", kind: "scalar", localName: "public_dependency", repeat: 2 /*RepeatType.UNPACKED*/, T: 5 /*ScalarType.INT32*/ }, { no: 11, name: "weak_dependency", kind: "scalar", localName: "weak_dependency", repeat: 2 /*RepeatType.UNPACKED*/, T: 5 /*ScalarType.INT32*/ }, - { no: 4, name: "message_type", kind: "message", localName: "message_type", repeat: 2 /*RepeatType.UNPACKED*/, T: () => DescriptorProto }, - { no: 5, name: "enum_type", kind: "message", localName: "enum_type", repeat: 2 /*RepeatType.UNPACKED*/, T: () => EnumDescriptorProto }, - { no: 6, name: "service", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => ServiceDescriptorProto }, - { no: 7, name: "extension", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => FieldDescriptorProto }, - { no: 8, name: "options", kind: "message", T: () => FileOptions }, - { no: 9, name: "source_code_info", kind: "message", localName: "source_code_info", T: () => SourceCodeInfo }, + { no: 4, name: "message_type", kind: "message", localName: "message_type", repeat: 2 /*RepeatType.UNPACKED*/, T: () => exports.DescriptorProto }, + { no: 5, name: "enum_type", kind: "message", localName: "enum_type", repeat: 2 /*RepeatType.UNPACKED*/, T: () => exports.EnumDescriptorProto }, + { no: 6, name: "service", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => exports.ServiceDescriptorProto }, + { no: 7, name: "extension", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => exports.FieldDescriptorProto }, + { no: 8, name: "options", kind: "message", T: () => exports.FileOptions }, + { no: 9, name: "source_code_info", kind: "message", localName: "source_code_info", T: () => exports.SourceCodeInfo }, { no: 12, name: "syntax", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ }, { no: 14, name: "edition", kind: "enum", opt: true, T: () => ["google.protobuf.Edition", Edition] } ]); } - create(value?: PartialMessage): FileDescriptorProto { - const message = globalThis.Object.create((this.messagePrototype!)); + create(value) { + const message = globalThis.Object.create((this.messagePrototype)); message.dependency = []; message.public_dependency = []; message.weak_dependency = []; @@ -2110,10 +656,10 @@ class FileDescriptorProto$Type extends MessageType { message.service = []; message.extension = []; if (value !== undefined) - reflectionMergePartial(this, message, value); + runtime_3.reflectionMergePartial(this, message, value); return message; } - internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: FileDescriptorProto): FileDescriptorProto { + internalBinaryRead(reader, length, options, target) { let message = target ?? this.create(), end = reader.pos + length; while (reader.pos < end) { let [fieldNo, wireType] = reader.tag(); @@ -2128,36 +674,36 @@ class FileDescriptorProto$Type extends MessageType { message.dependency.push(reader.string()); break; case /* repeated int32 public_dependency */ 10: - if (wireType === WireType.LengthDelimited) + if (wireType === runtime_1.WireType.LengthDelimited) for (let e = reader.int32() + reader.pos; reader.pos < e;) message.public_dependency.push(reader.int32()); else message.public_dependency.push(reader.int32()); break; case /* repeated int32 weak_dependency */ 11: - if (wireType === WireType.LengthDelimited) + if (wireType === runtime_1.WireType.LengthDelimited) for (let e = reader.int32() + reader.pos; reader.pos < e;) message.weak_dependency.push(reader.int32()); else message.weak_dependency.push(reader.int32()); break; case /* repeated google.protobuf.DescriptorProto message_type */ 4: - message.message_type.push(DescriptorProto.internalBinaryRead(reader, reader.uint32(), options)); + message.message_type.push(exports.DescriptorProto.internalBinaryRead(reader, reader.uint32(), options)); break; case /* repeated google.protobuf.EnumDescriptorProto enum_type */ 5: - message.enum_type.push(EnumDescriptorProto.internalBinaryRead(reader, reader.uint32(), options)); + message.enum_type.push(exports.EnumDescriptorProto.internalBinaryRead(reader, reader.uint32(), options)); break; case /* repeated google.protobuf.ServiceDescriptorProto service */ 6: - message.service.push(ServiceDescriptorProto.internalBinaryRead(reader, reader.uint32(), options)); + message.service.push(exports.ServiceDescriptorProto.internalBinaryRead(reader, reader.uint32(), options)); break; case /* repeated google.protobuf.FieldDescriptorProto extension */ 7: - message.extension.push(FieldDescriptorProto.internalBinaryRead(reader, reader.uint32(), options)); + message.extension.push(exports.FieldDescriptorProto.internalBinaryRead(reader, reader.uint32(), options)); break; case /* optional google.protobuf.FileOptions options */ 8: - message.options = FileOptions.internalBinaryRead(reader, reader.uint32(), options, message.options); + message.options = exports.FileOptions.internalBinaryRead(reader, reader.uint32(), options, message.options); break; case /* optional google.protobuf.SourceCodeInfo source_code_info */ 9: - message.source_code_info = SourceCodeInfo.internalBinaryRead(reader, reader.uint32(), options, message.source_code_info); + message.source_code_info = exports.SourceCodeInfo.internalBinaryRead(reader, reader.uint32(), options, message.source_code_info); break; case /* optional string syntax */ 12: message.syntax = reader.string(); @@ -2171,79 +717,79 @@ class FileDescriptorProto$Type extends MessageType { throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); let d = reader.skip(wireType); if (u !== false) - (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + (u === true ? runtime_2.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); } } return message; } - internalBinaryWrite(message: FileDescriptorProto, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + internalBinaryWrite(message, writer, options) { /* optional string name = 1; */ if (message.name !== undefined) - writer.tag(1, WireType.LengthDelimited).string(message.name); + writer.tag(1, runtime_1.WireType.LengthDelimited).string(message.name); /* optional string package = 2; */ if (message.package !== undefined) - writer.tag(2, WireType.LengthDelimited).string(message.package); + writer.tag(2, runtime_1.WireType.LengthDelimited).string(message.package); /* repeated string dependency = 3; */ for (let i = 0; i < message.dependency.length; i++) - writer.tag(3, WireType.LengthDelimited).string(message.dependency[i]); + writer.tag(3, runtime_1.WireType.LengthDelimited).string(message.dependency[i]); /* repeated int32 public_dependency = 10; */ for (let i = 0; i < message.public_dependency.length; i++) - writer.tag(10, WireType.Varint).int32(message.public_dependency[i]); + writer.tag(10, runtime_1.WireType.Varint).int32(message.public_dependency[i]); /* repeated int32 weak_dependency = 11; */ for (let i = 0; i < message.weak_dependency.length; i++) - writer.tag(11, WireType.Varint).int32(message.weak_dependency[i]); + writer.tag(11, runtime_1.WireType.Varint).int32(message.weak_dependency[i]); /* repeated google.protobuf.DescriptorProto message_type = 4; */ for (let i = 0; i < message.message_type.length; i++) - DescriptorProto.internalBinaryWrite(message.message_type[i], writer.tag(4, WireType.LengthDelimited).fork(), options).join(); + exports.DescriptorProto.internalBinaryWrite(message.message_type[i], writer.tag(4, runtime_1.WireType.LengthDelimited).fork(), options).join(); /* repeated google.protobuf.EnumDescriptorProto enum_type = 5; */ for (let i = 0; i < message.enum_type.length; i++) - EnumDescriptorProto.internalBinaryWrite(message.enum_type[i], writer.tag(5, WireType.LengthDelimited).fork(), options).join(); + exports.EnumDescriptorProto.internalBinaryWrite(message.enum_type[i], writer.tag(5, runtime_1.WireType.LengthDelimited).fork(), options).join(); /* repeated google.protobuf.ServiceDescriptorProto service = 6; */ for (let i = 0; i < message.service.length; i++) - ServiceDescriptorProto.internalBinaryWrite(message.service[i], writer.tag(6, WireType.LengthDelimited).fork(), options).join(); + exports.ServiceDescriptorProto.internalBinaryWrite(message.service[i], writer.tag(6, runtime_1.WireType.LengthDelimited).fork(), options).join(); /* repeated google.protobuf.FieldDescriptorProto extension = 7; */ for (let i = 0; i < message.extension.length; i++) - FieldDescriptorProto.internalBinaryWrite(message.extension[i], writer.tag(7, WireType.LengthDelimited).fork(), options).join(); + exports.FieldDescriptorProto.internalBinaryWrite(message.extension[i], writer.tag(7, runtime_1.WireType.LengthDelimited).fork(), options).join(); /* optional google.protobuf.FileOptions options = 8; */ if (message.options) - FileOptions.internalBinaryWrite(message.options, writer.tag(8, WireType.LengthDelimited).fork(), options).join(); + exports.FileOptions.internalBinaryWrite(message.options, writer.tag(8, runtime_1.WireType.LengthDelimited).fork(), options).join(); /* optional google.protobuf.SourceCodeInfo source_code_info = 9; */ if (message.source_code_info) - SourceCodeInfo.internalBinaryWrite(message.source_code_info, writer.tag(9, WireType.LengthDelimited).fork(), options).join(); + exports.SourceCodeInfo.internalBinaryWrite(message.source_code_info, writer.tag(9, runtime_1.WireType.LengthDelimited).fork(), options).join(); /* optional string syntax = 12; */ if (message.syntax !== undefined) - writer.tag(12, WireType.LengthDelimited).string(message.syntax); + writer.tag(12, runtime_1.WireType.LengthDelimited).string(message.syntax); /* optional google.protobuf.Edition edition = 14; */ if (message.edition !== undefined) - writer.tag(14, WireType.Varint).int32(message.edition); + writer.tag(14, runtime_1.WireType.Varint).int32(message.edition); let u = options.writeUnknownFields; if (u !== false) - (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + (u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); return writer; } } /** * @generated MessageType for protobuf message google.protobuf.FileDescriptorProto */ -export const FileDescriptorProto = new FileDescriptorProto$Type(); +exports.FileDescriptorProto = new FileDescriptorProto$Type(); // @generated message type with reflection information, may provide speed optimized methods -class DescriptorProto$Type extends MessageType { +class DescriptorProto$Type extends runtime_4.MessageType { constructor() { super("google.protobuf.DescriptorProto", [ { no: 1, name: "name", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ }, - { no: 2, name: "field", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => FieldDescriptorProto }, - { no: 6, name: "extension", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => FieldDescriptorProto }, - { no: 3, name: "nested_type", kind: "message", localName: "nested_type", repeat: 2 /*RepeatType.UNPACKED*/, T: () => DescriptorProto }, - { no: 4, name: "enum_type", kind: "message", localName: "enum_type", repeat: 2 /*RepeatType.UNPACKED*/, T: () => EnumDescriptorProto }, - { no: 5, name: "extension_range", kind: "message", localName: "extension_range", repeat: 2 /*RepeatType.UNPACKED*/, T: () => DescriptorProto_ExtensionRange }, - { no: 8, name: "oneof_decl", kind: "message", localName: "oneof_decl", repeat: 2 /*RepeatType.UNPACKED*/, T: () => OneofDescriptorProto }, - { no: 7, name: "options", kind: "message", T: () => MessageOptions }, - { no: 9, name: "reserved_range", kind: "message", localName: "reserved_range", repeat: 2 /*RepeatType.UNPACKED*/, T: () => DescriptorProto_ReservedRange }, + { no: 2, name: "field", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => exports.FieldDescriptorProto }, + { no: 6, name: "extension", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => exports.FieldDescriptorProto }, + { no: 3, name: "nested_type", kind: "message", localName: "nested_type", repeat: 2 /*RepeatType.UNPACKED*/, T: () => exports.DescriptorProto }, + { no: 4, name: "enum_type", kind: "message", localName: "enum_type", repeat: 2 /*RepeatType.UNPACKED*/, T: () => exports.EnumDescriptorProto }, + { no: 5, name: "extension_range", kind: "message", localName: "extension_range", repeat: 2 /*RepeatType.UNPACKED*/, T: () => exports.DescriptorProto_ExtensionRange }, + { no: 8, name: "oneof_decl", kind: "message", localName: "oneof_decl", repeat: 2 /*RepeatType.UNPACKED*/, T: () => exports.OneofDescriptorProto }, + { no: 7, name: "options", kind: "message", T: () => exports.MessageOptions }, + { no: 9, name: "reserved_range", kind: "message", localName: "reserved_range", repeat: 2 /*RepeatType.UNPACKED*/, T: () => exports.DescriptorProto_ReservedRange }, { no: 10, name: "reserved_name", kind: "scalar", localName: "reserved_name", repeat: 2 /*RepeatType.UNPACKED*/, T: 9 /*ScalarType.STRING*/ } ]); } - create(value?: PartialMessage): DescriptorProto { - const message = globalThis.Object.create((this.messagePrototype!)); + create(value) { + const message = globalThis.Object.create((this.messagePrototype)); message.field = []; message.extension = []; message.nested_type = []; @@ -2253,10 +799,10 @@ class DescriptorProto$Type extends MessageType { message.reserved_range = []; message.reserved_name = []; if (value !== undefined) - reflectionMergePartial(this, message, value); + runtime_3.reflectionMergePartial(this, message, value); return message; } - internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: DescriptorProto): DescriptorProto { + internalBinaryRead(reader, length, options, target) { let message = target ?? this.create(), end = reader.pos + length; while (reader.pos < end) { let [fieldNo, wireType] = reader.tag(); @@ -2265,28 +811,28 @@ class DescriptorProto$Type extends MessageType { message.name = reader.string(); break; case /* repeated google.protobuf.FieldDescriptorProto field */ 2: - message.field.push(FieldDescriptorProto.internalBinaryRead(reader, reader.uint32(), options)); + message.field.push(exports.FieldDescriptorProto.internalBinaryRead(reader, reader.uint32(), options)); break; case /* repeated google.protobuf.FieldDescriptorProto extension */ 6: - message.extension.push(FieldDescriptorProto.internalBinaryRead(reader, reader.uint32(), options)); + message.extension.push(exports.FieldDescriptorProto.internalBinaryRead(reader, reader.uint32(), options)); break; case /* repeated google.protobuf.DescriptorProto nested_type */ 3: - message.nested_type.push(DescriptorProto.internalBinaryRead(reader, reader.uint32(), options)); + message.nested_type.push(exports.DescriptorProto.internalBinaryRead(reader, reader.uint32(), options)); break; case /* repeated google.protobuf.EnumDescriptorProto enum_type */ 4: - message.enum_type.push(EnumDescriptorProto.internalBinaryRead(reader, reader.uint32(), options)); + message.enum_type.push(exports.EnumDescriptorProto.internalBinaryRead(reader, reader.uint32(), options)); break; case /* repeated google.protobuf.DescriptorProto.ExtensionRange extension_range */ 5: - message.extension_range.push(DescriptorProto_ExtensionRange.internalBinaryRead(reader, reader.uint32(), options)); + message.extension_range.push(exports.DescriptorProto_ExtensionRange.internalBinaryRead(reader, reader.uint32(), options)); break; case /* repeated google.protobuf.OneofDescriptorProto oneof_decl */ 8: - message.oneof_decl.push(OneofDescriptorProto.internalBinaryRead(reader, reader.uint32(), options)); + message.oneof_decl.push(exports.OneofDescriptorProto.internalBinaryRead(reader, reader.uint32(), options)); break; case /* optional google.protobuf.MessageOptions options */ 7: - message.options = MessageOptions.internalBinaryRead(reader, reader.uint32(), options, message.options); + message.options = exports.MessageOptions.internalBinaryRead(reader, reader.uint32(), options, message.options); break; case /* repeated google.protobuf.DescriptorProto.ReservedRange reserved_range */ 9: - message.reserved_range.push(DescriptorProto_ReservedRange.internalBinaryRead(reader, reader.uint32(), options)); + message.reserved_range.push(exports.DescriptorProto_ReservedRange.internalBinaryRead(reader, reader.uint32(), options)); break; case /* repeated string reserved_name */ 10: message.reserved_name.push(reader.string()); @@ -2297,68 +843,68 @@ class DescriptorProto$Type extends MessageType { throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); let d = reader.skip(wireType); if (u !== false) - (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + (u === true ? runtime_2.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); } } return message; } - internalBinaryWrite(message: DescriptorProto, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + internalBinaryWrite(message, writer, options) { /* optional string name = 1; */ if (message.name !== undefined) - writer.tag(1, WireType.LengthDelimited).string(message.name); + writer.tag(1, runtime_1.WireType.LengthDelimited).string(message.name); /* repeated google.protobuf.FieldDescriptorProto field = 2; */ for (let i = 0; i < message.field.length; i++) - FieldDescriptorProto.internalBinaryWrite(message.field[i], writer.tag(2, WireType.LengthDelimited).fork(), options).join(); + exports.FieldDescriptorProto.internalBinaryWrite(message.field[i], writer.tag(2, runtime_1.WireType.LengthDelimited).fork(), options).join(); /* repeated google.protobuf.FieldDescriptorProto extension = 6; */ for (let i = 0; i < message.extension.length; i++) - FieldDescriptorProto.internalBinaryWrite(message.extension[i], writer.tag(6, WireType.LengthDelimited).fork(), options).join(); + exports.FieldDescriptorProto.internalBinaryWrite(message.extension[i], writer.tag(6, runtime_1.WireType.LengthDelimited).fork(), options).join(); /* repeated google.protobuf.DescriptorProto nested_type = 3; */ for (let i = 0; i < message.nested_type.length; i++) - DescriptorProto.internalBinaryWrite(message.nested_type[i], writer.tag(3, WireType.LengthDelimited).fork(), options).join(); + exports.DescriptorProto.internalBinaryWrite(message.nested_type[i], writer.tag(3, runtime_1.WireType.LengthDelimited).fork(), options).join(); /* repeated google.protobuf.EnumDescriptorProto enum_type = 4; */ for (let i = 0; i < message.enum_type.length; i++) - EnumDescriptorProto.internalBinaryWrite(message.enum_type[i], writer.tag(4, WireType.LengthDelimited).fork(), options).join(); + exports.EnumDescriptorProto.internalBinaryWrite(message.enum_type[i], writer.tag(4, runtime_1.WireType.LengthDelimited).fork(), options).join(); /* repeated google.protobuf.DescriptorProto.ExtensionRange extension_range = 5; */ for (let i = 0; i < message.extension_range.length; i++) - DescriptorProto_ExtensionRange.internalBinaryWrite(message.extension_range[i], writer.tag(5, WireType.LengthDelimited).fork(), options).join(); + exports.DescriptorProto_ExtensionRange.internalBinaryWrite(message.extension_range[i], writer.tag(5, runtime_1.WireType.LengthDelimited).fork(), options).join(); /* repeated google.protobuf.OneofDescriptorProto oneof_decl = 8; */ for (let i = 0; i < message.oneof_decl.length; i++) - OneofDescriptorProto.internalBinaryWrite(message.oneof_decl[i], writer.tag(8, WireType.LengthDelimited).fork(), options).join(); + exports.OneofDescriptorProto.internalBinaryWrite(message.oneof_decl[i], writer.tag(8, runtime_1.WireType.LengthDelimited).fork(), options).join(); /* optional google.protobuf.MessageOptions options = 7; */ if (message.options) - MessageOptions.internalBinaryWrite(message.options, writer.tag(7, WireType.LengthDelimited).fork(), options).join(); + exports.MessageOptions.internalBinaryWrite(message.options, writer.tag(7, runtime_1.WireType.LengthDelimited).fork(), options).join(); /* repeated google.protobuf.DescriptorProto.ReservedRange reserved_range = 9; */ for (let i = 0; i < message.reserved_range.length; i++) - DescriptorProto_ReservedRange.internalBinaryWrite(message.reserved_range[i], writer.tag(9, WireType.LengthDelimited).fork(), options).join(); + exports.DescriptorProto_ReservedRange.internalBinaryWrite(message.reserved_range[i], writer.tag(9, runtime_1.WireType.LengthDelimited).fork(), options).join(); /* repeated string reserved_name = 10; */ for (let i = 0; i < message.reserved_name.length; i++) - writer.tag(10, WireType.LengthDelimited).string(message.reserved_name[i]); + writer.tag(10, runtime_1.WireType.LengthDelimited).string(message.reserved_name[i]); let u = options.writeUnknownFields; if (u !== false) - (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + (u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); return writer; } } /** * @generated MessageType for protobuf message google.protobuf.DescriptorProto */ -export const DescriptorProto = new DescriptorProto$Type(); +exports.DescriptorProto = new DescriptorProto$Type(); // @generated message type with reflection information, may provide speed optimized methods -class DescriptorProto_ExtensionRange$Type extends MessageType { +class DescriptorProto_ExtensionRange$Type extends runtime_4.MessageType { constructor() { super("google.protobuf.DescriptorProto.ExtensionRange", [ { no: 1, name: "start", kind: "scalar", opt: true, T: 5 /*ScalarType.INT32*/ }, { no: 2, name: "end", kind: "scalar", opt: true, T: 5 /*ScalarType.INT32*/ }, - { no: 3, name: "options", kind: "message", T: () => ExtensionRangeOptions } + { no: 3, name: "options", kind: "message", T: () => exports.ExtensionRangeOptions } ]); } - create(value?: PartialMessage): DescriptorProto_ExtensionRange { - const message = globalThis.Object.create((this.messagePrototype!)); + create(value) { + const message = globalThis.Object.create((this.messagePrototype)); if (value !== undefined) - reflectionMergePartial(this, message, value); + runtime_3.reflectionMergePartial(this, message, value); return message; } - internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: DescriptorProto_ExtensionRange): DescriptorProto_ExtensionRange { + internalBinaryRead(reader, length, options, target) { let message = target ?? this.create(), end = reader.pos + length; while (reader.pos < end) { let [fieldNo, wireType] = reader.tag(); @@ -2370,7 +916,7 @@ class DescriptorProto_ExtensionRange$Type extends MessageType { +class DescriptorProto_ReservedRange$Type extends runtime_4.MessageType { constructor() { super("google.protobuf.DescriptorProto.ReservedRange", [ { no: 1, name: "start", kind: "scalar", opt: true, T: 5 /*ScalarType.INT32*/ }, { no: 2, name: "end", kind: "scalar", opt: true, T: 5 /*ScalarType.INT32*/ } ]); } - create(value?: PartialMessage): DescriptorProto_ReservedRange { - const message = globalThis.Object.create((this.messagePrototype!)); + create(value) { + const message = globalThis.Object.create((this.messagePrototype)); if (value !== undefined) - reflectionMergePartial(this, message, value); + runtime_3.reflectionMergePartial(this, message, value); return message; } - internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: DescriptorProto_ReservedRange): DescriptorProto_ReservedRange { + internalBinaryRead(reader, length, options, target) { let message = target ?? this.create(), end = reader.pos + length; while (reader.pos < end) { let [fieldNo, wireType] = reader.tag(); @@ -2434,59 +980,59 @@ class DescriptorProto_ReservedRange$Type extends MessageType { +class ExtensionRangeOptions$Type extends runtime_4.MessageType { constructor() { super("google.protobuf.ExtensionRangeOptions", [ - { no: 999, name: "uninterpreted_option", kind: "message", localName: "uninterpreted_option", repeat: 2 /*RepeatType.UNPACKED*/, T: () => UninterpretedOption }, - { no: 2, name: "declaration", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => ExtensionRangeOptions_Declaration }, - { no: 50, name: "features", kind: "message", T: () => FeatureSet }, + { no: 999, name: "uninterpreted_option", kind: "message", localName: "uninterpreted_option", repeat: 2 /*RepeatType.UNPACKED*/, T: () => exports.UninterpretedOption }, + { no: 2, name: "declaration", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => exports.ExtensionRangeOptions_Declaration }, + { no: 50, name: "features", kind: "message", T: () => exports.FeatureSet }, { no: 3, name: "verification", kind: "enum", opt: true, T: () => ["google.protobuf.ExtensionRangeOptions.VerificationState", ExtensionRangeOptions_VerificationState] } ]); } - create(value?: PartialMessage): ExtensionRangeOptions { - const message = globalThis.Object.create((this.messagePrototype!)); + create(value) { + const message = globalThis.Object.create((this.messagePrototype)); message.uninterpreted_option = []; message.declaration = []; if (value !== undefined) - reflectionMergePartial(this, message, value); + runtime_3.reflectionMergePartial(this, message, value); return message; } - internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ExtensionRangeOptions): ExtensionRangeOptions { + internalBinaryRead(reader, length, options, target) { let message = target ?? this.create(), end = reader.pos + length; while (reader.pos < end) { let [fieldNo, wireType] = reader.tag(); switch (fieldNo) { case /* repeated google.protobuf.UninterpretedOption uninterpreted_option */ 999: - message.uninterpreted_option.push(UninterpretedOption.internalBinaryRead(reader, reader.uint32(), options)); + message.uninterpreted_option.push(exports.UninterpretedOption.internalBinaryRead(reader, reader.uint32(), options)); break; case /* repeated google.protobuf.ExtensionRangeOptions.Declaration declaration */ 2: - message.declaration.push(ExtensionRangeOptions_Declaration.internalBinaryRead(reader, reader.uint32(), options)); + message.declaration.push(exports.ExtensionRangeOptions_Declaration.internalBinaryRead(reader, reader.uint32(), options)); break; case /* optional google.protobuf.FeatureSet features */ 50: - message.features = FeatureSet.internalBinaryRead(reader, reader.uint32(), options, message.features); + message.features = exports.FeatureSet.internalBinaryRead(reader, reader.uint32(), options, message.features); break; case /* optional google.protobuf.ExtensionRangeOptions.VerificationState verification */ 3: message.verification = reader.int32(); @@ -2497,36 +1043,36 @@ class ExtensionRangeOptions$Type extends MessageType { throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); let d = reader.skip(wireType); if (u !== false) - (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + (u === true ? runtime_2.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); } } return message; } - internalBinaryWrite(message: ExtensionRangeOptions, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + internalBinaryWrite(message, writer, options) { /* repeated google.protobuf.UninterpretedOption uninterpreted_option = 999; */ for (let i = 0; i < message.uninterpreted_option.length; i++) - UninterpretedOption.internalBinaryWrite(message.uninterpreted_option[i], writer.tag(999, WireType.LengthDelimited).fork(), options).join(); + exports.UninterpretedOption.internalBinaryWrite(message.uninterpreted_option[i], writer.tag(999, runtime_1.WireType.LengthDelimited).fork(), options).join(); /* repeated google.protobuf.ExtensionRangeOptions.Declaration declaration = 2; */ for (let i = 0; i < message.declaration.length; i++) - ExtensionRangeOptions_Declaration.internalBinaryWrite(message.declaration[i], writer.tag(2, WireType.LengthDelimited).fork(), options).join(); + exports.ExtensionRangeOptions_Declaration.internalBinaryWrite(message.declaration[i], writer.tag(2, runtime_1.WireType.LengthDelimited).fork(), options).join(); /* optional google.protobuf.FeatureSet features = 50; */ if (message.features) - FeatureSet.internalBinaryWrite(message.features, writer.tag(50, WireType.LengthDelimited).fork(), options).join(); + exports.FeatureSet.internalBinaryWrite(message.features, writer.tag(50, runtime_1.WireType.LengthDelimited).fork(), options).join(); /* optional google.protobuf.ExtensionRangeOptions.VerificationState verification = 3; */ if (message.verification !== undefined) - writer.tag(3, WireType.Varint).int32(message.verification); + writer.tag(3, runtime_1.WireType.Varint).int32(message.verification); let u = options.writeUnknownFields; if (u !== false) - (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + (u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); return writer; } } /** * @generated MessageType for protobuf message google.protobuf.ExtensionRangeOptions */ -export const ExtensionRangeOptions = new ExtensionRangeOptions$Type(); +exports.ExtensionRangeOptions = new ExtensionRangeOptions$Type(); // @generated message type with reflection information, may provide speed optimized methods -class ExtensionRangeOptions_Declaration$Type extends MessageType { +class ExtensionRangeOptions_Declaration$Type extends runtime_4.MessageType { constructor() { super("google.protobuf.ExtensionRangeOptions.Declaration", [ { no: 1, name: "number", kind: "scalar", opt: true, T: 5 /*ScalarType.INT32*/ }, @@ -2536,13 +1082,13 @@ class ExtensionRangeOptions_Declaration$Type extends MessageType): ExtensionRangeOptions_Declaration { - const message = globalThis.Object.create((this.messagePrototype!)); + create(value) { + const message = globalThis.Object.create((this.messagePrototype)); if (value !== undefined) - reflectionMergePartial(this, message, value); + runtime_3.reflectionMergePartial(this, message, value); return message; } - internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ExtensionRangeOptions_Declaration): ExtensionRangeOptions_Declaration { + internalBinaryRead(reader, length, options, target) { let message = target ?? this.create(), end = reader.pos + length; while (reader.pos < end) { let [fieldNo, wireType] = reader.tag(); @@ -2568,39 +1114,39 @@ class ExtensionRangeOptions_Declaration$Type extends MessageType { +class FieldDescriptorProto$Type extends runtime_4.MessageType { constructor() { super("google.protobuf.FieldDescriptorProto", [ { no: 1, name: "name", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ }, @@ -2612,17 +1158,17 @@ class FieldDescriptorProto$Type extends MessageType { { no: 7, name: "default_value", kind: "scalar", localName: "default_value", opt: true, T: 9 /*ScalarType.STRING*/ }, { no: 9, name: "oneof_index", kind: "scalar", localName: "oneof_index", opt: true, T: 5 /*ScalarType.INT32*/ }, { no: 10, name: "json_name", kind: "scalar", localName: "json_name", opt: true, T: 9 /*ScalarType.STRING*/ }, - { no: 8, name: "options", kind: "message", T: () => FieldOptions }, + { no: 8, name: "options", kind: "message", T: () => exports.FieldOptions }, { no: 17, name: "proto3_optional", kind: "scalar", localName: "proto3_optional", opt: true, T: 8 /*ScalarType.BOOL*/ } ]); } - create(value?: PartialMessage): FieldDescriptorProto { - const message = globalThis.Object.create((this.messagePrototype!)); + create(value) { + const message = globalThis.Object.create((this.messagePrototype)); if (value !== undefined) - reflectionMergePartial(this, message, value); + runtime_3.reflectionMergePartial(this, message, value); return message; } - internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: FieldDescriptorProto): FieldDescriptorProto { + internalBinaryRead(reader, length, options, target) { let message = target ?? this.create(), end = reader.pos + length; while (reader.pos < end) { let [fieldNo, wireType] = reader.tag(); @@ -2655,7 +1201,7 @@ class FieldDescriptorProto$Type extends MessageType { message.json_name = reader.string(); break; case /* optional google.protobuf.FieldOptions options */ 8: - message.options = FieldOptions.internalBinaryRead(reader, reader.uint32(), options, message.options); + message.options = exports.FieldOptions.internalBinaryRead(reader, reader.uint32(), options, message.options); break; case /* optional bool proto3_optional */ 17: message.proto3_optional = reader.bool(); @@ -2666,70 +1212,70 @@ class FieldDescriptorProto$Type extends MessageType { throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); let d = reader.skip(wireType); if (u !== false) - (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + (u === true ? runtime_2.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); } } return message; } - internalBinaryWrite(message: FieldDescriptorProto, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + internalBinaryWrite(message, writer, options) { /* optional string name = 1; */ if (message.name !== undefined) - writer.tag(1, WireType.LengthDelimited).string(message.name); + writer.tag(1, runtime_1.WireType.LengthDelimited).string(message.name); /* optional int32 number = 3; */ if (message.number !== undefined) - writer.tag(3, WireType.Varint).int32(message.number); + writer.tag(3, runtime_1.WireType.Varint).int32(message.number); /* optional google.protobuf.FieldDescriptorProto.Label label = 4; */ if (message.label !== undefined) - writer.tag(4, WireType.Varint).int32(message.label); + writer.tag(4, runtime_1.WireType.Varint).int32(message.label); /* optional google.protobuf.FieldDescriptorProto.Type type = 5; */ if (message.type !== undefined) - writer.tag(5, WireType.Varint).int32(message.type); + writer.tag(5, runtime_1.WireType.Varint).int32(message.type); /* optional string type_name = 6; */ if (message.type_name !== undefined) - writer.tag(6, WireType.LengthDelimited).string(message.type_name); + writer.tag(6, runtime_1.WireType.LengthDelimited).string(message.type_name); /* optional string extendee = 2; */ if (message.extendee !== undefined) - writer.tag(2, WireType.LengthDelimited).string(message.extendee); + writer.tag(2, runtime_1.WireType.LengthDelimited).string(message.extendee); /* optional string default_value = 7; */ if (message.default_value !== undefined) - writer.tag(7, WireType.LengthDelimited).string(message.default_value); + writer.tag(7, runtime_1.WireType.LengthDelimited).string(message.default_value); /* optional int32 oneof_index = 9; */ if (message.oneof_index !== undefined) - writer.tag(9, WireType.Varint).int32(message.oneof_index); + writer.tag(9, runtime_1.WireType.Varint).int32(message.oneof_index); /* optional string json_name = 10; */ if (message.json_name !== undefined) - writer.tag(10, WireType.LengthDelimited).string(message.json_name); + writer.tag(10, runtime_1.WireType.LengthDelimited).string(message.json_name); /* optional google.protobuf.FieldOptions options = 8; */ if (message.options) - FieldOptions.internalBinaryWrite(message.options, writer.tag(8, WireType.LengthDelimited).fork(), options).join(); + exports.FieldOptions.internalBinaryWrite(message.options, writer.tag(8, runtime_1.WireType.LengthDelimited).fork(), options).join(); /* optional bool proto3_optional = 17; */ if (message.proto3_optional !== undefined) - writer.tag(17, WireType.Varint).bool(message.proto3_optional); + writer.tag(17, runtime_1.WireType.Varint).bool(message.proto3_optional); let u = options.writeUnknownFields; if (u !== false) - (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + (u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); return writer; } } /** * @generated MessageType for protobuf message google.protobuf.FieldDescriptorProto */ -export const FieldDescriptorProto = new FieldDescriptorProto$Type(); +exports.FieldDescriptorProto = new FieldDescriptorProto$Type(); // @generated message type with reflection information, may provide speed optimized methods -class OneofDescriptorProto$Type extends MessageType { +class OneofDescriptorProto$Type extends runtime_4.MessageType { constructor() { super("google.protobuf.OneofDescriptorProto", [ { no: 1, name: "name", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ }, - { no: 2, name: "options", kind: "message", T: () => OneofOptions } + { no: 2, name: "options", kind: "message", T: () => exports.OneofOptions } ]); } - create(value?: PartialMessage): OneofDescriptorProto { - const message = globalThis.Object.create((this.messagePrototype!)); + create(value) { + const message = globalThis.Object.create((this.messagePrototype)); if (value !== undefined) - reflectionMergePartial(this, message, value); + runtime_3.reflectionMergePartial(this, message, value); return message; } - internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: OneofDescriptorProto): OneofDescriptorProto { + internalBinaryRead(reader, length, options, target) { let message = target ?? this.create(), end = reader.pos + length; while (reader.pos < end) { let [fieldNo, wireType] = reader.tag(); @@ -2738,7 +1284,7 @@ class OneofDescriptorProto$Type extends MessageType { message.name = reader.string(); break; case /* optional google.protobuf.OneofOptions options */ 2: - message.options = OneofOptions.internalBinaryRead(reader, reader.uint32(), options, message.options); + message.options = exports.OneofOptions.internalBinaryRead(reader, reader.uint32(), options, message.options); break; default: let u = options.readUnknownField; @@ -2746,49 +1292,49 @@ class OneofDescriptorProto$Type extends MessageType { throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); let d = reader.skip(wireType); if (u !== false) - (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + (u === true ? runtime_2.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); } } return message; } - internalBinaryWrite(message: OneofDescriptorProto, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + internalBinaryWrite(message, writer, options) { /* optional string name = 1; */ if (message.name !== undefined) - writer.tag(1, WireType.LengthDelimited).string(message.name); + writer.tag(1, runtime_1.WireType.LengthDelimited).string(message.name); /* optional google.protobuf.OneofOptions options = 2; */ if (message.options) - OneofOptions.internalBinaryWrite(message.options, writer.tag(2, WireType.LengthDelimited).fork(), options).join(); + exports.OneofOptions.internalBinaryWrite(message.options, writer.tag(2, runtime_1.WireType.LengthDelimited).fork(), options).join(); let u = options.writeUnknownFields; if (u !== false) - (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + (u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); return writer; } } /** * @generated MessageType for protobuf message google.protobuf.OneofDescriptorProto */ -export const OneofDescriptorProto = new OneofDescriptorProto$Type(); +exports.OneofDescriptorProto = new OneofDescriptorProto$Type(); // @generated message type with reflection information, may provide speed optimized methods -class EnumDescriptorProto$Type extends MessageType { +class EnumDescriptorProto$Type extends runtime_4.MessageType { constructor() { super("google.protobuf.EnumDescriptorProto", [ { no: 1, name: "name", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ }, - { no: 2, name: "value", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => EnumValueDescriptorProto }, - { no: 3, name: "options", kind: "message", T: () => EnumOptions }, - { no: 4, name: "reserved_range", kind: "message", localName: "reserved_range", repeat: 2 /*RepeatType.UNPACKED*/, T: () => EnumDescriptorProto_EnumReservedRange }, + { no: 2, name: "value", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => exports.EnumValueDescriptorProto }, + { no: 3, name: "options", kind: "message", T: () => exports.EnumOptions }, + { no: 4, name: "reserved_range", kind: "message", localName: "reserved_range", repeat: 2 /*RepeatType.UNPACKED*/, T: () => exports.EnumDescriptorProto_EnumReservedRange }, { no: 5, name: "reserved_name", kind: "scalar", localName: "reserved_name", repeat: 2 /*RepeatType.UNPACKED*/, T: 9 /*ScalarType.STRING*/ } ]); } - create(value?: PartialMessage): EnumDescriptorProto { - const message = globalThis.Object.create((this.messagePrototype!)); + create(value) { + const message = globalThis.Object.create((this.messagePrototype)); message.value = []; message.reserved_range = []; message.reserved_name = []; if (value !== undefined) - reflectionMergePartial(this, message, value); + runtime_3.reflectionMergePartial(this, message, value); return message; } - internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: EnumDescriptorProto): EnumDescriptorProto { + internalBinaryRead(reader, length, options, target) { let message = target ?? this.create(), end = reader.pos + length; while (reader.pos < end) { let [fieldNo, wireType] = reader.tag(); @@ -2797,13 +1343,13 @@ class EnumDescriptorProto$Type extends MessageType { message.name = reader.string(); break; case /* repeated google.protobuf.EnumValueDescriptorProto value */ 2: - message.value.push(EnumValueDescriptorProto.internalBinaryRead(reader, reader.uint32(), options)); + message.value.push(exports.EnumValueDescriptorProto.internalBinaryRead(reader, reader.uint32(), options)); break; case /* optional google.protobuf.EnumOptions options */ 3: - message.options = EnumOptions.internalBinaryRead(reader, reader.uint32(), options, message.options); + message.options = exports.EnumOptions.internalBinaryRead(reader, reader.uint32(), options, message.options); break; case /* repeated google.protobuf.EnumDescriptorProto.EnumReservedRange reserved_range */ 4: - message.reserved_range.push(EnumDescriptorProto_EnumReservedRange.internalBinaryRead(reader, reader.uint32(), options)); + message.reserved_range.push(exports.EnumDescriptorProto_EnumReservedRange.internalBinaryRead(reader, reader.uint32(), options)); break; case /* repeated string reserved_name */ 5: message.reserved_name.push(reader.string()); @@ -2814,52 +1360,52 @@ class EnumDescriptorProto$Type extends MessageType { throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); let d = reader.skip(wireType); if (u !== false) - (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + (u === true ? runtime_2.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); } } return message; } - internalBinaryWrite(message: EnumDescriptorProto, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + internalBinaryWrite(message, writer, options) { /* optional string name = 1; */ if (message.name !== undefined) - writer.tag(1, WireType.LengthDelimited).string(message.name); + writer.tag(1, runtime_1.WireType.LengthDelimited).string(message.name); /* repeated google.protobuf.EnumValueDescriptorProto value = 2; */ for (let i = 0; i < message.value.length; i++) - EnumValueDescriptorProto.internalBinaryWrite(message.value[i], writer.tag(2, WireType.LengthDelimited).fork(), options).join(); + exports.EnumValueDescriptorProto.internalBinaryWrite(message.value[i], writer.tag(2, runtime_1.WireType.LengthDelimited).fork(), options).join(); /* optional google.protobuf.EnumOptions options = 3; */ if (message.options) - EnumOptions.internalBinaryWrite(message.options, writer.tag(3, WireType.LengthDelimited).fork(), options).join(); + exports.EnumOptions.internalBinaryWrite(message.options, writer.tag(3, runtime_1.WireType.LengthDelimited).fork(), options).join(); /* repeated google.protobuf.EnumDescriptorProto.EnumReservedRange reserved_range = 4; */ for (let i = 0; i < message.reserved_range.length; i++) - EnumDescriptorProto_EnumReservedRange.internalBinaryWrite(message.reserved_range[i], writer.tag(4, WireType.LengthDelimited).fork(), options).join(); + exports.EnumDescriptorProto_EnumReservedRange.internalBinaryWrite(message.reserved_range[i], writer.tag(4, runtime_1.WireType.LengthDelimited).fork(), options).join(); /* repeated string reserved_name = 5; */ for (let i = 0; i < message.reserved_name.length; i++) - writer.tag(5, WireType.LengthDelimited).string(message.reserved_name[i]); + writer.tag(5, runtime_1.WireType.LengthDelimited).string(message.reserved_name[i]); let u = options.writeUnknownFields; if (u !== false) - (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + (u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); return writer; } } /** * @generated MessageType for protobuf message google.protobuf.EnumDescriptorProto */ -export const EnumDescriptorProto = new EnumDescriptorProto$Type(); +exports.EnumDescriptorProto = new EnumDescriptorProto$Type(); // @generated message type with reflection information, may provide speed optimized methods -class EnumDescriptorProto_EnumReservedRange$Type extends MessageType { +class EnumDescriptorProto_EnumReservedRange$Type extends runtime_4.MessageType { constructor() { super("google.protobuf.EnumDescriptorProto.EnumReservedRange", [ { no: 1, name: "start", kind: "scalar", opt: true, T: 5 /*ScalarType.INT32*/ }, { no: 2, name: "end", kind: "scalar", opt: true, T: 5 /*ScalarType.INT32*/ } ]); } - create(value?: PartialMessage): EnumDescriptorProto_EnumReservedRange { - const message = globalThis.Object.create((this.messagePrototype!)); + create(value) { + const message = globalThis.Object.create((this.messagePrototype)); if (value !== undefined) - reflectionMergePartial(this, message, value); + runtime_3.reflectionMergePartial(this, message, value); return message; } - internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: EnumDescriptorProto_EnumReservedRange): EnumDescriptorProto_EnumReservedRange { + internalBinaryRead(reader, length, options, target) { let message = target ?? this.create(), end = reader.pos + length; while (reader.pos < end) { let [fieldNo, wireType] = reader.tag(); @@ -2876,44 +1422,44 @@ class EnumDescriptorProto_EnumReservedRange$Type extends MessageType { +class EnumValueDescriptorProto$Type extends runtime_4.MessageType { constructor() { super("google.protobuf.EnumValueDescriptorProto", [ { no: 1, name: "name", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ }, { no: 2, name: "number", kind: "scalar", opt: true, T: 5 /*ScalarType.INT32*/ }, - { no: 3, name: "options", kind: "message", T: () => EnumValueOptions } + { no: 3, name: "options", kind: "message", T: () => exports.EnumValueOptions } ]); } - create(value?: PartialMessage): EnumValueDescriptorProto { - const message = globalThis.Object.create((this.messagePrototype!)); + create(value) { + const message = globalThis.Object.create((this.messagePrototype)); if (value !== undefined) - reflectionMergePartial(this, message, value); + runtime_3.reflectionMergePartial(this, message, value); return message; } - internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: EnumValueDescriptorProto): EnumValueDescriptorProto { + internalBinaryRead(reader, length, options, target) { let message = target ?? this.create(), end = reader.pos + length; while (reader.pos < end) { let [fieldNo, wireType] = reader.tag(); @@ -2925,7 +1471,7 @@ class EnumValueDescriptorProto$Type extends MessageType { +class ServiceDescriptorProto$Type extends runtime_4.MessageType { constructor() { super("google.protobuf.ServiceDescriptorProto", [ { no: 1, name: "name", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ }, - { no: 2, name: "method", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => MethodDescriptorProto }, - { no: 3, name: "options", kind: "message", T: () => ServiceOptions } + { no: 2, name: "method", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => exports.MethodDescriptorProto }, + { no: 3, name: "options", kind: "message", T: () => exports.ServiceOptions } ]); } - create(value?: PartialMessage): ServiceDescriptorProto { - const message = globalThis.Object.create((this.messagePrototype!)); + create(value) { + const message = globalThis.Object.create((this.messagePrototype)); message.method = []; if (value !== undefined) - reflectionMergePartial(this, message, value); + runtime_3.reflectionMergePartial(this, message, value); return message; } - internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ServiceDescriptorProto): ServiceDescriptorProto { + internalBinaryRead(reader, length, options, target) { let message = target ?? this.create(), end = reader.pos + length; while (reader.pos < end) { let [fieldNo, wireType] = reader.tag(); @@ -2983,10 +1529,10 @@ class ServiceDescriptorProto$Type extends MessageType { message.name = reader.string(); break; case /* repeated google.protobuf.MethodDescriptorProto method */ 2: - message.method.push(MethodDescriptorProto.internalBinaryRead(reader, reader.uint32(), options)); + message.method.push(exports.MethodDescriptorProto.internalBinaryRead(reader, reader.uint32(), options)); break; case /* optional google.protobuf.ServiceOptions options */ 3: - message.options = ServiceOptions.internalBinaryRead(reader, reader.uint32(), options, message.options); + message.options = exports.ServiceOptions.internalBinaryRead(reader, reader.uint32(), options, message.options); break; default: let u = options.readUnknownField; @@ -2994,50 +1540,50 @@ class ServiceDescriptorProto$Type extends MessageType { throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); let d = reader.skip(wireType); if (u !== false) - (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + (u === true ? runtime_2.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); } } return message; } - internalBinaryWrite(message: ServiceDescriptorProto, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + internalBinaryWrite(message, writer, options) { /* optional string name = 1; */ if (message.name !== undefined) - writer.tag(1, WireType.LengthDelimited).string(message.name); + writer.tag(1, runtime_1.WireType.LengthDelimited).string(message.name); /* repeated google.protobuf.MethodDescriptorProto method = 2; */ for (let i = 0; i < message.method.length; i++) - MethodDescriptorProto.internalBinaryWrite(message.method[i], writer.tag(2, WireType.LengthDelimited).fork(), options).join(); + exports.MethodDescriptorProto.internalBinaryWrite(message.method[i], writer.tag(2, runtime_1.WireType.LengthDelimited).fork(), options).join(); /* optional google.protobuf.ServiceOptions options = 3; */ if (message.options) - ServiceOptions.internalBinaryWrite(message.options, writer.tag(3, WireType.LengthDelimited).fork(), options).join(); + exports.ServiceOptions.internalBinaryWrite(message.options, writer.tag(3, runtime_1.WireType.LengthDelimited).fork(), options).join(); let u = options.writeUnknownFields; if (u !== false) - (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + (u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); return writer; } } /** * @generated MessageType for protobuf message google.protobuf.ServiceDescriptorProto */ -export const ServiceDescriptorProto = new ServiceDescriptorProto$Type(); +exports.ServiceDescriptorProto = new ServiceDescriptorProto$Type(); // @generated message type with reflection information, may provide speed optimized methods -class MethodDescriptorProto$Type extends MessageType { +class MethodDescriptorProto$Type extends runtime_4.MessageType { constructor() { super("google.protobuf.MethodDescriptorProto", [ { no: 1, name: "name", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ }, { no: 2, name: "input_type", kind: "scalar", localName: "input_type", opt: true, T: 9 /*ScalarType.STRING*/ }, { no: 3, name: "output_type", kind: "scalar", localName: "output_type", opt: true, T: 9 /*ScalarType.STRING*/ }, - { no: 4, name: "options", kind: "message", T: () => MethodOptions }, + { no: 4, name: "options", kind: "message", T: () => exports.MethodOptions }, { no: 5, name: "client_streaming", kind: "scalar", localName: "client_streaming", opt: true, T: 8 /*ScalarType.BOOL*/ }, { no: 6, name: "server_streaming", kind: "scalar", localName: "server_streaming", opt: true, T: 8 /*ScalarType.BOOL*/ } ]); } - create(value?: PartialMessage): MethodDescriptorProto { - const message = globalThis.Object.create((this.messagePrototype!)); + create(value) { + const message = globalThis.Object.create((this.messagePrototype)); if (value !== undefined) - reflectionMergePartial(this, message, value); + runtime_3.reflectionMergePartial(this, message, value); return message; } - internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: MethodDescriptorProto): MethodDescriptorProto { + internalBinaryRead(reader, length, options, target) { let message = target ?? this.create(), end = reader.pos + length; while (reader.pos < end) { let [fieldNo, wireType] = reader.tag(); @@ -3052,7 +1598,7 @@ class MethodDescriptorProto$Type extends MessageType { message.output_type = reader.string(); break; case /* optional google.protobuf.MethodOptions options */ 4: - message.options = MethodOptions.internalBinaryRead(reader, reader.uint32(), options, message.options); + message.options = exports.MethodOptions.internalBinaryRead(reader, reader.uint32(), options, message.options); break; case /* optional bool client_streaming */ 5: message.client_streaming = reader.bool(); @@ -3066,42 +1612,42 @@ class MethodDescriptorProto$Type extends MessageType { throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); let d = reader.skip(wireType); if (u !== false) - (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + (u === true ? runtime_2.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); } } return message; } - internalBinaryWrite(message: MethodDescriptorProto, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + internalBinaryWrite(message, writer, options) { /* optional string name = 1; */ if (message.name !== undefined) - writer.tag(1, WireType.LengthDelimited).string(message.name); + writer.tag(1, runtime_1.WireType.LengthDelimited).string(message.name); /* optional string input_type = 2; */ if (message.input_type !== undefined) - writer.tag(2, WireType.LengthDelimited).string(message.input_type); + writer.tag(2, runtime_1.WireType.LengthDelimited).string(message.input_type); /* optional string output_type = 3; */ if (message.output_type !== undefined) - writer.tag(3, WireType.LengthDelimited).string(message.output_type); + writer.tag(3, runtime_1.WireType.LengthDelimited).string(message.output_type); /* optional google.protobuf.MethodOptions options = 4; */ if (message.options) - MethodOptions.internalBinaryWrite(message.options, writer.tag(4, WireType.LengthDelimited).fork(), options).join(); + exports.MethodOptions.internalBinaryWrite(message.options, writer.tag(4, runtime_1.WireType.LengthDelimited).fork(), options).join(); /* optional bool client_streaming = 5; */ if (message.client_streaming !== undefined) - writer.tag(5, WireType.Varint).bool(message.client_streaming); + writer.tag(5, runtime_1.WireType.Varint).bool(message.client_streaming); /* optional bool server_streaming = 6; */ if (message.server_streaming !== undefined) - writer.tag(6, WireType.Varint).bool(message.server_streaming); + writer.tag(6, runtime_1.WireType.Varint).bool(message.server_streaming); let u = options.writeUnknownFields; if (u !== false) - (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + (u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); return writer; } } /** * @generated MessageType for protobuf message google.protobuf.MethodDescriptorProto */ -export const MethodDescriptorProto = new MethodDescriptorProto$Type(); +exports.MethodDescriptorProto = new MethodDescriptorProto$Type(); // @generated message type with reflection information, may provide speed optimized methods -class FileOptions$Type extends MessageType { +class FileOptions$Type extends runtime_4.MessageType { constructor() { super("google.protobuf.FileOptions", [ { no: 1, name: "java_package", kind: "scalar", localName: "java_package", opt: true, T: 9 /*ScalarType.STRING*/ }, @@ -3124,18 +1670,18 @@ class FileOptions$Type extends MessageType { { no: 41, name: "php_namespace", kind: "scalar", localName: "php_namespace", opt: true, T: 9 /*ScalarType.STRING*/ }, { no: 44, name: "php_metadata_namespace", kind: "scalar", localName: "php_metadata_namespace", opt: true, T: 9 /*ScalarType.STRING*/ }, { no: 45, name: "ruby_package", kind: "scalar", localName: "ruby_package", opt: true, T: 9 /*ScalarType.STRING*/ }, - { no: 50, name: "features", kind: "message", T: () => FeatureSet }, - { no: 999, name: "uninterpreted_option", kind: "message", localName: "uninterpreted_option", repeat: 2 /*RepeatType.UNPACKED*/, T: () => UninterpretedOption } + { no: 50, name: "features", kind: "message", T: () => exports.FeatureSet }, + { no: 999, name: "uninterpreted_option", kind: "message", localName: "uninterpreted_option", repeat: 2 /*RepeatType.UNPACKED*/, T: () => exports.UninterpretedOption } ]); } - create(value?: PartialMessage): FileOptions { - const message = globalThis.Object.create((this.messagePrototype!)); + create(value) { + const message = globalThis.Object.create((this.messagePrototype)); message.uninterpreted_option = []; if (value !== undefined) - reflectionMergePartial(this, message, value); + runtime_3.reflectionMergePartial(this, message, value); return message; } - internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: FileOptions): FileOptions { + internalBinaryRead(reader, length, options, target) { let message = target ?? this.create(), end = reader.pos + length; while (reader.pos < end) { let [fieldNo, wireType] = reader.tag(); @@ -3201,10 +1747,10 @@ class FileOptions$Type extends MessageType { message.ruby_package = reader.string(); break; case /* optional google.protobuf.FeatureSet features */ 50: - message.features = FeatureSet.internalBinaryRead(reader, reader.uint32(), options, message.features); + message.features = exports.FeatureSet.internalBinaryRead(reader, reader.uint32(), options, message.features); break; case /* repeated google.protobuf.UninterpretedOption uninterpreted_option */ 999: - message.uninterpreted_option.push(UninterpretedOption.internalBinaryRead(reader, reader.uint32(), options)); + message.uninterpreted_option.push(exports.UninterpretedOption.internalBinaryRead(reader, reader.uint32(), options)); break; default: let u = options.readUnknownField; @@ -3212,90 +1758,90 @@ class FileOptions$Type extends MessageType { throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); let d = reader.skip(wireType); if (u !== false) - (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + (u === true ? runtime_2.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); } } return message; } - internalBinaryWrite(message: FileOptions, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + internalBinaryWrite(message, writer, options) { /* optional string java_package = 1; */ if (message.java_package !== undefined) - writer.tag(1, WireType.LengthDelimited).string(message.java_package); + writer.tag(1, runtime_1.WireType.LengthDelimited).string(message.java_package); /* optional string java_outer_classname = 8; */ if (message.java_outer_classname !== undefined) - writer.tag(8, WireType.LengthDelimited).string(message.java_outer_classname); + writer.tag(8, runtime_1.WireType.LengthDelimited).string(message.java_outer_classname); /* optional bool java_multiple_files = 10; */ if (message.java_multiple_files !== undefined) - writer.tag(10, WireType.Varint).bool(message.java_multiple_files); + writer.tag(10, runtime_1.WireType.Varint).bool(message.java_multiple_files); /* optional bool java_generate_equals_and_hash = 20 [deprecated = true]; */ if (message.java_generate_equals_and_hash !== undefined) - writer.tag(20, WireType.Varint).bool(message.java_generate_equals_and_hash); + writer.tag(20, runtime_1.WireType.Varint).bool(message.java_generate_equals_and_hash); /* optional bool java_string_check_utf8 = 27; */ if (message.java_string_check_utf8 !== undefined) - writer.tag(27, WireType.Varint).bool(message.java_string_check_utf8); + writer.tag(27, runtime_1.WireType.Varint).bool(message.java_string_check_utf8); /* optional google.protobuf.FileOptions.OptimizeMode optimize_for = 9; */ if (message.optimize_for !== undefined) - writer.tag(9, WireType.Varint).int32(message.optimize_for); + writer.tag(9, runtime_1.WireType.Varint).int32(message.optimize_for); /* optional string go_package = 11; */ if (message.go_package !== undefined) - writer.tag(11, WireType.LengthDelimited).string(message.go_package); + writer.tag(11, runtime_1.WireType.LengthDelimited).string(message.go_package); /* optional bool cc_generic_services = 16; */ if (message.cc_generic_services !== undefined) - writer.tag(16, WireType.Varint).bool(message.cc_generic_services); + writer.tag(16, runtime_1.WireType.Varint).bool(message.cc_generic_services); /* optional bool java_generic_services = 17; */ if (message.java_generic_services !== undefined) - writer.tag(17, WireType.Varint).bool(message.java_generic_services); + writer.tag(17, runtime_1.WireType.Varint).bool(message.java_generic_services); /* optional bool py_generic_services = 18; */ if (message.py_generic_services !== undefined) - writer.tag(18, WireType.Varint).bool(message.py_generic_services); + writer.tag(18, runtime_1.WireType.Varint).bool(message.py_generic_services); /* optional bool php_generic_services = 42; */ if (message.php_generic_services !== undefined) - writer.tag(42, WireType.Varint).bool(message.php_generic_services); + writer.tag(42, runtime_1.WireType.Varint).bool(message.php_generic_services); /* optional bool deprecated = 23; */ if (message.deprecated !== undefined) - writer.tag(23, WireType.Varint).bool(message.deprecated); + writer.tag(23, runtime_1.WireType.Varint).bool(message.deprecated); /* optional bool cc_enable_arenas = 31; */ if (message.cc_enable_arenas !== undefined) - writer.tag(31, WireType.Varint).bool(message.cc_enable_arenas); + writer.tag(31, runtime_1.WireType.Varint).bool(message.cc_enable_arenas); /* optional string objc_class_prefix = 36; */ if (message.objc_class_prefix !== undefined) - writer.tag(36, WireType.LengthDelimited).string(message.objc_class_prefix); + writer.tag(36, runtime_1.WireType.LengthDelimited).string(message.objc_class_prefix); /* optional string csharp_namespace = 37; */ if (message.csharp_namespace !== undefined) - writer.tag(37, WireType.LengthDelimited).string(message.csharp_namespace); + writer.tag(37, runtime_1.WireType.LengthDelimited).string(message.csharp_namespace); /* optional string swift_prefix = 39; */ if (message.swift_prefix !== undefined) - writer.tag(39, WireType.LengthDelimited).string(message.swift_prefix); + writer.tag(39, runtime_1.WireType.LengthDelimited).string(message.swift_prefix); /* optional string php_class_prefix = 40; */ if (message.php_class_prefix !== undefined) - writer.tag(40, WireType.LengthDelimited).string(message.php_class_prefix); + writer.tag(40, runtime_1.WireType.LengthDelimited).string(message.php_class_prefix); /* optional string php_namespace = 41; */ if (message.php_namespace !== undefined) - writer.tag(41, WireType.LengthDelimited).string(message.php_namespace); + writer.tag(41, runtime_1.WireType.LengthDelimited).string(message.php_namespace); /* optional string php_metadata_namespace = 44; */ if (message.php_metadata_namespace !== undefined) - writer.tag(44, WireType.LengthDelimited).string(message.php_metadata_namespace); + writer.tag(44, runtime_1.WireType.LengthDelimited).string(message.php_metadata_namespace); /* optional string ruby_package = 45; */ if (message.ruby_package !== undefined) - writer.tag(45, WireType.LengthDelimited).string(message.ruby_package); + writer.tag(45, runtime_1.WireType.LengthDelimited).string(message.ruby_package); /* optional google.protobuf.FeatureSet features = 50; */ if (message.features) - FeatureSet.internalBinaryWrite(message.features, writer.tag(50, WireType.LengthDelimited).fork(), options).join(); + exports.FeatureSet.internalBinaryWrite(message.features, writer.tag(50, runtime_1.WireType.LengthDelimited).fork(), options).join(); /* repeated google.protobuf.UninterpretedOption uninterpreted_option = 999; */ for (let i = 0; i < message.uninterpreted_option.length; i++) - UninterpretedOption.internalBinaryWrite(message.uninterpreted_option[i], writer.tag(999, WireType.LengthDelimited).fork(), options).join(); + exports.UninterpretedOption.internalBinaryWrite(message.uninterpreted_option[i], writer.tag(999, runtime_1.WireType.LengthDelimited).fork(), options).join(); let u = options.writeUnknownFields; if (u !== false) - (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + (u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); return writer; } } /** * @generated MessageType for protobuf message google.protobuf.FileOptions */ -export const FileOptions = new FileOptions$Type(); +exports.FileOptions = new FileOptions$Type(); // @generated message type with reflection information, may provide speed optimized methods -class MessageOptions$Type extends MessageType { +class MessageOptions$Type extends runtime_4.MessageType { constructor() { super("google.protobuf.MessageOptions", [ { no: 1, name: "message_set_wire_format", kind: "scalar", localName: "message_set_wire_format", opt: true, T: 8 /*ScalarType.BOOL*/ }, @@ -3303,18 +1849,18 @@ class MessageOptions$Type extends MessageType { { no: 3, name: "deprecated", kind: "scalar", opt: true, T: 8 /*ScalarType.BOOL*/ }, { no: 7, name: "map_entry", kind: "scalar", localName: "map_entry", opt: true, T: 8 /*ScalarType.BOOL*/ }, { no: 11, name: "deprecated_legacy_json_field_conflicts", kind: "scalar", localName: "deprecated_legacy_json_field_conflicts", opt: true, T: 8 /*ScalarType.BOOL*/ }, - { no: 12, name: "features", kind: "message", T: () => FeatureSet }, - { no: 999, name: "uninterpreted_option", kind: "message", localName: "uninterpreted_option", repeat: 2 /*RepeatType.UNPACKED*/, T: () => UninterpretedOption } + { no: 12, name: "features", kind: "message", T: () => exports.FeatureSet }, + { no: 999, name: "uninterpreted_option", kind: "message", localName: "uninterpreted_option", repeat: 2 /*RepeatType.UNPACKED*/, T: () => exports.UninterpretedOption } ]); } - create(value?: PartialMessage): MessageOptions { - const message = globalThis.Object.create((this.messagePrototype!)); + create(value) { + const message = globalThis.Object.create((this.messagePrototype)); message.uninterpreted_option = []; if (value !== undefined) - reflectionMergePartial(this, message, value); + runtime_3.reflectionMergePartial(this, message, value); return message; } - internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: MessageOptions): MessageOptions { + internalBinaryRead(reader, length, options, target) { let message = target ?? this.create(), end = reader.pos + length; while (reader.pos < end) { let [fieldNo, wireType] = reader.tag(); @@ -3335,10 +1881,10 @@ class MessageOptions$Type extends MessageType { message.deprecated_legacy_json_field_conflicts = reader.bool(); break; case /* optional google.protobuf.FeatureSet features */ 12: - message.features = FeatureSet.internalBinaryRead(reader, reader.uint32(), options, message.features); + message.features = exports.FeatureSet.internalBinaryRead(reader, reader.uint32(), options, message.features); break; case /* repeated google.protobuf.UninterpretedOption uninterpreted_option */ 999: - message.uninterpreted_option.push(UninterpretedOption.internalBinaryRead(reader, reader.uint32(), options)); + message.uninterpreted_option.push(exports.UninterpretedOption.internalBinaryRead(reader, reader.uint32(), options)); break; default: let u = options.readUnknownField; @@ -3346,45 +1892,45 @@ class MessageOptions$Type extends MessageType { throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); let d = reader.skip(wireType); if (u !== false) - (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + (u === true ? runtime_2.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); } } return message; } - internalBinaryWrite(message: MessageOptions, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + internalBinaryWrite(message, writer, options) { /* optional bool message_set_wire_format = 1; */ if (message.message_set_wire_format !== undefined) - writer.tag(1, WireType.Varint).bool(message.message_set_wire_format); + writer.tag(1, runtime_1.WireType.Varint).bool(message.message_set_wire_format); /* optional bool no_standard_descriptor_accessor = 2; */ if (message.no_standard_descriptor_accessor !== undefined) - writer.tag(2, WireType.Varint).bool(message.no_standard_descriptor_accessor); + writer.tag(2, runtime_1.WireType.Varint).bool(message.no_standard_descriptor_accessor); /* optional bool deprecated = 3; */ if (message.deprecated !== undefined) - writer.tag(3, WireType.Varint).bool(message.deprecated); + writer.tag(3, runtime_1.WireType.Varint).bool(message.deprecated); /* optional bool map_entry = 7; */ if (message.map_entry !== undefined) - writer.tag(7, WireType.Varint).bool(message.map_entry); + writer.tag(7, runtime_1.WireType.Varint).bool(message.map_entry); /* optional bool deprecated_legacy_json_field_conflicts = 11 [deprecated = true]; */ if (message.deprecated_legacy_json_field_conflicts !== undefined) - writer.tag(11, WireType.Varint).bool(message.deprecated_legacy_json_field_conflicts); + writer.tag(11, runtime_1.WireType.Varint).bool(message.deprecated_legacy_json_field_conflicts); /* optional google.protobuf.FeatureSet features = 12; */ if (message.features) - FeatureSet.internalBinaryWrite(message.features, writer.tag(12, WireType.LengthDelimited).fork(), options).join(); + exports.FeatureSet.internalBinaryWrite(message.features, writer.tag(12, runtime_1.WireType.LengthDelimited).fork(), options).join(); /* repeated google.protobuf.UninterpretedOption uninterpreted_option = 999; */ for (let i = 0; i < message.uninterpreted_option.length; i++) - UninterpretedOption.internalBinaryWrite(message.uninterpreted_option[i], writer.tag(999, WireType.LengthDelimited).fork(), options).join(); + exports.UninterpretedOption.internalBinaryWrite(message.uninterpreted_option[i], writer.tag(999, runtime_1.WireType.LengthDelimited).fork(), options).join(); let u = options.writeUnknownFields; if (u !== false) - (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + (u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); return writer; } } /** * @generated MessageType for protobuf message google.protobuf.MessageOptions */ -export const MessageOptions = new MessageOptions$Type(); +exports.MessageOptions = new MessageOptions$Type(); // @generated message type with reflection information, may provide speed optimized methods -class FieldOptions$Type extends MessageType { +class FieldOptions$Type extends runtime_4.MessageType { constructor() { super("google.protobuf.FieldOptions", [ { no: 1, name: "ctype", kind: "enum", opt: true, T: () => ["google.protobuf.FieldOptions.CType", FieldOptions_CType] }, @@ -3397,21 +1943,21 @@ class FieldOptions$Type extends MessageType { { no: 16, name: "debug_redact", kind: "scalar", localName: "debug_redact", opt: true, T: 8 /*ScalarType.BOOL*/ }, { no: 17, name: "retention", kind: "enum", opt: true, T: () => ["google.protobuf.FieldOptions.OptionRetention", FieldOptions_OptionRetention] }, { no: 19, name: "targets", kind: "enum", repeat: 2 /*RepeatType.UNPACKED*/, T: () => ["google.protobuf.FieldOptions.OptionTargetType", FieldOptions_OptionTargetType] }, - { no: 20, name: "edition_defaults", kind: "message", localName: "edition_defaults", repeat: 2 /*RepeatType.UNPACKED*/, T: () => FieldOptions_EditionDefault }, - { no: 21, name: "features", kind: "message", T: () => FeatureSet }, - { no: 999, name: "uninterpreted_option", kind: "message", localName: "uninterpreted_option", repeat: 2 /*RepeatType.UNPACKED*/, T: () => UninterpretedOption } + { no: 20, name: "edition_defaults", kind: "message", localName: "edition_defaults", repeat: 2 /*RepeatType.UNPACKED*/, T: () => exports.FieldOptions_EditionDefault }, + { no: 21, name: "features", kind: "message", T: () => exports.FeatureSet }, + { no: 999, name: "uninterpreted_option", kind: "message", localName: "uninterpreted_option", repeat: 2 /*RepeatType.UNPACKED*/, T: () => exports.UninterpretedOption } ]); } - create(value?: PartialMessage): FieldOptions { - const message = globalThis.Object.create((this.messagePrototype!)); + create(value) { + const message = globalThis.Object.create((this.messagePrototype)); message.targets = []; message.edition_defaults = []; message.uninterpreted_option = []; if (value !== undefined) - reflectionMergePartial(this, message, value); + runtime_3.reflectionMergePartial(this, message, value); return message; } - internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: FieldOptions): FieldOptions { + internalBinaryRead(reader, length, options, target) { let message = target ?? this.create(), end = reader.pos + length; while (reader.pos < end) { let [fieldNo, wireType] = reader.tag(); @@ -3444,20 +1990,20 @@ class FieldOptions$Type extends MessageType { message.retention = reader.int32(); break; case /* repeated google.protobuf.FieldOptions.OptionTargetType targets */ 19: - if (wireType === WireType.LengthDelimited) + if (wireType === runtime_1.WireType.LengthDelimited) for (let e = reader.int32() + reader.pos; reader.pos < e;) message.targets.push(reader.int32()); else message.targets.push(reader.int32()); break; case /* repeated google.protobuf.FieldOptions.EditionDefault edition_defaults */ 20: - message.edition_defaults.push(FieldOptions_EditionDefault.internalBinaryRead(reader, reader.uint32(), options)); + message.edition_defaults.push(exports.FieldOptions_EditionDefault.internalBinaryRead(reader, reader.uint32(), options)); break; case /* optional google.protobuf.FeatureSet features */ 21: - message.features = FeatureSet.internalBinaryRead(reader, reader.uint32(), options, message.features); + message.features = exports.FeatureSet.internalBinaryRead(reader, reader.uint32(), options, message.features); break; case /* repeated google.protobuf.UninterpretedOption uninterpreted_option */ 999: - message.uninterpreted_option.push(UninterpretedOption.internalBinaryRead(reader, reader.uint32(), options)); + message.uninterpreted_option.push(exports.UninterpretedOption.internalBinaryRead(reader, reader.uint32(), options)); break; default: let u = options.readUnknownField; @@ -3465,76 +2011,76 @@ class FieldOptions$Type extends MessageType { throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); let d = reader.skip(wireType); if (u !== false) - (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + (u === true ? runtime_2.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); } } return message; } - internalBinaryWrite(message: FieldOptions, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + internalBinaryWrite(message, writer, options) { /* optional google.protobuf.FieldOptions.CType ctype = 1; */ if (message.ctype !== undefined) - writer.tag(1, WireType.Varint).int32(message.ctype); + writer.tag(1, runtime_1.WireType.Varint).int32(message.ctype); /* optional bool packed = 2; */ if (message.packed !== undefined) - writer.tag(2, WireType.Varint).bool(message.packed); + writer.tag(2, runtime_1.WireType.Varint).bool(message.packed); /* optional google.protobuf.FieldOptions.JSType jstype = 6; */ if (message.jstype !== undefined) - writer.tag(6, WireType.Varint).int32(message.jstype); + writer.tag(6, runtime_1.WireType.Varint).int32(message.jstype); /* optional bool lazy = 5; */ if (message.lazy !== undefined) - writer.tag(5, WireType.Varint).bool(message.lazy); + writer.tag(5, runtime_1.WireType.Varint).bool(message.lazy); /* optional bool unverified_lazy = 15; */ if (message.unverified_lazy !== undefined) - writer.tag(15, WireType.Varint).bool(message.unverified_lazy); + writer.tag(15, runtime_1.WireType.Varint).bool(message.unverified_lazy); /* optional bool deprecated = 3; */ if (message.deprecated !== undefined) - writer.tag(3, WireType.Varint).bool(message.deprecated); + writer.tag(3, runtime_1.WireType.Varint).bool(message.deprecated); /* optional bool weak = 10; */ if (message.weak !== undefined) - writer.tag(10, WireType.Varint).bool(message.weak); + writer.tag(10, runtime_1.WireType.Varint).bool(message.weak); /* optional bool debug_redact = 16; */ if (message.debug_redact !== undefined) - writer.tag(16, WireType.Varint).bool(message.debug_redact); + writer.tag(16, runtime_1.WireType.Varint).bool(message.debug_redact); /* optional google.protobuf.FieldOptions.OptionRetention retention = 17; */ if (message.retention !== undefined) - writer.tag(17, WireType.Varint).int32(message.retention); + writer.tag(17, runtime_1.WireType.Varint).int32(message.retention); /* repeated google.protobuf.FieldOptions.OptionTargetType targets = 19; */ for (let i = 0; i < message.targets.length; i++) - writer.tag(19, WireType.Varint).int32(message.targets[i]); + writer.tag(19, runtime_1.WireType.Varint).int32(message.targets[i]); /* repeated google.protobuf.FieldOptions.EditionDefault edition_defaults = 20; */ for (let i = 0; i < message.edition_defaults.length; i++) - FieldOptions_EditionDefault.internalBinaryWrite(message.edition_defaults[i], writer.tag(20, WireType.LengthDelimited).fork(), options).join(); + exports.FieldOptions_EditionDefault.internalBinaryWrite(message.edition_defaults[i], writer.tag(20, runtime_1.WireType.LengthDelimited).fork(), options).join(); /* optional google.protobuf.FeatureSet features = 21; */ if (message.features) - FeatureSet.internalBinaryWrite(message.features, writer.tag(21, WireType.LengthDelimited).fork(), options).join(); + exports.FeatureSet.internalBinaryWrite(message.features, writer.tag(21, runtime_1.WireType.LengthDelimited).fork(), options).join(); /* repeated google.protobuf.UninterpretedOption uninterpreted_option = 999; */ for (let i = 0; i < message.uninterpreted_option.length; i++) - UninterpretedOption.internalBinaryWrite(message.uninterpreted_option[i], writer.tag(999, WireType.LengthDelimited).fork(), options).join(); + exports.UninterpretedOption.internalBinaryWrite(message.uninterpreted_option[i], writer.tag(999, runtime_1.WireType.LengthDelimited).fork(), options).join(); let u = options.writeUnknownFields; if (u !== false) - (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + (u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); return writer; } } /** * @generated MessageType for protobuf message google.protobuf.FieldOptions */ -export const FieldOptions = new FieldOptions$Type(); +exports.FieldOptions = new FieldOptions$Type(); // @generated message type with reflection information, may provide speed optimized methods -class FieldOptions_EditionDefault$Type extends MessageType { +class FieldOptions_EditionDefault$Type extends runtime_4.MessageType { constructor() { super("google.protobuf.FieldOptions.EditionDefault", [ { no: 3, name: "edition", kind: "enum", opt: true, T: () => ["google.protobuf.Edition", Edition] }, { no: 2, name: "value", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ } ]); } - create(value?: PartialMessage): FieldOptions_EditionDefault { - const message = globalThis.Object.create((this.messagePrototype!)); + create(value) { + const message = globalThis.Object.create((this.messagePrototype)); if (value !== undefined) - reflectionMergePartial(this, message, value); + runtime_3.reflectionMergePartial(this, message, value); return message; } - internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: FieldOptions_EditionDefault): FieldOptions_EditionDefault { + internalBinaryRead(reader, length, options, target) { let message = target ?? this.create(), end = reader.pos + length; while (reader.pos < end) { let [fieldNo, wireType] = reader.tag(); @@ -3551,53 +2097,53 @@ class FieldOptions_EditionDefault$Type extends MessageType { +class OneofOptions$Type extends runtime_4.MessageType { constructor() { super("google.protobuf.OneofOptions", [ - { no: 1, name: "features", kind: "message", T: () => FeatureSet }, - { no: 999, name: "uninterpreted_option", kind: "message", localName: "uninterpreted_option", repeat: 2 /*RepeatType.UNPACKED*/, T: () => UninterpretedOption } + { no: 1, name: "features", kind: "message", T: () => exports.FeatureSet }, + { no: 999, name: "uninterpreted_option", kind: "message", localName: "uninterpreted_option", repeat: 2 /*RepeatType.UNPACKED*/, T: () => exports.UninterpretedOption } ]); } - create(value?: PartialMessage): OneofOptions { - const message = globalThis.Object.create((this.messagePrototype!)); + create(value) { + const message = globalThis.Object.create((this.messagePrototype)); message.uninterpreted_option = []; if (value !== undefined) - reflectionMergePartial(this, message, value); + runtime_3.reflectionMergePartial(this, message, value); return message; } - internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: OneofOptions): OneofOptions { + internalBinaryRead(reader, length, options, target) { let message = target ?? this.create(), end = reader.pos + length; while (reader.pos < end) { let [fieldNo, wireType] = reader.tag(); switch (fieldNo) { case /* optional google.protobuf.FeatureSet features */ 1: - message.features = FeatureSet.internalBinaryRead(reader, reader.uint32(), options, message.features); + message.features = exports.FeatureSet.internalBinaryRead(reader, reader.uint32(), options, message.features); break; case /* repeated google.protobuf.UninterpretedOption uninterpreted_option */ 999: - message.uninterpreted_option.push(UninterpretedOption.internalBinaryRead(reader, reader.uint32(), options)); + message.uninterpreted_option.push(exports.UninterpretedOption.internalBinaryRead(reader, reader.uint32(), options)); break; default: let u = options.readUnknownField; @@ -3605,47 +2151,47 @@ class OneofOptions$Type extends MessageType { throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); let d = reader.skip(wireType); if (u !== false) - (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + (u === true ? runtime_2.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); } } return message; } - internalBinaryWrite(message: OneofOptions, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + internalBinaryWrite(message, writer, options) { /* optional google.protobuf.FeatureSet features = 1; */ if (message.features) - FeatureSet.internalBinaryWrite(message.features, writer.tag(1, WireType.LengthDelimited).fork(), options).join(); + exports.FeatureSet.internalBinaryWrite(message.features, writer.tag(1, runtime_1.WireType.LengthDelimited).fork(), options).join(); /* repeated google.protobuf.UninterpretedOption uninterpreted_option = 999; */ for (let i = 0; i < message.uninterpreted_option.length; i++) - UninterpretedOption.internalBinaryWrite(message.uninterpreted_option[i], writer.tag(999, WireType.LengthDelimited).fork(), options).join(); + exports.UninterpretedOption.internalBinaryWrite(message.uninterpreted_option[i], writer.tag(999, runtime_1.WireType.LengthDelimited).fork(), options).join(); let u = options.writeUnknownFields; if (u !== false) - (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + (u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); return writer; } } /** * @generated MessageType for protobuf message google.protobuf.OneofOptions */ -export const OneofOptions = new OneofOptions$Type(); +exports.OneofOptions = new OneofOptions$Type(); // @generated message type with reflection information, may provide speed optimized methods -class EnumOptions$Type extends MessageType { +class EnumOptions$Type extends runtime_4.MessageType { constructor() { super("google.protobuf.EnumOptions", [ { no: 2, name: "allow_alias", kind: "scalar", localName: "allow_alias", opt: true, T: 8 /*ScalarType.BOOL*/ }, { no: 3, name: "deprecated", kind: "scalar", opt: true, T: 8 /*ScalarType.BOOL*/ }, { no: 6, name: "deprecated_legacy_json_field_conflicts", kind: "scalar", localName: "deprecated_legacy_json_field_conflicts", opt: true, T: 8 /*ScalarType.BOOL*/ }, - { no: 7, name: "features", kind: "message", T: () => FeatureSet }, - { no: 999, name: "uninterpreted_option", kind: "message", localName: "uninterpreted_option", repeat: 2 /*RepeatType.UNPACKED*/, T: () => UninterpretedOption } + { no: 7, name: "features", kind: "message", T: () => exports.FeatureSet }, + { no: 999, name: "uninterpreted_option", kind: "message", localName: "uninterpreted_option", repeat: 2 /*RepeatType.UNPACKED*/, T: () => exports.UninterpretedOption } ]); } - create(value?: PartialMessage): EnumOptions { - const message = globalThis.Object.create((this.messagePrototype!)); + create(value) { + const message = globalThis.Object.create((this.messagePrototype)); message.uninterpreted_option = []; if (value !== undefined) - reflectionMergePartial(this, message, value); + runtime_3.reflectionMergePartial(this, message, value); return message; } - internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: EnumOptions): EnumOptions { + internalBinaryRead(reader, length, options, target) { let message = target ?? this.create(), end = reader.pos + length; while (reader.pos < end) { let [fieldNo, wireType] = reader.tag(); @@ -3660,10 +2206,10 @@ class EnumOptions$Type extends MessageType { message.deprecated_legacy_json_field_conflicts = reader.bool(); break; case /* optional google.protobuf.FeatureSet features */ 7: - message.features = FeatureSet.internalBinaryRead(reader, reader.uint32(), options, message.features); + message.features = exports.FeatureSet.internalBinaryRead(reader, reader.uint32(), options, message.features); break; case /* repeated google.protobuf.UninterpretedOption uninterpreted_option */ 999: - message.uninterpreted_option.push(UninterpretedOption.internalBinaryRead(reader, reader.uint32(), options)); + message.uninterpreted_option.push(exports.UninterpretedOption.internalBinaryRead(reader, reader.uint32(), options)); break; default: let u = options.readUnknownField; @@ -3671,55 +2217,55 @@ class EnumOptions$Type extends MessageType { throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); let d = reader.skip(wireType); if (u !== false) - (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + (u === true ? runtime_2.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); } } return message; } - internalBinaryWrite(message: EnumOptions, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + internalBinaryWrite(message, writer, options) { /* optional bool allow_alias = 2; */ if (message.allow_alias !== undefined) - writer.tag(2, WireType.Varint).bool(message.allow_alias); + writer.tag(2, runtime_1.WireType.Varint).bool(message.allow_alias); /* optional bool deprecated = 3; */ if (message.deprecated !== undefined) - writer.tag(3, WireType.Varint).bool(message.deprecated); + writer.tag(3, runtime_1.WireType.Varint).bool(message.deprecated); /* optional bool deprecated_legacy_json_field_conflicts = 6 [deprecated = true]; */ if (message.deprecated_legacy_json_field_conflicts !== undefined) - writer.tag(6, WireType.Varint).bool(message.deprecated_legacy_json_field_conflicts); + writer.tag(6, runtime_1.WireType.Varint).bool(message.deprecated_legacy_json_field_conflicts); /* optional google.protobuf.FeatureSet features = 7; */ if (message.features) - FeatureSet.internalBinaryWrite(message.features, writer.tag(7, WireType.LengthDelimited).fork(), options).join(); + exports.FeatureSet.internalBinaryWrite(message.features, writer.tag(7, runtime_1.WireType.LengthDelimited).fork(), options).join(); /* repeated google.protobuf.UninterpretedOption uninterpreted_option = 999; */ for (let i = 0; i < message.uninterpreted_option.length; i++) - UninterpretedOption.internalBinaryWrite(message.uninterpreted_option[i], writer.tag(999, WireType.LengthDelimited).fork(), options).join(); + exports.UninterpretedOption.internalBinaryWrite(message.uninterpreted_option[i], writer.tag(999, runtime_1.WireType.LengthDelimited).fork(), options).join(); let u = options.writeUnknownFields; if (u !== false) - (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + (u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); return writer; } } /** * @generated MessageType for protobuf message google.protobuf.EnumOptions */ -export const EnumOptions = new EnumOptions$Type(); +exports.EnumOptions = new EnumOptions$Type(); // @generated message type with reflection information, may provide speed optimized methods -class EnumValueOptions$Type extends MessageType { +class EnumValueOptions$Type extends runtime_4.MessageType { constructor() { super("google.protobuf.EnumValueOptions", [ { no: 1, name: "deprecated", kind: "scalar", opt: true, T: 8 /*ScalarType.BOOL*/ }, - { no: 2, name: "features", kind: "message", T: () => FeatureSet }, + { no: 2, name: "features", kind: "message", T: () => exports.FeatureSet }, { no: 3, name: "debug_redact", kind: "scalar", localName: "debug_redact", opt: true, T: 8 /*ScalarType.BOOL*/ }, - { no: 999, name: "uninterpreted_option", kind: "message", localName: "uninterpreted_option", repeat: 2 /*RepeatType.UNPACKED*/, T: () => UninterpretedOption } + { no: 999, name: "uninterpreted_option", kind: "message", localName: "uninterpreted_option", repeat: 2 /*RepeatType.UNPACKED*/, T: () => exports.UninterpretedOption } ]); } - create(value?: PartialMessage): EnumValueOptions { - const message = globalThis.Object.create((this.messagePrototype!)); + create(value) { + const message = globalThis.Object.create((this.messagePrototype)); message.uninterpreted_option = []; if (value !== undefined) - reflectionMergePartial(this, message, value); + runtime_3.reflectionMergePartial(this, message, value); return message; } - internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: EnumValueOptions): EnumValueOptions { + internalBinaryRead(reader, length, options, target) { let message = target ?? this.create(), end = reader.pos + length; while (reader.pos < end) { let [fieldNo, wireType] = reader.tag(); @@ -3728,13 +2274,13 @@ class EnumValueOptions$Type extends MessageType { message.deprecated = reader.bool(); break; case /* optional google.protobuf.FeatureSet features */ 2: - message.features = FeatureSet.internalBinaryRead(reader, reader.uint32(), options, message.features); + message.features = exports.FeatureSet.internalBinaryRead(reader, reader.uint32(), options, message.features); break; case /* optional bool debug_redact */ 3: message.debug_redact = reader.bool(); break; case /* repeated google.protobuf.UninterpretedOption uninterpreted_option */ 999: - message.uninterpreted_option.push(UninterpretedOption.internalBinaryRead(reader, reader.uint32(), options)); + message.uninterpreted_option.push(exports.UninterpretedOption.internalBinaryRead(reader, reader.uint32(), options)); break; default: let u = options.readUnknownField; @@ -3742,63 +2288,63 @@ class EnumValueOptions$Type extends MessageType { throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); let d = reader.skip(wireType); if (u !== false) - (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + (u === true ? runtime_2.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); } } return message; } - internalBinaryWrite(message: EnumValueOptions, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + internalBinaryWrite(message, writer, options) { /* optional bool deprecated = 1; */ if (message.deprecated !== undefined) - writer.tag(1, WireType.Varint).bool(message.deprecated); + writer.tag(1, runtime_1.WireType.Varint).bool(message.deprecated); /* optional google.protobuf.FeatureSet features = 2; */ if (message.features) - FeatureSet.internalBinaryWrite(message.features, writer.tag(2, WireType.LengthDelimited).fork(), options).join(); + exports.FeatureSet.internalBinaryWrite(message.features, writer.tag(2, runtime_1.WireType.LengthDelimited).fork(), options).join(); /* optional bool debug_redact = 3; */ if (message.debug_redact !== undefined) - writer.tag(3, WireType.Varint).bool(message.debug_redact); + writer.tag(3, runtime_1.WireType.Varint).bool(message.debug_redact); /* repeated google.protobuf.UninterpretedOption uninterpreted_option = 999; */ for (let i = 0; i < message.uninterpreted_option.length; i++) - UninterpretedOption.internalBinaryWrite(message.uninterpreted_option[i], writer.tag(999, WireType.LengthDelimited).fork(), options).join(); + exports.UninterpretedOption.internalBinaryWrite(message.uninterpreted_option[i], writer.tag(999, runtime_1.WireType.LengthDelimited).fork(), options).join(); let u = options.writeUnknownFields; if (u !== false) - (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + (u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); return writer; } } /** * @generated MessageType for protobuf message google.protobuf.EnumValueOptions */ -export const EnumValueOptions = new EnumValueOptions$Type(); +exports.EnumValueOptions = new EnumValueOptions$Type(); // @generated message type with reflection information, may provide speed optimized methods -class ServiceOptions$Type extends MessageType { +class ServiceOptions$Type extends runtime_4.MessageType { constructor() { super("google.protobuf.ServiceOptions", [ - { no: 34, name: "features", kind: "message", T: () => FeatureSet }, + { no: 34, name: "features", kind: "message", T: () => exports.FeatureSet }, { no: 33, name: "deprecated", kind: "scalar", opt: true, T: 8 /*ScalarType.BOOL*/ }, - { no: 999, name: "uninterpreted_option", kind: "message", localName: "uninterpreted_option", repeat: 2 /*RepeatType.UNPACKED*/, T: () => UninterpretedOption } + { no: 999, name: "uninterpreted_option", kind: "message", localName: "uninterpreted_option", repeat: 2 /*RepeatType.UNPACKED*/, T: () => exports.UninterpretedOption } ]); } - create(value?: PartialMessage): ServiceOptions { - const message = globalThis.Object.create((this.messagePrototype!)); + create(value) { + const message = globalThis.Object.create((this.messagePrototype)); message.uninterpreted_option = []; if (value !== undefined) - reflectionMergePartial(this, message, value); + runtime_3.reflectionMergePartial(this, message, value); return message; } - internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ServiceOptions): ServiceOptions { + internalBinaryRead(reader, length, options, target) { let message = target ?? this.create(), end = reader.pos + length; while (reader.pos < end) { let [fieldNo, wireType] = reader.tag(); switch (fieldNo) { case /* optional google.protobuf.FeatureSet features */ 34: - message.features = FeatureSet.internalBinaryRead(reader, reader.uint32(), options, message.features); + message.features = exports.FeatureSet.internalBinaryRead(reader, reader.uint32(), options, message.features); break; case /* optional bool deprecated */ 33: message.deprecated = reader.bool(); break; case /* repeated google.protobuf.UninterpretedOption uninterpreted_option */ 999: - message.uninterpreted_option.push(UninterpretedOption.internalBinaryRead(reader, reader.uint32(), options)); + message.uninterpreted_option.push(exports.UninterpretedOption.internalBinaryRead(reader, reader.uint32(), options)); break; default: let u = options.readUnknownField; @@ -3806,49 +2352,49 @@ class ServiceOptions$Type extends MessageType { throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); let d = reader.skip(wireType); if (u !== false) - (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + (u === true ? runtime_2.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); } } return message; } - internalBinaryWrite(message: ServiceOptions, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + internalBinaryWrite(message, writer, options) { /* optional google.protobuf.FeatureSet features = 34; */ if (message.features) - FeatureSet.internalBinaryWrite(message.features, writer.tag(34, WireType.LengthDelimited).fork(), options).join(); + exports.FeatureSet.internalBinaryWrite(message.features, writer.tag(34, runtime_1.WireType.LengthDelimited).fork(), options).join(); /* optional bool deprecated = 33; */ if (message.deprecated !== undefined) - writer.tag(33, WireType.Varint).bool(message.deprecated); + writer.tag(33, runtime_1.WireType.Varint).bool(message.deprecated); /* repeated google.protobuf.UninterpretedOption uninterpreted_option = 999; */ for (let i = 0; i < message.uninterpreted_option.length; i++) - UninterpretedOption.internalBinaryWrite(message.uninterpreted_option[i], writer.tag(999, WireType.LengthDelimited).fork(), options).join(); + exports.UninterpretedOption.internalBinaryWrite(message.uninterpreted_option[i], writer.tag(999, runtime_1.WireType.LengthDelimited).fork(), options).join(); let u = options.writeUnknownFields; if (u !== false) - (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + (u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); return writer; } } /** * @generated MessageType for protobuf message google.protobuf.ServiceOptions */ -export const ServiceOptions = new ServiceOptions$Type(); +exports.ServiceOptions = new ServiceOptions$Type(); // @generated message type with reflection information, may provide speed optimized methods -class MethodOptions$Type extends MessageType { +class MethodOptions$Type extends runtime_4.MessageType { constructor() { super("google.protobuf.MethodOptions", [ { no: 33, name: "deprecated", kind: "scalar", opt: true, T: 8 /*ScalarType.BOOL*/ }, { no: 34, name: "idempotency_level", kind: "enum", localName: "idempotency_level", opt: true, T: () => ["google.protobuf.MethodOptions.IdempotencyLevel", MethodOptions_IdempotencyLevel] }, - { no: 35, name: "features", kind: "message", T: () => FeatureSet }, - { no: 999, name: "uninterpreted_option", kind: "message", localName: "uninterpreted_option", repeat: 2 /*RepeatType.UNPACKED*/, T: () => UninterpretedOption } + { no: 35, name: "features", kind: "message", T: () => exports.FeatureSet }, + { no: 999, name: "uninterpreted_option", kind: "message", localName: "uninterpreted_option", repeat: 2 /*RepeatType.UNPACKED*/, T: () => exports.UninterpretedOption } ]); } - create(value?: PartialMessage): MethodOptions { - const message = globalThis.Object.create((this.messagePrototype!)); + create(value) { + const message = globalThis.Object.create((this.messagePrototype)); message.uninterpreted_option = []; if (value !== undefined) - reflectionMergePartial(this, message, value); + runtime_3.reflectionMergePartial(this, message, value); return message; } - internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: MethodOptions): MethodOptions { + internalBinaryRead(reader, length, options, target) { let message = target ?? this.create(), end = reader.pos + length; while (reader.pos < end) { let [fieldNo, wireType] = reader.tag(); @@ -3860,10 +2406,10 @@ class MethodOptions$Type extends MessageType { message.idempotency_level = reader.int32(); break; case /* optional google.protobuf.FeatureSet features */ 35: - message.features = FeatureSet.internalBinaryRead(reader, reader.uint32(), options, message.features); + message.features = exports.FeatureSet.internalBinaryRead(reader, reader.uint32(), options, message.features); break; case /* repeated google.protobuf.UninterpretedOption uninterpreted_option */ 999: - message.uninterpreted_option.push(UninterpretedOption.internalBinaryRead(reader, reader.uint32(), options)); + message.uninterpreted_option.push(exports.UninterpretedOption.internalBinaryRead(reader, reader.uint32(), options)); break; default: let u = options.readUnknownField; @@ -3871,39 +2417,39 @@ class MethodOptions$Type extends MessageType { throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); let d = reader.skip(wireType); if (u !== false) - (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + (u === true ? runtime_2.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); } } return message; } - internalBinaryWrite(message: MethodOptions, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + internalBinaryWrite(message, writer, options) { /* optional bool deprecated = 33; */ if (message.deprecated !== undefined) - writer.tag(33, WireType.Varint).bool(message.deprecated); + writer.tag(33, runtime_1.WireType.Varint).bool(message.deprecated); /* optional google.protobuf.MethodOptions.IdempotencyLevel idempotency_level = 34; */ if (message.idempotency_level !== undefined) - writer.tag(34, WireType.Varint).int32(message.idempotency_level); + writer.tag(34, runtime_1.WireType.Varint).int32(message.idempotency_level); /* optional google.protobuf.FeatureSet features = 35; */ if (message.features) - FeatureSet.internalBinaryWrite(message.features, writer.tag(35, WireType.LengthDelimited).fork(), options).join(); + exports.FeatureSet.internalBinaryWrite(message.features, writer.tag(35, runtime_1.WireType.LengthDelimited).fork(), options).join(); /* repeated google.protobuf.UninterpretedOption uninterpreted_option = 999; */ for (let i = 0; i < message.uninterpreted_option.length; i++) - UninterpretedOption.internalBinaryWrite(message.uninterpreted_option[i], writer.tag(999, WireType.LengthDelimited).fork(), options).join(); + exports.UninterpretedOption.internalBinaryWrite(message.uninterpreted_option[i], writer.tag(999, runtime_1.WireType.LengthDelimited).fork(), options).join(); let u = options.writeUnknownFields; if (u !== false) - (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + (u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); return writer; } } /** * @generated MessageType for protobuf message google.protobuf.MethodOptions */ -export const MethodOptions = new MethodOptions$Type(); +exports.MethodOptions = new MethodOptions$Type(); // @generated message type with reflection information, may provide speed optimized methods -class UninterpretedOption$Type extends MessageType { +class UninterpretedOption$Type extends runtime_4.MessageType { constructor() { super("google.protobuf.UninterpretedOption", [ - { no: 2, name: "name", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => UninterpretedOption_NamePart }, + { no: 2, name: "name", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => exports.UninterpretedOption_NamePart }, { no: 3, name: "identifier_value", kind: "scalar", localName: "identifier_value", opt: true, T: 9 /*ScalarType.STRING*/ }, { no: 4, name: "positive_int_value", kind: "scalar", localName: "positive_int_value", opt: true, T: 4 /*ScalarType.UINT64*/, L: 0 /*LongType.BIGINT*/ }, { no: 5, name: "negative_int_value", kind: "scalar", localName: "negative_int_value", opt: true, T: 3 /*ScalarType.INT64*/, L: 0 /*LongType.BIGINT*/ }, @@ -3912,20 +2458,20 @@ class UninterpretedOption$Type extends MessageType { { no: 8, name: "aggregate_value", kind: "scalar", localName: "aggregate_value", opt: true, T: 9 /*ScalarType.STRING*/ } ]); } - create(value?: PartialMessage): UninterpretedOption { - const message = globalThis.Object.create((this.messagePrototype!)); + create(value) { + const message = globalThis.Object.create((this.messagePrototype)); message.name = []; if (value !== undefined) - reflectionMergePartial(this, message, value); + runtime_3.reflectionMergePartial(this, message, value); return message; } - internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: UninterpretedOption): UninterpretedOption { + internalBinaryRead(reader, length, options, target) { let message = target ?? this.create(), end = reader.pos + length; while (reader.pos < end) { let [fieldNo, wireType] = reader.tag(); switch (fieldNo) { case /* repeated google.protobuf.UninterpretedOption.NamePart name */ 2: - message.name.push(UninterpretedOption_NamePart.internalBinaryRead(reader, reader.uint32(), options)); + message.name.push(exports.UninterpretedOption_NamePart.internalBinaryRead(reader, reader.uint32(), options)); break; case /* optional string identifier_value */ 3: message.identifier_value = reader.string(); @@ -3951,60 +2497,60 @@ class UninterpretedOption$Type extends MessageType { throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); let d = reader.skip(wireType); if (u !== false) - (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + (u === true ? runtime_2.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); } } return message; } - internalBinaryWrite(message: UninterpretedOption, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + internalBinaryWrite(message, writer, options) { /* repeated google.protobuf.UninterpretedOption.NamePart name = 2; */ for (let i = 0; i < message.name.length; i++) - UninterpretedOption_NamePart.internalBinaryWrite(message.name[i], writer.tag(2, WireType.LengthDelimited).fork(), options).join(); + exports.UninterpretedOption_NamePart.internalBinaryWrite(message.name[i], writer.tag(2, runtime_1.WireType.LengthDelimited).fork(), options).join(); /* optional string identifier_value = 3; */ if (message.identifier_value !== undefined) - writer.tag(3, WireType.LengthDelimited).string(message.identifier_value); + writer.tag(3, runtime_1.WireType.LengthDelimited).string(message.identifier_value); /* optional uint64 positive_int_value = 4; */ if (message.positive_int_value !== undefined) - writer.tag(4, WireType.Varint).uint64(message.positive_int_value); + writer.tag(4, runtime_1.WireType.Varint).uint64(message.positive_int_value); /* optional int64 negative_int_value = 5; */ if (message.negative_int_value !== undefined) - writer.tag(5, WireType.Varint).int64(message.negative_int_value); + writer.tag(5, runtime_1.WireType.Varint).int64(message.negative_int_value); /* optional double double_value = 6; */ if (message.double_value !== undefined) - writer.tag(6, WireType.Bit64).double(message.double_value); + writer.tag(6, runtime_1.WireType.Bit64).double(message.double_value); /* optional bytes string_value = 7; */ if (message.string_value !== undefined) - writer.tag(7, WireType.LengthDelimited).bytes(message.string_value); + writer.tag(7, runtime_1.WireType.LengthDelimited).bytes(message.string_value); /* optional string aggregate_value = 8; */ if (message.aggregate_value !== undefined) - writer.tag(8, WireType.LengthDelimited).string(message.aggregate_value); + writer.tag(8, runtime_1.WireType.LengthDelimited).string(message.aggregate_value); let u = options.writeUnknownFields; if (u !== false) - (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + (u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); return writer; } } /** * @generated MessageType for protobuf message google.protobuf.UninterpretedOption */ -export const UninterpretedOption = new UninterpretedOption$Type(); +exports.UninterpretedOption = new UninterpretedOption$Type(); // @generated message type with reflection information, may provide speed optimized methods -class UninterpretedOption_NamePart$Type extends MessageType { +class UninterpretedOption_NamePart$Type extends runtime_4.MessageType { constructor() { super("google.protobuf.UninterpretedOption.NamePart", [ { no: 1, name: "name_part", kind: "scalar", localName: "name_part", T: 9 /*ScalarType.STRING*/ }, { no: 2, name: "is_extension", kind: "scalar", localName: "is_extension", T: 8 /*ScalarType.BOOL*/ } ]); } - create(value?: PartialMessage): UninterpretedOption_NamePart { - const message = globalThis.Object.create((this.messagePrototype!)); + create(value) { + const message = globalThis.Object.create((this.messagePrototype)); message.name_part = ""; message.is_extension = false; if (value !== undefined) - reflectionMergePartial(this, message, value); + runtime_3.reflectionMergePartial(this, message, value); return message; } - internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: UninterpretedOption_NamePart): UninterpretedOption_NamePart { + internalBinaryRead(reader, length, options, target) { let message = target ?? this.create(), end = reader.pos + length; while (reader.pos < end) { let [fieldNo, wireType] = reader.tag(); @@ -4021,30 +2567,30 @@ class UninterpretedOption_NamePart$Type extends MessageType { +class FeatureSet$Type extends runtime_4.MessageType { constructor() { super("google.protobuf.FeatureSet", [ { no: 1, name: "field_presence", kind: "enum", localName: "field_presence", opt: true, T: () => ["google.protobuf.FeatureSet.FieldPresence", FeatureSet_FieldPresence] }, @@ -4055,13 +2601,13 @@ class FeatureSet$Type extends MessageType { { no: 6, name: "json_format", kind: "enum", localName: "json_format", opt: true, T: () => ["google.protobuf.FeatureSet.JsonFormat", FeatureSet_JsonFormat] } ]); } - create(value?: PartialMessage): FeatureSet { - const message = globalThis.Object.create((this.messagePrototype!)); + create(value) { + const message = globalThis.Object.create((this.messagePrototype)); if (value !== undefined) - reflectionMergePartial(this, message, value); + runtime_3.reflectionMergePartial(this, message, value); return message; } - internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: FeatureSet): FeatureSet { + internalBinaryRead(reader, length, options, target) { let message = target ?? this.create(), end = reader.pos + length; while (reader.pos < end) { let [fieldNo, wireType] = reader.tag(); @@ -4090,63 +2636,63 @@ class FeatureSet$Type extends MessageType { throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); let d = reader.skip(wireType); if (u !== false) - (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + (u === true ? runtime_2.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); } } return message; } - internalBinaryWrite(message: FeatureSet, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + internalBinaryWrite(message, writer, options) { /* optional google.protobuf.FeatureSet.FieldPresence field_presence = 1; */ if (message.field_presence !== undefined) - writer.tag(1, WireType.Varint).int32(message.field_presence); + writer.tag(1, runtime_1.WireType.Varint).int32(message.field_presence); /* optional google.protobuf.FeatureSet.EnumType enum_type = 2; */ if (message.enum_type !== undefined) - writer.tag(2, WireType.Varint).int32(message.enum_type); + writer.tag(2, runtime_1.WireType.Varint).int32(message.enum_type); /* optional google.protobuf.FeatureSet.RepeatedFieldEncoding repeated_field_encoding = 3; */ if (message.repeated_field_encoding !== undefined) - writer.tag(3, WireType.Varint).int32(message.repeated_field_encoding); + writer.tag(3, runtime_1.WireType.Varint).int32(message.repeated_field_encoding); /* optional google.protobuf.FeatureSet.Utf8Validation utf8_validation = 4; */ if (message.utf8_validation !== undefined) - writer.tag(4, WireType.Varint).int32(message.utf8_validation); + writer.tag(4, runtime_1.WireType.Varint).int32(message.utf8_validation); /* optional google.protobuf.FeatureSet.MessageEncoding message_encoding = 5; */ if (message.message_encoding !== undefined) - writer.tag(5, WireType.Varint).int32(message.message_encoding); + writer.tag(5, runtime_1.WireType.Varint).int32(message.message_encoding); /* optional google.protobuf.FeatureSet.JsonFormat json_format = 6; */ if (message.json_format !== undefined) - writer.tag(6, WireType.Varint).int32(message.json_format); + writer.tag(6, runtime_1.WireType.Varint).int32(message.json_format); let u = options.writeUnknownFields; if (u !== false) - (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + (u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); return writer; } } /** * @generated MessageType for protobuf message google.protobuf.FeatureSet */ -export const FeatureSet = new FeatureSet$Type(); +exports.FeatureSet = new FeatureSet$Type(); // @generated message type with reflection information, may provide speed optimized methods -class FeatureSetDefaults$Type extends MessageType { +class FeatureSetDefaults$Type extends runtime_4.MessageType { constructor() { super("google.protobuf.FeatureSetDefaults", [ - { no: 1, name: "defaults", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => FeatureSetDefaults_FeatureSetEditionDefault }, + { no: 1, name: "defaults", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => exports.FeatureSetDefaults_FeatureSetEditionDefault }, { no: 4, name: "minimum_edition", kind: "enum", localName: "minimum_edition", opt: true, T: () => ["google.protobuf.Edition", Edition] }, { no: 5, name: "maximum_edition", kind: "enum", localName: "maximum_edition", opt: true, T: () => ["google.protobuf.Edition", Edition] } ]); } - create(value?: PartialMessage): FeatureSetDefaults { - const message = globalThis.Object.create((this.messagePrototype!)); + create(value) { + const message = globalThis.Object.create((this.messagePrototype)); message.defaults = []; if (value !== undefined) - reflectionMergePartial(this, message, value); + runtime_3.reflectionMergePartial(this, message, value); return message; } - internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: FeatureSetDefaults): FeatureSetDefaults { + internalBinaryRead(reader, length, options, target) { let message = target ?? this.create(), end = reader.pos + length; while (reader.pos < end) { let [fieldNo, wireType] = reader.tag(); switch (fieldNo) { case /* repeated google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault defaults */ 1: - message.defaults.push(FeatureSetDefaults_FeatureSetEditionDefault.internalBinaryRead(reader, reader.uint32(), options)); + message.defaults.push(exports.FeatureSetDefaults_FeatureSetEditionDefault.internalBinaryRead(reader, reader.uint32(), options)); break; case /* optional google.protobuf.Edition minimum_edition */ 4: message.minimum_edition = reader.int32(); @@ -4160,46 +2706,46 @@ class FeatureSetDefaults$Type extends MessageType { throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); let d = reader.skip(wireType); if (u !== false) - (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + (u === true ? runtime_2.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); } } return message; } - internalBinaryWrite(message: FeatureSetDefaults, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + internalBinaryWrite(message, writer, options) { /* repeated google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault defaults = 1; */ for (let i = 0; i < message.defaults.length; i++) - FeatureSetDefaults_FeatureSetEditionDefault.internalBinaryWrite(message.defaults[i], writer.tag(1, WireType.LengthDelimited).fork(), options).join(); + exports.FeatureSetDefaults_FeatureSetEditionDefault.internalBinaryWrite(message.defaults[i], writer.tag(1, runtime_1.WireType.LengthDelimited).fork(), options).join(); /* optional google.protobuf.Edition minimum_edition = 4; */ if (message.minimum_edition !== undefined) - writer.tag(4, WireType.Varint).int32(message.minimum_edition); + writer.tag(4, runtime_1.WireType.Varint).int32(message.minimum_edition); /* optional google.protobuf.Edition maximum_edition = 5; */ if (message.maximum_edition !== undefined) - writer.tag(5, WireType.Varint).int32(message.maximum_edition); + writer.tag(5, runtime_1.WireType.Varint).int32(message.maximum_edition); let u = options.writeUnknownFields; if (u !== false) - (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + (u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); return writer; } } /** * @generated MessageType for protobuf message google.protobuf.FeatureSetDefaults */ -export const FeatureSetDefaults = new FeatureSetDefaults$Type(); +exports.FeatureSetDefaults = new FeatureSetDefaults$Type(); // @generated message type with reflection information, may provide speed optimized methods -class FeatureSetDefaults_FeatureSetEditionDefault$Type extends MessageType { +class FeatureSetDefaults_FeatureSetEditionDefault$Type extends runtime_4.MessageType { constructor() { super("google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault", [ { no: 3, name: "edition", kind: "enum", opt: true, T: () => ["google.protobuf.Edition", Edition] }, - { no: 2, name: "features", kind: "message", T: () => FeatureSet } + { no: 2, name: "features", kind: "message", T: () => exports.FeatureSet } ]); } - create(value?: PartialMessage): FeatureSetDefaults_FeatureSetEditionDefault { - const message = globalThis.Object.create((this.messagePrototype!)); + create(value) { + const message = globalThis.Object.create((this.messagePrototype)); if (value !== undefined) - reflectionMergePartial(this, message, value); + runtime_3.reflectionMergePartial(this, message, value); return message; } - internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: FeatureSetDefaults_FeatureSetEditionDefault): FeatureSetDefaults_FeatureSetEditionDefault { + internalBinaryRead(reader, length, options, target) { let message = target ?? this.create(), end = reader.pos + length; while (reader.pos < end) { let [fieldNo, wireType] = reader.tag(); @@ -4208,7 +2754,7 @@ class FeatureSetDefaults_FeatureSetEditionDefault$Type extends MessageType { +class SourceCodeInfo$Type extends runtime_4.MessageType { constructor() { super("google.protobuf.SourceCodeInfo", [ - { no: 1, name: "location", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => SourceCodeInfo_Location } + { no: 1, name: "location", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => exports.SourceCodeInfo_Location } ]); } - create(value?: PartialMessage): SourceCodeInfo { - const message = globalThis.Object.create((this.messagePrototype!)); + create(value) { + const message = globalThis.Object.create((this.messagePrototype)); message.location = []; if (value !== undefined) - reflectionMergePartial(this, message, value); + runtime_3.reflectionMergePartial(this, message, value); return message; } - internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: SourceCodeInfo): SourceCodeInfo { + internalBinaryRead(reader, length, options, target) { let message = target ?? this.create(), end = reader.pos + length; while (reader.pos < end) { let [fieldNo, wireType] = reader.tag(); switch (fieldNo) { case /* repeated google.protobuf.SourceCodeInfo.Location location */ 1: - message.location.push(SourceCodeInfo_Location.internalBinaryRead(reader, reader.uint32(), options)); + message.location.push(exports.SourceCodeInfo_Location.internalBinaryRead(reader, reader.uint32(), options)); break; default: let u = options.readUnknownField; @@ -4266,27 +2812,27 @@ class SourceCodeInfo$Type extends MessageType { throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); let d = reader.skip(wireType); if (u !== false) - (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + (u === true ? runtime_2.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); } } return message; } - internalBinaryWrite(message: SourceCodeInfo, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + internalBinaryWrite(message, writer, options) { /* repeated google.protobuf.SourceCodeInfo.Location location = 1; */ for (let i = 0; i < message.location.length; i++) - SourceCodeInfo_Location.internalBinaryWrite(message.location[i], writer.tag(1, WireType.LengthDelimited).fork(), options).join(); + exports.SourceCodeInfo_Location.internalBinaryWrite(message.location[i], writer.tag(1, runtime_1.WireType.LengthDelimited).fork(), options).join(); let u = options.writeUnknownFields; if (u !== false) - (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + (u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); return writer; } } /** * @generated MessageType for protobuf message google.protobuf.SourceCodeInfo */ -export const SourceCodeInfo = new SourceCodeInfo$Type(); +exports.SourceCodeInfo = new SourceCodeInfo$Type(); // @generated message type with reflection information, may provide speed optimized methods -class SourceCodeInfo_Location$Type extends MessageType { +class SourceCodeInfo_Location$Type extends runtime_4.MessageType { constructor() { super("google.protobuf.SourceCodeInfo.Location", [ { no: 1, name: "path", kind: "scalar", repeat: 1 /*RepeatType.PACKED*/, T: 5 /*ScalarType.INT32*/ }, @@ -4296,29 +2842,29 @@ class SourceCodeInfo_Location$Type extends MessageType { no: 6, name: "leading_detached_comments", kind: "scalar", localName: "leading_detached_comments", repeat: 2 /*RepeatType.UNPACKED*/, T: 9 /*ScalarType.STRING*/ } ]); } - create(value?: PartialMessage): SourceCodeInfo_Location { - const message = globalThis.Object.create((this.messagePrototype!)); + create(value) { + const message = globalThis.Object.create((this.messagePrototype)); message.path = []; message.span = []; message.leading_detached_comments = []; if (value !== undefined) - reflectionMergePartial(this, message, value); + runtime_3.reflectionMergePartial(this, message, value); return message; } - internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: SourceCodeInfo_Location): SourceCodeInfo_Location { + internalBinaryRead(reader, length, options, target) { let message = target ?? this.create(), end = reader.pos + length; while (reader.pos < end) { let [fieldNo, wireType] = reader.tag(); switch (fieldNo) { case /* repeated int32 path = 1 [packed = true];*/ 1: - if (wireType === WireType.LengthDelimited) + if (wireType === runtime_1.WireType.LengthDelimited) for (let e = reader.int32() + reader.pos; reader.pos < e;) message.path.push(reader.int32()); else message.path.push(reader.int32()); break; case /* repeated int32 span = 2 [packed = true];*/ 2: - if (wireType === WireType.LengthDelimited) + if (wireType === runtime_1.WireType.LengthDelimited) for (let e = reader.int32() + reader.pos; reader.pos < e;) message.span.push(reader.int32()); else @@ -4339,66 +2885,66 @@ class SourceCodeInfo_Location$Type extends MessageType throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); let d = reader.skip(wireType); if (u !== false) - (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + (u === true ? runtime_2.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); } } return message; } - internalBinaryWrite(message: SourceCodeInfo_Location, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + internalBinaryWrite(message, writer, options) { /* repeated int32 path = 1 [packed = true]; */ if (message.path.length) { - writer.tag(1, WireType.LengthDelimited).fork(); + writer.tag(1, runtime_1.WireType.LengthDelimited).fork(); for (let i = 0; i < message.path.length; i++) writer.int32(message.path[i]); writer.join(); } /* repeated int32 span = 2 [packed = true]; */ if (message.span.length) { - writer.tag(2, WireType.LengthDelimited).fork(); + writer.tag(2, runtime_1.WireType.LengthDelimited).fork(); for (let i = 0; i < message.span.length; i++) writer.int32(message.span[i]); writer.join(); } /* optional string leading_comments = 3; */ if (message.leading_comments !== undefined) - writer.tag(3, WireType.LengthDelimited).string(message.leading_comments); + writer.tag(3, runtime_1.WireType.LengthDelimited).string(message.leading_comments); /* optional string trailing_comments = 4; */ if (message.trailing_comments !== undefined) - writer.tag(4, WireType.LengthDelimited).string(message.trailing_comments); + writer.tag(4, runtime_1.WireType.LengthDelimited).string(message.trailing_comments); /* repeated string leading_detached_comments = 6; */ for (let i = 0; i < message.leading_detached_comments.length; i++) - writer.tag(6, WireType.LengthDelimited).string(message.leading_detached_comments[i]); + writer.tag(6, runtime_1.WireType.LengthDelimited).string(message.leading_detached_comments[i]); let u = options.writeUnknownFields; if (u !== false) - (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + (u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); return writer; } } /** * @generated MessageType for protobuf message google.protobuf.SourceCodeInfo.Location */ -export const SourceCodeInfo_Location = new SourceCodeInfo_Location$Type(); +exports.SourceCodeInfo_Location = new SourceCodeInfo_Location$Type(); // @generated message type with reflection information, may provide speed optimized methods -class GeneratedCodeInfo$Type extends MessageType { +class GeneratedCodeInfo$Type extends runtime_4.MessageType { constructor() { super("google.protobuf.GeneratedCodeInfo", [ - { no: 1, name: "annotation", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => GeneratedCodeInfo_Annotation } + { no: 1, name: "annotation", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => exports.GeneratedCodeInfo_Annotation } ]); } - create(value?: PartialMessage): GeneratedCodeInfo { - const message = globalThis.Object.create((this.messagePrototype!)); + create(value) { + const message = globalThis.Object.create((this.messagePrototype)); message.annotation = []; if (value !== undefined) - reflectionMergePartial(this, message, value); + runtime_3.reflectionMergePartial(this, message, value); return message; } - internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: GeneratedCodeInfo): GeneratedCodeInfo { + internalBinaryRead(reader, length, options, target) { let message = target ?? this.create(), end = reader.pos + length; while (reader.pos < end) { let [fieldNo, wireType] = reader.tag(); switch (fieldNo) { case /* repeated google.protobuf.GeneratedCodeInfo.Annotation annotation */ 1: - message.annotation.push(GeneratedCodeInfo_Annotation.internalBinaryRead(reader, reader.uint32(), options)); + message.annotation.push(exports.GeneratedCodeInfo_Annotation.internalBinaryRead(reader, reader.uint32(), options)); break; default: let u = options.readUnknownField; @@ -4406,27 +2952,27 @@ class GeneratedCodeInfo$Type extends MessageType { throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); let d = reader.skip(wireType); if (u !== false) - (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + (u === true ? runtime_2.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); } } return message; } - internalBinaryWrite(message: GeneratedCodeInfo, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + internalBinaryWrite(message, writer, options) { /* repeated google.protobuf.GeneratedCodeInfo.Annotation annotation = 1; */ for (let i = 0; i < message.annotation.length; i++) - GeneratedCodeInfo_Annotation.internalBinaryWrite(message.annotation[i], writer.tag(1, WireType.LengthDelimited).fork(), options).join(); + exports.GeneratedCodeInfo_Annotation.internalBinaryWrite(message.annotation[i], writer.tag(1, runtime_1.WireType.LengthDelimited).fork(), options).join(); let u = options.writeUnknownFields; if (u !== false) - (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + (u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); return writer; } } /** * @generated MessageType for protobuf message google.protobuf.GeneratedCodeInfo */ -export const GeneratedCodeInfo = new GeneratedCodeInfo$Type(); +exports.GeneratedCodeInfo = new GeneratedCodeInfo$Type(); // @generated message type with reflection information, may provide speed optimized methods -class GeneratedCodeInfo_Annotation$Type extends MessageType { +class GeneratedCodeInfo_Annotation$Type extends runtime_4.MessageType { constructor() { super("google.protobuf.GeneratedCodeInfo.Annotation", [ { no: 1, name: "path", kind: "scalar", repeat: 1 /*RepeatType.PACKED*/, T: 5 /*ScalarType.INT32*/ }, @@ -4436,20 +2982,20 @@ class GeneratedCodeInfo_Annotation$Type extends MessageType ["google.protobuf.GeneratedCodeInfo.Annotation.Semantic", GeneratedCodeInfo_Annotation_Semantic] } ]); } - create(value?: PartialMessage): GeneratedCodeInfo_Annotation { - const message = globalThis.Object.create((this.messagePrototype!)); + create(value) { + const message = globalThis.Object.create((this.messagePrototype)); message.path = []; if (value !== undefined) - reflectionMergePartial(this, message, value); + runtime_3.reflectionMergePartial(this, message, value); return message; } - internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: GeneratedCodeInfo_Annotation): GeneratedCodeInfo_Annotation { + internalBinaryRead(reader, length, options, target) { let message = target ?? this.create(), end = reader.pos + length; while (reader.pos < end) { let [fieldNo, wireType] = reader.tag(); switch (fieldNo) { case /* repeated int32 path = 1 [packed = true];*/ 1: - if (wireType === WireType.LengthDelimited) + if (wireType === runtime_1.WireType.LengthDelimited) for (let e = reader.int32() + reader.pos; reader.pos < e;) message.path.push(reader.int32()); else @@ -4473,38 +3019,38 @@ class GeneratedCodeInfo_Annotation$Type extends MessageType { - constructor() { - super("google.protobuf.Duration", [ - { no: 1, name: "seconds", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 0 /*LongType.BIGINT*/ }, - { no: 2, name: "nanos", kind: "scalar", T: 5 /*ScalarType.INT32*/ } - ]); - } +declare class Duration$Type extends MessageType { + constructor(); /** * Encode `Duration` to JSON string like "3.000001s". */ - internalJsonWrite(message: Duration, options: JsonWriteOptions): JsonValue { - let s = PbLong.from(message.seconds).toNumber(); - if (s > 315576000000 || s < -315576000000) - throw new Error("Duration value out of range."); - let text = message.seconds.toString(); - if (s === 0 && message.nanos < 0) - text = "-" + text; - if (message.nanos !== 0) { - let nanosStr = Math.abs(message.nanos).toString(); - nanosStr = "0".repeat(9 - nanosStr.length) + nanosStr; - if (nanosStr.substring(3) === "000000") - nanosStr = nanosStr.substring(0, 3); - else if (nanosStr.substring(6) === "000") - nanosStr = nanosStr.substring(0, 6); - text += "." + nanosStr; - } - return text + "s"; - } + internalJsonWrite(message: Duration, options: JsonWriteOptions): JsonValue; /** * Decode `Duration` from JSON string like "3.000001s" */ - internalJsonRead(json: JsonValue, options: JsonReadOptions, target?: Duration): Duration { - if (typeof json !== "string") - throw new Error("Unable to parse Duration from JSON " + typeofJsonValue(json) + ". Expected string."); - let match = json.match(/^(-?)([0-9]+)(?:\.([0-9]+))?s/); - if (match === null) - throw new Error("Unable to parse Duration from JSON string. Invalid format."); - if (!target) - target = this.create(); - let [, sign, secs, nanos] = match; - let longSeconds = PbLong.from(sign + secs); - if (longSeconds.toNumber() > 315576000000 || longSeconds.toNumber() < -315576000000) - throw new Error("Unable to parse Duration from JSON string. Value out of range."); - target.seconds = longSeconds.toBigInt(); - if (typeof nanos == "string") { - let nanosStr = sign + nanos + "0".repeat(9 - nanos.length); - target.nanos = parseInt(nanosStr); - } - return target; - } - create(value?: PartialMessage): Duration { - const message = globalThis.Object.create((this.messagePrototype!)); - message.seconds = 0n; - message.nanos = 0; - if (value !== undefined) - reflectionMergePartial(this, message, value); - return message; - } - internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Duration): Duration { - let message = target ?? this.create(), end = reader.pos + length; - while (reader.pos < end) { - let [fieldNo, wireType] = reader.tag(); - switch (fieldNo) { - case /* int64 seconds */ 1: - message.seconds = reader.int64().toBigInt(); - break; - case /* int32 nanos */ 2: - message.nanos = reader.int32(); - break; - default: - let u = options.readUnknownField; - if (u === "throw") - throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); - let d = reader.skip(wireType); - if (u !== false) - (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); - } - } - return message; - } - internalBinaryWrite(message: Duration, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { - /* int64 seconds = 1; */ - if (message.seconds !== 0n) - writer.tag(1, WireType.Varint).int64(message.seconds); - /* int32 nanos = 2; */ - if (message.nanos !== 0) - writer.tag(2, WireType.Varint).int32(message.nanos); - let u = options.writeUnknownFields; - if (u !== false) - (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); - return writer; - } + internalJsonRead(json: JsonValue, options: JsonReadOptions, target?: Duration): Duration; + create(value?: PartialMessage): Duration; + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Duration): Duration; + internalBinaryWrite(message: Duration, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter; } /** * @generated MessageType for protobuf message google.protobuf.Duration */ -export const Duration = new Duration$Type(); +export declare const Duration: Duration$Type; +export {}; diff --git a/src/google/protobuf/duration_pb.js b/src/google/protobuf/duration_pb.js new file mode 100644 index 0000000..9be202f --- /dev/null +++ b/src/google/protobuf/duration_pb.js @@ -0,0 +1,143 @@ +/* eslint-disable */ +// @generated by protobuf-ts 2.9.3 with parameter add_pb_suffix,client_grpc1,generate_dependencies,keep_enum_prefix,ts_nocheck,use_proto_field_name,output_javascript,output_legacy_commonjs,eslint_disable +// @generated from protobuf file "google/protobuf/duration.proto" (package "google.protobuf", syntax proto3) +// tslint:disable +// @ts-nocheck +// +// Protocol Buffers - Google's data interchange format +// Copyright 2008 Google Inc. All rights reserved. +// https://developers.google.com/protocol-buffers/ +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.Duration = void 0; +const runtime_1 = require("@protobuf-ts/runtime"); +const runtime_2 = require("@protobuf-ts/runtime"); +const runtime_3 = require("@protobuf-ts/runtime"); +const runtime_4 = require("@protobuf-ts/runtime"); +const runtime_5 = require("@protobuf-ts/runtime"); +const runtime_6 = require("@protobuf-ts/runtime"); +// @generated message type with reflection information, may provide speed optimized methods +class Duration$Type extends runtime_6.MessageType { + constructor() { + super("google.protobuf.Duration", [ + { no: 1, name: "seconds", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 0 /*LongType.BIGINT*/ }, + { no: 2, name: "nanos", kind: "scalar", T: 5 /*ScalarType.INT32*/ } + ]); + } + /** + * Encode `Duration` to JSON string like "3.000001s". + */ + internalJsonWrite(message, options) { + let s = runtime_5.PbLong.from(message.seconds).toNumber(); + if (s > 315576000000 || s < -315576000000) + throw new Error("Duration value out of range."); + let text = message.seconds.toString(); + if (s === 0 && message.nanos < 0) + text = "-" + text; + if (message.nanos !== 0) { + let nanosStr = Math.abs(message.nanos).toString(); + nanosStr = "0".repeat(9 - nanosStr.length) + nanosStr; + if (nanosStr.substring(3) === "000000") + nanosStr = nanosStr.substring(0, 3); + else if (nanosStr.substring(6) === "000") + nanosStr = nanosStr.substring(0, 6); + text += "." + nanosStr; + } + return text + "s"; + } + /** + * Decode `Duration` from JSON string like "3.000001s" + */ + internalJsonRead(json, options, target) { + if (typeof json !== "string") + throw new Error("Unable to parse Duration from JSON " + runtime_4.typeofJsonValue(json) + ". Expected string."); + let match = json.match(/^(-?)([0-9]+)(?:\.([0-9]+))?s/); + if (match === null) + throw new Error("Unable to parse Duration from JSON string. Invalid format."); + if (!target) + target = this.create(); + let [, sign, secs, nanos] = match; + let longSeconds = runtime_5.PbLong.from(sign + secs); + if (longSeconds.toNumber() > 315576000000 || longSeconds.toNumber() < -315576000000) + throw new Error("Unable to parse Duration from JSON string. Value out of range."); + target.seconds = longSeconds.toBigInt(); + if (typeof nanos == "string") { + let nanosStr = sign + nanos + "0".repeat(9 - nanos.length); + target.nanos = parseInt(nanosStr); + } + return target; + } + create(value) { + const message = globalThis.Object.create((this.messagePrototype)); + message.seconds = 0n; + message.nanos = 0; + if (value !== undefined) + runtime_3.reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader, length, options, target) { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* int64 seconds */ 1: + message.seconds = reader.int64().toBigInt(); + break; + case /* int32 nanos */ 2: + message.nanos = reader.int32(); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? runtime_2.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message, writer, options) { + /* int64 seconds = 1; */ + if (message.seconds !== 0n) + writer.tag(1, runtime_1.WireType.Varint).int64(message.seconds); + /* int32 nanos = 2; */ + if (message.nanos !== 0) + writer.tag(2, runtime_1.WireType.Varint).int32(message.nanos); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message google.protobuf.Duration + */ +exports.Duration = new Duration$Type(); diff --git a/src/google/protobuf/timestamp_pb.ts b/src/google/protobuf/timestamp_pb.d.ts similarity index 59% rename from src/google/protobuf/timestamp_pb.ts rename to src/google/protobuf/timestamp_pb.d.ts index 902d958..d64151e 100644 --- a/src/google/protobuf/timestamp_pb.ts +++ b/src/google/protobuf/timestamp_pb.d.ts @@ -1,4 +1,5 @@ -// @generated by protobuf-ts 2.9.3 with parameter add_pb_suffix,client_grpc1,generate_dependencies,keep_enum_prefix,ts_nocheck,use_proto_field_name +/* eslint-disable */ +// @generated by protobuf-ts 2.9.3 with parameter add_pb_suffix,client_grpc1,generate_dependencies,keep_enum_prefix,ts_nocheck,use_proto_field_name,output_javascript,output_legacy_commonjs,eslint_disable // @generated from protobuf file "google/protobuf/timestamp.proto" (package "google.protobuf", syntax proto3) // tslint:disable // @ts-nocheck @@ -35,17 +36,12 @@ // import type { BinaryWriteOptions } from "@protobuf-ts/runtime"; import type { IBinaryWriter } from "@protobuf-ts/runtime"; -import { WireType } from "@protobuf-ts/runtime"; import type { BinaryReadOptions } from "@protobuf-ts/runtime"; import type { IBinaryReader } from "@protobuf-ts/runtime"; -import { UnknownFieldHandler } from "@protobuf-ts/runtime"; import type { PartialMessage } from "@protobuf-ts/runtime"; -import { reflectionMergePartial } from "@protobuf-ts/runtime"; -import { typeofJsonValue } from "@protobuf-ts/runtime"; import type { JsonValue } from "@protobuf-ts/runtime"; import type { JsonReadOptions } from "@protobuf-ts/runtime"; import type { JsonWriteOptions } from "@protobuf-ts/runtime"; -import { PbLong } from "@protobuf-ts/runtime"; import { MessageType } from "@protobuf-ts/runtime"; /** * A Timestamp represents a point in time independent of any time zone or local @@ -160,129 +156,36 @@ export interface Timestamp { */ nanos: number; } -// @generated message type with reflection information, may provide speed optimized methods -class Timestamp$Type extends MessageType { - constructor() { - super("google.protobuf.Timestamp", [ - { no: 1, name: "seconds", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 0 /*LongType.BIGINT*/ }, - { no: 2, name: "nanos", kind: "scalar", T: 5 /*ScalarType.INT32*/ } - ]); - } +declare class Timestamp$Type extends MessageType { + constructor(); /** * Creates a new `Timestamp` for the current time. */ - now(): Timestamp { - const msg = this.create(); - const ms = Date.now(); - msg.seconds = PbLong.from(Math.floor(ms / 1000)).toBigInt(); - msg.nanos = (ms % 1000) * 1000000; - return msg; - } + now(): Timestamp; /** * Converts a `Timestamp` to a JavaScript Date. */ - toDate(message: Timestamp): Date { - return new Date(PbLong.from(message.seconds).toNumber() * 1000 + Math.ceil(message.nanos / 1000000)); - } + toDate(message: Timestamp): Date; /** * Converts a JavaScript Date to a `Timestamp`. */ - fromDate(date: Date): Timestamp { - const msg = this.create(); - const ms = date.getTime(); - msg.seconds = PbLong.from(Math.floor(ms / 1000)).toBigInt(); - msg.nanos = (ms % 1000) * 1000000; - return msg; - } + fromDate(date: Date): Timestamp; /** * In JSON format, the `Timestamp` type is encoded as a string * in the RFC 3339 format. */ - internalJsonWrite(message: Timestamp, options: JsonWriteOptions): JsonValue { - let ms = PbLong.from(message.seconds).toNumber() * 1000; - if (ms < Date.parse("0001-01-01T00:00:00Z") || ms > Date.parse("9999-12-31T23:59:59Z")) - throw new Error("Unable to encode Timestamp to JSON. Must be from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z inclusive."); - if (message.nanos < 0) - throw new Error("Unable to encode invalid Timestamp to JSON. Nanos must not be negative."); - let z = "Z"; - if (message.nanos > 0) { - let nanosStr = (message.nanos + 1000000000).toString().substring(1); - if (nanosStr.substring(3) === "000000") - z = "." + nanosStr.substring(0, 3) + "Z"; - else if (nanosStr.substring(6) === "000") - z = "." + nanosStr.substring(0, 6) + "Z"; - else - z = "." + nanosStr + "Z"; - } - return new Date(ms).toISOString().replace(".000Z", z); - } + internalJsonWrite(message: Timestamp, options: JsonWriteOptions): JsonValue; /** * In JSON format, the `Timestamp` type is encoded as a string * in the RFC 3339 format. */ - internalJsonRead(json: JsonValue, options: JsonReadOptions, target?: Timestamp): Timestamp { - if (typeof json !== "string") - throw new Error("Unable to parse Timestamp from JSON " + typeofJsonValue(json) + "."); - let matches = json.match(/^([0-9]{4})-([0-9]{2})-([0-9]{2})T([0-9]{2}):([0-9]{2}):([0-9]{2})(?:Z|\.([0-9]{3,9})Z|([+-][0-9][0-9]:[0-9][0-9]))$/); - if (!matches) - throw new Error("Unable to parse Timestamp from JSON. Invalid format."); - let ms = Date.parse(matches[1] + "-" + matches[2] + "-" + matches[3] + "T" + matches[4] + ":" + matches[5] + ":" + matches[6] + (matches[8] ? matches[8] : "Z")); - if (Number.isNaN(ms)) - throw new Error("Unable to parse Timestamp from JSON. Invalid value."); - if (ms < Date.parse("0001-01-01T00:00:00Z") || ms > Date.parse("9999-12-31T23:59:59Z")) - throw new globalThis.Error("Unable to parse Timestamp from JSON. Must be from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z inclusive."); - if (!target) - target = this.create(); - target.seconds = PbLong.from(ms / 1000).toBigInt(); - target.nanos = 0; - if (matches[7]) - target.nanos = (parseInt("1" + matches[7] + "0".repeat(9 - matches[7].length)) - 1000000000); - return target; - } - create(value?: PartialMessage): Timestamp { - const message = globalThis.Object.create((this.messagePrototype!)); - message.seconds = 0n; - message.nanos = 0; - if (value !== undefined) - reflectionMergePartial(this, message, value); - return message; - } - internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Timestamp): Timestamp { - let message = target ?? this.create(), end = reader.pos + length; - while (reader.pos < end) { - let [fieldNo, wireType] = reader.tag(); - switch (fieldNo) { - case /* int64 seconds */ 1: - message.seconds = reader.int64().toBigInt(); - break; - case /* int32 nanos */ 2: - message.nanos = reader.int32(); - break; - default: - let u = options.readUnknownField; - if (u === "throw") - throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); - let d = reader.skip(wireType); - if (u !== false) - (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); - } - } - return message; - } - internalBinaryWrite(message: Timestamp, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { - /* int64 seconds = 1; */ - if (message.seconds !== 0n) - writer.tag(1, WireType.Varint).int64(message.seconds); - /* int32 nanos = 2; */ - if (message.nanos !== 0) - writer.tag(2, WireType.Varint).int32(message.nanos); - let u = options.writeUnknownFields; - if (u !== false) - (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); - return writer; - } + internalJsonRead(json: JsonValue, options: JsonReadOptions, target?: Timestamp): Timestamp; + create(value?: PartialMessage): Timestamp; + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Timestamp): Timestamp; + internalBinaryWrite(message: Timestamp, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter; } /** * @generated MessageType for protobuf message google.protobuf.Timestamp */ -export const Timestamp = new Timestamp$Type(); +export declare const Timestamp: Timestamp$Type; +export {}; diff --git a/src/google/protobuf/timestamp_pb.js b/src/google/protobuf/timestamp_pb.js new file mode 100644 index 0000000..926325a --- /dev/null +++ b/src/google/protobuf/timestamp_pb.js @@ -0,0 +1,171 @@ +/* eslint-disable */ +// @generated by protobuf-ts 2.9.3 with parameter add_pb_suffix,client_grpc1,generate_dependencies,keep_enum_prefix,ts_nocheck,use_proto_field_name,output_javascript,output_legacy_commonjs,eslint_disable +// @generated from protobuf file "google/protobuf/timestamp.proto" (package "google.protobuf", syntax proto3) +// tslint:disable +// @ts-nocheck +// +// Protocol Buffers - Google's data interchange format +// Copyright 2008 Google Inc. All rights reserved. +// https://developers.google.com/protocol-buffers/ +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.Timestamp = void 0; +const runtime_1 = require("@protobuf-ts/runtime"); +const runtime_2 = require("@protobuf-ts/runtime"); +const runtime_3 = require("@protobuf-ts/runtime"); +const runtime_4 = require("@protobuf-ts/runtime"); +const runtime_5 = require("@protobuf-ts/runtime"); +const runtime_6 = require("@protobuf-ts/runtime"); +// @generated message type with reflection information, may provide speed optimized methods +class Timestamp$Type extends runtime_6.MessageType { + constructor() { + super("google.protobuf.Timestamp", [ + { no: 1, name: "seconds", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 0 /*LongType.BIGINT*/ }, + { no: 2, name: "nanos", kind: "scalar", T: 5 /*ScalarType.INT32*/ } + ]); + } + /** + * Creates a new `Timestamp` for the current time. + */ + now() { + const msg = this.create(); + const ms = Date.now(); + msg.seconds = runtime_5.PbLong.from(Math.floor(ms / 1000)).toBigInt(); + msg.nanos = (ms % 1000) * 1000000; + return msg; + } + /** + * Converts a `Timestamp` to a JavaScript Date. + */ + toDate(message) { + return new Date(runtime_5.PbLong.from(message.seconds).toNumber() * 1000 + Math.ceil(message.nanos / 1000000)); + } + /** + * Converts a JavaScript Date to a `Timestamp`. + */ + fromDate(date) { + const msg = this.create(); + const ms = date.getTime(); + msg.seconds = runtime_5.PbLong.from(Math.floor(ms / 1000)).toBigInt(); + msg.nanos = (ms % 1000) * 1000000; + return msg; + } + /** + * In JSON format, the `Timestamp` type is encoded as a string + * in the RFC 3339 format. + */ + internalJsonWrite(message, options) { + let ms = runtime_5.PbLong.from(message.seconds).toNumber() * 1000; + if (ms < Date.parse("0001-01-01T00:00:00Z") || ms > Date.parse("9999-12-31T23:59:59Z")) + throw new Error("Unable to encode Timestamp to JSON. Must be from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z inclusive."); + if (message.nanos < 0) + throw new Error("Unable to encode invalid Timestamp to JSON. Nanos must not be negative."); + let z = "Z"; + if (message.nanos > 0) { + let nanosStr = (message.nanos + 1000000000).toString().substring(1); + if (nanosStr.substring(3) === "000000") + z = "." + nanosStr.substring(0, 3) + "Z"; + else if (nanosStr.substring(6) === "000") + z = "." + nanosStr.substring(0, 6) + "Z"; + else + z = "." + nanosStr + "Z"; + } + return new Date(ms).toISOString().replace(".000Z", z); + } + /** + * In JSON format, the `Timestamp` type is encoded as a string + * in the RFC 3339 format. + */ + internalJsonRead(json, options, target) { + if (typeof json !== "string") + throw new Error("Unable to parse Timestamp from JSON " + runtime_4.typeofJsonValue(json) + "."); + let matches = json.match(/^([0-9]{4})-([0-9]{2})-([0-9]{2})T([0-9]{2}):([0-9]{2}):([0-9]{2})(?:Z|\.([0-9]{3,9})Z|([+-][0-9][0-9]:[0-9][0-9]))$/); + if (!matches) + throw new Error("Unable to parse Timestamp from JSON. Invalid format."); + let ms = Date.parse(matches[1] + "-" + matches[2] + "-" + matches[3] + "T" + matches[4] + ":" + matches[5] + ":" + matches[6] + (matches[8] ? matches[8] : "Z")); + if (Number.isNaN(ms)) + throw new Error("Unable to parse Timestamp from JSON. Invalid value."); + if (ms < Date.parse("0001-01-01T00:00:00Z") || ms > Date.parse("9999-12-31T23:59:59Z")) + throw new globalThis.Error("Unable to parse Timestamp from JSON. Must be from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z inclusive."); + if (!target) + target = this.create(); + target.seconds = runtime_5.PbLong.from(ms / 1000).toBigInt(); + target.nanos = 0; + if (matches[7]) + target.nanos = (parseInt("1" + matches[7] + "0".repeat(9 - matches[7].length)) - 1000000000); + return target; + } + create(value) { + const message = globalThis.Object.create((this.messagePrototype)); + message.seconds = 0n; + message.nanos = 0; + if (value !== undefined) + runtime_3.reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader, length, options, target) { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* int64 seconds */ 1: + message.seconds = reader.int64().toBigInt(); + break; + case /* int32 nanos */ 2: + message.nanos = reader.int32(); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? runtime_2.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message, writer, options) { + /* int64 seconds = 1; */ + if (message.seconds !== 0n) + writer.tag(1, runtime_1.WireType.Varint).int64(message.seconds); + /* int32 nanos = 2; */ + if (message.nanos !== 0) + writer.tag(2, runtime_1.WireType.Varint).int32(message.nanos); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message google.protobuf.Timestamp + */ +exports.Timestamp = new Timestamp$Type(); diff --git a/src/google/rpc/status_grpc_pb.js b/src/google/rpc/status_grpc_pb.js deleted file mode 100644 index 97b3a24..0000000 --- a/src/google/rpc/status_grpc_pb.js +++ /dev/null @@ -1 +0,0 @@ -// GENERATED CODE -- NO SERVICES IN PROTO \ No newline at end of file diff --git a/src/google/rpc/status_pb.d.ts b/src/google/rpc/status_pb.d.ts new file mode 100644 index 0000000..1d5354b --- /dev/null +++ b/src/google/rpc/status_pb.d.ts @@ -0,0 +1,74 @@ +/* eslint-disable */ +// @generated by protobuf-ts 2.9.3 with parameter add_pb_suffix,client_grpc1,generate_dependencies,keep_enum_prefix,ts_nocheck,use_proto_field_name,output_javascript,output_legacy_commonjs,eslint_disable +// @generated from protobuf file "google/rpc/status.proto" (package "google.rpc", syntax proto3) +// tslint:disable +// @ts-nocheck +// +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +import type { BinaryWriteOptions } from "@protobuf-ts/runtime"; +import type { IBinaryWriter } from "@protobuf-ts/runtime"; +import type { BinaryReadOptions } from "@protobuf-ts/runtime"; +import type { IBinaryReader } from "@protobuf-ts/runtime"; +import type { PartialMessage } from "@protobuf-ts/runtime"; +import { MessageType } from "@protobuf-ts/runtime"; +import { Any } from "../protobuf/any_pb"; +/** + * The `Status` type defines a logical error model that is suitable for + * different programming environments, including REST APIs and RPC APIs. It is + * used by [gRPC](https://github.com/grpc). Each `Status` message contains + * three pieces of data: error code, error message, and error details. + * + * You can find out more about this error model and how to work with it in the + * [API Design Guide](https://cloud.google.com/apis/design/errors). + * + * @generated from protobuf message google.rpc.Status + */ +export interface Status { + /** + * The status code, which should be an enum value of + * [google.rpc.Code][google.rpc.Code]. + * + * @generated from protobuf field: int32 code = 1; + */ + code: number; + /** + * A developer-facing error message, which should be in English. Any + * user-facing error message should be localized and sent in the + * [google.rpc.Status.details][google.rpc.Status.details] field, or localized + * by the client. + * + * @generated from protobuf field: string message = 2; + */ + message: string; + /** + * A list of messages that carry the error details. There is a common set of + * message types for APIs to use. + * + * @generated from protobuf field: repeated google.protobuf.Any details = 3; + */ + details: Any[]; +} +declare class Status$Type extends MessageType { + constructor(); + create(value?: PartialMessage): Status; + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Status): Status; + internalBinaryWrite(message: Status, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter; +} +/** + * @generated MessageType for protobuf message google.rpc.Status + */ +export declare const Status: Status$Type; +export {}; diff --git a/src/google/rpc/status_pb.js b/src/google/rpc/status_pb.js index 7129424..ace407e 100644 --- a/src/google/rpc/status_pb.js +++ b/src/google/rpc/status_pb.js @@ -1,268 +1,91 @@ -// source: google/rpc/status.proto -/** - * @fileoverview - * @enhanceable - * @suppress {missingRequire} reports error on implicit type usages. - * @suppress {messageConventions} JS Compiler reports an error if a variable or - * field starts with 'MSG_' and isn't a translatable message. - * @public - */ -// GENERATED CODE -- DO NOT EDIT! /* eslint-disable */ +// @generated by protobuf-ts 2.9.3 with parameter add_pb_suffix,client_grpc1,generate_dependencies,keep_enum_prefix,ts_nocheck,use_proto_field_name,output_javascript,output_legacy_commonjs,eslint_disable +// @generated from protobuf file "google/rpc/status.proto" (package "google.rpc", syntax proto3) +// tslint:disable // @ts-nocheck - -var jspb = require('google-protobuf'); -var goog = jspb; -var global = - (typeof globalThis !== 'undefined' && globalThis) || - (typeof window !== 'undefined' && window) || - (typeof global !== 'undefined' && global) || - (typeof self !== 'undefined' && self) || - (function () { return this; }).call(null) || - Function('return this')(); - -var google_protobuf_any_pb = require('google-protobuf/google/protobuf/any_pb.js'); -goog.object.extend(proto, google_protobuf_any_pb); -goog.exportSymbol('proto.google.rpc.Status', null, global); -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.google.rpc.Status = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.google.rpc.Status.repeatedFields_, null); -}; -goog.inherits(proto.google.rpc.Status, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.google.rpc.Status.displayName = 'proto.google.rpc.Status'; -} - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.google.rpc.Status.repeatedFields_ = [3]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.google.rpc.Status.prototype.toObject = function(opt_includeInstance) { - return proto.google.rpc.Status.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.google.rpc.Status} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.google.rpc.Status.toObject = function(includeInstance, msg) { - var f, obj = { - code: jspb.Message.getFieldWithDefault(msg, 1, 0), - message: jspb.Message.getFieldWithDefault(msg, 2, ""), - detailsList: jspb.Message.toObjectList(msg.getDetailsList(), - google_protobuf_any_pb.Any.toObject, includeInstance) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.google.rpc.Status} - */ -proto.google.rpc.Status.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.google.rpc.Status; - return proto.google.rpc.Status.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.google.rpc.Status} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.google.rpc.Status} - */ -proto.google.rpc.Status.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; +// +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.Status = void 0; +const runtime_1 = require("@protobuf-ts/runtime"); +const runtime_2 = require("@protobuf-ts/runtime"); +const runtime_3 = require("@protobuf-ts/runtime"); +const runtime_4 = require("@protobuf-ts/runtime"); +const any_pb_1 = require("../protobuf/any_pb"); +// @generated message type with reflection information, may provide speed optimized methods +class Status$Type extends runtime_4.MessageType { + constructor() { + super("google.rpc.Status", [ + { no: 1, name: "code", kind: "scalar", T: 5 /*ScalarType.INT32*/ }, + { no: 2, name: "message", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, + { no: 3, name: "details", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => any_pb_1.Any } + ]); } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {number} */ (reader.readInt32()); - msg.setCode(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setMessage(value); - break; - case 3: - var value = new google_protobuf_any_pb.Any; - reader.readMessage(value,google_protobuf_any_pb.Any.deserializeBinaryFromReader); - msg.addDetails(value); - break; - default: - reader.skipField(); - break; + create(value) { + const message = globalThis.Object.create((this.messagePrototype)); + message.code = 0; + message.message = ""; + message.details = []; + if (value !== undefined) + runtime_3.reflectionMergePartial(this, message, value); + return message; } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.google.rpc.Status.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.google.rpc.Status.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.google.rpc.Status} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.google.rpc.Status.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getCode(); - if (f !== 0) { - writer.writeInt32( - 1, - f - ); - } - f = message.getMessage(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } - f = message.getDetailsList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 3, - f, - google_protobuf_any_pb.Any.serializeBinaryToWriter - ); - } -}; - - -/** - * optional int32 code = 1; - * @return {number} - */ -proto.google.rpc.Status.prototype.getCode = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.google.rpc.Status} returns this - */ -proto.google.rpc.Status.prototype.setCode = function(value) { - return jspb.Message.setProto3IntField(this, 1, value); -}; - - -/** - * optional string message = 2; - * @return {string} - */ -proto.google.rpc.Status.prototype.getMessage = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * @param {string} value - * @return {!proto.google.rpc.Status} returns this - */ -proto.google.rpc.Status.prototype.setMessage = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); -}; - - -/** - * repeated google.protobuf.Any details = 3; - * @return {!Array} - */ -proto.google.rpc.Status.prototype.getDetailsList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, google_protobuf_any_pb.Any, 3)); -}; - - -/** - * @param {!Array} value - * @return {!proto.google.rpc.Status} returns this -*/ -proto.google.rpc.Status.prototype.setDetailsList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 3, value); -}; - - -/** - * @param {!proto.google.protobuf.Any=} opt_value - * @param {number=} opt_index - * @return {!proto.google.protobuf.Any} - */ -proto.google.rpc.Status.prototype.addDetails = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 3, opt_value, proto.google.protobuf.Any, opt_index); -}; - - + internalBinaryRead(reader, length, options, target) { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* int32 code */ 1: + message.code = reader.int32(); + break; + case /* string message */ 2: + message.message = reader.string(); + break; + case /* repeated google.protobuf.Any details */ 3: + message.details.push(any_pb_1.Any.internalBinaryRead(reader, reader.uint32(), options)); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? runtime_2.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message, writer, options) { + /* int32 code = 1; */ + if (message.code !== 0) + writer.tag(1, runtime_1.WireType.Varint).int32(message.code); + /* string message = 2; */ + if (message.message !== "") + writer.tag(2, runtime_1.WireType.LengthDelimited).string(message.message); + /* repeated google.protobuf.Any details = 3; */ + for (let i = 0; i < message.details.length; i++) + any_pb_1.Any.internalBinaryWrite(message.details[i], writer.tag(3, runtime_1.WireType.LengthDelimited).fork(), options).join(); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} /** - * Clears the list making it empty but non-null. - * @return {!proto.google.rpc.Status} returns this + * @generated MessageType for protobuf message google.rpc.Status */ -proto.google.rpc.Status.prototype.clearDetailsList = function() { - return this.setDetailsList([]); -}; - - -goog.object.extend(exports, proto.google.rpc); +exports.Status = new Status$Type(); diff --git a/src/google/rpc/status_pb.ts b/src/google/rpc/status_pb.ts deleted file mode 100644 index b3aac55..0000000 --- a/src/google/rpc/status_pb.ts +++ /dev/null @@ -1,128 +0,0 @@ -// @generated by protobuf-ts 2.9.3 with parameter add_pb_suffix,client_grpc1,generate_dependencies,keep_enum_prefix,ts_nocheck,use_proto_field_name -// @generated from protobuf file "google/rpc/status.proto" (package "google.rpc", syntax proto3) -// tslint:disable -// @ts-nocheck -// -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -import type { BinaryWriteOptions } from "@protobuf-ts/runtime"; -import type { IBinaryWriter } from "@protobuf-ts/runtime"; -import { WireType } from "@protobuf-ts/runtime"; -import type { BinaryReadOptions } from "@protobuf-ts/runtime"; -import type { IBinaryReader } from "@protobuf-ts/runtime"; -import { UnknownFieldHandler } from "@protobuf-ts/runtime"; -import type { PartialMessage } from "@protobuf-ts/runtime"; -import { reflectionMergePartial } from "@protobuf-ts/runtime"; -import { MessageType } from "@protobuf-ts/runtime"; -import { Any } from "../protobuf/any_pb"; -/** - * The `Status` type defines a logical error model that is suitable for - * different programming environments, including REST APIs and RPC APIs. It is - * used by [gRPC](https://github.com/grpc). Each `Status` message contains - * three pieces of data: error code, error message, and error details. - * - * You can find out more about this error model and how to work with it in the - * [API Design Guide](https://cloud.google.com/apis/design/errors). - * - * @generated from protobuf message google.rpc.Status - */ -export interface Status { - /** - * The status code, which should be an enum value of - * [google.rpc.Code][google.rpc.Code]. - * - * @generated from protobuf field: int32 code = 1; - */ - code: number; - /** - * A developer-facing error message, which should be in English. Any - * user-facing error message should be localized and sent in the - * [google.rpc.Status.details][google.rpc.Status.details] field, or localized - * by the client. - * - * @generated from protobuf field: string message = 2; - */ - message: string; - /** - * A list of messages that carry the error details. There is a common set of - * message types for APIs to use. - * - * @generated from protobuf field: repeated google.protobuf.Any details = 3; - */ - details: Any[]; -} -// @generated message type with reflection information, may provide speed optimized methods -class Status$Type extends MessageType { - constructor() { - super("google.rpc.Status", [ - { no: 1, name: "code", kind: "scalar", T: 5 /*ScalarType.INT32*/ }, - { no: 2, name: "message", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, - { no: 3, name: "details", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => Any } - ]); - } - create(value?: PartialMessage): Status { - const message = globalThis.Object.create((this.messagePrototype!)); - message.code = 0; - message.message = ""; - message.details = []; - if (value !== undefined) - reflectionMergePartial(this, message, value); - return message; - } - internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Status): Status { - let message = target ?? this.create(), end = reader.pos + length; - while (reader.pos < end) { - let [fieldNo, wireType] = reader.tag(); - switch (fieldNo) { - case /* int32 code */ 1: - message.code = reader.int32(); - break; - case /* string message */ 2: - message.message = reader.string(); - break; - case /* repeated google.protobuf.Any details */ 3: - message.details.push(Any.internalBinaryRead(reader, reader.uint32(), options)); - break; - default: - let u = options.readUnknownField; - if (u === "throw") - throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); - let d = reader.skip(wireType); - if (u !== false) - (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); - } - } - return message; - } - internalBinaryWrite(message: Status, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { - /* int32 code = 1; */ - if (message.code !== 0) - writer.tag(1, WireType.Varint).int32(message.code); - /* string message = 2; */ - if (message.message !== "") - writer.tag(2, WireType.LengthDelimited).string(message.message); - /* repeated google.protobuf.Any details = 3; */ - for (let i = 0; i < message.details.length; i++) - Any.internalBinaryWrite(message.details[i], writer.tag(3, WireType.LengthDelimited).fork(), options).join(); - let u = options.writeUnknownFields; - if (u !== false) - (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); - return writer; - } -} -/** - * @generated MessageType for protobuf message google.rpc.Status - */ -export const Status = new Status$Type(); diff --git a/src/vald/v1/agent/core/agent_grpc_pb.js b/src/vald/v1/agent/core/agent_grpc_pb.js deleted file mode 100644 index e5da3e4..0000000 --- a/src/vald/v1/agent/core/agent_grpc_pb.js +++ /dev/null @@ -1,145 +0,0 @@ -// GENERATED CODE -- DO NOT EDIT! - -// Original file comments: -// -// Copyright (C) 2019-2023 vdaas.org vald team -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// You may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// -'use strict'; -var grpc = require('@grpc/grpc-js'); -var google_api_annotations_pb = require('../../../../google/api/annotations_pb.js'); -var vald_v1_payload_payload_pb = require('../../../../vald/v1/payload/payload_pb.js'); - -function serialize_payload_v1_Control_CreateIndexRequest(arg) { - if (!(arg instanceof vald_v1_payload_payload_pb.Control.CreateIndexRequest)) { - throw new Error('Expected argument of type payload.v1.Control.CreateIndexRequest'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_payload_v1_Control_CreateIndexRequest(buffer_arg) { - return vald_v1_payload_payload_pb.Control.CreateIndexRequest.deserializeBinary(new Uint8Array(buffer_arg)); -} - -function serialize_payload_v1_Empty(arg) { - if (!(arg instanceof vald_v1_payload_payload_pb.Empty)) { - throw new Error('Expected argument of type payload.v1.Empty'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_payload_v1_Empty(buffer_arg) { - return vald_v1_payload_payload_pb.Empty.deserializeBinary(new Uint8Array(buffer_arg)); -} - -function serialize_payload_v1_Info_Index_Count(arg) { - if (!(arg instanceof vald_v1_payload_payload_pb.Info.Index.Count)) { - throw new Error('Expected argument of type payload.v1.Info.Index.Count'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_payload_v1_Info_Index_Count(buffer_arg) { - return vald_v1_payload_payload_pb.Info.Index.Count.deserializeBinary(new Uint8Array(buffer_arg)); -} - -function serialize_payload_v1_Object_GetTimestampRequest(arg) { - if (!(arg instanceof vald_v1_payload_payload_pb.Object.GetTimestampRequest)) { - throw new Error('Expected argument of type payload.v1.Object.GetTimestampRequest'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_payload_v1_Object_GetTimestampRequest(buffer_arg) { - return vald_v1_payload_payload_pb.Object.GetTimestampRequest.deserializeBinary(new Uint8Array(buffer_arg)); -} - -function serialize_payload_v1_Object_Timestamp(arg) { - if (!(arg instanceof vald_v1_payload_payload_pb.Object.Timestamp)) { - throw new Error('Expected argument of type payload.v1.Object.Timestamp'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_payload_v1_Object_Timestamp(buffer_arg) { - return vald_v1_payload_payload_pb.Object.Timestamp.deserializeBinary(new Uint8Array(buffer_arg)); -} - - -// Represent the agent service. -var AgentService = exports.AgentService = { - // Represent the creating index RPC. -createIndex: { - path: '/core.v1.Agent/CreateIndex', - requestStream: false, - responseStream: false, - requestType: vald_v1_payload_payload_pb.Control.CreateIndexRequest, - responseType: vald_v1_payload_payload_pb.Empty, - requestSerialize: serialize_payload_v1_Control_CreateIndexRequest, - requestDeserialize: deserialize_payload_v1_Control_CreateIndexRequest, - responseSerialize: serialize_payload_v1_Empty, - responseDeserialize: deserialize_payload_v1_Empty, - }, - // Represent the saving index RPC. -saveIndex: { - path: '/core.v1.Agent/SaveIndex', - requestStream: false, - responseStream: false, - requestType: vald_v1_payload_payload_pb.Empty, - responseType: vald_v1_payload_payload_pb.Empty, - requestSerialize: serialize_payload_v1_Empty, - requestDeserialize: deserialize_payload_v1_Empty, - responseSerialize: serialize_payload_v1_Empty, - responseDeserialize: deserialize_payload_v1_Empty, - }, - // Represent the creating and saving index RPC. -createAndSaveIndex: { - path: '/core.v1.Agent/CreateAndSaveIndex', - requestStream: false, - responseStream: false, - requestType: vald_v1_payload_payload_pb.Control.CreateIndexRequest, - responseType: vald_v1_payload_payload_pb.Empty, - requestSerialize: serialize_payload_v1_Control_CreateIndexRequest, - requestDeserialize: deserialize_payload_v1_Control_CreateIndexRequest, - responseSerialize: serialize_payload_v1_Empty, - responseDeserialize: deserialize_payload_v1_Empty, - }, - // Represent the RPC to get the agent index information. -indexInfo: { - path: '/core.v1.Agent/IndexInfo', - requestStream: false, - responseStream: false, - requestType: vald_v1_payload_payload_pb.Empty, - responseType: vald_v1_payload_payload_pb.Info.Index.Count, - requestSerialize: serialize_payload_v1_Empty, - requestDeserialize: deserialize_payload_v1_Empty, - responseSerialize: serialize_payload_v1_Info_Index_Count, - responseDeserialize: deserialize_payload_v1_Info_Index_Count, - }, - // Represent the RPC to get the vector metadata. This RPC is mainly used for index correction process -getTimestamp: { - path: '/core.v1.Agent/GetTimestamp', - requestStream: false, - responseStream: false, - requestType: vald_v1_payload_payload_pb.Object.GetTimestampRequest, - responseType: vald_v1_payload_payload_pb.Object.Timestamp, - requestSerialize: serialize_payload_v1_Object_GetTimestampRequest, - requestDeserialize: deserialize_payload_v1_Object_GetTimestampRequest, - responseSerialize: serialize_payload_v1_Object_Timestamp, - responseDeserialize: deserialize_payload_v1_Object_Timestamp, - }, -}; - -exports.AgentClient = grpc.makeGenericClientConstructor(AgentService); diff --git a/src/vald/v1/agent/core/agent_pb.d.ts b/src/vald/v1/agent/core/agent_pb.d.ts new file mode 100644 index 0000000..74b9bf6 --- /dev/null +++ b/src/vald/v1/agent/core/agent_pb.d.ts @@ -0,0 +1,26 @@ +/* eslint-disable */ +// @generated by protobuf-ts 2.9.3 with parameter add_pb_suffix,client_grpc1,generate_dependencies,keep_enum_prefix,ts_nocheck,use_proto_field_name,output_javascript,output_legacy_commonjs,eslint_disable +// @generated from protobuf file "vald/v1/agent/core/agent.proto" (package "core.v1", syntax proto3) +// tslint:disable +// @ts-nocheck +// +// +// Copyright (C) 2019-2023 vdaas.org vald team +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// You may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +/** + * @generated ServiceType for protobuf service core.v1.Agent + */ +export declare const Agent: any; diff --git a/src/vald/v1/agent/core/agent_pb.grpc-client.ts b/src/vald/v1/agent/core/agent_pb.grpc-client.d.ts similarity index 76% rename from src/vald/v1/agent/core/agent_pb.grpc-client.ts rename to src/vald/v1/agent/core/agent_pb.grpc-client.d.ts index c264f0c..d5f463d 100644 --- a/src/vald/v1/agent/core/agent_pb.grpc-client.ts +++ b/src/vald/v1/agent/core/agent_pb.grpc-client.d.ts @@ -1,4 +1,5 @@ -// @generated by protobuf-ts 2.9.3 with parameter add_pb_suffix,client_grpc1,generate_dependencies,keep_enum_prefix,ts_nocheck,use_proto_field_name +/* eslint-disable */ +// @generated by protobuf-ts 2.9.3 with parameter add_pb_suffix,client_grpc1,generate_dependencies,keep_enum_prefix,ts_nocheck,use_proto_field_name,output_javascript,output_legacy_commonjs,eslint_disable // @generated from protobuf file "vald/v1/agent/core/agent.proto" (package "core.v1", syntax proto3) // tslint:disable // @ts-nocheck @@ -19,7 +20,6 @@ // limitations under the License. // // -import { Agent } from "./agent_pb"; import type { BinaryWriteOptions } from "@protobuf-ts/runtime"; import type { BinaryReadOptions } from "@protobuf-ts/runtime"; import type { Object_Timestamp } from "../../payload/payload_pb"; @@ -85,55 +85,37 @@ export interface IAgentClient { * * @generated from protobuf service core.v1.Agent */ -export class AgentClient extends grpc.Client implements IAgentClient { - private readonly _binaryOptions: Partial; - constructor(address: string, credentials: grpc.ChannelCredentials, options: grpc.ClientOptions = {}, binaryOptions: Partial = {}) { - super(address, credentials, options); - this._binaryOptions = binaryOptions; - } +export declare class AgentClient extends grpc.Client implements IAgentClient { + private readonly _binaryOptions; + constructor(address: string, credentials: grpc.ChannelCredentials, options?: grpc.ClientOptions, binaryOptions?: Partial); /** * Represent the creating index RPC. * * @generated from protobuf rpc: CreateIndex(payload.v1.Control.CreateIndexRequest) returns (payload.v1.Empty); */ - createIndex(input: Control_CreateIndexRequest, metadata: grpc.Metadata | grpc.CallOptions | ((err: grpc.ServiceError | null, value?: Empty) => void), options?: grpc.CallOptions | ((err: grpc.ServiceError | null, value?: Empty) => void), callback?: ((err: grpc.ServiceError | null, value?: Empty) => void)): grpc.ClientUnaryCall { - const method = Agent.methods[0]; - return this.makeUnaryRequest(`/${Agent.typeName}/${method.name}`, (value: Control_CreateIndexRequest): Buffer => Buffer.from(method.I.toBinary(value, this._binaryOptions)), (value: Buffer): Empty => method.O.fromBinary(value, this._binaryOptions), input, (metadata as any), (options as any), (callback as any)); - } + createIndex(input: Control_CreateIndexRequest, metadata: grpc.Metadata | grpc.CallOptions | ((err: grpc.ServiceError | null, value?: Empty) => void), options?: grpc.CallOptions | ((err: grpc.ServiceError | null, value?: Empty) => void), callback?: ((err: grpc.ServiceError | null, value?: Empty) => void)): grpc.ClientUnaryCall; /** * Represent the saving index RPC. * * @generated from protobuf rpc: SaveIndex(payload.v1.Empty) returns (payload.v1.Empty); */ - saveIndex(input: Empty, metadata: grpc.Metadata | grpc.CallOptions | ((err: grpc.ServiceError | null, value?: Empty) => void), options?: grpc.CallOptions | ((err: grpc.ServiceError | null, value?: Empty) => void), callback?: ((err: grpc.ServiceError | null, value?: Empty) => void)): grpc.ClientUnaryCall { - const method = Agent.methods[1]; - return this.makeUnaryRequest(`/${Agent.typeName}/${method.name}`, (value: Empty): Buffer => Buffer.from(method.I.toBinary(value, this._binaryOptions)), (value: Buffer): Empty => method.O.fromBinary(value, this._binaryOptions), input, (metadata as any), (options as any), (callback as any)); - } + saveIndex(input: Empty, metadata: grpc.Metadata | grpc.CallOptions | ((err: grpc.ServiceError | null, value?: Empty) => void), options?: grpc.CallOptions | ((err: grpc.ServiceError | null, value?: Empty) => void), callback?: ((err: grpc.ServiceError | null, value?: Empty) => void)): grpc.ClientUnaryCall; /** * Represent the creating and saving index RPC. * * @generated from protobuf rpc: CreateAndSaveIndex(payload.v1.Control.CreateIndexRequest) returns (payload.v1.Empty); */ - createAndSaveIndex(input: Control_CreateIndexRequest, metadata: grpc.Metadata | grpc.CallOptions | ((err: grpc.ServiceError | null, value?: Empty) => void), options?: grpc.CallOptions | ((err: grpc.ServiceError | null, value?: Empty) => void), callback?: ((err: grpc.ServiceError | null, value?: Empty) => void)): grpc.ClientUnaryCall { - const method = Agent.methods[2]; - return this.makeUnaryRequest(`/${Agent.typeName}/${method.name}`, (value: Control_CreateIndexRequest): Buffer => Buffer.from(method.I.toBinary(value, this._binaryOptions)), (value: Buffer): Empty => method.O.fromBinary(value, this._binaryOptions), input, (metadata as any), (options as any), (callback as any)); - } + createAndSaveIndex(input: Control_CreateIndexRequest, metadata: grpc.Metadata | grpc.CallOptions | ((err: grpc.ServiceError | null, value?: Empty) => void), options?: grpc.CallOptions | ((err: grpc.ServiceError | null, value?: Empty) => void), callback?: ((err: grpc.ServiceError | null, value?: Empty) => void)): grpc.ClientUnaryCall; /** * Represent the RPC to get the agent index information. * * @generated from protobuf rpc: IndexInfo(payload.v1.Empty) returns (payload.v1.Info.Index.Count); */ - indexInfo(input: Empty, metadata: grpc.Metadata | grpc.CallOptions | ((err: grpc.ServiceError | null, value?: Info_Index_Count) => void), options?: grpc.CallOptions | ((err: grpc.ServiceError | null, value?: Info_Index_Count) => void), callback?: ((err: grpc.ServiceError | null, value?: Info_Index_Count) => void)): grpc.ClientUnaryCall { - const method = Agent.methods[3]; - return this.makeUnaryRequest(`/${Agent.typeName}/${method.name}`, (value: Empty): Buffer => Buffer.from(method.I.toBinary(value, this._binaryOptions)), (value: Buffer): Info_Index_Count => method.O.fromBinary(value, this._binaryOptions), input, (metadata as any), (options as any), (callback as any)); - } + indexInfo(input: Empty, metadata: grpc.Metadata | grpc.CallOptions | ((err: grpc.ServiceError | null, value?: Info_Index_Count) => void), options?: grpc.CallOptions | ((err: grpc.ServiceError | null, value?: Info_Index_Count) => void), callback?: ((err: grpc.ServiceError | null, value?: Info_Index_Count) => void)): grpc.ClientUnaryCall; /** * Represent the RPC to get the vector metadata. This RPC is mainly used for index correction process * * @generated from protobuf rpc: GetTimestamp(payload.v1.Object.GetTimestampRequest) returns (payload.v1.Object.Timestamp); */ - getTimestamp(input: Object_GetTimestampRequest, metadata: grpc.Metadata | grpc.CallOptions | ((err: grpc.ServiceError | null, value?: Object_Timestamp) => void), options?: grpc.CallOptions | ((err: grpc.ServiceError | null, value?: Object_Timestamp) => void), callback?: ((err: grpc.ServiceError | null, value?: Object_Timestamp) => void)): grpc.ClientUnaryCall { - const method = Agent.methods[4]; - return this.makeUnaryRequest(`/${Agent.typeName}/${method.name}`, (value: Object_GetTimestampRequest): Buffer => Buffer.from(method.I.toBinary(value, this._binaryOptions)), (value: Buffer): Object_Timestamp => method.O.fromBinary(value, this._binaryOptions), input, (metadata as any), (options as any), (callback as any)); - } + getTimestamp(input: Object_GetTimestampRequest, metadata: grpc.Metadata | grpc.CallOptions | ((err: grpc.ServiceError | null, value?: Object_Timestamp) => void), options?: grpc.CallOptions | ((err: grpc.ServiceError | null, value?: Object_Timestamp) => void), callback?: ((err: grpc.ServiceError | null, value?: Object_Timestamp) => void)): grpc.ClientUnaryCall; } diff --git a/src/vald/v1/agent/core/agent_pb.grpc-client.js b/src/vald/v1/agent/core/agent_pb.grpc-client.js new file mode 100644 index 0000000..5e0d865 --- /dev/null +++ b/src/vald/v1/agent/core/agent_pb.grpc-client.js @@ -0,0 +1,106 @@ +/* eslint-disable */ +// @generated by protobuf-ts 2.9.3 with parameter add_pb_suffix,client_grpc1,generate_dependencies,keep_enum_prefix,ts_nocheck,use_proto_field_name,output_javascript,output_legacy_commonjs,eslint_disable +// @generated from protobuf file "vald/v1/agent/core/agent.proto" (package "core.v1", syntax proto3) +// tslint:disable +// @ts-nocheck +// +// +// Copyright (C) 2019-2023 vdaas.org vald team +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// You may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.AgentClient = void 0; +/* eslint-disable */ +// @generated by protobuf-ts 2.9.3 with parameter add_pb_suffix,client_grpc1,generate_dependencies,keep_enum_prefix,ts_nocheck,use_proto_field_name,output_javascript,output_legacy_commonjs,eslint_disable +// @generated from protobuf file "vald/v1/agent/core/agent.proto" (package "core.v1", syntax proto3) +// tslint:disable +// @ts-nocheck +// +// +// Copyright (C) 2019-2023 vdaas.org vald team +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// You may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +const agent_pb_1 = require("./agent_pb"); +const grpc = require("@grpc/grpc-js"); +/** + * Represent the agent service. + * + * @generated from protobuf service core.v1.Agent + */ +class AgentClient extends grpc.Client { + constructor(address, credentials, options = {}, binaryOptions = {}) { + super(address, credentials, options); + this._binaryOptions = binaryOptions; + } + /** + * Represent the creating index RPC. + * + * @generated from protobuf rpc: CreateIndex(payload.v1.Control.CreateIndexRequest) returns (payload.v1.Empty); + */ + createIndex(input, metadata, options, callback) { + const method = agent_pb_1.Agent.methods[0]; + return this.makeUnaryRequest(`/${agent_pb_1.Agent.typeName}/${method.name}`, (value) => Buffer.from(method.I.toBinary(value, this._binaryOptions)), (value) => method.O.fromBinary(value, this._binaryOptions), input, metadata, options, callback); + } + /** + * Represent the saving index RPC. + * + * @generated from protobuf rpc: SaveIndex(payload.v1.Empty) returns (payload.v1.Empty); + */ + saveIndex(input, metadata, options, callback) { + const method = agent_pb_1.Agent.methods[1]; + return this.makeUnaryRequest(`/${agent_pb_1.Agent.typeName}/${method.name}`, (value) => Buffer.from(method.I.toBinary(value, this._binaryOptions)), (value) => method.O.fromBinary(value, this._binaryOptions), input, metadata, options, callback); + } + /** + * Represent the creating and saving index RPC. + * + * @generated from protobuf rpc: CreateAndSaveIndex(payload.v1.Control.CreateIndexRequest) returns (payload.v1.Empty); + */ + createAndSaveIndex(input, metadata, options, callback) { + const method = agent_pb_1.Agent.methods[2]; + return this.makeUnaryRequest(`/${agent_pb_1.Agent.typeName}/${method.name}`, (value) => Buffer.from(method.I.toBinary(value, this._binaryOptions)), (value) => method.O.fromBinary(value, this._binaryOptions), input, metadata, options, callback); + } + /** + * Represent the RPC to get the agent index information. + * + * @generated from protobuf rpc: IndexInfo(payload.v1.Empty) returns (payload.v1.Info.Index.Count); + */ + indexInfo(input, metadata, options, callback) { + const method = agent_pb_1.Agent.methods[3]; + return this.makeUnaryRequest(`/${agent_pb_1.Agent.typeName}/${method.name}`, (value) => Buffer.from(method.I.toBinary(value, this._binaryOptions)), (value) => method.O.fromBinary(value, this._binaryOptions), input, metadata, options, callback); + } + /** + * Represent the RPC to get the vector metadata. This RPC is mainly used for index correction process + * + * @generated from protobuf rpc: GetTimestamp(payload.v1.Object.GetTimestampRequest) returns (payload.v1.Object.Timestamp); + */ + getTimestamp(input, metadata, options, callback) { + const method = agent_pb_1.Agent.methods[4]; + return this.makeUnaryRequest(`/${agent_pb_1.Agent.typeName}/${method.name}`, (value) => Buffer.from(method.I.toBinary(value, this._binaryOptions)), (value) => method.O.fromBinary(value, this._binaryOptions), input, metadata, options, callback); + } +} +exports.AgentClient = AgentClient; diff --git a/src/vald/v1/agent/core/agent_pb.js b/src/vald/v1/agent/core/agent_pb.js index a91db64..1200370 100644 --- a/src/vald/v1/agent/core/agent_pb.js +++ b/src/vald/v1/agent/core/agent_pb.js @@ -1,27 +1,63 @@ -// source: vald/v1/agent/core/agent.proto -/** - * @fileoverview - * @enhanceable - * @suppress {missingRequire} reports error on implicit type usages. - * @suppress {messageConventions} JS Compiler reports an error if a variable or - * field starts with 'MSG_' and isn't a translatable message. - * @public - */ -// GENERATED CODE -- DO NOT EDIT! /* eslint-disable */ +// @generated by protobuf-ts 2.9.3 with parameter add_pb_suffix,client_grpc1,generate_dependencies,keep_enum_prefix,ts_nocheck,use_proto_field_name,output_javascript,output_legacy_commonjs,eslint_disable +// @generated from protobuf file "vald/v1/agent/core/agent.proto" (package "core.v1", syntax proto3) +// tslint:disable +// @ts-nocheck +// +// +// Copyright (C) 2019-2023 vdaas.org vald team +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// You may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.Agent = void 0; +/* eslint-disable */ +// @generated by protobuf-ts 2.9.3 with parameter add_pb_suffix,client_grpc1,generate_dependencies,keep_enum_prefix,ts_nocheck,use_proto_field_name,output_javascript,output_legacy_commonjs,eslint_disable +// @generated from protobuf file "vald/v1/agent/core/agent.proto" (package "core.v1", syntax proto3) +// tslint:disable // @ts-nocheck - -var jspb = require('google-protobuf'); -var goog = jspb; -var global = - (typeof globalThis !== 'undefined' && globalThis) || - (typeof window !== 'undefined' && window) || - (typeof global !== 'undefined' && global) || - (typeof self !== 'undefined' && self) || - (function () { return this; }).call(null) || - Function('return this')(); - -var google_api_annotations_pb = require('../../../../google/api/annotations_pb.js'); -goog.object.extend(proto, google_api_annotations_pb); -var vald_v1_payload_payload_pb = require('../../../../vald/v1/payload/payload_pb.js'); -goog.object.extend(proto, vald_v1_payload_payload_pb); +// +// +// Copyright (C) 2019-2023 vdaas.org vald team +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// You may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +const payload_pb_1 = require("../../payload/payload_pb"); +const payload_pb_2 = require("../../payload/payload_pb"); +const payload_pb_3 = require("../../payload/payload_pb"); +const payload_pb_4 = require("../../payload/payload_pb"); +const payload_pb_5 = require("../../payload/payload_pb"); +const runtime_rpc_1 = require("@protobuf-ts/runtime-rpc"); +/** + * @generated ServiceType for protobuf service core.v1.Agent + */ +exports.Agent = new runtime_rpc_1.ServiceType("core.v1.Agent", [ + { name: "CreateIndex", options: { "google.api.http": { get: "/index/create" } }, I: payload_pb_5.Control_CreateIndexRequest, O: payload_pb_4.Empty }, + { name: "SaveIndex", options: { "google.api.http": { get: "/index/save" } }, I: payload_pb_4.Empty, O: payload_pb_4.Empty }, + { name: "CreateAndSaveIndex", options: { "google.api.http": { get: "/index/createandsave" } }, I: payload_pb_5.Control_CreateIndexRequest, O: payload_pb_4.Empty }, + { name: "IndexInfo", options: { "google.api.http": { get: "/index/info" } }, I: payload_pb_4.Empty, O: payload_pb_3.Info_Index_Count }, + { name: "GetTimestamp", options: { "google.api.http": { get: "/object/meta" } }, I: payload_pb_2.Object_GetTimestampRequest, O: payload_pb_1.Object_Timestamp } +]); diff --git a/src/vald/v1/agent/core/agent_pb.ts b/src/vald/v1/agent/core/agent_pb.ts deleted file mode 100644 index b11060d..0000000 --- a/src/vald/v1/agent/core/agent_pb.ts +++ /dev/null @@ -1,37 +0,0 @@ -// @generated by protobuf-ts 2.9.3 with parameter add_pb_suffix,client_grpc1,generate_dependencies,keep_enum_prefix,ts_nocheck,use_proto_field_name -// @generated from protobuf file "vald/v1/agent/core/agent.proto" (package "core.v1", syntax proto3) -// tslint:disable -// @ts-nocheck -// -// -// Copyright (C) 2019-2023 vdaas.org vald team -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// You may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// -import { Object_Timestamp } from "../../payload/payload_pb"; -import { Object_GetTimestampRequest } from "../../payload/payload_pb"; -import { Info_Index_Count } from "../../payload/payload_pb"; -import { Empty } from "../../payload/payload_pb"; -import { Control_CreateIndexRequest } from "../../payload/payload_pb"; -import { ServiceType } from "@protobuf-ts/runtime-rpc"; -/** - * @generated ServiceType for protobuf service core.v1.Agent - */ -export const Agent = new ServiceType("core.v1.Agent", [ - { name: "CreateIndex", options: { "google.api.http": { get: "/index/create" } }, I: Control_CreateIndexRequest, O: Empty }, - { name: "SaveIndex", options: { "google.api.http": { get: "/index/save" } }, I: Empty, O: Empty }, - { name: "CreateAndSaveIndex", options: { "google.api.http": { get: "/index/createandsave" } }, I: Control_CreateIndexRequest, O: Empty }, - { name: "IndexInfo", options: { "google.api.http": { get: "/index/info" } }, I: Empty, O: Info_Index_Count }, - { name: "GetTimestamp", options: { "google.api.http": { get: "/object/meta" } }, I: Object_GetTimestampRequest, O: Object_Timestamp } -]); diff --git a/src/vald/v1/agent/core/index.js b/src/vald/v1/agent/core/index.js index 5b802a9..b823dcb 100644 --- a/src/vald/v1/agent/core/index.js +++ b/src/vald/v1/agent/core/index.js @@ -1,2 +1,2 @@ module.exports.agent = require("./agent_pb"); -module.exports.agent_grpc = require("./agent_grpc_pb"); +module.exports.agent_grpc = require("./agent_pb.grpc-client"); diff --git a/src/vald/v1/payload/index.js b/src/vald/v1/payload/index.js index ddd78b5..409df91 100644 --- a/src/vald/v1/payload/index.js +++ b/src/vald/v1/payload/index.js @@ -1,2 +1 @@ module.exports.payload = require("./payload_pb"); -module.exports.payload_grpc = require("./payload_grpc_pb"); diff --git a/src/vald/v1/payload/payload_grpc_pb.js b/src/vald/v1/payload/payload_grpc_pb.js deleted file mode 100644 index 97b3a24..0000000 --- a/src/vald/v1/payload/payload_grpc_pb.js +++ /dev/null @@ -1 +0,0 @@ -// GENERATED CODE -- NO SERVICES IN PROTO \ No newline at end of file diff --git a/src/vald/v1/payload/payload_pb.d.ts b/src/vald/v1/payload/payload_pb.d.ts new file mode 100644 index 0000000..107b6ba --- /dev/null +++ b/src/vald/v1/payload/payload_pb.d.ts @@ -0,0 +1,2369 @@ +/* eslint-disable */ +// @generated by protobuf-ts 2.9.3 with parameter add_pb_suffix,client_grpc1,generate_dependencies,keep_enum_prefix,ts_nocheck,use_proto_field_name,output_javascript,output_legacy_commonjs,eslint_disable +// @generated from protobuf file "vald/v1/payload/payload.proto" (package "payload.v1", syntax proto3) +// tslint:disable +// @ts-nocheck +// +// +// Copyright (C) 2019-2023 vdaas.org vald team +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// You may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +import type { BinaryWriteOptions } from "@protobuf-ts/runtime"; +import type { IBinaryWriter } from "@protobuf-ts/runtime"; +import type { BinaryReadOptions } from "@protobuf-ts/runtime"; +import type { IBinaryReader } from "@protobuf-ts/runtime"; +import type { PartialMessage } from "@protobuf-ts/runtime"; +import { MessageType } from "@protobuf-ts/runtime"; +import { Status } from "../../../google/rpc/status_pb"; +/** + * Search related messages. + * + * @generated from protobuf message payload.v1.Search + */ +export interface Search { +} +/** + * Represent a search request. + * + * @generated from protobuf message payload.v1.Search.Request + */ +export interface Search_Request { + /** + * The vector to be searched. + * + * @generated from protobuf field: repeated float vector = 1; + */ + vector: number[]; + /** + * The configuration of the search request. + * + * @generated from protobuf field: payload.v1.Search.Config config = 2; + */ + config?: Search_Config; +} +/** + * Represent the multiple search request. + * + * @generated from protobuf message payload.v1.Search.MultiRequest + */ +export interface Search_MultiRequest { + /** + * Represent the multiple search request content. + * + * @generated from protobuf field: repeated payload.v1.Search.Request requests = 1; + */ + requests: Search_Request[]; +} +/** + * Represent a search by ID request. + * + * @generated from protobuf message payload.v1.Search.IDRequest + */ +export interface Search_IDRequest { + /** + * The vector ID to be searched. + * + * @generated from protobuf field: string id = 1; + */ + id: string; + /** + * The configuration of the search request. + * + * @generated from protobuf field: payload.v1.Search.Config config = 2; + */ + config?: Search_Config; +} +/** + * Represent the multiple search by ID request. + * + * @generated from protobuf message payload.v1.Search.MultiIDRequest + */ +export interface Search_MultiIDRequest { + /** + * Represent the multiple search by ID request content. + * + * @generated from protobuf field: repeated payload.v1.Search.IDRequest requests = 1; + */ + requests: Search_IDRequest[]; +} +/** + * Represent a search by binary object request. + * + * @generated from protobuf message payload.v1.Search.ObjectRequest + */ +export interface Search_ObjectRequest { + /** + * The binary object to be searched. + * + * @generated from protobuf field: bytes object = 1; + */ + object: Uint8Array; + /** + * The configuration of the search request. + * + * @generated from protobuf field: payload.v1.Search.Config config = 2; + */ + config?: Search_Config; + /** + * Filter configuration. + * + * @generated from protobuf field: payload.v1.Filter.Target vectorizer = 3; + */ + vectorizer?: Filter_Target; +} +/** + * Represent the multiple search by binary object request. + * + * @generated from protobuf message payload.v1.Search.MultiObjectRequest + */ +export interface Search_MultiObjectRequest { + /** + * Represent the multiple search by binary object request content. + * + * @generated from protobuf field: repeated payload.v1.Search.ObjectRequest requests = 1; + */ + requests: Search_ObjectRequest[]; +} +/** + * Represent search configuration. + * + * @generated from protobuf message payload.v1.Search.Config + */ +export interface Search_Config { + /** + * Unique request ID. + * + * @generated from protobuf field: string request_id = 1; + */ + request_id: string; + /** + * Maximum number of result to be returned. + * + * @generated from protobuf field: uint32 num = 2; + */ + num: number; + /** + * Search radius. + * + * @generated from protobuf field: float radius = 3; + */ + radius: number; + /** + * Search coefficient. + * + * @generated from protobuf field: float epsilon = 4; + */ + epsilon: number; + /** + * Search timeout in nanoseconds. + * + * @generated from protobuf field: int64 timeout = 5; + */ + timeout: bigint; + /** + * Ingress filter configurations. + * + * @generated from protobuf field: payload.v1.Filter.Config ingress_filters = 6; + */ + ingress_filters?: Filter_Config; + /** + * Egress filter configurations. + * + * @generated from protobuf field: payload.v1.Filter.Config egress_filters = 7; + */ + egress_filters?: Filter_Config; + /** + * Minimum number of result to be returned. + * + * @generated from protobuf field: uint32 min_num = 8; + */ + min_num: number; + /** + * Aggregation Algorithm + * + * @generated from protobuf field: payload.v1.Search.AggregationAlgorithm aggregation_algorithm = 9; + */ + aggregation_algorithm: Search_AggregationAlgorithm; +} +/** + * Represent a search response. + * + * @generated from protobuf message payload.v1.Search.Response + */ +export interface Search_Response { + /** + * The unique request ID. + * + * @generated from protobuf field: string request_id = 1; + */ + request_id: string; + /** + * Search results. + * + * @generated from protobuf field: repeated payload.v1.Object.Distance results = 2; + */ + results: Object_Distance[]; +} +/** + * Represent multiple search responses. + * + * @generated from protobuf message payload.v1.Search.Responses + */ +export interface Search_Responses { + /** + * Represent the multiple search response content. + * + * @generated from protobuf field: repeated payload.v1.Search.Response responses = 1; + */ + responses: Search_Response[]; +} +/** + * Represent stream search response. + * + * @generated from protobuf message payload.v1.Search.StreamResponse + */ +export interface Search_StreamResponse { + /** + * @generated from protobuf oneof: payload + */ + payload: { + oneofKind: "response"; + /** + * Represent the search response. + * + * @generated from protobuf field: payload.v1.Search.Response response = 1; + */ + response: Search_Response; + } | { + oneofKind: "status"; + /** + * The RPC error status. + * + * @generated from protobuf field: google.rpc.Status status = 2; + */ + status: Status; + } | { + oneofKind: undefined; + }; +} +/** + * AggregationAlgorithm is enum of each aggregation algorithms + * + * @generated from protobuf enum payload.v1.Search.AggregationAlgorithm + */ +export declare enum Search_AggregationAlgorithm { + /** + * @generated from protobuf enum value: Unknown = 0; + */ + Unknown = 0, + /** + * @generated from protobuf enum value: ConcurrentQueue = 1; + */ + ConcurrentQueue = 1, + /** + * @generated from protobuf enum value: SortSlice = 2; + */ + SortSlice = 2, + /** + * @generated from protobuf enum value: SortPoolSlice = 3; + */ + SortPoolSlice = 3, + /** + * @generated from protobuf enum value: PairingHeap = 4; + */ + PairingHeap = 4 +} +/** + * Filter related messages. + * + * @generated from protobuf message payload.v1.Filter + */ +export interface Filter { +} +/** + * Represent the target filter server. + * + * @generated from protobuf message payload.v1.Filter.Target + */ +export interface Filter_Target { + /** + * The target hostname. + * + * @generated from protobuf field: string host = 1; + */ + host: string; + /** + * The target port. + * + * @generated from protobuf field: uint32 port = 2; + */ + port: number; +} +/** + * Represent filter configuration. + * + * @generated from protobuf message payload.v1.Filter.Config + */ +export interface Filter_Config { + /** + * Represent the filter target configuration. + * + * @generated from protobuf field: repeated payload.v1.Filter.Target targets = 1; + */ + targets: Filter_Target[]; +} +/** + * Insert related messages. + * + * @generated from protobuf message payload.v1.Insert + */ +export interface Insert { +} +/** + * Represent the insert request. + * + * @generated from protobuf message payload.v1.Insert.Request + */ +export interface Insert_Request { + /** + * The vector to be inserted. + * + * @generated from protobuf field: payload.v1.Object.Vector vector = 1; + */ + vector?: Object_Vector; + /** + * The configuration of the insert request. + * + * @generated from protobuf field: payload.v1.Insert.Config config = 2; + */ + config?: Insert_Config; +} +/** + * Represent the multiple insert request. + * + * @generated from protobuf message payload.v1.Insert.MultiRequest + */ +export interface Insert_MultiRequest { + /** + * Represent multiple insert request content. + * + * @generated from protobuf field: repeated payload.v1.Insert.Request requests = 1; + */ + requests: Insert_Request[]; +} +/** + * Represent the insert by binary object request. + * + * @generated from protobuf message payload.v1.Insert.ObjectRequest + */ +export interface Insert_ObjectRequest { + /** + * The binary object to be inserted. + * + * @generated from protobuf field: payload.v1.Object.Blob object = 1; + */ + object?: Object_Blob; + /** + * The configuration of the insert request. + * + * @generated from protobuf field: payload.v1.Insert.Config config = 2; + */ + config?: Insert_Config; + /** + * Filter configurations. + * + * @generated from protobuf field: payload.v1.Filter.Target vectorizer = 3; + */ + vectorizer?: Filter_Target; +} +/** + * Represent the multiple insert by binary object request. + * + * @generated from protobuf message payload.v1.Insert.MultiObjectRequest + */ +export interface Insert_MultiObjectRequest { + /** + * Represent multiple insert by object content. + * + * @generated from protobuf field: repeated payload.v1.Insert.ObjectRequest requests = 1; + */ + requests: Insert_ObjectRequest[]; +} +/** + * Represent insert configurations. + * + * @generated from protobuf message payload.v1.Insert.Config + */ +export interface Insert_Config { + /** + * A flag to skip exist check during insert operation. + * + * @generated from protobuf field: bool skip_strict_exist_check = 1; + */ + skip_strict_exist_check: boolean; + /** + * Filter configurations. + * + * @generated from protobuf field: payload.v1.Filter.Config filters = 2; + */ + filters?: Filter_Config; + /** + * Insert timestamp. + * + * @generated from protobuf field: int64 timestamp = 3; + */ + timestamp: bigint; +} +/** + * Update related messages + * + * @generated from protobuf message payload.v1.Update + */ +export interface Update { +} +/** + * Represent the update request. + * + * @generated from protobuf message payload.v1.Update.Request + */ +export interface Update_Request { + /** + * The vector to be updated. + * + * @generated from protobuf field: payload.v1.Object.Vector vector = 1; + */ + vector?: Object_Vector; + /** + * The configuration of the update request. + * + * @generated from protobuf field: payload.v1.Update.Config config = 2; + */ + config?: Update_Config; +} +/** + * Represent the multiple update request. + * + * @generated from protobuf message payload.v1.Update.MultiRequest + */ +export interface Update_MultiRequest { + /** + * Represent the multiple update request content. + * + * @generated from protobuf field: repeated payload.v1.Update.Request requests = 1; + */ + requests: Update_Request[]; +} +/** + * Represent the update binary object request. + * + * @generated from protobuf message payload.v1.Update.ObjectRequest + */ +export interface Update_ObjectRequest { + /** + * The binary object to be updated. + * + * @generated from protobuf field: payload.v1.Object.Blob object = 1; + */ + object?: Object_Blob; + /** + * The configuration of the update request. + * + * @generated from protobuf field: payload.v1.Update.Config config = 2; + */ + config?: Update_Config; + /** + * Filter target. + * + * @generated from protobuf field: payload.v1.Filter.Target vectorizer = 3; + */ + vectorizer?: Filter_Target; +} +/** + * Represent the multiple update binary object request. + * + * @generated from protobuf message payload.v1.Update.MultiObjectRequest + */ +export interface Update_MultiObjectRequest { + /** + * Represent the multiple update object request content. + * + * @generated from protobuf field: repeated payload.v1.Update.ObjectRequest requests = 1; + */ + requests: Update_ObjectRequest[]; +} +/** + * Represent the update configuration. + * + * @generated from protobuf message payload.v1.Update.Config + */ +export interface Update_Config { + /** + * A flag to skip exist check during update operation. + * + * @generated from protobuf field: bool skip_strict_exist_check = 1; + */ + skip_strict_exist_check: boolean; + /** + * Filter configuration. + * + * @generated from protobuf field: payload.v1.Filter.Config filters = 2; + */ + filters?: Filter_Config; + /** + * Update timestamp. + * + * @generated from protobuf field: int64 timestamp = 3; + */ + timestamp: bigint; + /** + * A flag to disable balanced update (split remove -> insert operation) + * during update operation. + * + * @generated from protobuf field: bool disable_balanced_update = 4; + */ + disable_balanced_update: boolean; +} +/** + * Upsert related messages. + * + * @generated from protobuf message payload.v1.Upsert + */ +export interface Upsert { +} +/** + * Represent the upsert request. + * + * @generated from protobuf message payload.v1.Upsert.Request + */ +export interface Upsert_Request { + /** + * The vector to be upserted. + * + * @generated from protobuf field: payload.v1.Object.Vector vector = 1; + */ + vector?: Object_Vector; + /** + * The configuration of the upsert request. + * + * @generated from protobuf field: payload.v1.Upsert.Config config = 2; + */ + config?: Upsert_Config; +} +/** + * Represent mthe ultiple upsert request. + * + * @generated from protobuf message payload.v1.Upsert.MultiRequest + */ +export interface Upsert_MultiRequest { + /** + * Represent the multiple upsert request content. + * + * @generated from protobuf field: repeated payload.v1.Upsert.Request requests = 1; + */ + requests: Upsert_Request[]; +} +/** + * Represent the upsert binary object request. + * + * @generated from protobuf message payload.v1.Upsert.ObjectRequest + */ +export interface Upsert_ObjectRequest { + /** + * The binary object to be upserted. + * + * @generated from protobuf field: payload.v1.Object.Blob object = 1; + */ + object?: Object_Blob; + /** + * The configuration of the upsert request. + * + * @generated from protobuf field: payload.v1.Upsert.Config config = 2; + */ + config?: Upsert_Config; + /** + * Filter target. + * + * @generated from protobuf field: payload.v1.Filter.Target vectorizer = 3; + */ + vectorizer?: Filter_Target; +} +/** + * Represent the multiple upsert binary object request. + * + * @generated from protobuf message payload.v1.Upsert.MultiObjectRequest + */ +export interface Upsert_MultiObjectRequest { + /** + * Represent the multiple upsert object request content. + * + * @generated from protobuf field: repeated payload.v1.Upsert.ObjectRequest requests = 1; + */ + requests: Upsert_ObjectRequest[]; +} +/** + * Represent the upsert configuration. + * + * @generated from protobuf message payload.v1.Upsert.Config + */ +export interface Upsert_Config { + /** + * A flag to skip exist check during upsert operation. + * + * @generated from protobuf field: bool skip_strict_exist_check = 1; + */ + skip_strict_exist_check: boolean; + /** + * Filter configuration. + * + * @generated from protobuf field: payload.v1.Filter.Config filters = 2; + */ + filters?: Filter_Config; + /** + * Upsert timestamp. + * + * @generated from protobuf field: int64 timestamp = 3; + */ + timestamp: bigint; + /** + * A flag to disable balanced update (split remove -> insert operation) + * during update operation. + * + * @generated from protobuf field: bool disable_balanced_update = 4; + */ + disable_balanced_update: boolean; +} +/** + * Remove related messages. + * + * @generated from protobuf message payload.v1.Remove + */ +export interface Remove { +} +/** + * Represent the remove request. + * + * @generated from protobuf message payload.v1.Remove.Request + */ +export interface Remove_Request { + /** + * The object ID to be removed. + * + * @generated from protobuf field: payload.v1.Object.ID id = 1; + */ + id?: Object_ID; + /** + * The configuration of the remove request. + * + * @generated from protobuf field: payload.v1.Remove.Config config = 2; + */ + config?: Remove_Config; +} +/** + * Represent the multiple remove request. + * + * @generated from protobuf message payload.v1.Remove.MultiRequest + */ +export interface Remove_MultiRequest { + /** + * Represent the multiple remove request content. + * + * @generated from protobuf field: repeated payload.v1.Remove.Request requests = 1; + */ + requests: Remove_Request[]; +} +/** + * Represent the remove request based on timestamp. + * + * @generated from protobuf message payload.v1.Remove.TimestampRequest + */ +export interface Remove_TimestampRequest { + /** + * The timestamp comparison list. If more than one is specified, the `AND` search is applied. + * + * @generated from protobuf field: repeated payload.v1.Remove.Timestamp timestamps = 1; + */ + timestamps: Remove_Timestamp[]; +} +/** + * Represent the timestamp comparison. + * + * @generated from protobuf message payload.v1.Remove.Timestamp + */ +export interface Remove_Timestamp { + /** + * The timestamp. + * + * @generated from protobuf field: int64 timestamp = 1; + */ + timestamp: bigint; + /** + * The conditional operator. + * + * @generated from protobuf field: payload.v1.Remove.Timestamp.Operator operator = 2; + */ + operator: Remove_Timestamp_Operator; +} +/** + * Operator is enum of each conditional operator. + * + * @generated from protobuf enum payload.v1.Remove.Timestamp.Operator + */ +export declare enum Remove_Timestamp_Operator { + /** + * The timestamp is equal to the specified value in the request. + * + * @generated from protobuf enum value: Eq = 0; + */ + Eq = 0, + /** + * The timestamp is not equal to the specified value in the request. + * + * @generated from protobuf enum value: Ne = 1; + */ + Ne = 1, + /** + * The timestamp is greater than or equal to the specified value in the request. + * + * @generated from protobuf enum value: Ge = 2; + */ + Ge = 2, + /** + * The timestamp is greater than the specified value in the request. + * + * @generated from protobuf enum value: Gt = 3; + */ + Gt = 3, + /** + * The timestamp is less than or equal to the specified value in the request. + * + * @generated from protobuf enum value: Le = 4; + */ + Le = 4, + /** + * The timestamp is less than the specified value in the request. + * + * @generated from protobuf enum value: Lt = 5; + */ + Lt = 5 +} +/** + * Represent the remove configuration. + * + * @generated from protobuf message payload.v1.Remove.Config + */ +export interface Remove_Config { + /** + * A flag to skip exist check during upsert operation. + * + * @generated from protobuf field: bool skip_strict_exist_check = 1; + */ + skip_strict_exist_check: boolean; + /** + * Remove timestamp. + * + * @generated from protobuf field: int64 timestamp = 3; + */ + timestamp: bigint; +} +/** + * Common messages. + * + * @generated from protobuf message payload.v1.Object + */ +export interface Object { +} +/** + * Represent a request to fetch raw vector. + * + * @generated from protobuf message payload.v1.Object.VectorRequest + */ +export interface Object_VectorRequest { + /** + * The vector ID to be fetched. + * + * @generated from protobuf field: payload.v1.Object.ID id = 1; + */ + id?: Object_ID; + /** + * Filter configurations. + * + * @generated from protobuf field: payload.v1.Filter.Config filters = 2; + */ + filters?: Filter_Config; +} +/** + * Represent the ID and distance pair. + * + * @generated from protobuf message payload.v1.Object.Distance + */ +export interface Object_Distance { + /** + * The vector ID. + * + * @generated from protobuf field: string id = 1; + */ + id: string; + /** + * The distance. + * + * @generated from protobuf field: float distance = 2; + */ + distance: number; +} +/** + * Represent stream response of distances. + * + * @generated from protobuf message payload.v1.Object.StreamDistance + */ +export interface Object_StreamDistance { + /** + * @generated from protobuf oneof: payload + */ + payload: { + oneofKind: "distance"; + /** + * The distance. + * + * @generated from protobuf field: payload.v1.Object.Distance distance = 1; + */ + distance: Object_Distance; + } | { + oneofKind: "status"; + /** + * The RPC error status. + * + * @generated from protobuf field: google.rpc.Status status = 2; + */ + status: Status; + } | { + oneofKind: undefined; + }; +} +/** + * Represent the vector ID. + * + * @generated from protobuf message payload.v1.Object.ID + */ +export interface Object_ID { + /** + * @generated from protobuf field: string id = 1; + */ + id: string; +} +/** + * Represent multiple vector IDs. + * + * @generated from protobuf message payload.v1.Object.IDs + */ +export interface Object_IDs { + /** + * @generated from protobuf field: repeated string ids = 1; + */ + ids: string[]; +} +/** + * Represent a vector. + * + * @generated from protobuf message payload.v1.Object.Vector + */ +export interface Object_Vector { + /** + * The vector ID. + * + * @generated from protobuf field: string id = 1; + */ + id: string; + /** + * The vector. + * + * @generated from protobuf field: repeated float vector = 2; + */ + vector: number[]; + /** + * timestamp represents when this vector inserted. + * + * @generated from protobuf field: int64 timestamp = 3; + */ + timestamp: bigint; +} +/** + * Represent a request to fetch vector meta data. + * + * @generated from protobuf message payload.v1.Object.GetTimestampRequest + */ +export interface Object_GetTimestampRequest { + /** + * The vector ID to be fetched. + * + * @generated from protobuf field: payload.v1.Object.ID id = 1; + */ + id?: Object_ID; +} +/** + * Represent a vector meta data. + * + * @generated from protobuf message payload.v1.Object.Timestamp + */ +export interface Object_Timestamp { + /** + * The vector ID. + * + * @generated from protobuf field: string id = 1; + */ + id: string; + /** + * timestamp represents when this vector inserted. + * + * @generated from protobuf field: int64 timestamp = 2; + */ + timestamp: bigint; +} +/** + * Represent multiple vectors. + * + * @generated from protobuf message payload.v1.Object.Vectors + */ +export interface Object_Vectors { + /** + * @generated from protobuf field: repeated payload.v1.Object.Vector vectors = 1; + */ + vectors: Object_Vector[]; +} +/** + * Represent stream response of the vector. + * + * @generated from protobuf message payload.v1.Object.StreamVector + */ +export interface Object_StreamVector { + /** + * @generated from protobuf oneof: payload + */ + payload: { + oneofKind: "vector"; + /** + * The vector. + * + * @generated from protobuf field: payload.v1.Object.Vector vector = 1; + */ + vector: Object_Vector; + } | { + oneofKind: "status"; + /** + * The RPC error status. + * + * @generated from protobuf field: google.rpc.Status status = 2; + */ + status: Status; + } | { + oneofKind: undefined; + }; +} +/** + * Represent reshape vector. + * + * @generated from protobuf message payload.v1.Object.ReshapeVector + */ +export interface Object_ReshapeVector { + /** + * The binary object. + * + * @generated from protobuf field: bytes object = 1; + */ + object: Uint8Array; + /** + * The new shape. + * + * @generated from protobuf field: repeated int32 shape = 2; + */ + shape: number[]; +} +/** + * Represent the binary object. + * + * @generated from protobuf message payload.v1.Object.Blob + */ +export interface Object_Blob { + /** + * The object ID. + * + * @generated from protobuf field: string id = 1; + */ + id: string; + /** + * The binary object. + * + * @generated from protobuf field: bytes object = 2; + */ + object: Uint8Array; +} +/** + * Represent stream response of binary objects. + * + * @generated from protobuf message payload.v1.Object.StreamBlob + */ +export interface Object_StreamBlob { + /** + * @generated from protobuf oneof: payload + */ + payload: { + oneofKind: "blob"; + /** + * The binary object. + * + * @generated from protobuf field: payload.v1.Object.Blob blob = 1; + */ + blob: Object_Blob; + } | { + oneofKind: "status"; + /** + * The RPC error status. + * + * @generated from protobuf field: google.rpc.Status status = 2; + */ + status: Status; + } | { + oneofKind: undefined; + }; +} +/** + * Represent the vector location. + * + * @generated from protobuf message payload.v1.Object.Location + */ +export interface Object_Location { + /** + * The name of the location. + * + * @generated from protobuf field: string name = 1; + */ + name: string; + /** + * The UUID of the vector. + * + * @generated from protobuf field: string uuid = 2; + */ + uuid: string; + /** + * The IP list. + * + * @generated from protobuf field: repeated string ips = 3; + */ + ips: string[]; +} +/** + * Represent the stream response of the vector location. + * + * @generated from protobuf message payload.v1.Object.StreamLocation + */ +export interface Object_StreamLocation { + /** + * @generated from protobuf oneof: payload + */ + payload: { + oneofKind: "location"; + /** + * The vector location. + * + * @generated from protobuf field: payload.v1.Object.Location location = 1; + */ + location: Object_Location; + } | { + oneofKind: "status"; + /** + * The RPC error status. + * + * @generated from protobuf field: google.rpc.Status status = 2; + */ + status: Status; + } | { + oneofKind: undefined; + }; +} +/** + * Represent multiple vector locations. + * + * @generated from protobuf message payload.v1.Object.Locations + */ +export interface Object_Locations { + /** + * @generated from protobuf field: repeated payload.v1.Object.Location locations = 1; + */ + locations: Object_Location[]; +} +/** + * Represent the list object vector stream request and response. + * + * @generated from protobuf message payload.v1.Object.List + */ +export interface Object_List { +} +/** + * @generated from protobuf message payload.v1.Object.List.Request + */ +export interface Object_List_Request { +} +/** + * @generated from protobuf message payload.v1.Object.List.Response + */ +export interface Object_List_Response { + /** + * @generated from protobuf oneof: payload + */ + payload: { + oneofKind: "vector"; + /** + * The vector + * + * @generated from protobuf field: payload.v1.Object.Vector vector = 1; + */ + vector: Object_Vector; + } | { + oneofKind: "status"; + /** + * The RPC error status. + * + * @generated from protobuf field: google.rpc.Status status = 2; + */ + status: Status; + } | { + oneofKind: undefined; + }; +} +/** + * Control related messages. + * + * @generated from protobuf message payload.v1.Control + */ +export interface Control { +} +/** + * Represent the create index request. + * + * @generated from protobuf message payload.v1.Control.CreateIndexRequest + */ +export interface Control_CreateIndexRequest { + /** + * The pool size of the create index operation. + * + * @generated from protobuf field: uint32 pool_size = 1; + */ + pool_size: number; +} +/** + * Discoverer related messages. + * + * @generated from protobuf message payload.v1.Discoverer + */ +export interface Discoverer { +} +/** + * Represent the dicoverer request. + * + * @generated from protobuf message payload.v1.Discoverer.Request + */ +export interface Discoverer_Request { + /** + * The agent name to be discovered. + * + * @generated from protobuf field: string name = 1; + */ + name: string; + /** + * The namespace to be discovered. + * + * @generated from protobuf field: string namespace = 2; + */ + namespace: string; + /** + * The node to be discovered. + * + * @generated from protobuf field: string node = 3; + */ + node: string; +} +/** + * Info related messages. + * + * @generated from protobuf message payload.v1.Info + */ +export interface Info { +} +/** + * Represent the index information messages. + * + * @generated from protobuf message payload.v1.Info.Index + */ +export interface Info_Index { +} +/** + * Represent the index count message. + * + * @generated from protobuf message payload.v1.Info.Index.Count + */ +export interface Info_Index_Count { + /** + * The stored index count. + * + * @generated from protobuf field: uint32 stored = 1; + */ + stored: number; + /** + * The uncommitted index count. + * + * @generated from protobuf field: uint32 uncommitted = 2; + */ + uncommitted: number; + /** + * The indexing index count. + * + * @generated from protobuf field: bool indexing = 3; + */ + indexing: boolean; + /** + * The saving index count. + * + * @generated from protobuf field: bool saving = 4; + */ + saving: boolean; +} +/** + * Represent the UUID message. + * + * @generated from protobuf message payload.v1.Info.Index.UUID + */ +export interface Info_Index_UUID { +} +/** + * The committed UUID. + * + * @generated from protobuf message payload.v1.Info.Index.UUID.Committed + */ +export interface Info_Index_UUID_Committed { + /** + * @generated from protobuf field: string uuid = 1; + */ + uuid: string; +} +/** + * The uncommitted UUID. + * + * @generated from protobuf message payload.v1.Info.Index.UUID.Uncommitted + */ +export interface Info_Index_UUID_Uncommitted { + /** + * @generated from protobuf field: string uuid = 1; + */ + uuid: string; +} +/** + * Represent the pod information message. + * + * @generated from protobuf message payload.v1.Info.Pod + */ +export interface Info_Pod { + /** + * The app name of the pod on the label. + * + * @generated from protobuf field: string app_name = 1; + */ + app_name: string; + /** + * The name of the pod. + * + * @generated from protobuf field: string name = 2; + */ + name: string; + /** + * The namespace of the pod. + * + * @generated from protobuf field: string namespace = 3; + */ + namespace: string; + /** + * The IP of the pod. + * + * @generated from protobuf field: string ip = 4; + */ + ip: string; + /** + * The CPU information of the pod. + * + * @generated from protobuf field: payload.v1.Info.CPU cpu = 5; + */ + cpu?: Info_CPU; + /** + * The memory information of the pod. + * + * @generated from protobuf field: payload.v1.Info.Memory memory = 6; + */ + memory?: Info_Memory; + /** + * The node information of the pod. + * + * @generated from protobuf field: payload.v1.Info.Node node = 7; + */ + node?: Info_Node; +} +/** + * Represent the node information message. + * + * @generated from protobuf message payload.v1.Info.Node + */ +export interface Info_Node { + /** + * The name of the node. + * + * @generated from protobuf field: string name = 1; + */ + name: string; + /** + * The internal IP address of the node. + * + * @generated from protobuf field: string internal_addr = 2; + */ + internal_addr: string; + /** + * The external IP address of the node. + * + * @generated from protobuf field: string external_addr = 3; + */ + external_addr: string; + /** + * The CPU information of the node. + * + * @generated from protobuf field: payload.v1.Info.CPU cpu = 4; + */ + cpu?: Info_CPU; + /** + * The memory information of the node. + * + * @generated from protobuf field: payload.v1.Info.Memory memory = 5; + */ + memory?: Info_Memory; + /** + * The pod information of the node. + * + * @generated from protobuf field: payload.v1.Info.Pods Pods = 6 [json_name = "Pods"]; + */ + Pods?: Info_Pods; +} +/** + * Represent the service information message. + * + * @generated from protobuf message payload.v1.Info.Service + */ +export interface Info_Service { + /** + * The name of the svc. + * + * @generated from protobuf field: string name = 1; + */ + name: string; + /** + * The cluster ip of the svc. + * + * @generated from protobuf field: string cluster_ip = 2; + */ + cluster_ip: string; + /** + * The cluster ips of the svc. + * + * @generated from protobuf field: repeated string cluster_ips = 3; + */ + cluster_ips: string[]; + /** + * The port of the svc. + * + * @generated from protobuf field: repeated payload.v1.Info.ServicePort ports = 4; + */ + ports: Info_ServicePort[]; + /** + * The labels of the service. + * + * @generated from protobuf field: payload.v1.Info.Labels labels = 5; + */ + labels?: Info_Labels; + /** + * The annotations of the service. + * + * @generated from protobuf field: payload.v1.Info.Annotations annotations = 6; + */ + annotations?: Info_Annotations; +} +/** + * Represets the service port information message. + * + * @generated from protobuf message payload.v1.Info.ServicePort + */ +export interface Info_ServicePort { + /** + * The name of the port. + * + * @generated from protobuf field: string name = 1; + */ + name: string; + /** + * The port number + * + * @generated from protobuf field: int32 port = 2; + */ + port: number; +} +/** + * Represent the kubernetes labels. + * + * @generated from protobuf message payload.v1.Info.Labels + */ +export interface Info_Labels { + /** + * @generated from protobuf field: map labels = 1; + */ + labels: { + [key: string]: string; + }; +} +/** + * Represent the kubernetes annotations. + * + * @generated from protobuf message payload.v1.Info.Annotations + */ +export interface Info_Annotations { + /** + * @generated from protobuf field: map annotations = 1; + */ + annotations: { + [key: string]: string; + }; +} +/** + * Represent the CPU information message. + * + * @generated from protobuf message payload.v1.Info.CPU + */ +export interface Info_CPU { + /** + * The CPU resource limit. + * + * @generated from protobuf field: double limit = 1; + */ + limit: number; + /** + * The CPU resource requested. + * + * @generated from protobuf field: double request = 2; + */ + request: number; + /** + * The CPU usage. + * + * @generated from protobuf field: double usage = 3; + */ + usage: number; +} +/** + * Represent the memory information message. + * + * @generated from protobuf message payload.v1.Info.Memory + */ +export interface Info_Memory { + /** + * The memory limit. + * + * @generated from protobuf field: double limit = 1; + */ + limit: number; + /** + * The memory requested. + * + * @generated from protobuf field: double request = 2; + */ + request: number; + /** + * The memory usage. + * + * @generated from protobuf field: double usage = 3; + */ + usage: number; +} +/** + * Represent the multiple pod information message. + * + * @generated from protobuf message payload.v1.Info.Pods + */ +export interface Info_Pods { + /** + * The multiple pod information. + * + * @generated from protobuf field: repeated payload.v1.Info.Pod pods = 1; + */ + pods: Info_Pod[]; +} +/** + * Represent the multiple node information message. + * + * @generated from protobuf message payload.v1.Info.Nodes + */ +export interface Info_Nodes { + /** + * The multiple node information. + * + * @generated from protobuf field: repeated payload.v1.Info.Node nodes = 1; + */ + nodes: Info_Node[]; +} +/** + * Represent the multiple service information message. + * + * @generated from protobuf message payload.v1.Info.Services + */ +export interface Info_Services { + /** + * The multiple service information. + * + * @generated from protobuf field: repeated payload.v1.Info.Service services = 1; + */ + services: Info_Service[]; +} +/** + * Represent the multiple IP message. + * + * @generated from protobuf message payload.v1.Info.IPs + */ +export interface Info_IPs { + /** + * @generated from protobuf field: repeated string ip = 1; + */ + ip: string[]; +} +/** + * Represent an empty message. + * + * @generated from protobuf message payload.v1.Empty + */ +export interface Empty { +} +declare class Search$Type extends MessageType { + constructor(); + create(value?: PartialMessage): Search; + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Search): Search; + internalBinaryWrite(message: Search, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter; +} +/** + * @generated MessageType for protobuf message payload.v1.Search + */ +export declare const Search: Search$Type; +declare class Search_Request$Type extends MessageType { + constructor(); + create(value?: PartialMessage): Search_Request; + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Search_Request): Search_Request; + internalBinaryWrite(message: Search_Request, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter; +} +/** + * @generated MessageType for protobuf message payload.v1.Search.Request + */ +export declare const Search_Request: Search_Request$Type; +declare class Search_MultiRequest$Type extends MessageType { + constructor(); + create(value?: PartialMessage): Search_MultiRequest; + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Search_MultiRequest): Search_MultiRequest; + internalBinaryWrite(message: Search_MultiRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter; +} +/** + * @generated MessageType for protobuf message payload.v1.Search.MultiRequest + */ +export declare const Search_MultiRequest: Search_MultiRequest$Type; +declare class Search_IDRequest$Type extends MessageType { + constructor(); + create(value?: PartialMessage): Search_IDRequest; + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Search_IDRequest): Search_IDRequest; + internalBinaryWrite(message: Search_IDRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter; +} +/** + * @generated MessageType for protobuf message payload.v1.Search.IDRequest + */ +export declare const Search_IDRequest: Search_IDRequest$Type; +declare class Search_MultiIDRequest$Type extends MessageType { + constructor(); + create(value?: PartialMessage): Search_MultiIDRequest; + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Search_MultiIDRequest): Search_MultiIDRequest; + internalBinaryWrite(message: Search_MultiIDRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter; +} +/** + * @generated MessageType for protobuf message payload.v1.Search.MultiIDRequest + */ +export declare const Search_MultiIDRequest: Search_MultiIDRequest$Type; +declare class Search_ObjectRequest$Type extends MessageType { + constructor(); + create(value?: PartialMessage): Search_ObjectRequest; + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Search_ObjectRequest): Search_ObjectRequest; + internalBinaryWrite(message: Search_ObjectRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter; +} +/** + * @generated MessageType for protobuf message payload.v1.Search.ObjectRequest + */ +export declare const Search_ObjectRequest: Search_ObjectRequest$Type; +declare class Search_MultiObjectRequest$Type extends MessageType { + constructor(); + create(value?: PartialMessage): Search_MultiObjectRequest; + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Search_MultiObjectRequest): Search_MultiObjectRequest; + internalBinaryWrite(message: Search_MultiObjectRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter; +} +/** + * @generated MessageType for protobuf message payload.v1.Search.MultiObjectRequest + */ +export declare const Search_MultiObjectRequest: Search_MultiObjectRequest$Type; +declare class Search_Config$Type extends MessageType { + constructor(); + create(value?: PartialMessage): Search_Config; + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Search_Config): Search_Config; + internalBinaryWrite(message: Search_Config, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter; +} +/** + * @generated MessageType for protobuf message payload.v1.Search.Config + */ +export declare const Search_Config: Search_Config$Type; +declare class Search_Response$Type extends MessageType { + constructor(); + create(value?: PartialMessage): Search_Response; + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Search_Response): Search_Response; + internalBinaryWrite(message: Search_Response, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter; +} +/** + * @generated MessageType for protobuf message payload.v1.Search.Response + */ +export declare const Search_Response: Search_Response$Type; +declare class Search_Responses$Type extends MessageType { + constructor(); + create(value?: PartialMessage): Search_Responses; + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Search_Responses): Search_Responses; + internalBinaryWrite(message: Search_Responses, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter; +} +/** + * @generated MessageType for protobuf message payload.v1.Search.Responses + */ +export declare const Search_Responses: Search_Responses$Type; +declare class Search_StreamResponse$Type extends MessageType { + constructor(); + create(value?: PartialMessage): Search_StreamResponse; + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Search_StreamResponse): Search_StreamResponse; + internalBinaryWrite(message: Search_StreamResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter; +} +/** + * @generated MessageType for protobuf message payload.v1.Search.StreamResponse + */ +export declare const Search_StreamResponse: Search_StreamResponse$Type; +declare class Filter$Type extends MessageType { + constructor(); + create(value?: PartialMessage): Filter; + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Filter): Filter; + internalBinaryWrite(message: Filter, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter; +} +/** + * @generated MessageType for protobuf message payload.v1.Filter + */ +export declare const Filter: Filter$Type; +declare class Filter_Target$Type extends MessageType { + constructor(); + create(value?: PartialMessage): Filter_Target; + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Filter_Target): Filter_Target; + internalBinaryWrite(message: Filter_Target, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter; +} +/** + * @generated MessageType for protobuf message payload.v1.Filter.Target + */ +export declare const Filter_Target: Filter_Target$Type; +declare class Filter_Config$Type extends MessageType { + constructor(); + create(value?: PartialMessage): Filter_Config; + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Filter_Config): Filter_Config; + internalBinaryWrite(message: Filter_Config, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter; +} +/** + * @generated MessageType for protobuf message payload.v1.Filter.Config + */ +export declare const Filter_Config: Filter_Config$Type; +declare class Insert$Type extends MessageType { + constructor(); + create(value?: PartialMessage): Insert; + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Insert): Insert; + internalBinaryWrite(message: Insert, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter; +} +/** + * @generated MessageType for protobuf message payload.v1.Insert + */ +export declare const Insert: Insert$Type; +declare class Insert_Request$Type extends MessageType { + constructor(); + create(value?: PartialMessage): Insert_Request; + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Insert_Request): Insert_Request; + internalBinaryWrite(message: Insert_Request, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter; +} +/** + * @generated MessageType for protobuf message payload.v1.Insert.Request + */ +export declare const Insert_Request: Insert_Request$Type; +declare class Insert_MultiRequest$Type extends MessageType { + constructor(); + create(value?: PartialMessage): Insert_MultiRequest; + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Insert_MultiRequest): Insert_MultiRequest; + internalBinaryWrite(message: Insert_MultiRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter; +} +/** + * @generated MessageType for protobuf message payload.v1.Insert.MultiRequest + */ +export declare const Insert_MultiRequest: Insert_MultiRequest$Type; +declare class Insert_ObjectRequest$Type extends MessageType { + constructor(); + create(value?: PartialMessage): Insert_ObjectRequest; + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Insert_ObjectRequest): Insert_ObjectRequest; + internalBinaryWrite(message: Insert_ObjectRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter; +} +/** + * @generated MessageType for protobuf message payload.v1.Insert.ObjectRequest + */ +export declare const Insert_ObjectRequest: Insert_ObjectRequest$Type; +declare class Insert_MultiObjectRequest$Type extends MessageType { + constructor(); + create(value?: PartialMessage): Insert_MultiObjectRequest; + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Insert_MultiObjectRequest): Insert_MultiObjectRequest; + internalBinaryWrite(message: Insert_MultiObjectRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter; +} +/** + * @generated MessageType for protobuf message payload.v1.Insert.MultiObjectRequest + */ +export declare const Insert_MultiObjectRequest: Insert_MultiObjectRequest$Type; +declare class Insert_Config$Type extends MessageType { + constructor(); + create(value?: PartialMessage): Insert_Config; + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Insert_Config): Insert_Config; + internalBinaryWrite(message: Insert_Config, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter; +} +/** + * @generated MessageType for protobuf message payload.v1.Insert.Config + */ +export declare const Insert_Config: Insert_Config$Type; +declare class Update$Type extends MessageType { + constructor(); + create(value?: PartialMessage): Update; + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Update): Update; + internalBinaryWrite(message: Update, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter; +} +/** + * @generated MessageType for protobuf message payload.v1.Update + */ +export declare const Update: Update$Type; +declare class Update_Request$Type extends MessageType { + constructor(); + create(value?: PartialMessage): Update_Request; + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Update_Request): Update_Request; + internalBinaryWrite(message: Update_Request, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter; +} +/** + * @generated MessageType for protobuf message payload.v1.Update.Request + */ +export declare const Update_Request: Update_Request$Type; +declare class Update_MultiRequest$Type extends MessageType { + constructor(); + create(value?: PartialMessage): Update_MultiRequest; + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Update_MultiRequest): Update_MultiRequest; + internalBinaryWrite(message: Update_MultiRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter; +} +/** + * @generated MessageType for protobuf message payload.v1.Update.MultiRequest + */ +export declare const Update_MultiRequest: Update_MultiRequest$Type; +declare class Update_ObjectRequest$Type extends MessageType { + constructor(); + create(value?: PartialMessage): Update_ObjectRequest; + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Update_ObjectRequest): Update_ObjectRequest; + internalBinaryWrite(message: Update_ObjectRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter; +} +/** + * @generated MessageType for protobuf message payload.v1.Update.ObjectRequest + */ +export declare const Update_ObjectRequest: Update_ObjectRequest$Type; +declare class Update_MultiObjectRequest$Type extends MessageType { + constructor(); + create(value?: PartialMessage): Update_MultiObjectRequest; + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Update_MultiObjectRequest): Update_MultiObjectRequest; + internalBinaryWrite(message: Update_MultiObjectRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter; +} +/** + * @generated MessageType for protobuf message payload.v1.Update.MultiObjectRequest + */ +export declare const Update_MultiObjectRequest: Update_MultiObjectRequest$Type; +declare class Update_Config$Type extends MessageType { + constructor(); + create(value?: PartialMessage): Update_Config; + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Update_Config): Update_Config; + internalBinaryWrite(message: Update_Config, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter; +} +/** + * @generated MessageType for protobuf message payload.v1.Update.Config + */ +export declare const Update_Config: Update_Config$Type; +declare class Upsert$Type extends MessageType { + constructor(); + create(value?: PartialMessage): Upsert; + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Upsert): Upsert; + internalBinaryWrite(message: Upsert, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter; +} +/** + * @generated MessageType for protobuf message payload.v1.Upsert + */ +export declare const Upsert: Upsert$Type; +declare class Upsert_Request$Type extends MessageType { + constructor(); + create(value?: PartialMessage): Upsert_Request; + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Upsert_Request): Upsert_Request; + internalBinaryWrite(message: Upsert_Request, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter; +} +/** + * @generated MessageType for protobuf message payload.v1.Upsert.Request + */ +export declare const Upsert_Request: Upsert_Request$Type; +declare class Upsert_MultiRequest$Type extends MessageType { + constructor(); + create(value?: PartialMessage): Upsert_MultiRequest; + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Upsert_MultiRequest): Upsert_MultiRequest; + internalBinaryWrite(message: Upsert_MultiRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter; +} +/** + * @generated MessageType for protobuf message payload.v1.Upsert.MultiRequest + */ +export declare const Upsert_MultiRequest: Upsert_MultiRequest$Type; +declare class Upsert_ObjectRequest$Type extends MessageType { + constructor(); + create(value?: PartialMessage): Upsert_ObjectRequest; + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Upsert_ObjectRequest): Upsert_ObjectRequest; + internalBinaryWrite(message: Upsert_ObjectRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter; +} +/** + * @generated MessageType for protobuf message payload.v1.Upsert.ObjectRequest + */ +export declare const Upsert_ObjectRequest: Upsert_ObjectRequest$Type; +declare class Upsert_MultiObjectRequest$Type extends MessageType { + constructor(); + create(value?: PartialMessage): Upsert_MultiObjectRequest; + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Upsert_MultiObjectRequest): Upsert_MultiObjectRequest; + internalBinaryWrite(message: Upsert_MultiObjectRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter; +} +/** + * @generated MessageType for protobuf message payload.v1.Upsert.MultiObjectRequest + */ +export declare const Upsert_MultiObjectRequest: Upsert_MultiObjectRequest$Type; +declare class Upsert_Config$Type extends MessageType { + constructor(); + create(value?: PartialMessage): Upsert_Config; + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Upsert_Config): Upsert_Config; + internalBinaryWrite(message: Upsert_Config, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter; +} +/** + * @generated MessageType for protobuf message payload.v1.Upsert.Config + */ +export declare const Upsert_Config: Upsert_Config$Type; +declare class Remove$Type extends MessageType { + constructor(); + create(value?: PartialMessage): Remove; + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Remove): Remove; + internalBinaryWrite(message: Remove, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter; +} +/** + * @generated MessageType for protobuf message payload.v1.Remove + */ +export declare const Remove: Remove$Type; +declare class Remove_Request$Type extends MessageType { + constructor(); + create(value?: PartialMessage): Remove_Request; + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Remove_Request): Remove_Request; + internalBinaryWrite(message: Remove_Request, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter; +} +/** + * @generated MessageType for protobuf message payload.v1.Remove.Request + */ +export declare const Remove_Request: Remove_Request$Type; +declare class Remove_MultiRequest$Type extends MessageType { + constructor(); + create(value?: PartialMessage): Remove_MultiRequest; + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Remove_MultiRequest): Remove_MultiRequest; + internalBinaryWrite(message: Remove_MultiRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter; +} +/** + * @generated MessageType for protobuf message payload.v1.Remove.MultiRequest + */ +export declare const Remove_MultiRequest: Remove_MultiRequest$Type; +declare class Remove_TimestampRequest$Type extends MessageType { + constructor(); + create(value?: PartialMessage): Remove_TimestampRequest; + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Remove_TimestampRequest): Remove_TimestampRequest; + internalBinaryWrite(message: Remove_TimestampRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter; +} +/** + * @generated MessageType for protobuf message payload.v1.Remove.TimestampRequest + */ +export declare const Remove_TimestampRequest: Remove_TimestampRequest$Type; +declare class Remove_Timestamp$Type extends MessageType { + constructor(); + create(value?: PartialMessage): Remove_Timestamp; + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Remove_Timestamp): Remove_Timestamp; + internalBinaryWrite(message: Remove_Timestamp, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter; +} +/** + * @generated MessageType for protobuf message payload.v1.Remove.Timestamp + */ +export declare const Remove_Timestamp: Remove_Timestamp$Type; +declare class Remove_Config$Type extends MessageType { + constructor(); + create(value?: PartialMessage): Remove_Config; + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Remove_Config): Remove_Config; + internalBinaryWrite(message: Remove_Config, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter; +} +/** + * @generated MessageType for protobuf message payload.v1.Remove.Config + */ +export declare const Remove_Config: Remove_Config$Type; +declare class Object$Type extends MessageType { + constructor(); + create(value?: PartialMessage): Object; + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Object): Object; + internalBinaryWrite(message: Object, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter; +} +/** + * @generated MessageType for protobuf message payload.v1.Object + */ +export declare const Object: Object$Type; +declare class Object_VectorRequest$Type extends MessageType { + constructor(); + create(value?: PartialMessage): Object_VectorRequest; + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Object_VectorRequest): Object_VectorRequest; + internalBinaryWrite(message: Object_VectorRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter; +} +/** + * @generated MessageType for protobuf message payload.v1.Object.VectorRequest + */ +export declare const Object_VectorRequest: Object_VectorRequest$Type; +declare class Object_Distance$Type extends MessageType { + constructor(); + create(value?: PartialMessage): Object_Distance; + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Object_Distance): Object_Distance; + internalBinaryWrite(message: Object_Distance, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter; +} +/** + * @generated MessageType for protobuf message payload.v1.Object.Distance + */ +export declare const Object_Distance: Object_Distance$Type; +declare class Object_StreamDistance$Type extends MessageType { + constructor(); + create(value?: PartialMessage): Object_StreamDistance; + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Object_StreamDistance): Object_StreamDistance; + internalBinaryWrite(message: Object_StreamDistance, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter; +} +/** + * @generated MessageType for protobuf message payload.v1.Object.StreamDistance + */ +export declare const Object_StreamDistance: Object_StreamDistance$Type; +declare class Object_ID$Type extends MessageType { + constructor(); + create(value?: PartialMessage): Object_ID; + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Object_ID): Object_ID; + internalBinaryWrite(message: Object_ID, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter; +} +/** + * @generated MessageType for protobuf message payload.v1.Object.ID + */ +export declare const Object_ID: Object_ID$Type; +declare class Object_IDs$Type extends MessageType { + constructor(); + create(value?: PartialMessage): Object_IDs; + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Object_IDs): Object_IDs; + internalBinaryWrite(message: Object_IDs, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter; +} +/** + * @generated MessageType for protobuf message payload.v1.Object.IDs + */ +export declare const Object_IDs: Object_IDs$Type; +declare class Object_Vector$Type extends MessageType { + constructor(); + create(value?: PartialMessage): Object_Vector; + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Object_Vector): Object_Vector; + internalBinaryWrite(message: Object_Vector, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter; +} +/** + * @generated MessageType for protobuf message payload.v1.Object.Vector + */ +export declare const Object_Vector: Object_Vector$Type; +declare class Object_GetTimestampRequest$Type extends MessageType { + constructor(); + create(value?: PartialMessage): Object_GetTimestampRequest; + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Object_GetTimestampRequest): Object_GetTimestampRequest; + internalBinaryWrite(message: Object_GetTimestampRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter; +} +/** + * @generated MessageType for protobuf message payload.v1.Object.GetTimestampRequest + */ +export declare const Object_GetTimestampRequest: Object_GetTimestampRequest$Type; +declare class Object_Timestamp$Type extends MessageType { + constructor(); + create(value?: PartialMessage): Object_Timestamp; + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Object_Timestamp): Object_Timestamp; + internalBinaryWrite(message: Object_Timestamp, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter; +} +/** + * @generated MessageType for protobuf message payload.v1.Object.Timestamp + */ +export declare const Object_Timestamp: Object_Timestamp$Type; +declare class Object_Vectors$Type extends MessageType { + constructor(); + create(value?: PartialMessage): Object_Vectors; + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Object_Vectors): Object_Vectors; + internalBinaryWrite(message: Object_Vectors, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter; +} +/** + * @generated MessageType for protobuf message payload.v1.Object.Vectors + */ +export declare const Object_Vectors: Object_Vectors$Type; +declare class Object_StreamVector$Type extends MessageType { + constructor(); + create(value?: PartialMessage): Object_StreamVector; + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Object_StreamVector): Object_StreamVector; + internalBinaryWrite(message: Object_StreamVector, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter; +} +/** + * @generated MessageType for protobuf message payload.v1.Object.StreamVector + */ +export declare const Object_StreamVector: Object_StreamVector$Type; +declare class Object_ReshapeVector$Type extends MessageType { + constructor(); + create(value?: PartialMessage): Object_ReshapeVector; + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Object_ReshapeVector): Object_ReshapeVector; + internalBinaryWrite(message: Object_ReshapeVector, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter; +} +/** + * @generated MessageType for protobuf message payload.v1.Object.ReshapeVector + */ +export declare const Object_ReshapeVector: Object_ReshapeVector$Type; +declare class Object_Blob$Type extends MessageType { + constructor(); + create(value?: PartialMessage): Object_Blob; + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Object_Blob): Object_Blob; + internalBinaryWrite(message: Object_Blob, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter; +} +/** + * @generated MessageType for protobuf message payload.v1.Object.Blob + */ +export declare const Object_Blob: Object_Blob$Type; +declare class Object_StreamBlob$Type extends MessageType { + constructor(); + create(value?: PartialMessage): Object_StreamBlob; + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Object_StreamBlob): Object_StreamBlob; + internalBinaryWrite(message: Object_StreamBlob, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter; +} +/** + * @generated MessageType for protobuf message payload.v1.Object.StreamBlob + */ +export declare const Object_StreamBlob: Object_StreamBlob$Type; +declare class Object_Location$Type extends MessageType { + constructor(); + create(value?: PartialMessage): Object_Location; + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Object_Location): Object_Location; + internalBinaryWrite(message: Object_Location, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter; +} +/** + * @generated MessageType for protobuf message payload.v1.Object.Location + */ +export declare const Object_Location: Object_Location$Type; +declare class Object_StreamLocation$Type extends MessageType { + constructor(); + create(value?: PartialMessage): Object_StreamLocation; + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Object_StreamLocation): Object_StreamLocation; + internalBinaryWrite(message: Object_StreamLocation, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter; +} +/** + * @generated MessageType for protobuf message payload.v1.Object.StreamLocation + */ +export declare const Object_StreamLocation: Object_StreamLocation$Type; +declare class Object_Locations$Type extends MessageType { + constructor(); + create(value?: PartialMessage): Object_Locations; + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Object_Locations): Object_Locations; + internalBinaryWrite(message: Object_Locations, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter; +} +/** + * @generated MessageType for protobuf message payload.v1.Object.Locations + */ +export declare const Object_Locations: Object_Locations$Type; +declare class Object_List$Type extends MessageType { + constructor(); + create(value?: PartialMessage): Object_List; + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Object_List): Object_List; + internalBinaryWrite(message: Object_List, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter; +} +/** + * @generated MessageType for protobuf message payload.v1.Object.List + */ +export declare const Object_List: Object_List$Type; +declare class Object_List_Request$Type extends MessageType { + constructor(); + create(value?: PartialMessage): Object_List_Request; + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Object_List_Request): Object_List_Request; + internalBinaryWrite(message: Object_List_Request, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter; +} +/** + * @generated MessageType for protobuf message payload.v1.Object.List.Request + */ +export declare const Object_List_Request: Object_List_Request$Type; +declare class Object_List_Response$Type extends MessageType { + constructor(); + create(value?: PartialMessage): Object_List_Response; + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Object_List_Response): Object_List_Response; + internalBinaryWrite(message: Object_List_Response, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter; +} +/** + * @generated MessageType for protobuf message payload.v1.Object.List.Response + */ +export declare const Object_List_Response: Object_List_Response$Type; +declare class Control$Type extends MessageType { + constructor(); + create(value?: PartialMessage): Control; + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Control): Control; + internalBinaryWrite(message: Control, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter; +} +/** + * @generated MessageType for protobuf message payload.v1.Control + */ +export declare const Control: Control$Type; +declare class Control_CreateIndexRequest$Type extends MessageType { + constructor(); + create(value?: PartialMessage): Control_CreateIndexRequest; + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Control_CreateIndexRequest): Control_CreateIndexRequest; + internalBinaryWrite(message: Control_CreateIndexRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter; +} +/** + * @generated MessageType for protobuf message payload.v1.Control.CreateIndexRequest + */ +export declare const Control_CreateIndexRequest: Control_CreateIndexRequest$Type; +declare class Discoverer$Type extends MessageType { + constructor(); + create(value?: PartialMessage): Discoverer; + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Discoverer): Discoverer; + internalBinaryWrite(message: Discoverer, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter; +} +/** + * @generated MessageType for protobuf message payload.v1.Discoverer + */ +export declare const Discoverer: Discoverer$Type; +declare class Discoverer_Request$Type extends MessageType { + constructor(); + create(value?: PartialMessage): Discoverer_Request; + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Discoverer_Request): Discoverer_Request; + internalBinaryWrite(message: Discoverer_Request, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter; +} +/** + * @generated MessageType for protobuf message payload.v1.Discoverer.Request + */ +export declare const Discoverer_Request: Discoverer_Request$Type; +declare class Info$Type extends MessageType { + constructor(); + create(value?: PartialMessage): Info; + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Info): Info; + internalBinaryWrite(message: Info, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter; +} +/** + * @generated MessageType for protobuf message payload.v1.Info + */ +export declare const Info: Info$Type; +declare class Info_Index$Type extends MessageType { + constructor(); + create(value?: PartialMessage): Info_Index; + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Info_Index): Info_Index; + internalBinaryWrite(message: Info_Index, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter; +} +/** + * @generated MessageType for protobuf message payload.v1.Info.Index + */ +export declare const Info_Index: Info_Index$Type; +declare class Info_Index_Count$Type extends MessageType { + constructor(); + create(value?: PartialMessage): Info_Index_Count; + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Info_Index_Count): Info_Index_Count; + internalBinaryWrite(message: Info_Index_Count, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter; +} +/** + * @generated MessageType for protobuf message payload.v1.Info.Index.Count + */ +export declare const Info_Index_Count: Info_Index_Count$Type; +declare class Info_Index_UUID$Type extends MessageType { + constructor(); + create(value?: PartialMessage): Info_Index_UUID; + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Info_Index_UUID): Info_Index_UUID; + internalBinaryWrite(message: Info_Index_UUID, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter; +} +/** + * @generated MessageType for protobuf message payload.v1.Info.Index.UUID + */ +export declare const Info_Index_UUID: Info_Index_UUID$Type; +declare class Info_Index_UUID_Committed$Type extends MessageType { + constructor(); + create(value?: PartialMessage): Info_Index_UUID_Committed; + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Info_Index_UUID_Committed): Info_Index_UUID_Committed; + internalBinaryWrite(message: Info_Index_UUID_Committed, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter; +} +/** + * @generated MessageType for protobuf message payload.v1.Info.Index.UUID.Committed + */ +export declare const Info_Index_UUID_Committed: Info_Index_UUID_Committed$Type; +declare class Info_Index_UUID_Uncommitted$Type extends MessageType { + constructor(); + create(value?: PartialMessage): Info_Index_UUID_Uncommitted; + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Info_Index_UUID_Uncommitted): Info_Index_UUID_Uncommitted; + internalBinaryWrite(message: Info_Index_UUID_Uncommitted, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter; +} +/** + * @generated MessageType for protobuf message payload.v1.Info.Index.UUID.Uncommitted + */ +export declare const Info_Index_UUID_Uncommitted: Info_Index_UUID_Uncommitted$Type; +declare class Info_Pod$Type extends MessageType { + constructor(); + create(value?: PartialMessage): Info_Pod; + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Info_Pod): Info_Pod; + internalBinaryWrite(message: Info_Pod, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter; +} +/** + * @generated MessageType for protobuf message payload.v1.Info.Pod + */ +export declare const Info_Pod: Info_Pod$Type; +declare class Info_Node$Type extends MessageType { + constructor(); + create(value?: PartialMessage): Info_Node; + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Info_Node): Info_Node; + internalBinaryWrite(message: Info_Node, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter; +} +/** + * @generated MessageType for protobuf message payload.v1.Info.Node + */ +export declare const Info_Node: Info_Node$Type; +declare class Info_Service$Type extends MessageType { + constructor(); + create(value?: PartialMessage): Info_Service; + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Info_Service): Info_Service; + internalBinaryWrite(message: Info_Service, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter; +} +/** + * @generated MessageType for protobuf message payload.v1.Info.Service + */ +export declare const Info_Service: Info_Service$Type; +declare class Info_ServicePort$Type extends MessageType { + constructor(); + create(value?: PartialMessage): Info_ServicePort; + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Info_ServicePort): Info_ServicePort; + internalBinaryWrite(message: Info_ServicePort, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter; +} +/** + * @generated MessageType for protobuf message payload.v1.Info.ServicePort + */ +export declare const Info_ServicePort: Info_ServicePort$Type; +declare class Info_Labels$Type extends MessageType { + constructor(); + create(value?: PartialMessage): Info_Labels; + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Info_Labels): Info_Labels; + private binaryReadMap1; + internalBinaryWrite(message: Info_Labels, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter; +} +/** + * @generated MessageType for protobuf message payload.v1.Info.Labels + */ +export declare const Info_Labels: Info_Labels$Type; +declare class Info_Annotations$Type extends MessageType { + constructor(); + create(value?: PartialMessage): Info_Annotations; + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Info_Annotations): Info_Annotations; + private binaryReadMap1; + internalBinaryWrite(message: Info_Annotations, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter; +} +/** + * @generated MessageType for protobuf message payload.v1.Info.Annotations + */ +export declare const Info_Annotations: Info_Annotations$Type; +declare class Info_CPU$Type extends MessageType { + constructor(); + create(value?: PartialMessage): Info_CPU; + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Info_CPU): Info_CPU; + internalBinaryWrite(message: Info_CPU, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter; +} +/** + * @generated MessageType for protobuf message payload.v1.Info.CPU + */ +export declare const Info_CPU: Info_CPU$Type; +declare class Info_Memory$Type extends MessageType { + constructor(); + create(value?: PartialMessage): Info_Memory; + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Info_Memory): Info_Memory; + internalBinaryWrite(message: Info_Memory, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter; +} +/** + * @generated MessageType for protobuf message payload.v1.Info.Memory + */ +export declare const Info_Memory: Info_Memory$Type; +declare class Info_Pods$Type extends MessageType { + constructor(); + create(value?: PartialMessage): Info_Pods; + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Info_Pods): Info_Pods; + internalBinaryWrite(message: Info_Pods, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter; +} +/** + * @generated MessageType for protobuf message payload.v1.Info.Pods + */ +export declare const Info_Pods: Info_Pods$Type; +declare class Info_Nodes$Type extends MessageType { + constructor(); + create(value?: PartialMessage): Info_Nodes; + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Info_Nodes): Info_Nodes; + internalBinaryWrite(message: Info_Nodes, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter; +} +/** + * @generated MessageType for protobuf message payload.v1.Info.Nodes + */ +export declare const Info_Nodes: Info_Nodes$Type; +declare class Info_Services$Type extends MessageType { + constructor(); + create(value?: PartialMessage): Info_Services; + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Info_Services): Info_Services; + internalBinaryWrite(message: Info_Services, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter; +} +/** + * @generated MessageType for protobuf message payload.v1.Info.Services + */ +export declare const Info_Services: Info_Services$Type; +declare class Info_IPs$Type extends MessageType { + constructor(); + create(value?: PartialMessage): Info_IPs; + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Info_IPs): Info_IPs; + internalBinaryWrite(message: Info_IPs, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter; +} +/** + * @generated MessageType for protobuf message payload.v1.Info.IPs + */ +export declare const Info_IPs: Info_IPs$Type; +declare class Empty$Type extends MessageType { + constructor(); + create(value?: PartialMessage): Empty; + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Empty): Empty; + internalBinaryWrite(message: Empty, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter; +} +/** + * @generated MessageType for protobuf message payload.v1.Empty + */ +export declare const Empty: Empty$Type; +export {}; diff --git a/src/vald/v1/payload/payload_pb.js b/src/vald/v1/payload/payload_pb.js index d8ae877..cd86a45 100644 --- a/src/vald/v1/payload/payload_pb.js +++ b/src/vald/v1/payload/payload_pb.js @@ -1,16232 +1,4250 @@ -// source: vald/v1/payload/payload.proto -/** - * @fileoverview - * @enhanceable - * @suppress {missingRequire} reports error on implicit type usages. - * @suppress {messageConventions} JS Compiler reports an error if a variable or - * field starts with 'MSG_' and isn't a translatable message. - * @public - */ -// GENERATED CODE -- DO NOT EDIT! /* eslint-disable */ +// @generated by protobuf-ts 2.9.3 with parameter add_pb_suffix,client_grpc1,generate_dependencies,keep_enum_prefix,ts_nocheck,use_proto_field_name,output_javascript,output_legacy_commonjs,eslint_disable +// @generated from protobuf file "vald/v1/payload/payload.proto" (package "payload.v1", syntax proto3) +// tslint:disable // @ts-nocheck - -var jspb = require('google-protobuf'); -var goog = jspb; -var global = - (typeof globalThis !== 'undefined' && globalThis) || - (typeof window !== 'undefined' && window) || - (typeof global !== 'undefined' && global) || - (typeof self !== 'undefined' && self) || - (function () { return this; }).call(null) || - Function('return this')(); - -var buf_validate_validate_pb = require('../../../buf/validate/validate_pb.js'); -goog.object.extend(proto, buf_validate_validate_pb); -var google_rpc_status_pb = require('../../../google/rpc/status_pb.js'); -goog.object.extend(proto, google_rpc_status_pb); -goog.exportSymbol('proto.payload.v1.Control', null, global); -goog.exportSymbol('proto.payload.v1.Control.CreateIndexRequest', null, global); -goog.exportSymbol('proto.payload.v1.Discoverer', null, global); -goog.exportSymbol('proto.payload.v1.Discoverer.Request', null, global); -goog.exportSymbol('proto.payload.v1.Empty', null, global); -goog.exportSymbol('proto.payload.v1.Filter', null, global); -goog.exportSymbol('proto.payload.v1.Filter.Config', null, global); -goog.exportSymbol('proto.payload.v1.Filter.Target', null, global); -goog.exportSymbol('proto.payload.v1.Info', null, global); -goog.exportSymbol('proto.payload.v1.Info.Annotations', null, global); -goog.exportSymbol('proto.payload.v1.Info.CPU', null, global); -goog.exportSymbol('proto.payload.v1.Info.IPs', null, global); -goog.exportSymbol('proto.payload.v1.Info.Index', null, global); -goog.exportSymbol('proto.payload.v1.Info.Index.Count', null, global); -goog.exportSymbol('proto.payload.v1.Info.Index.UUID', null, global); -goog.exportSymbol('proto.payload.v1.Info.Index.UUID.Committed', null, global); -goog.exportSymbol('proto.payload.v1.Info.Index.UUID.Uncommitted', null, global); -goog.exportSymbol('proto.payload.v1.Info.Labels', null, global); -goog.exportSymbol('proto.payload.v1.Info.Memory', null, global); -goog.exportSymbol('proto.payload.v1.Info.Node', null, global); -goog.exportSymbol('proto.payload.v1.Info.Nodes', null, global); -goog.exportSymbol('proto.payload.v1.Info.Pod', null, global); -goog.exportSymbol('proto.payload.v1.Info.Pods', null, global); -goog.exportSymbol('proto.payload.v1.Info.Service', null, global); -goog.exportSymbol('proto.payload.v1.Info.ServicePort', null, global); -goog.exportSymbol('proto.payload.v1.Info.Services', null, global); -goog.exportSymbol('proto.payload.v1.Insert', null, global); -goog.exportSymbol('proto.payload.v1.Insert.Config', null, global); -goog.exportSymbol('proto.payload.v1.Insert.MultiObjectRequest', null, global); -goog.exportSymbol('proto.payload.v1.Insert.MultiRequest', null, global); -goog.exportSymbol('proto.payload.v1.Insert.ObjectRequest', null, global); -goog.exportSymbol('proto.payload.v1.Insert.Request', null, global); -goog.exportSymbol('proto.payload.v1.Object', null, global); -goog.exportSymbol('proto.payload.v1.Object.Blob', null, global); -goog.exportSymbol('proto.payload.v1.Object.Distance', null, global); -goog.exportSymbol('proto.payload.v1.Object.GetTimestampRequest', null, global); -goog.exportSymbol('proto.payload.v1.Object.ID', null, global); -goog.exportSymbol('proto.payload.v1.Object.IDs', null, global); -goog.exportSymbol('proto.payload.v1.Object.List', null, global); -goog.exportSymbol('proto.payload.v1.Object.List.Request', null, global); -goog.exportSymbol('proto.payload.v1.Object.List.Response', null, global); -goog.exportSymbol('proto.payload.v1.Object.List.Response.PayloadCase', null, global); -goog.exportSymbol('proto.payload.v1.Object.Location', null, global); -goog.exportSymbol('proto.payload.v1.Object.Locations', null, global); -goog.exportSymbol('proto.payload.v1.Object.ReshapeVector', null, global); -goog.exportSymbol('proto.payload.v1.Object.StreamBlob', null, global); -goog.exportSymbol('proto.payload.v1.Object.StreamBlob.PayloadCase', null, global); -goog.exportSymbol('proto.payload.v1.Object.StreamDistance', null, global); -goog.exportSymbol('proto.payload.v1.Object.StreamDistance.PayloadCase', null, global); -goog.exportSymbol('proto.payload.v1.Object.StreamLocation', null, global); -goog.exportSymbol('proto.payload.v1.Object.StreamLocation.PayloadCase', null, global); -goog.exportSymbol('proto.payload.v1.Object.StreamVector', null, global); -goog.exportSymbol('proto.payload.v1.Object.StreamVector.PayloadCase', null, global); -goog.exportSymbol('proto.payload.v1.Object.Timestamp', null, global); -goog.exportSymbol('proto.payload.v1.Object.Vector', null, global); -goog.exportSymbol('proto.payload.v1.Object.VectorRequest', null, global); -goog.exportSymbol('proto.payload.v1.Object.Vectors', null, global); -goog.exportSymbol('proto.payload.v1.Remove', null, global); -goog.exportSymbol('proto.payload.v1.Remove.Config', null, global); -goog.exportSymbol('proto.payload.v1.Remove.MultiRequest', null, global); -goog.exportSymbol('proto.payload.v1.Remove.Request', null, global); -goog.exportSymbol('proto.payload.v1.Remove.Timestamp', null, global); -goog.exportSymbol('proto.payload.v1.Remove.Timestamp.Operator', null, global); -goog.exportSymbol('proto.payload.v1.Remove.TimestampRequest', null, global); -goog.exportSymbol('proto.payload.v1.Search', null, global); -goog.exportSymbol('proto.payload.v1.Search.AggregationAlgorithm', null, global); -goog.exportSymbol('proto.payload.v1.Search.Config', null, global); -goog.exportSymbol('proto.payload.v1.Search.IDRequest', null, global); -goog.exportSymbol('proto.payload.v1.Search.MultiIDRequest', null, global); -goog.exportSymbol('proto.payload.v1.Search.MultiObjectRequest', null, global); -goog.exportSymbol('proto.payload.v1.Search.MultiRequest', null, global); -goog.exportSymbol('proto.payload.v1.Search.ObjectRequest', null, global); -goog.exportSymbol('proto.payload.v1.Search.Request', null, global); -goog.exportSymbol('proto.payload.v1.Search.Response', null, global); -goog.exportSymbol('proto.payload.v1.Search.Responses', null, global); -goog.exportSymbol('proto.payload.v1.Search.StreamResponse', null, global); -goog.exportSymbol('proto.payload.v1.Search.StreamResponse.PayloadCase', null, global); -goog.exportSymbol('proto.payload.v1.Update', null, global); -goog.exportSymbol('proto.payload.v1.Update.Config', null, global); -goog.exportSymbol('proto.payload.v1.Update.MultiObjectRequest', null, global); -goog.exportSymbol('proto.payload.v1.Update.MultiRequest', null, global); -goog.exportSymbol('proto.payload.v1.Update.ObjectRequest', null, global); -goog.exportSymbol('proto.payload.v1.Update.Request', null, global); -goog.exportSymbol('proto.payload.v1.Upsert', null, global); -goog.exportSymbol('proto.payload.v1.Upsert.Config', null, global); -goog.exportSymbol('proto.payload.v1.Upsert.MultiObjectRequest', null, global); -goog.exportSymbol('proto.payload.v1.Upsert.MultiRequest', null, global); -goog.exportSymbol('proto.payload.v1.Upsert.ObjectRequest', null, global); -goog.exportSymbol('proto.payload.v1.Upsert.Request', null, global); -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.payload.v1.Search = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.payload.v1.Search, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.payload.v1.Search.displayName = 'proto.payload.v1.Search'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.payload.v1.Search.Request = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.payload.v1.Search.Request.repeatedFields_, null); -}; -goog.inherits(proto.payload.v1.Search.Request, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.payload.v1.Search.Request.displayName = 'proto.payload.v1.Search.Request'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.payload.v1.Search.MultiRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.payload.v1.Search.MultiRequest.repeatedFields_, null); -}; -goog.inherits(proto.payload.v1.Search.MultiRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.payload.v1.Search.MultiRequest.displayName = 'proto.payload.v1.Search.MultiRequest'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.payload.v1.Search.IDRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.payload.v1.Search.IDRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.payload.v1.Search.IDRequest.displayName = 'proto.payload.v1.Search.IDRequest'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.payload.v1.Search.MultiIDRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.payload.v1.Search.MultiIDRequest.repeatedFields_, null); -}; -goog.inherits(proto.payload.v1.Search.MultiIDRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.payload.v1.Search.MultiIDRequest.displayName = 'proto.payload.v1.Search.MultiIDRequest'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.payload.v1.Search.ObjectRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.payload.v1.Search.ObjectRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.payload.v1.Search.ObjectRequest.displayName = 'proto.payload.v1.Search.ObjectRequest'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.payload.v1.Search.MultiObjectRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.payload.v1.Search.MultiObjectRequest.repeatedFields_, null); -}; -goog.inherits(proto.payload.v1.Search.MultiObjectRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.payload.v1.Search.MultiObjectRequest.displayName = 'proto.payload.v1.Search.MultiObjectRequest'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.payload.v1.Search.Config = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.payload.v1.Search.Config, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.payload.v1.Search.Config.displayName = 'proto.payload.v1.Search.Config'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.payload.v1.Search.Response = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.payload.v1.Search.Response.repeatedFields_, null); -}; -goog.inherits(proto.payload.v1.Search.Response, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.payload.v1.Search.Response.displayName = 'proto.payload.v1.Search.Response'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.payload.v1.Search.Responses = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.payload.v1.Search.Responses.repeatedFields_, null); -}; -goog.inherits(proto.payload.v1.Search.Responses, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.payload.v1.Search.Responses.displayName = 'proto.payload.v1.Search.Responses'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.payload.v1.Search.StreamResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, proto.payload.v1.Search.StreamResponse.oneofGroups_); -}; -goog.inherits(proto.payload.v1.Search.StreamResponse, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.payload.v1.Search.StreamResponse.displayName = 'proto.payload.v1.Search.StreamResponse'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.payload.v1.Filter = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.payload.v1.Filter, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.payload.v1.Filter.displayName = 'proto.payload.v1.Filter'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.payload.v1.Filter.Target = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.payload.v1.Filter.Target, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.payload.v1.Filter.Target.displayName = 'proto.payload.v1.Filter.Target'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.payload.v1.Filter.Config = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.payload.v1.Filter.Config.repeatedFields_, null); -}; -goog.inherits(proto.payload.v1.Filter.Config, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.payload.v1.Filter.Config.displayName = 'proto.payload.v1.Filter.Config'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.payload.v1.Insert = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.payload.v1.Insert, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.payload.v1.Insert.displayName = 'proto.payload.v1.Insert'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.payload.v1.Insert.Request = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.payload.v1.Insert.Request, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.payload.v1.Insert.Request.displayName = 'proto.payload.v1.Insert.Request'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.payload.v1.Insert.MultiRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.payload.v1.Insert.MultiRequest.repeatedFields_, null); -}; -goog.inherits(proto.payload.v1.Insert.MultiRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.payload.v1.Insert.MultiRequest.displayName = 'proto.payload.v1.Insert.MultiRequest'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.payload.v1.Insert.ObjectRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.payload.v1.Insert.ObjectRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.payload.v1.Insert.ObjectRequest.displayName = 'proto.payload.v1.Insert.ObjectRequest'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.payload.v1.Insert.MultiObjectRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.payload.v1.Insert.MultiObjectRequest.repeatedFields_, null); -}; -goog.inherits(proto.payload.v1.Insert.MultiObjectRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.payload.v1.Insert.MultiObjectRequest.displayName = 'proto.payload.v1.Insert.MultiObjectRequest'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.payload.v1.Insert.Config = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.payload.v1.Insert.Config, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.payload.v1.Insert.Config.displayName = 'proto.payload.v1.Insert.Config'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.payload.v1.Update = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.payload.v1.Update, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.payload.v1.Update.displayName = 'proto.payload.v1.Update'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.payload.v1.Update.Request = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.payload.v1.Update.Request, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.payload.v1.Update.Request.displayName = 'proto.payload.v1.Update.Request'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.payload.v1.Update.MultiRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.payload.v1.Update.MultiRequest.repeatedFields_, null); -}; -goog.inherits(proto.payload.v1.Update.MultiRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.payload.v1.Update.MultiRequest.displayName = 'proto.payload.v1.Update.MultiRequest'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.payload.v1.Update.ObjectRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.payload.v1.Update.ObjectRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.payload.v1.Update.ObjectRequest.displayName = 'proto.payload.v1.Update.ObjectRequest'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.payload.v1.Update.MultiObjectRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.payload.v1.Update.MultiObjectRequest.repeatedFields_, null); -}; -goog.inherits(proto.payload.v1.Update.MultiObjectRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.payload.v1.Update.MultiObjectRequest.displayName = 'proto.payload.v1.Update.MultiObjectRequest'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.payload.v1.Update.Config = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.payload.v1.Update.Config, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.payload.v1.Update.Config.displayName = 'proto.payload.v1.Update.Config'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.payload.v1.Upsert = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.payload.v1.Upsert, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.payload.v1.Upsert.displayName = 'proto.payload.v1.Upsert'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.payload.v1.Upsert.Request = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.payload.v1.Upsert.Request, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.payload.v1.Upsert.Request.displayName = 'proto.payload.v1.Upsert.Request'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.payload.v1.Upsert.MultiRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.payload.v1.Upsert.MultiRequest.repeatedFields_, null); -}; -goog.inherits(proto.payload.v1.Upsert.MultiRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.payload.v1.Upsert.MultiRequest.displayName = 'proto.payload.v1.Upsert.MultiRequest'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.payload.v1.Upsert.ObjectRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.payload.v1.Upsert.ObjectRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.payload.v1.Upsert.ObjectRequest.displayName = 'proto.payload.v1.Upsert.ObjectRequest'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.payload.v1.Upsert.MultiObjectRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.payload.v1.Upsert.MultiObjectRequest.repeatedFields_, null); -}; -goog.inherits(proto.payload.v1.Upsert.MultiObjectRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.payload.v1.Upsert.MultiObjectRequest.displayName = 'proto.payload.v1.Upsert.MultiObjectRequest'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.payload.v1.Upsert.Config = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.payload.v1.Upsert.Config, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.payload.v1.Upsert.Config.displayName = 'proto.payload.v1.Upsert.Config'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.payload.v1.Remove = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.payload.v1.Remove, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.payload.v1.Remove.displayName = 'proto.payload.v1.Remove'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.payload.v1.Remove.Request = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.payload.v1.Remove.Request, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.payload.v1.Remove.Request.displayName = 'proto.payload.v1.Remove.Request'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.payload.v1.Remove.MultiRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.payload.v1.Remove.MultiRequest.repeatedFields_, null); -}; -goog.inherits(proto.payload.v1.Remove.MultiRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.payload.v1.Remove.MultiRequest.displayName = 'proto.payload.v1.Remove.MultiRequest'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.payload.v1.Remove.TimestampRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.payload.v1.Remove.TimestampRequest.repeatedFields_, null); -}; -goog.inherits(proto.payload.v1.Remove.TimestampRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.payload.v1.Remove.TimestampRequest.displayName = 'proto.payload.v1.Remove.TimestampRequest'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.payload.v1.Remove.Timestamp = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.payload.v1.Remove.Timestamp, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.payload.v1.Remove.Timestamp.displayName = 'proto.payload.v1.Remove.Timestamp'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.payload.v1.Remove.Config = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.payload.v1.Remove.Config, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.payload.v1.Remove.Config.displayName = 'proto.payload.v1.Remove.Config'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.payload.v1.Object = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.payload.v1.Object, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.payload.v1.Object.displayName = 'proto.payload.v1.Object'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.payload.v1.Object.VectorRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.payload.v1.Object.VectorRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.payload.v1.Object.VectorRequest.displayName = 'proto.payload.v1.Object.VectorRequest'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.payload.v1.Object.Distance = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.payload.v1.Object.Distance, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.payload.v1.Object.Distance.displayName = 'proto.payload.v1.Object.Distance'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.payload.v1.Object.StreamDistance = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, proto.payload.v1.Object.StreamDistance.oneofGroups_); -}; -goog.inherits(proto.payload.v1.Object.StreamDistance, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.payload.v1.Object.StreamDistance.displayName = 'proto.payload.v1.Object.StreamDistance'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.payload.v1.Object.ID = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.payload.v1.Object.ID, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.payload.v1.Object.ID.displayName = 'proto.payload.v1.Object.ID'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.payload.v1.Object.IDs = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.payload.v1.Object.IDs.repeatedFields_, null); -}; -goog.inherits(proto.payload.v1.Object.IDs, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.payload.v1.Object.IDs.displayName = 'proto.payload.v1.Object.IDs'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.payload.v1.Object.Vector = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.payload.v1.Object.Vector.repeatedFields_, null); -}; -goog.inherits(proto.payload.v1.Object.Vector, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.payload.v1.Object.Vector.displayName = 'proto.payload.v1.Object.Vector'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.payload.v1.Object.GetTimestampRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.payload.v1.Object.GetTimestampRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.payload.v1.Object.GetTimestampRequest.displayName = 'proto.payload.v1.Object.GetTimestampRequest'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.payload.v1.Object.Timestamp = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.payload.v1.Object.Timestamp, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.payload.v1.Object.Timestamp.displayName = 'proto.payload.v1.Object.Timestamp'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.payload.v1.Object.Vectors = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.payload.v1.Object.Vectors.repeatedFields_, null); -}; -goog.inherits(proto.payload.v1.Object.Vectors, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.payload.v1.Object.Vectors.displayName = 'proto.payload.v1.Object.Vectors'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.payload.v1.Object.StreamVector = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, proto.payload.v1.Object.StreamVector.oneofGroups_); -}; -goog.inherits(proto.payload.v1.Object.StreamVector, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.payload.v1.Object.StreamVector.displayName = 'proto.payload.v1.Object.StreamVector'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.payload.v1.Object.ReshapeVector = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.payload.v1.Object.ReshapeVector.repeatedFields_, null); -}; -goog.inherits(proto.payload.v1.Object.ReshapeVector, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.payload.v1.Object.ReshapeVector.displayName = 'proto.payload.v1.Object.ReshapeVector'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.payload.v1.Object.Blob = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.payload.v1.Object.Blob, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.payload.v1.Object.Blob.displayName = 'proto.payload.v1.Object.Blob'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.payload.v1.Object.StreamBlob = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, proto.payload.v1.Object.StreamBlob.oneofGroups_); -}; -goog.inherits(proto.payload.v1.Object.StreamBlob, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.payload.v1.Object.StreamBlob.displayName = 'proto.payload.v1.Object.StreamBlob'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.payload.v1.Object.Location = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.payload.v1.Object.Location.repeatedFields_, null); -}; -goog.inherits(proto.payload.v1.Object.Location, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.payload.v1.Object.Location.displayName = 'proto.payload.v1.Object.Location'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.payload.v1.Object.StreamLocation = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, proto.payload.v1.Object.StreamLocation.oneofGroups_); -}; -goog.inherits(proto.payload.v1.Object.StreamLocation, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.payload.v1.Object.StreamLocation.displayName = 'proto.payload.v1.Object.StreamLocation'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.payload.v1.Object.Locations = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.payload.v1.Object.Locations.repeatedFields_, null); -}; -goog.inherits(proto.payload.v1.Object.Locations, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.payload.v1.Object.Locations.displayName = 'proto.payload.v1.Object.Locations'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.payload.v1.Object.List = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.payload.v1.Object.List, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.payload.v1.Object.List.displayName = 'proto.payload.v1.Object.List'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.payload.v1.Object.List.Request = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.payload.v1.Object.List.Request, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.payload.v1.Object.List.Request.displayName = 'proto.payload.v1.Object.List.Request'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.payload.v1.Object.List.Response = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, proto.payload.v1.Object.List.Response.oneofGroups_); -}; -goog.inherits(proto.payload.v1.Object.List.Response, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.payload.v1.Object.List.Response.displayName = 'proto.payload.v1.Object.List.Response'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.payload.v1.Control = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.payload.v1.Control, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.payload.v1.Control.displayName = 'proto.payload.v1.Control'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.payload.v1.Control.CreateIndexRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.payload.v1.Control.CreateIndexRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.payload.v1.Control.CreateIndexRequest.displayName = 'proto.payload.v1.Control.CreateIndexRequest'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.payload.v1.Discoverer = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.payload.v1.Discoverer, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.payload.v1.Discoverer.displayName = 'proto.payload.v1.Discoverer'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.payload.v1.Discoverer.Request = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.payload.v1.Discoverer.Request, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.payload.v1.Discoverer.Request.displayName = 'proto.payload.v1.Discoverer.Request'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.payload.v1.Info = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.payload.v1.Info, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.payload.v1.Info.displayName = 'proto.payload.v1.Info'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.payload.v1.Info.Index = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.payload.v1.Info.Index, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.payload.v1.Info.Index.displayName = 'proto.payload.v1.Info.Index'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.payload.v1.Info.Index.Count = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.payload.v1.Info.Index.Count, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.payload.v1.Info.Index.Count.displayName = 'proto.payload.v1.Info.Index.Count'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.payload.v1.Info.Index.UUID = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.payload.v1.Info.Index.UUID, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.payload.v1.Info.Index.UUID.displayName = 'proto.payload.v1.Info.Index.UUID'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.payload.v1.Info.Index.UUID.Committed = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.payload.v1.Info.Index.UUID.Committed, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.payload.v1.Info.Index.UUID.Committed.displayName = 'proto.payload.v1.Info.Index.UUID.Committed'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.payload.v1.Info.Index.UUID.Uncommitted = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.payload.v1.Info.Index.UUID.Uncommitted, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.payload.v1.Info.Index.UUID.Uncommitted.displayName = 'proto.payload.v1.Info.Index.UUID.Uncommitted'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.payload.v1.Info.Pod = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.payload.v1.Info.Pod, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.payload.v1.Info.Pod.displayName = 'proto.payload.v1.Info.Pod'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.payload.v1.Info.Node = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.payload.v1.Info.Node, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.payload.v1.Info.Node.displayName = 'proto.payload.v1.Info.Node'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.payload.v1.Info.Service = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.payload.v1.Info.Service.repeatedFields_, null); -}; -goog.inherits(proto.payload.v1.Info.Service, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.payload.v1.Info.Service.displayName = 'proto.payload.v1.Info.Service'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.payload.v1.Info.ServicePort = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.payload.v1.Info.ServicePort, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.payload.v1.Info.ServicePort.displayName = 'proto.payload.v1.Info.ServicePort'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.payload.v1.Info.Labels = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.payload.v1.Info.Labels, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.payload.v1.Info.Labels.displayName = 'proto.payload.v1.Info.Labels'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.payload.v1.Info.Annotations = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.payload.v1.Info.Annotations, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.payload.v1.Info.Annotations.displayName = 'proto.payload.v1.Info.Annotations'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.payload.v1.Info.CPU = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.payload.v1.Info.CPU, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.payload.v1.Info.CPU.displayName = 'proto.payload.v1.Info.CPU'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.payload.v1.Info.Memory = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.payload.v1.Info.Memory, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.payload.v1.Info.Memory.displayName = 'proto.payload.v1.Info.Memory'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.payload.v1.Info.Pods = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.payload.v1.Info.Pods.repeatedFields_, null); -}; -goog.inherits(proto.payload.v1.Info.Pods, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.payload.v1.Info.Pods.displayName = 'proto.payload.v1.Info.Pods'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.payload.v1.Info.Nodes = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.payload.v1.Info.Nodes.repeatedFields_, null); -}; -goog.inherits(proto.payload.v1.Info.Nodes, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.payload.v1.Info.Nodes.displayName = 'proto.payload.v1.Info.Nodes'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.payload.v1.Info.Services = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.payload.v1.Info.Services.repeatedFields_, null); -}; -goog.inherits(proto.payload.v1.Info.Services, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.payload.v1.Info.Services.displayName = 'proto.payload.v1.Info.Services'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.payload.v1.Info.IPs = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.payload.v1.Info.IPs.repeatedFields_, null); -}; -goog.inherits(proto.payload.v1.Info.IPs, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.payload.v1.Info.IPs.displayName = 'proto.payload.v1.Info.IPs'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.payload.v1.Empty = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.payload.v1.Empty, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.payload.v1.Empty.displayName = 'proto.payload.v1.Empty'; -} - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.payload.v1.Search.prototype.toObject = function(opt_includeInstance) { - return proto.payload.v1.Search.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.payload.v1.Search} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.payload.v1.Search.toObject = function(includeInstance, msg) { - var f, obj = { - - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.payload.v1.Search} - */ -proto.payload.v1.Search.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.payload.v1.Search; - return proto.payload.v1.Search.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.payload.v1.Search} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.payload.v1.Search} - */ -proto.payload.v1.Search.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.payload.v1.Search.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.payload.v1.Search.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.payload.v1.Search} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.payload.v1.Search.serializeBinaryToWriter = function(message, writer) { - var f = undefined; -}; - - -/** - * @enum {number} - */ -proto.payload.v1.Search.AggregationAlgorithm = { - UNKNOWN: 0, - CONCURRENTQUEUE: 1, - SORTSLICE: 2, - SORTPOOLSLICE: 3, - PAIRINGHEAP: 4 -}; - - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.payload.v1.Search.Request.repeatedFields_ = [1]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.payload.v1.Search.Request.prototype.toObject = function(opt_includeInstance) { - return proto.payload.v1.Search.Request.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.payload.v1.Search.Request} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.payload.v1.Search.Request.toObject = function(includeInstance, msg) { - var f, obj = { - vectorList: (f = jspb.Message.getRepeatedFloatingPointField(msg, 1)) == null ? undefined : f, - config: (f = msg.getConfig()) && proto.payload.v1.Search.Config.toObject(includeInstance, f) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.payload.v1.Search.Request} - */ -proto.payload.v1.Search.Request.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.payload.v1.Search.Request; - return proto.payload.v1.Search.Request.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.payload.v1.Search.Request} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.payload.v1.Search.Request} - */ -proto.payload.v1.Search.Request.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var values = /** @type {!Array} */ (reader.isDelimited() ? reader.readPackedFloat() : [reader.readFloat()]); - for (var i = 0; i < values.length; i++) { - msg.addVector(values[i]); - } - break; - case 2: - var value = new proto.payload.v1.Search.Config; - reader.readMessage(value,proto.payload.v1.Search.Config.deserializeBinaryFromReader); - msg.setConfig(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.payload.v1.Search.Request.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.payload.v1.Search.Request.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.payload.v1.Search.Request} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.payload.v1.Search.Request.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getVectorList(); - if (f.length > 0) { - writer.writePackedFloat( - 1, - f - ); - } - f = message.getConfig(); - if (f != null) { - writer.writeMessage( - 2, - f, - proto.payload.v1.Search.Config.serializeBinaryToWriter - ); - } -}; - - -/** - * repeated float vector = 1; - * @return {!Array} - */ -proto.payload.v1.Search.Request.prototype.getVectorList = function() { - return /** @type {!Array} */ (jspb.Message.getRepeatedFloatingPointField(this, 1)); -}; - - -/** - * @param {!Array} value - * @return {!proto.payload.v1.Search.Request} returns this - */ -proto.payload.v1.Search.Request.prototype.setVectorList = function(value) { - return jspb.Message.setField(this, 1, value || []); -}; - - -/** - * @param {number} value - * @param {number=} opt_index - * @return {!proto.payload.v1.Search.Request} returns this - */ -proto.payload.v1.Search.Request.prototype.addVector = function(value, opt_index) { - return jspb.Message.addToRepeatedField(this, 1, value, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.payload.v1.Search.Request} returns this - */ -proto.payload.v1.Search.Request.prototype.clearVectorList = function() { - return this.setVectorList([]); -}; - - -/** - * optional Config config = 2; - * @return {?proto.payload.v1.Search.Config} - */ -proto.payload.v1.Search.Request.prototype.getConfig = function() { - return /** @type{?proto.payload.v1.Search.Config} */ ( - jspb.Message.getWrapperField(this, proto.payload.v1.Search.Config, 2)); -}; - - -/** - * @param {?proto.payload.v1.Search.Config|undefined} value - * @return {!proto.payload.v1.Search.Request} returns this -*/ -proto.payload.v1.Search.Request.prototype.setConfig = function(value) { - return jspb.Message.setWrapperField(this, 2, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.payload.v1.Search.Request} returns this - */ -proto.payload.v1.Search.Request.prototype.clearConfig = function() { - return this.setConfig(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.payload.v1.Search.Request.prototype.hasConfig = function() { - return jspb.Message.getField(this, 2) != null; -}; - - - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.payload.v1.Search.MultiRequest.repeatedFields_ = [1]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.payload.v1.Search.MultiRequest.prototype.toObject = function(opt_includeInstance) { - return proto.payload.v1.Search.MultiRequest.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.payload.v1.Search.MultiRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.payload.v1.Search.MultiRequest.toObject = function(includeInstance, msg) { - var f, obj = { - requestsList: jspb.Message.toObjectList(msg.getRequestsList(), - proto.payload.v1.Search.Request.toObject, includeInstance) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.payload.v1.Search.MultiRequest} - */ -proto.payload.v1.Search.MultiRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.payload.v1.Search.MultiRequest; - return proto.payload.v1.Search.MultiRequest.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.payload.v1.Search.MultiRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.payload.v1.Search.MultiRequest} - */ -proto.payload.v1.Search.MultiRequest.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.payload.v1.Search.Request; - reader.readMessage(value,proto.payload.v1.Search.Request.deserializeBinaryFromReader); - msg.addRequests(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.payload.v1.Search.MultiRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.payload.v1.Search.MultiRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.payload.v1.Search.MultiRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.payload.v1.Search.MultiRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getRequestsList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 1, - f, - proto.payload.v1.Search.Request.serializeBinaryToWriter - ); - } -}; - - -/** - * repeated Request requests = 1; - * @return {!Array} - */ -proto.payload.v1.Search.MultiRequest.prototype.getRequestsList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.payload.v1.Search.Request, 1)); -}; - - -/** - * @param {!Array} value - * @return {!proto.payload.v1.Search.MultiRequest} returns this -*/ -proto.payload.v1.Search.MultiRequest.prototype.setRequestsList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 1, value); -}; - - -/** - * @param {!proto.payload.v1.Search.Request=} opt_value - * @param {number=} opt_index - * @return {!proto.payload.v1.Search.Request} - */ -proto.payload.v1.Search.MultiRequest.prototype.addRequests = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.payload.v1.Search.Request, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.payload.v1.Search.MultiRequest} returns this - */ -proto.payload.v1.Search.MultiRequest.prototype.clearRequestsList = function() { - return this.setRequestsList([]); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.payload.v1.Search.IDRequest.prototype.toObject = function(opt_includeInstance) { - return proto.payload.v1.Search.IDRequest.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.payload.v1.Search.IDRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.payload.v1.Search.IDRequest.toObject = function(includeInstance, msg) { - var f, obj = { - id: jspb.Message.getFieldWithDefault(msg, 1, ""), - config: (f = msg.getConfig()) && proto.payload.v1.Search.Config.toObject(includeInstance, f) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.payload.v1.Search.IDRequest} - */ -proto.payload.v1.Search.IDRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.payload.v1.Search.IDRequest; - return proto.payload.v1.Search.IDRequest.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.payload.v1.Search.IDRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.payload.v1.Search.IDRequest} - */ -proto.payload.v1.Search.IDRequest.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setId(value); - break; - case 2: - var value = new proto.payload.v1.Search.Config; - reader.readMessage(value,proto.payload.v1.Search.Config.deserializeBinaryFromReader); - msg.setConfig(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.payload.v1.Search.IDRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.payload.v1.Search.IDRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.payload.v1.Search.IDRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.payload.v1.Search.IDRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getId(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getConfig(); - if (f != null) { - writer.writeMessage( - 2, - f, - proto.payload.v1.Search.Config.serializeBinaryToWriter - ); - } -}; - - -/** - * optional string id = 1; - * @return {string} - */ -proto.payload.v1.Search.IDRequest.prototype.getId = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.payload.v1.Search.IDRequest} returns this - */ -proto.payload.v1.Search.IDRequest.prototype.setId = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - -/** - * optional Config config = 2; - * @return {?proto.payload.v1.Search.Config} - */ -proto.payload.v1.Search.IDRequest.prototype.getConfig = function() { - return /** @type{?proto.payload.v1.Search.Config} */ ( - jspb.Message.getWrapperField(this, proto.payload.v1.Search.Config, 2)); -}; - - -/** - * @param {?proto.payload.v1.Search.Config|undefined} value - * @return {!proto.payload.v1.Search.IDRequest} returns this -*/ -proto.payload.v1.Search.IDRequest.prototype.setConfig = function(value) { - return jspb.Message.setWrapperField(this, 2, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.payload.v1.Search.IDRequest} returns this - */ -proto.payload.v1.Search.IDRequest.prototype.clearConfig = function() { - return this.setConfig(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.payload.v1.Search.IDRequest.prototype.hasConfig = function() { - return jspb.Message.getField(this, 2) != null; -}; - - - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.payload.v1.Search.MultiIDRequest.repeatedFields_ = [1]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.payload.v1.Search.MultiIDRequest.prototype.toObject = function(opt_includeInstance) { - return proto.payload.v1.Search.MultiIDRequest.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.payload.v1.Search.MultiIDRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.payload.v1.Search.MultiIDRequest.toObject = function(includeInstance, msg) { - var f, obj = { - requestsList: jspb.Message.toObjectList(msg.getRequestsList(), - proto.payload.v1.Search.IDRequest.toObject, includeInstance) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.payload.v1.Search.MultiIDRequest} - */ -proto.payload.v1.Search.MultiIDRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.payload.v1.Search.MultiIDRequest; - return proto.payload.v1.Search.MultiIDRequest.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.payload.v1.Search.MultiIDRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.payload.v1.Search.MultiIDRequest} - */ -proto.payload.v1.Search.MultiIDRequest.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.payload.v1.Search.IDRequest; - reader.readMessage(value,proto.payload.v1.Search.IDRequest.deserializeBinaryFromReader); - msg.addRequests(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.payload.v1.Search.MultiIDRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.payload.v1.Search.MultiIDRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.payload.v1.Search.MultiIDRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.payload.v1.Search.MultiIDRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getRequestsList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 1, - f, - proto.payload.v1.Search.IDRequest.serializeBinaryToWriter - ); - } -}; - - -/** - * repeated IDRequest requests = 1; - * @return {!Array} - */ -proto.payload.v1.Search.MultiIDRequest.prototype.getRequestsList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.payload.v1.Search.IDRequest, 1)); -}; - - -/** - * @param {!Array} value - * @return {!proto.payload.v1.Search.MultiIDRequest} returns this -*/ -proto.payload.v1.Search.MultiIDRequest.prototype.setRequestsList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 1, value); -}; - - -/** - * @param {!proto.payload.v1.Search.IDRequest=} opt_value - * @param {number=} opt_index - * @return {!proto.payload.v1.Search.IDRequest} - */ -proto.payload.v1.Search.MultiIDRequest.prototype.addRequests = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.payload.v1.Search.IDRequest, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.payload.v1.Search.MultiIDRequest} returns this - */ -proto.payload.v1.Search.MultiIDRequest.prototype.clearRequestsList = function() { - return this.setRequestsList([]); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.payload.v1.Search.ObjectRequest.prototype.toObject = function(opt_includeInstance) { - return proto.payload.v1.Search.ObjectRequest.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.payload.v1.Search.ObjectRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.payload.v1.Search.ObjectRequest.toObject = function(includeInstance, msg) { - var f, obj = { - object: msg.getObject_asB64(), - config: (f = msg.getConfig()) && proto.payload.v1.Search.Config.toObject(includeInstance, f), - vectorizer: (f = msg.getVectorizer()) && proto.payload.v1.Filter.Target.toObject(includeInstance, f) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.payload.v1.Search.ObjectRequest} - */ -proto.payload.v1.Search.ObjectRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.payload.v1.Search.ObjectRequest; - return proto.payload.v1.Search.ObjectRequest.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.payload.v1.Search.ObjectRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.payload.v1.Search.ObjectRequest} - */ -proto.payload.v1.Search.ObjectRequest.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setObject(value); - break; - case 2: - var value = new proto.payload.v1.Search.Config; - reader.readMessage(value,proto.payload.v1.Search.Config.deserializeBinaryFromReader); - msg.setConfig(value); - break; - case 3: - var value = new proto.payload.v1.Filter.Target; - reader.readMessage(value,proto.payload.v1.Filter.Target.deserializeBinaryFromReader); - msg.setVectorizer(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.payload.v1.Search.ObjectRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.payload.v1.Search.ObjectRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.payload.v1.Search.ObjectRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.payload.v1.Search.ObjectRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getObject_asU8(); - if (f.length > 0) { - writer.writeBytes( - 1, - f - ); - } - f = message.getConfig(); - if (f != null) { - writer.writeMessage( - 2, - f, - proto.payload.v1.Search.Config.serializeBinaryToWriter - ); - } - f = message.getVectorizer(); - if (f != null) { - writer.writeMessage( - 3, - f, - proto.payload.v1.Filter.Target.serializeBinaryToWriter - ); - } -}; - - -/** - * optional bytes object = 1; - * @return {string} - */ -proto.payload.v1.Search.ObjectRequest.prototype.getObject = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * optional bytes object = 1; - * This is a type-conversion wrapper around `getObject()` - * @return {string} - */ -proto.payload.v1.Search.ObjectRequest.prototype.getObject_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getObject())); -}; - - -/** - * optional bytes object = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getObject()` - * @return {!Uint8Array} - */ -proto.payload.v1.Search.ObjectRequest.prototype.getObject_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getObject())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.payload.v1.Search.ObjectRequest} returns this - */ -proto.payload.v1.Search.ObjectRequest.prototype.setObject = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); -}; - - -/** - * optional Config config = 2; - * @return {?proto.payload.v1.Search.Config} - */ -proto.payload.v1.Search.ObjectRequest.prototype.getConfig = function() { - return /** @type{?proto.payload.v1.Search.Config} */ ( - jspb.Message.getWrapperField(this, proto.payload.v1.Search.Config, 2)); -}; - - -/** - * @param {?proto.payload.v1.Search.Config|undefined} value - * @return {!proto.payload.v1.Search.ObjectRequest} returns this -*/ -proto.payload.v1.Search.ObjectRequest.prototype.setConfig = function(value) { - return jspb.Message.setWrapperField(this, 2, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.payload.v1.Search.ObjectRequest} returns this - */ -proto.payload.v1.Search.ObjectRequest.prototype.clearConfig = function() { - return this.setConfig(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.payload.v1.Search.ObjectRequest.prototype.hasConfig = function() { - return jspb.Message.getField(this, 2) != null; -}; - - -/** - * optional Filter.Target vectorizer = 3; - * @return {?proto.payload.v1.Filter.Target} - */ -proto.payload.v1.Search.ObjectRequest.prototype.getVectorizer = function() { - return /** @type{?proto.payload.v1.Filter.Target} */ ( - jspb.Message.getWrapperField(this, proto.payload.v1.Filter.Target, 3)); -}; - - -/** - * @param {?proto.payload.v1.Filter.Target|undefined} value - * @return {!proto.payload.v1.Search.ObjectRequest} returns this -*/ -proto.payload.v1.Search.ObjectRequest.prototype.setVectorizer = function(value) { - return jspb.Message.setWrapperField(this, 3, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.payload.v1.Search.ObjectRequest} returns this - */ -proto.payload.v1.Search.ObjectRequest.prototype.clearVectorizer = function() { - return this.setVectorizer(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.payload.v1.Search.ObjectRequest.prototype.hasVectorizer = function() { - return jspb.Message.getField(this, 3) != null; -}; - - - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.payload.v1.Search.MultiObjectRequest.repeatedFields_ = [1]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.payload.v1.Search.MultiObjectRequest.prototype.toObject = function(opt_includeInstance) { - return proto.payload.v1.Search.MultiObjectRequest.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.payload.v1.Search.MultiObjectRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.payload.v1.Search.MultiObjectRequest.toObject = function(includeInstance, msg) { - var f, obj = { - requestsList: jspb.Message.toObjectList(msg.getRequestsList(), - proto.payload.v1.Search.ObjectRequest.toObject, includeInstance) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.payload.v1.Search.MultiObjectRequest} - */ -proto.payload.v1.Search.MultiObjectRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.payload.v1.Search.MultiObjectRequest; - return proto.payload.v1.Search.MultiObjectRequest.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.payload.v1.Search.MultiObjectRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.payload.v1.Search.MultiObjectRequest} - */ -proto.payload.v1.Search.MultiObjectRequest.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.payload.v1.Search.ObjectRequest; - reader.readMessage(value,proto.payload.v1.Search.ObjectRequest.deserializeBinaryFromReader); - msg.addRequests(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.payload.v1.Search.MultiObjectRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.payload.v1.Search.MultiObjectRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.payload.v1.Search.MultiObjectRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.payload.v1.Search.MultiObjectRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getRequestsList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 1, - f, - proto.payload.v1.Search.ObjectRequest.serializeBinaryToWriter - ); - } -}; - - -/** - * repeated ObjectRequest requests = 1; - * @return {!Array} - */ -proto.payload.v1.Search.MultiObjectRequest.prototype.getRequestsList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.payload.v1.Search.ObjectRequest, 1)); -}; - - -/** - * @param {!Array} value - * @return {!proto.payload.v1.Search.MultiObjectRequest} returns this -*/ -proto.payload.v1.Search.MultiObjectRequest.prototype.setRequestsList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 1, value); -}; - - -/** - * @param {!proto.payload.v1.Search.ObjectRequest=} opt_value - * @param {number=} opt_index - * @return {!proto.payload.v1.Search.ObjectRequest} - */ -proto.payload.v1.Search.MultiObjectRequest.prototype.addRequests = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.payload.v1.Search.ObjectRequest, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.payload.v1.Search.MultiObjectRequest} returns this - */ -proto.payload.v1.Search.MultiObjectRequest.prototype.clearRequestsList = function() { - return this.setRequestsList([]); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.payload.v1.Search.Config.prototype.toObject = function(opt_includeInstance) { - return proto.payload.v1.Search.Config.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.payload.v1.Search.Config} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.payload.v1.Search.Config.toObject = function(includeInstance, msg) { - var f, obj = { - requestId: jspb.Message.getFieldWithDefault(msg, 1, ""), - num: jspb.Message.getFieldWithDefault(msg, 2, 0), - radius: jspb.Message.getFloatingPointFieldWithDefault(msg, 3, 0.0), - epsilon: jspb.Message.getFloatingPointFieldWithDefault(msg, 4, 0.0), - timeout: jspb.Message.getFieldWithDefault(msg, 5, 0), - ingressFilters: (f = msg.getIngressFilters()) && proto.payload.v1.Filter.Config.toObject(includeInstance, f), - egressFilters: (f = msg.getEgressFilters()) && proto.payload.v1.Filter.Config.toObject(includeInstance, f), - minNum: jspb.Message.getFieldWithDefault(msg, 8, 0), - aggregationAlgorithm: jspb.Message.getFieldWithDefault(msg, 9, 0) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.payload.v1.Search.Config} - */ -proto.payload.v1.Search.Config.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.payload.v1.Search.Config; - return proto.payload.v1.Search.Config.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.payload.v1.Search.Config} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.payload.v1.Search.Config} - */ -proto.payload.v1.Search.Config.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setRequestId(value); - break; - case 2: - var value = /** @type {number} */ (reader.readUint32()); - msg.setNum(value); - break; - case 3: - var value = /** @type {number} */ (reader.readFloat()); - msg.setRadius(value); - break; - case 4: - var value = /** @type {number} */ (reader.readFloat()); - msg.setEpsilon(value); - break; - case 5: - var value = /** @type {number} */ (reader.readInt64()); - msg.setTimeout(value); - break; - case 6: - var value = new proto.payload.v1.Filter.Config; - reader.readMessage(value,proto.payload.v1.Filter.Config.deserializeBinaryFromReader); - msg.setIngressFilters(value); - break; - case 7: - var value = new proto.payload.v1.Filter.Config; - reader.readMessage(value,proto.payload.v1.Filter.Config.deserializeBinaryFromReader); - msg.setEgressFilters(value); - break; - case 8: - var value = /** @type {number} */ (reader.readUint32()); - msg.setMinNum(value); - break; - case 9: - var value = /** @type {!proto.payload.v1.Search.AggregationAlgorithm} */ (reader.readEnum()); - msg.setAggregationAlgorithm(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.payload.v1.Search.Config.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.payload.v1.Search.Config.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.payload.v1.Search.Config} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.payload.v1.Search.Config.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getRequestId(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getNum(); - if (f !== 0) { - writer.writeUint32( - 2, - f - ); - } - f = message.getRadius(); - if (f !== 0.0) { - writer.writeFloat( - 3, - f - ); - } - f = message.getEpsilon(); - if (f !== 0.0) { - writer.writeFloat( - 4, - f - ); - } - f = message.getTimeout(); - if (f !== 0) { - writer.writeInt64( - 5, - f - ); - } - f = message.getIngressFilters(); - if (f != null) { - writer.writeMessage( - 6, - f, - proto.payload.v1.Filter.Config.serializeBinaryToWriter - ); - } - f = message.getEgressFilters(); - if (f != null) { - writer.writeMessage( - 7, - f, - proto.payload.v1.Filter.Config.serializeBinaryToWriter - ); - } - f = message.getMinNum(); - if (f !== 0) { - writer.writeUint32( - 8, - f - ); - } - f = message.getAggregationAlgorithm(); - if (f !== 0.0) { - writer.writeEnum( - 9, - f - ); - } -}; - - -/** - * optional string request_id = 1; - * @return {string} - */ -proto.payload.v1.Search.Config.prototype.getRequestId = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.payload.v1.Search.Config} returns this - */ -proto.payload.v1.Search.Config.prototype.setRequestId = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - -/** - * optional uint32 num = 2; - * @return {number} - */ -proto.payload.v1.Search.Config.prototype.getNum = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.payload.v1.Search.Config} returns this - */ -proto.payload.v1.Search.Config.prototype.setNum = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); -}; - - -/** - * optional float radius = 3; - * @return {number} - */ -proto.payload.v1.Search.Config.prototype.getRadius = function() { - return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 3, 0.0)); -}; - - -/** - * @param {number} value - * @return {!proto.payload.v1.Search.Config} returns this - */ -proto.payload.v1.Search.Config.prototype.setRadius = function(value) { - return jspb.Message.setProto3FloatField(this, 3, value); -}; - - -/** - * optional float epsilon = 4; - * @return {number} - */ -proto.payload.v1.Search.Config.prototype.getEpsilon = function() { - return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 4, 0.0)); -}; - - -/** - * @param {number} value - * @return {!proto.payload.v1.Search.Config} returns this - */ -proto.payload.v1.Search.Config.prototype.setEpsilon = function(value) { - return jspb.Message.setProto3FloatField(this, 4, value); -}; - - -/** - * optional int64 timeout = 5; - * @return {number} - */ -proto.payload.v1.Search.Config.prototype.getTimeout = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.payload.v1.Search.Config} returns this - */ -proto.payload.v1.Search.Config.prototype.setTimeout = function(value) { - return jspb.Message.setProto3IntField(this, 5, value); -}; - - -/** - * optional Filter.Config ingress_filters = 6; - * @return {?proto.payload.v1.Filter.Config} - */ -proto.payload.v1.Search.Config.prototype.getIngressFilters = function() { - return /** @type{?proto.payload.v1.Filter.Config} */ ( - jspb.Message.getWrapperField(this, proto.payload.v1.Filter.Config, 6)); -}; - - -/** - * @param {?proto.payload.v1.Filter.Config|undefined} value - * @return {!proto.payload.v1.Search.Config} returns this -*/ -proto.payload.v1.Search.Config.prototype.setIngressFilters = function(value) { - return jspb.Message.setWrapperField(this, 6, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.payload.v1.Search.Config} returns this - */ -proto.payload.v1.Search.Config.prototype.clearIngressFilters = function() { - return this.setIngressFilters(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.payload.v1.Search.Config.prototype.hasIngressFilters = function() { - return jspb.Message.getField(this, 6) != null; -}; - - -/** - * optional Filter.Config egress_filters = 7; - * @return {?proto.payload.v1.Filter.Config} - */ -proto.payload.v1.Search.Config.prototype.getEgressFilters = function() { - return /** @type{?proto.payload.v1.Filter.Config} */ ( - jspb.Message.getWrapperField(this, proto.payload.v1.Filter.Config, 7)); -}; - - -/** - * @param {?proto.payload.v1.Filter.Config|undefined} value - * @return {!proto.payload.v1.Search.Config} returns this -*/ -proto.payload.v1.Search.Config.prototype.setEgressFilters = function(value) { - return jspb.Message.setWrapperField(this, 7, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.payload.v1.Search.Config} returns this - */ -proto.payload.v1.Search.Config.prototype.clearEgressFilters = function() { - return this.setEgressFilters(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.payload.v1.Search.Config.prototype.hasEgressFilters = function() { - return jspb.Message.getField(this, 7) != null; -}; - - -/** - * optional uint32 min_num = 8; - * @return {number} - */ -proto.payload.v1.Search.Config.prototype.getMinNum = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 8, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.payload.v1.Search.Config} returns this - */ -proto.payload.v1.Search.Config.prototype.setMinNum = function(value) { - return jspb.Message.setProto3IntField(this, 8, value); -}; - - -/** - * optional AggregationAlgorithm aggregation_algorithm = 9; - * @return {!proto.payload.v1.Search.AggregationAlgorithm} - */ -proto.payload.v1.Search.Config.prototype.getAggregationAlgorithm = function() { - return /** @type {!proto.payload.v1.Search.AggregationAlgorithm} */ (jspb.Message.getFieldWithDefault(this, 9, 0)); -}; - - -/** - * @param {!proto.payload.v1.Search.AggregationAlgorithm} value - * @return {!proto.payload.v1.Search.Config} returns this - */ -proto.payload.v1.Search.Config.prototype.setAggregationAlgorithm = function(value) { - return jspb.Message.setProto3EnumField(this, 9, value); -}; - - - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.payload.v1.Search.Response.repeatedFields_ = [2]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.payload.v1.Search.Response.prototype.toObject = function(opt_includeInstance) { - return proto.payload.v1.Search.Response.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.payload.v1.Search.Response} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.payload.v1.Search.Response.toObject = function(includeInstance, msg) { - var f, obj = { - requestId: jspb.Message.getFieldWithDefault(msg, 1, ""), - resultsList: jspb.Message.toObjectList(msg.getResultsList(), - proto.payload.v1.Object.Distance.toObject, includeInstance) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.payload.v1.Search.Response} - */ -proto.payload.v1.Search.Response.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.payload.v1.Search.Response; - return proto.payload.v1.Search.Response.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.payload.v1.Search.Response} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.payload.v1.Search.Response} - */ -proto.payload.v1.Search.Response.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setRequestId(value); - break; - case 2: - var value = new proto.payload.v1.Object.Distance; - reader.readMessage(value,proto.payload.v1.Object.Distance.deserializeBinaryFromReader); - msg.addResults(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.payload.v1.Search.Response.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.payload.v1.Search.Response.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.payload.v1.Search.Response} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.payload.v1.Search.Response.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getRequestId(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getResultsList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 2, - f, - proto.payload.v1.Object.Distance.serializeBinaryToWriter - ); - } -}; - - -/** - * optional string request_id = 1; - * @return {string} - */ -proto.payload.v1.Search.Response.prototype.getRequestId = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.payload.v1.Search.Response} returns this - */ -proto.payload.v1.Search.Response.prototype.setRequestId = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - -/** - * repeated Object.Distance results = 2; - * @return {!Array} - */ -proto.payload.v1.Search.Response.prototype.getResultsList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.payload.v1.Object.Distance, 2)); -}; - - -/** - * @param {!Array} value - * @return {!proto.payload.v1.Search.Response} returns this -*/ -proto.payload.v1.Search.Response.prototype.setResultsList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 2, value); -}; - - -/** - * @param {!proto.payload.v1.Object.Distance=} opt_value - * @param {number=} opt_index - * @return {!proto.payload.v1.Object.Distance} - */ -proto.payload.v1.Search.Response.prototype.addResults = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.payload.v1.Object.Distance, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.payload.v1.Search.Response} returns this - */ -proto.payload.v1.Search.Response.prototype.clearResultsList = function() { - return this.setResultsList([]); -}; - - - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.payload.v1.Search.Responses.repeatedFields_ = [1]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.payload.v1.Search.Responses.prototype.toObject = function(opt_includeInstance) { - return proto.payload.v1.Search.Responses.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.payload.v1.Search.Responses} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.payload.v1.Search.Responses.toObject = function(includeInstance, msg) { - var f, obj = { - responsesList: jspb.Message.toObjectList(msg.getResponsesList(), - proto.payload.v1.Search.Response.toObject, includeInstance) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.payload.v1.Search.Responses} - */ -proto.payload.v1.Search.Responses.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.payload.v1.Search.Responses; - return proto.payload.v1.Search.Responses.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.payload.v1.Search.Responses} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.payload.v1.Search.Responses} - */ -proto.payload.v1.Search.Responses.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.payload.v1.Search.Response; - reader.readMessage(value,proto.payload.v1.Search.Response.deserializeBinaryFromReader); - msg.addResponses(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.payload.v1.Search.Responses.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.payload.v1.Search.Responses.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.payload.v1.Search.Responses} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.payload.v1.Search.Responses.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getResponsesList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 1, - f, - proto.payload.v1.Search.Response.serializeBinaryToWriter - ); - } -}; - - -/** - * repeated Response responses = 1; - * @return {!Array} - */ -proto.payload.v1.Search.Responses.prototype.getResponsesList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.payload.v1.Search.Response, 1)); -}; - - -/** - * @param {!Array} value - * @return {!proto.payload.v1.Search.Responses} returns this -*/ -proto.payload.v1.Search.Responses.prototype.setResponsesList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 1, value); -}; - - -/** - * @param {!proto.payload.v1.Search.Response=} opt_value - * @param {number=} opt_index - * @return {!proto.payload.v1.Search.Response} - */ -proto.payload.v1.Search.Responses.prototype.addResponses = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.payload.v1.Search.Response, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.payload.v1.Search.Responses} returns this - */ -proto.payload.v1.Search.Responses.prototype.clearResponsesList = function() { - return this.setResponsesList([]); -}; - - - -/** - * Oneof group definitions for this message. Each group defines the field - * numbers belonging to that group. When of these fields' value is set, all - * other fields in the group are cleared. During deserialization, if multiple - * fields are encountered for a group, only the last value seen will be kept. - * @private {!Array>} - * @const - */ -proto.payload.v1.Search.StreamResponse.oneofGroups_ = [[1,2]]; - -/** - * @enum {number} - */ -proto.payload.v1.Search.StreamResponse.PayloadCase = { - PAYLOAD_NOT_SET: 0, - RESPONSE: 1, - STATUS: 2 -}; - -/** - * @return {proto.payload.v1.Search.StreamResponse.PayloadCase} - */ -proto.payload.v1.Search.StreamResponse.prototype.getPayloadCase = function() { - return /** @type {proto.payload.v1.Search.StreamResponse.PayloadCase} */(jspb.Message.computeOneofCase(this, proto.payload.v1.Search.StreamResponse.oneofGroups_[0])); -}; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.payload.v1.Search.StreamResponse.prototype.toObject = function(opt_includeInstance) { - return proto.payload.v1.Search.StreamResponse.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.payload.v1.Search.StreamResponse} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.payload.v1.Search.StreamResponse.toObject = function(includeInstance, msg) { - var f, obj = { - response: (f = msg.getResponse()) && proto.payload.v1.Search.Response.toObject(includeInstance, f), - status: (f = msg.getStatus()) && google_rpc_status_pb.Status.toObject(includeInstance, f) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.payload.v1.Search.StreamResponse} - */ -proto.payload.v1.Search.StreamResponse.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.payload.v1.Search.StreamResponse; - return proto.payload.v1.Search.StreamResponse.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.payload.v1.Search.StreamResponse} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.payload.v1.Search.StreamResponse} - */ -proto.payload.v1.Search.StreamResponse.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.payload.v1.Search.Response; - reader.readMessage(value,proto.payload.v1.Search.Response.deserializeBinaryFromReader); - msg.setResponse(value); - break; - case 2: - var value = new google_rpc_status_pb.Status; - reader.readMessage(value,google_rpc_status_pb.Status.deserializeBinaryFromReader); - msg.setStatus(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.payload.v1.Search.StreamResponse.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.payload.v1.Search.StreamResponse.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.payload.v1.Search.StreamResponse} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.payload.v1.Search.StreamResponse.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getResponse(); - if (f != null) { - writer.writeMessage( - 1, - f, - proto.payload.v1.Search.Response.serializeBinaryToWriter - ); - } - f = message.getStatus(); - if (f != null) { - writer.writeMessage( - 2, - f, - google_rpc_status_pb.Status.serializeBinaryToWriter - ); - } -}; - - -/** - * optional Response response = 1; - * @return {?proto.payload.v1.Search.Response} - */ -proto.payload.v1.Search.StreamResponse.prototype.getResponse = function() { - return /** @type{?proto.payload.v1.Search.Response} */ ( - jspb.Message.getWrapperField(this, proto.payload.v1.Search.Response, 1)); -}; - - -/** - * @param {?proto.payload.v1.Search.Response|undefined} value - * @return {!proto.payload.v1.Search.StreamResponse} returns this -*/ -proto.payload.v1.Search.StreamResponse.prototype.setResponse = function(value) { - return jspb.Message.setOneofWrapperField(this, 1, proto.payload.v1.Search.StreamResponse.oneofGroups_[0], value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.payload.v1.Search.StreamResponse} returns this - */ -proto.payload.v1.Search.StreamResponse.prototype.clearResponse = function() { - return this.setResponse(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.payload.v1.Search.StreamResponse.prototype.hasResponse = function() { - return jspb.Message.getField(this, 1) != null; -}; - - -/** - * optional google.rpc.Status status = 2; - * @return {?proto.google.rpc.Status} - */ -proto.payload.v1.Search.StreamResponse.prototype.getStatus = function() { - return /** @type{?proto.google.rpc.Status} */ ( - jspb.Message.getWrapperField(this, google_rpc_status_pb.Status, 2)); -}; - - -/** - * @param {?proto.google.rpc.Status|undefined} value - * @return {!proto.payload.v1.Search.StreamResponse} returns this -*/ -proto.payload.v1.Search.StreamResponse.prototype.setStatus = function(value) { - return jspb.Message.setOneofWrapperField(this, 2, proto.payload.v1.Search.StreamResponse.oneofGroups_[0], value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.payload.v1.Search.StreamResponse} returns this - */ -proto.payload.v1.Search.StreamResponse.prototype.clearStatus = function() { - return this.setStatus(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.payload.v1.Search.StreamResponse.prototype.hasStatus = function() { - return jspb.Message.getField(this, 2) != null; -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.payload.v1.Filter.prototype.toObject = function(opt_includeInstance) { - return proto.payload.v1.Filter.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.payload.v1.Filter} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.payload.v1.Filter.toObject = function(includeInstance, msg) { - var f, obj = { - - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.payload.v1.Filter} - */ -proto.payload.v1.Filter.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.payload.v1.Filter; - return proto.payload.v1.Filter.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.payload.v1.Filter} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.payload.v1.Filter} - */ -proto.payload.v1.Filter.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.payload.v1.Filter.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.payload.v1.Filter.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.payload.v1.Filter} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.payload.v1.Filter.serializeBinaryToWriter = function(message, writer) { - var f = undefined; -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.payload.v1.Filter.Target.prototype.toObject = function(opt_includeInstance) { - return proto.payload.v1.Filter.Target.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.payload.v1.Filter.Target} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.payload.v1.Filter.Target.toObject = function(includeInstance, msg) { - var f, obj = { - host: jspb.Message.getFieldWithDefault(msg, 1, ""), - port: jspb.Message.getFieldWithDefault(msg, 2, 0) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.payload.v1.Filter.Target} - */ -proto.payload.v1.Filter.Target.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.payload.v1.Filter.Target; - return proto.payload.v1.Filter.Target.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.payload.v1.Filter.Target} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.payload.v1.Filter.Target} - */ -proto.payload.v1.Filter.Target.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setHost(value); - break; - case 2: - var value = /** @type {number} */ (reader.readUint32()); - msg.setPort(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.payload.v1.Filter.Target.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.payload.v1.Filter.Target.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.payload.v1.Filter.Target} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.payload.v1.Filter.Target.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getHost(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getPort(); - if (f !== 0) { - writer.writeUint32( - 2, - f - ); - } -}; - - -/** - * optional string host = 1; - * @return {string} - */ -proto.payload.v1.Filter.Target.prototype.getHost = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.payload.v1.Filter.Target} returns this - */ -proto.payload.v1.Filter.Target.prototype.setHost = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - -/** - * optional uint32 port = 2; - * @return {number} - */ -proto.payload.v1.Filter.Target.prototype.getPort = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.payload.v1.Filter.Target} returns this - */ -proto.payload.v1.Filter.Target.prototype.setPort = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); -}; - - - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.payload.v1.Filter.Config.repeatedFields_ = [1]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.payload.v1.Filter.Config.prototype.toObject = function(opt_includeInstance) { - return proto.payload.v1.Filter.Config.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.payload.v1.Filter.Config} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.payload.v1.Filter.Config.toObject = function(includeInstance, msg) { - var f, obj = { - targetsList: jspb.Message.toObjectList(msg.getTargetsList(), - proto.payload.v1.Filter.Target.toObject, includeInstance) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.payload.v1.Filter.Config} - */ -proto.payload.v1.Filter.Config.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.payload.v1.Filter.Config; - return proto.payload.v1.Filter.Config.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.payload.v1.Filter.Config} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.payload.v1.Filter.Config} - */ -proto.payload.v1.Filter.Config.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.payload.v1.Filter.Target; - reader.readMessage(value,proto.payload.v1.Filter.Target.deserializeBinaryFromReader); - msg.addTargets(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.payload.v1.Filter.Config.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.payload.v1.Filter.Config.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.payload.v1.Filter.Config} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.payload.v1.Filter.Config.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getTargetsList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 1, - f, - proto.payload.v1.Filter.Target.serializeBinaryToWriter - ); - } -}; - - -/** - * repeated Target targets = 1; - * @return {!Array} - */ -proto.payload.v1.Filter.Config.prototype.getTargetsList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.payload.v1.Filter.Target, 1)); -}; - - -/** - * @param {!Array} value - * @return {!proto.payload.v1.Filter.Config} returns this -*/ -proto.payload.v1.Filter.Config.prototype.setTargetsList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 1, value); -}; - - -/** - * @param {!proto.payload.v1.Filter.Target=} opt_value - * @param {number=} opt_index - * @return {!proto.payload.v1.Filter.Target} - */ -proto.payload.v1.Filter.Config.prototype.addTargets = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.payload.v1.Filter.Target, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.payload.v1.Filter.Config} returns this - */ -proto.payload.v1.Filter.Config.prototype.clearTargetsList = function() { - return this.setTargetsList([]); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.payload.v1.Insert.prototype.toObject = function(opt_includeInstance) { - return proto.payload.v1.Insert.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.payload.v1.Insert} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.payload.v1.Insert.toObject = function(includeInstance, msg) { - var f, obj = { - - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.payload.v1.Insert} - */ -proto.payload.v1.Insert.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.payload.v1.Insert; - return proto.payload.v1.Insert.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.payload.v1.Insert} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.payload.v1.Insert} - */ -proto.payload.v1.Insert.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.payload.v1.Insert.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.payload.v1.Insert.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.payload.v1.Insert} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.payload.v1.Insert.serializeBinaryToWriter = function(message, writer) { - var f = undefined; -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.payload.v1.Insert.Request.prototype.toObject = function(opt_includeInstance) { - return proto.payload.v1.Insert.Request.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.payload.v1.Insert.Request} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.payload.v1.Insert.Request.toObject = function(includeInstance, msg) { - var f, obj = { - vector: (f = msg.getVector()) && proto.payload.v1.Object.Vector.toObject(includeInstance, f), - config: (f = msg.getConfig()) && proto.payload.v1.Insert.Config.toObject(includeInstance, f) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.payload.v1.Insert.Request} - */ -proto.payload.v1.Insert.Request.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.payload.v1.Insert.Request; - return proto.payload.v1.Insert.Request.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.payload.v1.Insert.Request} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.payload.v1.Insert.Request} - */ -proto.payload.v1.Insert.Request.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.payload.v1.Object.Vector; - reader.readMessage(value,proto.payload.v1.Object.Vector.deserializeBinaryFromReader); - msg.setVector(value); - break; - case 2: - var value = new proto.payload.v1.Insert.Config; - reader.readMessage(value,proto.payload.v1.Insert.Config.deserializeBinaryFromReader); - msg.setConfig(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.payload.v1.Insert.Request.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.payload.v1.Insert.Request.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.payload.v1.Insert.Request} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.payload.v1.Insert.Request.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getVector(); - if (f != null) { - writer.writeMessage( - 1, - f, - proto.payload.v1.Object.Vector.serializeBinaryToWriter - ); - } - f = message.getConfig(); - if (f != null) { - writer.writeMessage( - 2, - f, - proto.payload.v1.Insert.Config.serializeBinaryToWriter - ); - } -}; - - -/** - * optional Object.Vector vector = 1; - * @return {?proto.payload.v1.Object.Vector} - */ -proto.payload.v1.Insert.Request.prototype.getVector = function() { - return /** @type{?proto.payload.v1.Object.Vector} */ ( - jspb.Message.getWrapperField(this, proto.payload.v1.Object.Vector, 1)); -}; - - -/** - * @param {?proto.payload.v1.Object.Vector|undefined} value - * @return {!proto.payload.v1.Insert.Request} returns this -*/ -proto.payload.v1.Insert.Request.prototype.setVector = function(value) { - return jspb.Message.setWrapperField(this, 1, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.payload.v1.Insert.Request} returns this - */ -proto.payload.v1.Insert.Request.prototype.clearVector = function() { - return this.setVector(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.payload.v1.Insert.Request.prototype.hasVector = function() { - return jspb.Message.getField(this, 1) != null; -}; - - -/** - * optional Config config = 2; - * @return {?proto.payload.v1.Insert.Config} - */ -proto.payload.v1.Insert.Request.prototype.getConfig = function() { - return /** @type{?proto.payload.v1.Insert.Config} */ ( - jspb.Message.getWrapperField(this, proto.payload.v1.Insert.Config, 2)); -}; - - -/** - * @param {?proto.payload.v1.Insert.Config|undefined} value - * @return {!proto.payload.v1.Insert.Request} returns this -*/ -proto.payload.v1.Insert.Request.prototype.setConfig = function(value) { - return jspb.Message.setWrapperField(this, 2, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.payload.v1.Insert.Request} returns this - */ -proto.payload.v1.Insert.Request.prototype.clearConfig = function() { - return this.setConfig(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.payload.v1.Insert.Request.prototype.hasConfig = function() { - return jspb.Message.getField(this, 2) != null; -}; - - - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.payload.v1.Insert.MultiRequest.repeatedFields_ = [1]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.payload.v1.Insert.MultiRequest.prototype.toObject = function(opt_includeInstance) { - return proto.payload.v1.Insert.MultiRequest.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.payload.v1.Insert.MultiRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.payload.v1.Insert.MultiRequest.toObject = function(includeInstance, msg) { - var f, obj = { - requestsList: jspb.Message.toObjectList(msg.getRequestsList(), - proto.payload.v1.Insert.Request.toObject, includeInstance) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.payload.v1.Insert.MultiRequest} - */ -proto.payload.v1.Insert.MultiRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.payload.v1.Insert.MultiRequest; - return proto.payload.v1.Insert.MultiRequest.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.payload.v1.Insert.MultiRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.payload.v1.Insert.MultiRequest} - */ -proto.payload.v1.Insert.MultiRequest.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.payload.v1.Insert.Request; - reader.readMessage(value,proto.payload.v1.Insert.Request.deserializeBinaryFromReader); - msg.addRequests(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.payload.v1.Insert.MultiRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.payload.v1.Insert.MultiRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.payload.v1.Insert.MultiRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.payload.v1.Insert.MultiRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getRequestsList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 1, - f, - proto.payload.v1.Insert.Request.serializeBinaryToWriter - ); - } -}; - - -/** - * repeated Request requests = 1; - * @return {!Array} - */ -proto.payload.v1.Insert.MultiRequest.prototype.getRequestsList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.payload.v1.Insert.Request, 1)); -}; - - -/** - * @param {!Array} value - * @return {!proto.payload.v1.Insert.MultiRequest} returns this -*/ -proto.payload.v1.Insert.MultiRequest.prototype.setRequestsList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 1, value); -}; - - -/** - * @param {!proto.payload.v1.Insert.Request=} opt_value - * @param {number=} opt_index - * @return {!proto.payload.v1.Insert.Request} - */ -proto.payload.v1.Insert.MultiRequest.prototype.addRequests = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.payload.v1.Insert.Request, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.payload.v1.Insert.MultiRequest} returns this - */ -proto.payload.v1.Insert.MultiRequest.prototype.clearRequestsList = function() { - return this.setRequestsList([]); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.payload.v1.Insert.ObjectRequest.prototype.toObject = function(opt_includeInstance) { - return proto.payload.v1.Insert.ObjectRequest.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.payload.v1.Insert.ObjectRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.payload.v1.Insert.ObjectRequest.toObject = function(includeInstance, msg) { - var f, obj = { - object: (f = msg.getObject()) && proto.payload.v1.Object.Blob.toObject(includeInstance, f), - config: (f = msg.getConfig()) && proto.payload.v1.Insert.Config.toObject(includeInstance, f), - vectorizer: (f = msg.getVectorizer()) && proto.payload.v1.Filter.Target.toObject(includeInstance, f) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.payload.v1.Insert.ObjectRequest} - */ -proto.payload.v1.Insert.ObjectRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.payload.v1.Insert.ObjectRequest; - return proto.payload.v1.Insert.ObjectRequest.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.payload.v1.Insert.ObjectRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.payload.v1.Insert.ObjectRequest} - */ -proto.payload.v1.Insert.ObjectRequest.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.payload.v1.Object.Blob; - reader.readMessage(value,proto.payload.v1.Object.Blob.deserializeBinaryFromReader); - msg.setObject(value); - break; - case 2: - var value = new proto.payload.v1.Insert.Config; - reader.readMessage(value,proto.payload.v1.Insert.Config.deserializeBinaryFromReader); - msg.setConfig(value); - break; - case 3: - var value = new proto.payload.v1.Filter.Target; - reader.readMessage(value,proto.payload.v1.Filter.Target.deserializeBinaryFromReader); - msg.setVectorizer(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.payload.v1.Insert.ObjectRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.payload.v1.Insert.ObjectRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.payload.v1.Insert.ObjectRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.payload.v1.Insert.ObjectRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getObject(); - if (f != null) { - writer.writeMessage( - 1, - f, - proto.payload.v1.Object.Blob.serializeBinaryToWriter - ); - } - f = message.getConfig(); - if (f != null) { - writer.writeMessage( - 2, - f, - proto.payload.v1.Insert.Config.serializeBinaryToWriter - ); - } - f = message.getVectorizer(); - if (f != null) { - writer.writeMessage( - 3, - f, - proto.payload.v1.Filter.Target.serializeBinaryToWriter - ); - } -}; - - -/** - * optional Object.Blob object = 1; - * @return {?proto.payload.v1.Object.Blob} - */ -proto.payload.v1.Insert.ObjectRequest.prototype.getObject = function() { - return /** @type{?proto.payload.v1.Object.Blob} */ ( - jspb.Message.getWrapperField(this, proto.payload.v1.Object.Blob, 1)); -}; - - -/** - * @param {?proto.payload.v1.Object.Blob|undefined} value - * @return {!proto.payload.v1.Insert.ObjectRequest} returns this -*/ -proto.payload.v1.Insert.ObjectRequest.prototype.setObject = function(value) { - return jspb.Message.setWrapperField(this, 1, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.payload.v1.Insert.ObjectRequest} returns this - */ -proto.payload.v1.Insert.ObjectRequest.prototype.clearObject = function() { - return this.setObject(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.payload.v1.Insert.ObjectRequest.prototype.hasObject = function() { - return jspb.Message.getField(this, 1) != null; -}; - - -/** - * optional Config config = 2; - * @return {?proto.payload.v1.Insert.Config} - */ -proto.payload.v1.Insert.ObjectRequest.prototype.getConfig = function() { - return /** @type{?proto.payload.v1.Insert.Config} */ ( - jspb.Message.getWrapperField(this, proto.payload.v1.Insert.Config, 2)); -}; - - -/** - * @param {?proto.payload.v1.Insert.Config|undefined} value - * @return {!proto.payload.v1.Insert.ObjectRequest} returns this -*/ -proto.payload.v1.Insert.ObjectRequest.prototype.setConfig = function(value) { - return jspb.Message.setWrapperField(this, 2, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.payload.v1.Insert.ObjectRequest} returns this - */ -proto.payload.v1.Insert.ObjectRequest.prototype.clearConfig = function() { - return this.setConfig(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.payload.v1.Insert.ObjectRequest.prototype.hasConfig = function() { - return jspb.Message.getField(this, 2) != null; -}; - - -/** - * optional Filter.Target vectorizer = 3; - * @return {?proto.payload.v1.Filter.Target} - */ -proto.payload.v1.Insert.ObjectRequest.prototype.getVectorizer = function() { - return /** @type{?proto.payload.v1.Filter.Target} */ ( - jspb.Message.getWrapperField(this, proto.payload.v1.Filter.Target, 3)); -}; - - -/** - * @param {?proto.payload.v1.Filter.Target|undefined} value - * @return {!proto.payload.v1.Insert.ObjectRequest} returns this -*/ -proto.payload.v1.Insert.ObjectRequest.prototype.setVectorizer = function(value) { - return jspb.Message.setWrapperField(this, 3, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.payload.v1.Insert.ObjectRequest} returns this - */ -proto.payload.v1.Insert.ObjectRequest.prototype.clearVectorizer = function() { - return this.setVectorizer(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.payload.v1.Insert.ObjectRequest.prototype.hasVectorizer = function() { - return jspb.Message.getField(this, 3) != null; -}; - - - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.payload.v1.Insert.MultiObjectRequest.repeatedFields_ = [1]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.payload.v1.Insert.MultiObjectRequest.prototype.toObject = function(opt_includeInstance) { - return proto.payload.v1.Insert.MultiObjectRequest.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.payload.v1.Insert.MultiObjectRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.payload.v1.Insert.MultiObjectRequest.toObject = function(includeInstance, msg) { - var f, obj = { - requestsList: jspb.Message.toObjectList(msg.getRequestsList(), - proto.payload.v1.Insert.ObjectRequest.toObject, includeInstance) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.payload.v1.Insert.MultiObjectRequest} - */ -proto.payload.v1.Insert.MultiObjectRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.payload.v1.Insert.MultiObjectRequest; - return proto.payload.v1.Insert.MultiObjectRequest.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.payload.v1.Insert.MultiObjectRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.payload.v1.Insert.MultiObjectRequest} - */ -proto.payload.v1.Insert.MultiObjectRequest.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.payload.v1.Insert.ObjectRequest; - reader.readMessage(value,proto.payload.v1.Insert.ObjectRequest.deserializeBinaryFromReader); - msg.addRequests(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.payload.v1.Insert.MultiObjectRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.payload.v1.Insert.MultiObjectRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.payload.v1.Insert.MultiObjectRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.payload.v1.Insert.MultiObjectRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getRequestsList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 1, - f, - proto.payload.v1.Insert.ObjectRequest.serializeBinaryToWriter - ); - } -}; - - -/** - * repeated ObjectRequest requests = 1; - * @return {!Array} - */ -proto.payload.v1.Insert.MultiObjectRequest.prototype.getRequestsList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.payload.v1.Insert.ObjectRequest, 1)); -}; - - -/** - * @param {!Array} value - * @return {!proto.payload.v1.Insert.MultiObjectRequest} returns this -*/ -proto.payload.v1.Insert.MultiObjectRequest.prototype.setRequestsList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 1, value); -}; - - -/** - * @param {!proto.payload.v1.Insert.ObjectRequest=} opt_value - * @param {number=} opt_index - * @return {!proto.payload.v1.Insert.ObjectRequest} - */ -proto.payload.v1.Insert.MultiObjectRequest.prototype.addRequests = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.payload.v1.Insert.ObjectRequest, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.payload.v1.Insert.MultiObjectRequest} returns this - */ -proto.payload.v1.Insert.MultiObjectRequest.prototype.clearRequestsList = function() { - return this.setRequestsList([]); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.payload.v1.Insert.Config.prototype.toObject = function(opt_includeInstance) { - return proto.payload.v1.Insert.Config.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.payload.v1.Insert.Config} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.payload.v1.Insert.Config.toObject = function(includeInstance, msg) { - var f, obj = { - skipStrictExistCheck: jspb.Message.getBooleanFieldWithDefault(msg, 1, false), - filters: (f = msg.getFilters()) && proto.payload.v1.Filter.Config.toObject(includeInstance, f), - timestamp: jspb.Message.getFieldWithDefault(msg, 3, 0) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.payload.v1.Insert.Config} - */ -proto.payload.v1.Insert.Config.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.payload.v1.Insert.Config; - return proto.payload.v1.Insert.Config.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.payload.v1.Insert.Config} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.payload.v1.Insert.Config} - */ -proto.payload.v1.Insert.Config.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setSkipStrictExistCheck(value); - break; - case 2: - var value = new proto.payload.v1.Filter.Config; - reader.readMessage(value,proto.payload.v1.Filter.Config.deserializeBinaryFromReader); - msg.setFilters(value); - break; - case 3: - var value = /** @type {number} */ (reader.readInt64()); - msg.setTimestamp(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.payload.v1.Insert.Config.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.payload.v1.Insert.Config.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.payload.v1.Insert.Config} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.payload.v1.Insert.Config.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getSkipStrictExistCheck(); - if (f) { - writer.writeBool( - 1, - f - ); - } - f = message.getFilters(); - if (f != null) { - writer.writeMessage( - 2, - f, - proto.payload.v1.Filter.Config.serializeBinaryToWriter - ); - } - f = message.getTimestamp(); - if (f !== 0) { - writer.writeInt64( - 3, - f - ); - } -}; - - -/** - * optional bool skip_strict_exist_check = 1; - * @return {boolean} - */ -proto.payload.v1.Insert.Config.prototype.getSkipStrictExistCheck = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 1, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.payload.v1.Insert.Config} returns this - */ -proto.payload.v1.Insert.Config.prototype.setSkipStrictExistCheck = function(value) { - return jspb.Message.setProto3BooleanField(this, 1, value); -}; - - -/** - * optional Filter.Config filters = 2; - * @return {?proto.payload.v1.Filter.Config} - */ -proto.payload.v1.Insert.Config.prototype.getFilters = function() { - return /** @type{?proto.payload.v1.Filter.Config} */ ( - jspb.Message.getWrapperField(this, proto.payload.v1.Filter.Config, 2)); -}; - - -/** - * @param {?proto.payload.v1.Filter.Config|undefined} value - * @return {!proto.payload.v1.Insert.Config} returns this -*/ -proto.payload.v1.Insert.Config.prototype.setFilters = function(value) { - return jspb.Message.setWrapperField(this, 2, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.payload.v1.Insert.Config} returns this - */ -proto.payload.v1.Insert.Config.prototype.clearFilters = function() { - return this.setFilters(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.payload.v1.Insert.Config.prototype.hasFilters = function() { - return jspb.Message.getField(this, 2) != null; -}; - - -/** - * optional int64 timestamp = 3; - * @return {number} - */ -proto.payload.v1.Insert.Config.prototype.getTimestamp = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.payload.v1.Insert.Config} returns this - */ -proto.payload.v1.Insert.Config.prototype.setTimestamp = function(value) { - return jspb.Message.setProto3IntField(this, 3, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.payload.v1.Update.prototype.toObject = function(opt_includeInstance) { - return proto.payload.v1.Update.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.payload.v1.Update} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.payload.v1.Update.toObject = function(includeInstance, msg) { - var f, obj = { - - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.payload.v1.Update} - */ -proto.payload.v1.Update.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.payload.v1.Update; - return proto.payload.v1.Update.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.payload.v1.Update} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.payload.v1.Update} - */ -proto.payload.v1.Update.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.payload.v1.Update.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.payload.v1.Update.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.payload.v1.Update} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.payload.v1.Update.serializeBinaryToWriter = function(message, writer) { - var f = undefined; -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.payload.v1.Update.Request.prototype.toObject = function(opt_includeInstance) { - return proto.payload.v1.Update.Request.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.payload.v1.Update.Request} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.payload.v1.Update.Request.toObject = function(includeInstance, msg) { - var f, obj = { - vector: (f = msg.getVector()) && proto.payload.v1.Object.Vector.toObject(includeInstance, f), - config: (f = msg.getConfig()) && proto.payload.v1.Update.Config.toObject(includeInstance, f) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.payload.v1.Update.Request} - */ -proto.payload.v1.Update.Request.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.payload.v1.Update.Request; - return proto.payload.v1.Update.Request.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.payload.v1.Update.Request} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.payload.v1.Update.Request} - */ -proto.payload.v1.Update.Request.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.payload.v1.Object.Vector; - reader.readMessage(value,proto.payload.v1.Object.Vector.deserializeBinaryFromReader); - msg.setVector(value); - break; - case 2: - var value = new proto.payload.v1.Update.Config; - reader.readMessage(value,proto.payload.v1.Update.Config.deserializeBinaryFromReader); - msg.setConfig(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.payload.v1.Update.Request.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.payload.v1.Update.Request.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.payload.v1.Update.Request} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.payload.v1.Update.Request.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getVector(); - if (f != null) { - writer.writeMessage( - 1, - f, - proto.payload.v1.Object.Vector.serializeBinaryToWriter - ); - } - f = message.getConfig(); - if (f != null) { - writer.writeMessage( - 2, - f, - proto.payload.v1.Update.Config.serializeBinaryToWriter - ); - } -}; - - -/** - * optional Object.Vector vector = 1; - * @return {?proto.payload.v1.Object.Vector} - */ -proto.payload.v1.Update.Request.prototype.getVector = function() { - return /** @type{?proto.payload.v1.Object.Vector} */ ( - jspb.Message.getWrapperField(this, proto.payload.v1.Object.Vector, 1)); -}; - - -/** - * @param {?proto.payload.v1.Object.Vector|undefined} value - * @return {!proto.payload.v1.Update.Request} returns this -*/ -proto.payload.v1.Update.Request.prototype.setVector = function(value) { - return jspb.Message.setWrapperField(this, 1, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.payload.v1.Update.Request} returns this - */ -proto.payload.v1.Update.Request.prototype.clearVector = function() { - return this.setVector(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.payload.v1.Update.Request.prototype.hasVector = function() { - return jspb.Message.getField(this, 1) != null; -}; - - -/** - * optional Config config = 2; - * @return {?proto.payload.v1.Update.Config} - */ -proto.payload.v1.Update.Request.prototype.getConfig = function() { - return /** @type{?proto.payload.v1.Update.Config} */ ( - jspb.Message.getWrapperField(this, proto.payload.v1.Update.Config, 2)); -}; - - -/** - * @param {?proto.payload.v1.Update.Config|undefined} value - * @return {!proto.payload.v1.Update.Request} returns this -*/ -proto.payload.v1.Update.Request.prototype.setConfig = function(value) { - return jspb.Message.setWrapperField(this, 2, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.payload.v1.Update.Request} returns this - */ -proto.payload.v1.Update.Request.prototype.clearConfig = function() { - return this.setConfig(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.payload.v1.Update.Request.prototype.hasConfig = function() { - return jspb.Message.getField(this, 2) != null; -}; - - - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.payload.v1.Update.MultiRequest.repeatedFields_ = [1]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.payload.v1.Update.MultiRequest.prototype.toObject = function(opt_includeInstance) { - return proto.payload.v1.Update.MultiRequest.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.payload.v1.Update.MultiRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.payload.v1.Update.MultiRequest.toObject = function(includeInstance, msg) { - var f, obj = { - requestsList: jspb.Message.toObjectList(msg.getRequestsList(), - proto.payload.v1.Update.Request.toObject, includeInstance) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.payload.v1.Update.MultiRequest} - */ -proto.payload.v1.Update.MultiRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.payload.v1.Update.MultiRequest; - return proto.payload.v1.Update.MultiRequest.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.payload.v1.Update.MultiRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.payload.v1.Update.MultiRequest} - */ -proto.payload.v1.Update.MultiRequest.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.payload.v1.Update.Request; - reader.readMessage(value,proto.payload.v1.Update.Request.deserializeBinaryFromReader); - msg.addRequests(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.payload.v1.Update.MultiRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.payload.v1.Update.MultiRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.payload.v1.Update.MultiRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.payload.v1.Update.MultiRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getRequestsList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 1, - f, - proto.payload.v1.Update.Request.serializeBinaryToWriter - ); - } -}; - - -/** - * repeated Request requests = 1; - * @return {!Array} - */ -proto.payload.v1.Update.MultiRequest.prototype.getRequestsList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.payload.v1.Update.Request, 1)); -}; - - -/** - * @param {!Array} value - * @return {!proto.payload.v1.Update.MultiRequest} returns this -*/ -proto.payload.v1.Update.MultiRequest.prototype.setRequestsList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 1, value); -}; - - -/** - * @param {!proto.payload.v1.Update.Request=} opt_value - * @param {number=} opt_index - * @return {!proto.payload.v1.Update.Request} - */ -proto.payload.v1.Update.MultiRequest.prototype.addRequests = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.payload.v1.Update.Request, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.payload.v1.Update.MultiRequest} returns this - */ -proto.payload.v1.Update.MultiRequest.prototype.clearRequestsList = function() { - return this.setRequestsList([]); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.payload.v1.Update.ObjectRequest.prototype.toObject = function(opt_includeInstance) { - return proto.payload.v1.Update.ObjectRequest.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.payload.v1.Update.ObjectRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.payload.v1.Update.ObjectRequest.toObject = function(includeInstance, msg) { - var f, obj = { - object: (f = msg.getObject()) && proto.payload.v1.Object.Blob.toObject(includeInstance, f), - config: (f = msg.getConfig()) && proto.payload.v1.Update.Config.toObject(includeInstance, f), - vectorizer: (f = msg.getVectorizer()) && proto.payload.v1.Filter.Target.toObject(includeInstance, f) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.payload.v1.Update.ObjectRequest} - */ -proto.payload.v1.Update.ObjectRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.payload.v1.Update.ObjectRequest; - return proto.payload.v1.Update.ObjectRequest.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.payload.v1.Update.ObjectRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.payload.v1.Update.ObjectRequest} - */ -proto.payload.v1.Update.ObjectRequest.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.payload.v1.Object.Blob; - reader.readMessage(value,proto.payload.v1.Object.Blob.deserializeBinaryFromReader); - msg.setObject(value); - break; - case 2: - var value = new proto.payload.v1.Update.Config; - reader.readMessage(value,proto.payload.v1.Update.Config.deserializeBinaryFromReader); - msg.setConfig(value); - break; - case 3: - var value = new proto.payload.v1.Filter.Target; - reader.readMessage(value,proto.payload.v1.Filter.Target.deserializeBinaryFromReader); - msg.setVectorizer(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.payload.v1.Update.ObjectRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.payload.v1.Update.ObjectRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.payload.v1.Update.ObjectRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.payload.v1.Update.ObjectRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getObject(); - if (f != null) { - writer.writeMessage( - 1, - f, - proto.payload.v1.Object.Blob.serializeBinaryToWriter - ); - } - f = message.getConfig(); - if (f != null) { - writer.writeMessage( - 2, - f, - proto.payload.v1.Update.Config.serializeBinaryToWriter - ); - } - f = message.getVectorizer(); - if (f != null) { - writer.writeMessage( - 3, - f, - proto.payload.v1.Filter.Target.serializeBinaryToWriter - ); - } -}; - - -/** - * optional Object.Blob object = 1; - * @return {?proto.payload.v1.Object.Blob} - */ -proto.payload.v1.Update.ObjectRequest.prototype.getObject = function() { - return /** @type{?proto.payload.v1.Object.Blob} */ ( - jspb.Message.getWrapperField(this, proto.payload.v1.Object.Blob, 1)); -}; - - -/** - * @param {?proto.payload.v1.Object.Blob|undefined} value - * @return {!proto.payload.v1.Update.ObjectRequest} returns this -*/ -proto.payload.v1.Update.ObjectRequest.prototype.setObject = function(value) { - return jspb.Message.setWrapperField(this, 1, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.payload.v1.Update.ObjectRequest} returns this - */ -proto.payload.v1.Update.ObjectRequest.prototype.clearObject = function() { - return this.setObject(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.payload.v1.Update.ObjectRequest.prototype.hasObject = function() { - return jspb.Message.getField(this, 1) != null; -}; - - -/** - * optional Config config = 2; - * @return {?proto.payload.v1.Update.Config} - */ -proto.payload.v1.Update.ObjectRequest.prototype.getConfig = function() { - return /** @type{?proto.payload.v1.Update.Config} */ ( - jspb.Message.getWrapperField(this, proto.payload.v1.Update.Config, 2)); -}; - - -/** - * @param {?proto.payload.v1.Update.Config|undefined} value - * @return {!proto.payload.v1.Update.ObjectRequest} returns this -*/ -proto.payload.v1.Update.ObjectRequest.prototype.setConfig = function(value) { - return jspb.Message.setWrapperField(this, 2, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.payload.v1.Update.ObjectRequest} returns this - */ -proto.payload.v1.Update.ObjectRequest.prototype.clearConfig = function() { - return this.setConfig(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.payload.v1.Update.ObjectRequest.prototype.hasConfig = function() { - return jspb.Message.getField(this, 2) != null; -}; - - -/** - * optional Filter.Target vectorizer = 3; - * @return {?proto.payload.v1.Filter.Target} - */ -proto.payload.v1.Update.ObjectRequest.prototype.getVectorizer = function() { - return /** @type{?proto.payload.v1.Filter.Target} */ ( - jspb.Message.getWrapperField(this, proto.payload.v1.Filter.Target, 3)); -}; - - -/** - * @param {?proto.payload.v1.Filter.Target|undefined} value - * @return {!proto.payload.v1.Update.ObjectRequest} returns this -*/ -proto.payload.v1.Update.ObjectRequest.prototype.setVectorizer = function(value) { - return jspb.Message.setWrapperField(this, 3, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.payload.v1.Update.ObjectRequest} returns this - */ -proto.payload.v1.Update.ObjectRequest.prototype.clearVectorizer = function() { - return this.setVectorizer(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.payload.v1.Update.ObjectRequest.prototype.hasVectorizer = function() { - return jspb.Message.getField(this, 3) != null; -}; - - - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.payload.v1.Update.MultiObjectRequest.repeatedFields_ = [1]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.payload.v1.Update.MultiObjectRequest.prototype.toObject = function(opt_includeInstance) { - return proto.payload.v1.Update.MultiObjectRequest.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.payload.v1.Update.MultiObjectRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.payload.v1.Update.MultiObjectRequest.toObject = function(includeInstance, msg) { - var f, obj = { - requestsList: jspb.Message.toObjectList(msg.getRequestsList(), - proto.payload.v1.Update.ObjectRequest.toObject, includeInstance) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.payload.v1.Update.MultiObjectRequest} - */ -proto.payload.v1.Update.MultiObjectRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.payload.v1.Update.MultiObjectRequest; - return proto.payload.v1.Update.MultiObjectRequest.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.payload.v1.Update.MultiObjectRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.payload.v1.Update.MultiObjectRequest} - */ -proto.payload.v1.Update.MultiObjectRequest.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.payload.v1.Update.ObjectRequest; - reader.readMessage(value,proto.payload.v1.Update.ObjectRequest.deserializeBinaryFromReader); - msg.addRequests(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.payload.v1.Update.MultiObjectRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.payload.v1.Update.MultiObjectRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.payload.v1.Update.MultiObjectRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.payload.v1.Update.MultiObjectRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getRequestsList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 1, - f, - proto.payload.v1.Update.ObjectRequest.serializeBinaryToWriter - ); - } -}; - - -/** - * repeated ObjectRequest requests = 1; - * @return {!Array} - */ -proto.payload.v1.Update.MultiObjectRequest.prototype.getRequestsList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.payload.v1.Update.ObjectRequest, 1)); -}; - - -/** - * @param {!Array} value - * @return {!proto.payload.v1.Update.MultiObjectRequest} returns this -*/ -proto.payload.v1.Update.MultiObjectRequest.prototype.setRequestsList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 1, value); -}; - - -/** - * @param {!proto.payload.v1.Update.ObjectRequest=} opt_value - * @param {number=} opt_index - * @return {!proto.payload.v1.Update.ObjectRequest} - */ -proto.payload.v1.Update.MultiObjectRequest.prototype.addRequests = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.payload.v1.Update.ObjectRequest, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.payload.v1.Update.MultiObjectRequest} returns this - */ -proto.payload.v1.Update.MultiObjectRequest.prototype.clearRequestsList = function() { - return this.setRequestsList([]); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.payload.v1.Update.Config.prototype.toObject = function(opt_includeInstance) { - return proto.payload.v1.Update.Config.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.payload.v1.Update.Config} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.payload.v1.Update.Config.toObject = function(includeInstance, msg) { - var f, obj = { - skipStrictExistCheck: jspb.Message.getBooleanFieldWithDefault(msg, 1, false), - filters: (f = msg.getFilters()) && proto.payload.v1.Filter.Config.toObject(includeInstance, f), - timestamp: jspb.Message.getFieldWithDefault(msg, 3, 0), - disableBalancedUpdate: jspb.Message.getBooleanFieldWithDefault(msg, 4, false) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.payload.v1.Update.Config} - */ -proto.payload.v1.Update.Config.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.payload.v1.Update.Config; - return proto.payload.v1.Update.Config.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.payload.v1.Update.Config} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.payload.v1.Update.Config} - */ -proto.payload.v1.Update.Config.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setSkipStrictExistCheck(value); - break; - case 2: - var value = new proto.payload.v1.Filter.Config; - reader.readMessage(value,proto.payload.v1.Filter.Config.deserializeBinaryFromReader); - msg.setFilters(value); - break; - case 3: - var value = /** @type {number} */ (reader.readInt64()); - msg.setTimestamp(value); - break; - case 4: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setDisableBalancedUpdate(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.payload.v1.Update.Config.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.payload.v1.Update.Config.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.payload.v1.Update.Config} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.payload.v1.Update.Config.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getSkipStrictExistCheck(); - if (f) { - writer.writeBool( - 1, - f - ); - } - f = message.getFilters(); - if (f != null) { - writer.writeMessage( - 2, - f, - proto.payload.v1.Filter.Config.serializeBinaryToWriter - ); - } - f = message.getTimestamp(); - if (f !== 0) { - writer.writeInt64( - 3, - f - ); - } - f = message.getDisableBalancedUpdate(); - if (f) { - writer.writeBool( - 4, - f - ); - } -}; - - -/** - * optional bool skip_strict_exist_check = 1; - * @return {boolean} - */ -proto.payload.v1.Update.Config.prototype.getSkipStrictExistCheck = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 1, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.payload.v1.Update.Config} returns this - */ -proto.payload.v1.Update.Config.prototype.setSkipStrictExistCheck = function(value) { - return jspb.Message.setProto3BooleanField(this, 1, value); -}; - - -/** - * optional Filter.Config filters = 2; - * @return {?proto.payload.v1.Filter.Config} - */ -proto.payload.v1.Update.Config.prototype.getFilters = function() { - return /** @type{?proto.payload.v1.Filter.Config} */ ( - jspb.Message.getWrapperField(this, proto.payload.v1.Filter.Config, 2)); -}; - - -/** - * @param {?proto.payload.v1.Filter.Config|undefined} value - * @return {!proto.payload.v1.Update.Config} returns this -*/ -proto.payload.v1.Update.Config.prototype.setFilters = function(value) { - return jspb.Message.setWrapperField(this, 2, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.payload.v1.Update.Config} returns this - */ -proto.payload.v1.Update.Config.prototype.clearFilters = function() { - return this.setFilters(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.payload.v1.Update.Config.prototype.hasFilters = function() { - return jspb.Message.getField(this, 2) != null; -}; - - -/** - * optional int64 timestamp = 3; - * @return {number} - */ -proto.payload.v1.Update.Config.prototype.getTimestamp = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.payload.v1.Update.Config} returns this - */ -proto.payload.v1.Update.Config.prototype.setTimestamp = function(value) { - return jspb.Message.setProto3IntField(this, 3, value); -}; - - -/** - * optional bool disable_balanced_update = 4; - * @return {boolean} - */ -proto.payload.v1.Update.Config.prototype.getDisableBalancedUpdate = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 4, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.payload.v1.Update.Config} returns this - */ -proto.payload.v1.Update.Config.prototype.setDisableBalancedUpdate = function(value) { - return jspb.Message.setProto3BooleanField(this, 4, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.payload.v1.Upsert.prototype.toObject = function(opt_includeInstance) { - return proto.payload.v1.Upsert.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.payload.v1.Upsert} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.payload.v1.Upsert.toObject = function(includeInstance, msg) { - var f, obj = { - - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.payload.v1.Upsert} - */ -proto.payload.v1.Upsert.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.payload.v1.Upsert; - return proto.payload.v1.Upsert.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.payload.v1.Upsert} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.payload.v1.Upsert} - */ -proto.payload.v1.Upsert.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.payload.v1.Upsert.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.payload.v1.Upsert.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.payload.v1.Upsert} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.payload.v1.Upsert.serializeBinaryToWriter = function(message, writer) { - var f = undefined; -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.payload.v1.Upsert.Request.prototype.toObject = function(opt_includeInstance) { - return proto.payload.v1.Upsert.Request.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.payload.v1.Upsert.Request} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.payload.v1.Upsert.Request.toObject = function(includeInstance, msg) { - var f, obj = { - vector: (f = msg.getVector()) && proto.payload.v1.Object.Vector.toObject(includeInstance, f), - config: (f = msg.getConfig()) && proto.payload.v1.Upsert.Config.toObject(includeInstance, f) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.payload.v1.Upsert.Request} - */ -proto.payload.v1.Upsert.Request.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.payload.v1.Upsert.Request; - return proto.payload.v1.Upsert.Request.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.payload.v1.Upsert.Request} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.payload.v1.Upsert.Request} - */ -proto.payload.v1.Upsert.Request.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.payload.v1.Object.Vector; - reader.readMessage(value,proto.payload.v1.Object.Vector.deserializeBinaryFromReader); - msg.setVector(value); - break; - case 2: - var value = new proto.payload.v1.Upsert.Config; - reader.readMessage(value,proto.payload.v1.Upsert.Config.deserializeBinaryFromReader); - msg.setConfig(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.payload.v1.Upsert.Request.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.payload.v1.Upsert.Request.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.payload.v1.Upsert.Request} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.payload.v1.Upsert.Request.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getVector(); - if (f != null) { - writer.writeMessage( - 1, - f, - proto.payload.v1.Object.Vector.serializeBinaryToWriter - ); - } - f = message.getConfig(); - if (f != null) { - writer.writeMessage( - 2, - f, - proto.payload.v1.Upsert.Config.serializeBinaryToWriter - ); - } -}; - - -/** - * optional Object.Vector vector = 1; - * @return {?proto.payload.v1.Object.Vector} - */ -proto.payload.v1.Upsert.Request.prototype.getVector = function() { - return /** @type{?proto.payload.v1.Object.Vector} */ ( - jspb.Message.getWrapperField(this, proto.payload.v1.Object.Vector, 1)); -}; - - -/** - * @param {?proto.payload.v1.Object.Vector|undefined} value - * @return {!proto.payload.v1.Upsert.Request} returns this -*/ -proto.payload.v1.Upsert.Request.prototype.setVector = function(value) { - return jspb.Message.setWrapperField(this, 1, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.payload.v1.Upsert.Request} returns this - */ -proto.payload.v1.Upsert.Request.prototype.clearVector = function() { - return this.setVector(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.payload.v1.Upsert.Request.prototype.hasVector = function() { - return jspb.Message.getField(this, 1) != null; -}; - - -/** - * optional Config config = 2; - * @return {?proto.payload.v1.Upsert.Config} - */ -proto.payload.v1.Upsert.Request.prototype.getConfig = function() { - return /** @type{?proto.payload.v1.Upsert.Config} */ ( - jspb.Message.getWrapperField(this, proto.payload.v1.Upsert.Config, 2)); -}; - - -/** - * @param {?proto.payload.v1.Upsert.Config|undefined} value - * @return {!proto.payload.v1.Upsert.Request} returns this -*/ -proto.payload.v1.Upsert.Request.prototype.setConfig = function(value) { - return jspb.Message.setWrapperField(this, 2, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.payload.v1.Upsert.Request} returns this - */ -proto.payload.v1.Upsert.Request.prototype.clearConfig = function() { - return this.setConfig(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.payload.v1.Upsert.Request.prototype.hasConfig = function() { - return jspb.Message.getField(this, 2) != null; -}; - - - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.payload.v1.Upsert.MultiRequest.repeatedFields_ = [1]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.payload.v1.Upsert.MultiRequest.prototype.toObject = function(opt_includeInstance) { - return proto.payload.v1.Upsert.MultiRequest.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.payload.v1.Upsert.MultiRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.payload.v1.Upsert.MultiRequest.toObject = function(includeInstance, msg) { - var f, obj = { - requestsList: jspb.Message.toObjectList(msg.getRequestsList(), - proto.payload.v1.Upsert.Request.toObject, includeInstance) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.payload.v1.Upsert.MultiRequest} - */ -proto.payload.v1.Upsert.MultiRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.payload.v1.Upsert.MultiRequest; - return proto.payload.v1.Upsert.MultiRequest.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.payload.v1.Upsert.MultiRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.payload.v1.Upsert.MultiRequest} - */ -proto.payload.v1.Upsert.MultiRequest.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.payload.v1.Upsert.Request; - reader.readMessage(value,proto.payload.v1.Upsert.Request.deserializeBinaryFromReader); - msg.addRequests(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.payload.v1.Upsert.MultiRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.payload.v1.Upsert.MultiRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.payload.v1.Upsert.MultiRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.payload.v1.Upsert.MultiRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getRequestsList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 1, - f, - proto.payload.v1.Upsert.Request.serializeBinaryToWriter - ); - } -}; - - -/** - * repeated Request requests = 1; - * @return {!Array} - */ -proto.payload.v1.Upsert.MultiRequest.prototype.getRequestsList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.payload.v1.Upsert.Request, 1)); -}; - - -/** - * @param {!Array} value - * @return {!proto.payload.v1.Upsert.MultiRequest} returns this -*/ -proto.payload.v1.Upsert.MultiRequest.prototype.setRequestsList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 1, value); -}; - - -/** - * @param {!proto.payload.v1.Upsert.Request=} opt_value - * @param {number=} opt_index - * @return {!proto.payload.v1.Upsert.Request} - */ -proto.payload.v1.Upsert.MultiRequest.prototype.addRequests = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.payload.v1.Upsert.Request, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.payload.v1.Upsert.MultiRequest} returns this - */ -proto.payload.v1.Upsert.MultiRequest.prototype.clearRequestsList = function() { - return this.setRequestsList([]); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.payload.v1.Upsert.ObjectRequest.prototype.toObject = function(opt_includeInstance) { - return proto.payload.v1.Upsert.ObjectRequest.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.payload.v1.Upsert.ObjectRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.payload.v1.Upsert.ObjectRequest.toObject = function(includeInstance, msg) { - var f, obj = { - object: (f = msg.getObject()) && proto.payload.v1.Object.Blob.toObject(includeInstance, f), - config: (f = msg.getConfig()) && proto.payload.v1.Upsert.Config.toObject(includeInstance, f), - vectorizer: (f = msg.getVectorizer()) && proto.payload.v1.Filter.Target.toObject(includeInstance, f) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.payload.v1.Upsert.ObjectRequest} - */ -proto.payload.v1.Upsert.ObjectRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.payload.v1.Upsert.ObjectRequest; - return proto.payload.v1.Upsert.ObjectRequest.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.payload.v1.Upsert.ObjectRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.payload.v1.Upsert.ObjectRequest} - */ -proto.payload.v1.Upsert.ObjectRequest.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.payload.v1.Object.Blob; - reader.readMessage(value,proto.payload.v1.Object.Blob.deserializeBinaryFromReader); - msg.setObject(value); - break; - case 2: - var value = new proto.payload.v1.Upsert.Config; - reader.readMessage(value,proto.payload.v1.Upsert.Config.deserializeBinaryFromReader); - msg.setConfig(value); - break; - case 3: - var value = new proto.payload.v1.Filter.Target; - reader.readMessage(value,proto.payload.v1.Filter.Target.deserializeBinaryFromReader); - msg.setVectorizer(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.payload.v1.Upsert.ObjectRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.payload.v1.Upsert.ObjectRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.payload.v1.Upsert.ObjectRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.payload.v1.Upsert.ObjectRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getObject(); - if (f != null) { - writer.writeMessage( - 1, - f, - proto.payload.v1.Object.Blob.serializeBinaryToWriter - ); - } - f = message.getConfig(); - if (f != null) { - writer.writeMessage( - 2, - f, - proto.payload.v1.Upsert.Config.serializeBinaryToWriter - ); - } - f = message.getVectorizer(); - if (f != null) { - writer.writeMessage( - 3, - f, - proto.payload.v1.Filter.Target.serializeBinaryToWriter - ); - } -}; - - -/** - * optional Object.Blob object = 1; - * @return {?proto.payload.v1.Object.Blob} - */ -proto.payload.v1.Upsert.ObjectRequest.prototype.getObject = function() { - return /** @type{?proto.payload.v1.Object.Blob} */ ( - jspb.Message.getWrapperField(this, proto.payload.v1.Object.Blob, 1)); -}; - - -/** - * @param {?proto.payload.v1.Object.Blob|undefined} value - * @return {!proto.payload.v1.Upsert.ObjectRequest} returns this -*/ -proto.payload.v1.Upsert.ObjectRequest.prototype.setObject = function(value) { - return jspb.Message.setWrapperField(this, 1, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.payload.v1.Upsert.ObjectRequest} returns this - */ -proto.payload.v1.Upsert.ObjectRequest.prototype.clearObject = function() { - return this.setObject(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.payload.v1.Upsert.ObjectRequest.prototype.hasObject = function() { - return jspb.Message.getField(this, 1) != null; -}; - - -/** - * optional Config config = 2; - * @return {?proto.payload.v1.Upsert.Config} - */ -proto.payload.v1.Upsert.ObjectRequest.prototype.getConfig = function() { - return /** @type{?proto.payload.v1.Upsert.Config} */ ( - jspb.Message.getWrapperField(this, proto.payload.v1.Upsert.Config, 2)); -}; - - -/** - * @param {?proto.payload.v1.Upsert.Config|undefined} value - * @return {!proto.payload.v1.Upsert.ObjectRequest} returns this -*/ -proto.payload.v1.Upsert.ObjectRequest.prototype.setConfig = function(value) { - return jspb.Message.setWrapperField(this, 2, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.payload.v1.Upsert.ObjectRequest} returns this - */ -proto.payload.v1.Upsert.ObjectRequest.prototype.clearConfig = function() { - return this.setConfig(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.payload.v1.Upsert.ObjectRequest.prototype.hasConfig = function() { - return jspb.Message.getField(this, 2) != null; -}; - - -/** - * optional Filter.Target vectorizer = 3; - * @return {?proto.payload.v1.Filter.Target} - */ -proto.payload.v1.Upsert.ObjectRequest.prototype.getVectorizer = function() { - return /** @type{?proto.payload.v1.Filter.Target} */ ( - jspb.Message.getWrapperField(this, proto.payload.v1.Filter.Target, 3)); -}; - - -/** - * @param {?proto.payload.v1.Filter.Target|undefined} value - * @return {!proto.payload.v1.Upsert.ObjectRequest} returns this -*/ -proto.payload.v1.Upsert.ObjectRequest.prototype.setVectorizer = function(value) { - return jspb.Message.setWrapperField(this, 3, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.payload.v1.Upsert.ObjectRequest} returns this - */ -proto.payload.v1.Upsert.ObjectRequest.prototype.clearVectorizer = function() { - return this.setVectorizer(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.payload.v1.Upsert.ObjectRequest.prototype.hasVectorizer = function() { - return jspb.Message.getField(this, 3) != null; -}; - - - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.payload.v1.Upsert.MultiObjectRequest.repeatedFields_ = [1]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.payload.v1.Upsert.MultiObjectRequest.prototype.toObject = function(opt_includeInstance) { - return proto.payload.v1.Upsert.MultiObjectRequest.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.payload.v1.Upsert.MultiObjectRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.payload.v1.Upsert.MultiObjectRequest.toObject = function(includeInstance, msg) { - var f, obj = { - requestsList: jspb.Message.toObjectList(msg.getRequestsList(), - proto.payload.v1.Upsert.ObjectRequest.toObject, includeInstance) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.payload.v1.Upsert.MultiObjectRequest} - */ -proto.payload.v1.Upsert.MultiObjectRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.payload.v1.Upsert.MultiObjectRequest; - return proto.payload.v1.Upsert.MultiObjectRequest.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.payload.v1.Upsert.MultiObjectRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.payload.v1.Upsert.MultiObjectRequest} - */ -proto.payload.v1.Upsert.MultiObjectRequest.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.payload.v1.Upsert.ObjectRequest; - reader.readMessage(value,proto.payload.v1.Upsert.ObjectRequest.deserializeBinaryFromReader); - msg.addRequests(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.payload.v1.Upsert.MultiObjectRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.payload.v1.Upsert.MultiObjectRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.payload.v1.Upsert.MultiObjectRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.payload.v1.Upsert.MultiObjectRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getRequestsList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 1, - f, - proto.payload.v1.Upsert.ObjectRequest.serializeBinaryToWriter - ); - } -}; - - -/** - * repeated ObjectRequest requests = 1; - * @return {!Array} - */ -proto.payload.v1.Upsert.MultiObjectRequest.prototype.getRequestsList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.payload.v1.Upsert.ObjectRequest, 1)); -}; - - -/** - * @param {!Array} value - * @return {!proto.payload.v1.Upsert.MultiObjectRequest} returns this -*/ -proto.payload.v1.Upsert.MultiObjectRequest.prototype.setRequestsList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 1, value); -}; - - -/** - * @param {!proto.payload.v1.Upsert.ObjectRequest=} opt_value - * @param {number=} opt_index - * @return {!proto.payload.v1.Upsert.ObjectRequest} - */ -proto.payload.v1.Upsert.MultiObjectRequest.prototype.addRequests = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.payload.v1.Upsert.ObjectRequest, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.payload.v1.Upsert.MultiObjectRequest} returns this - */ -proto.payload.v1.Upsert.MultiObjectRequest.prototype.clearRequestsList = function() { - return this.setRequestsList([]); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.payload.v1.Upsert.Config.prototype.toObject = function(opt_includeInstance) { - return proto.payload.v1.Upsert.Config.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.payload.v1.Upsert.Config} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.payload.v1.Upsert.Config.toObject = function(includeInstance, msg) { - var f, obj = { - skipStrictExistCheck: jspb.Message.getBooleanFieldWithDefault(msg, 1, false), - filters: (f = msg.getFilters()) && proto.payload.v1.Filter.Config.toObject(includeInstance, f), - timestamp: jspb.Message.getFieldWithDefault(msg, 3, 0), - disableBalancedUpdate: jspb.Message.getBooleanFieldWithDefault(msg, 4, false) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.payload.v1.Upsert.Config} - */ -proto.payload.v1.Upsert.Config.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.payload.v1.Upsert.Config; - return proto.payload.v1.Upsert.Config.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.payload.v1.Upsert.Config} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.payload.v1.Upsert.Config} - */ -proto.payload.v1.Upsert.Config.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setSkipStrictExistCheck(value); - break; - case 2: - var value = new proto.payload.v1.Filter.Config; - reader.readMessage(value,proto.payload.v1.Filter.Config.deserializeBinaryFromReader); - msg.setFilters(value); - break; - case 3: - var value = /** @type {number} */ (reader.readInt64()); - msg.setTimestamp(value); - break; - case 4: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setDisableBalancedUpdate(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.payload.v1.Upsert.Config.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.payload.v1.Upsert.Config.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.payload.v1.Upsert.Config} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.payload.v1.Upsert.Config.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getSkipStrictExistCheck(); - if (f) { - writer.writeBool( - 1, - f - ); - } - f = message.getFilters(); - if (f != null) { - writer.writeMessage( - 2, - f, - proto.payload.v1.Filter.Config.serializeBinaryToWriter - ); - } - f = message.getTimestamp(); - if (f !== 0) { - writer.writeInt64( - 3, - f - ); - } - f = message.getDisableBalancedUpdate(); - if (f) { - writer.writeBool( - 4, - f - ); - } -}; - - -/** - * optional bool skip_strict_exist_check = 1; - * @return {boolean} - */ -proto.payload.v1.Upsert.Config.prototype.getSkipStrictExistCheck = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 1, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.payload.v1.Upsert.Config} returns this - */ -proto.payload.v1.Upsert.Config.prototype.setSkipStrictExistCheck = function(value) { - return jspb.Message.setProto3BooleanField(this, 1, value); -}; - - -/** - * optional Filter.Config filters = 2; - * @return {?proto.payload.v1.Filter.Config} - */ -proto.payload.v1.Upsert.Config.prototype.getFilters = function() { - return /** @type{?proto.payload.v1.Filter.Config} */ ( - jspb.Message.getWrapperField(this, proto.payload.v1.Filter.Config, 2)); -}; - - -/** - * @param {?proto.payload.v1.Filter.Config|undefined} value - * @return {!proto.payload.v1.Upsert.Config} returns this -*/ -proto.payload.v1.Upsert.Config.prototype.setFilters = function(value) { - return jspb.Message.setWrapperField(this, 2, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.payload.v1.Upsert.Config} returns this - */ -proto.payload.v1.Upsert.Config.prototype.clearFilters = function() { - return this.setFilters(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.payload.v1.Upsert.Config.prototype.hasFilters = function() { - return jspb.Message.getField(this, 2) != null; -}; - - -/** - * optional int64 timestamp = 3; - * @return {number} - */ -proto.payload.v1.Upsert.Config.prototype.getTimestamp = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.payload.v1.Upsert.Config} returns this - */ -proto.payload.v1.Upsert.Config.prototype.setTimestamp = function(value) { - return jspb.Message.setProto3IntField(this, 3, value); -}; - - -/** - * optional bool disable_balanced_update = 4; - * @return {boolean} - */ -proto.payload.v1.Upsert.Config.prototype.getDisableBalancedUpdate = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 4, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.payload.v1.Upsert.Config} returns this - */ -proto.payload.v1.Upsert.Config.prototype.setDisableBalancedUpdate = function(value) { - return jspb.Message.setProto3BooleanField(this, 4, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.payload.v1.Remove.prototype.toObject = function(opt_includeInstance) { - return proto.payload.v1.Remove.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.payload.v1.Remove} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.payload.v1.Remove.toObject = function(includeInstance, msg) { - var f, obj = { - - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.payload.v1.Remove} - */ -proto.payload.v1.Remove.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.payload.v1.Remove; - return proto.payload.v1.Remove.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.payload.v1.Remove} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.payload.v1.Remove} - */ -proto.payload.v1.Remove.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.payload.v1.Remove.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.payload.v1.Remove.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.payload.v1.Remove} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.payload.v1.Remove.serializeBinaryToWriter = function(message, writer) { - var f = undefined; -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.payload.v1.Remove.Request.prototype.toObject = function(opt_includeInstance) { - return proto.payload.v1.Remove.Request.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.payload.v1.Remove.Request} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.payload.v1.Remove.Request.toObject = function(includeInstance, msg) { - var f, obj = { - id: (f = msg.getId()) && proto.payload.v1.Object.ID.toObject(includeInstance, f), - config: (f = msg.getConfig()) && proto.payload.v1.Remove.Config.toObject(includeInstance, f) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.payload.v1.Remove.Request} - */ -proto.payload.v1.Remove.Request.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.payload.v1.Remove.Request; - return proto.payload.v1.Remove.Request.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.payload.v1.Remove.Request} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.payload.v1.Remove.Request} - */ -proto.payload.v1.Remove.Request.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.payload.v1.Object.ID; - reader.readMessage(value,proto.payload.v1.Object.ID.deserializeBinaryFromReader); - msg.setId(value); - break; - case 2: - var value = new proto.payload.v1.Remove.Config; - reader.readMessage(value,proto.payload.v1.Remove.Config.deserializeBinaryFromReader); - msg.setConfig(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.payload.v1.Remove.Request.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.payload.v1.Remove.Request.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.payload.v1.Remove.Request} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.payload.v1.Remove.Request.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getId(); - if (f != null) { - writer.writeMessage( - 1, - f, - proto.payload.v1.Object.ID.serializeBinaryToWriter - ); - } - f = message.getConfig(); - if (f != null) { - writer.writeMessage( - 2, - f, - proto.payload.v1.Remove.Config.serializeBinaryToWriter - ); - } -}; - - -/** - * optional Object.ID id = 1; - * @return {?proto.payload.v1.Object.ID} - */ -proto.payload.v1.Remove.Request.prototype.getId = function() { - return /** @type{?proto.payload.v1.Object.ID} */ ( - jspb.Message.getWrapperField(this, proto.payload.v1.Object.ID, 1)); -}; - - -/** - * @param {?proto.payload.v1.Object.ID|undefined} value - * @return {!proto.payload.v1.Remove.Request} returns this -*/ -proto.payload.v1.Remove.Request.prototype.setId = function(value) { - return jspb.Message.setWrapperField(this, 1, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.payload.v1.Remove.Request} returns this - */ -proto.payload.v1.Remove.Request.prototype.clearId = function() { - return this.setId(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.payload.v1.Remove.Request.prototype.hasId = function() { - return jspb.Message.getField(this, 1) != null; -}; - - -/** - * optional Config config = 2; - * @return {?proto.payload.v1.Remove.Config} - */ -proto.payload.v1.Remove.Request.prototype.getConfig = function() { - return /** @type{?proto.payload.v1.Remove.Config} */ ( - jspb.Message.getWrapperField(this, proto.payload.v1.Remove.Config, 2)); -}; - - -/** - * @param {?proto.payload.v1.Remove.Config|undefined} value - * @return {!proto.payload.v1.Remove.Request} returns this -*/ -proto.payload.v1.Remove.Request.prototype.setConfig = function(value) { - return jspb.Message.setWrapperField(this, 2, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.payload.v1.Remove.Request} returns this - */ -proto.payload.v1.Remove.Request.prototype.clearConfig = function() { - return this.setConfig(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.payload.v1.Remove.Request.prototype.hasConfig = function() { - return jspb.Message.getField(this, 2) != null; -}; - - - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.payload.v1.Remove.MultiRequest.repeatedFields_ = [1]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.payload.v1.Remove.MultiRequest.prototype.toObject = function(opt_includeInstance) { - return proto.payload.v1.Remove.MultiRequest.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.payload.v1.Remove.MultiRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.payload.v1.Remove.MultiRequest.toObject = function(includeInstance, msg) { - var f, obj = { - requestsList: jspb.Message.toObjectList(msg.getRequestsList(), - proto.payload.v1.Remove.Request.toObject, includeInstance) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.payload.v1.Remove.MultiRequest} - */ -proto.payload.v1.Remove.MultiRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.payload.v1.Remove.MultiRequest; - return proto.payload.v1.Remove.MultiRequest.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.payload.v1.Remove.MultiRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.payload.v1.Remove.MultiRequest} - */ -proto.payload.v1.Remove.MultiRequest.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.payload.v1.Remove.Request; - reader.readMessage(value,proto.payload.v1.Remove.Request.deserializeBinaryFromReader); - msg.addRequests(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.payload.v1.Remove.MultiRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.payload.v1.Remove.MultiRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.payload.v1.Remove.MultiRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.payload.v1.Remove.MultiRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getRequestsList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 1, - f, - proto.payload.v1.Remove.Request.serializeBinaryToWriter - ); - } -}; - - -/** - * repeated Request requests = 1; - * @return {!Array} - */ -proto.payload.v1.Remove.MultiRequest.prototype.getRequestsList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.payload.v1.Remove.Request, 1)); -}; - - -/** - * @param {!Array} value - * @return {!proto.payload.v1.Remove.MultiRequest} returns this -*/ -proto.payload.v1.Remove.MultiRequest.prototype.setRequestsList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 1, value); -}; - - -/** - * @param {!proto.payload.v1.Remove.Request=} opt_value - * @param {number=} opt_index - * @return {!proto.payload.v1.Remove.Request} - */ -proto.payload.v1.Remove.MultiRequest.prototype.addRequests = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.payload.v1.Remove.Request, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.payload.v1.Remove.MultiRequest} returns this - */ -proto.payload.v1.Remove.MultiRequest.prototype.clearRequestsList = function() { - return this.setRequestsList([]); -}; - - - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.payload.v1.Remove.TimestampRequest.repeatedFields_ = [1]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.payload.v1.Remove.TimestampRequest.prototype.toObject = function(opt_includeInstance) { - return proto.payload.v1.Remove.TimestampRequest.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.payload.v1.Remove.TimestampRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.payload.v1.Remove.TimestampRequest.toObject = function(includeInstance, msg) { - var f, obj = { - timestampsList: jspb.Message.toObjectList(msg.getTimestampsList(), - proto.payload.v1.Remove.Timestamp.toObject, includeInstance) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.payload.v1.Remove.TimestampRequest} - */ -proto.payload.v1.Remove.TimestampRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.payload.v1.Remove.TimestampRequest; - return proto.payload.v1.Remove.TimestampRequest.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.payload.v1.Remove.TimestampRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.payload.v1.Remove.TimestampRequest} - */ -proto.payload.v1.Remove.TimestampRequest.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.payload.v1.Remove.Timestamp; - reader.readMessage(value,proto.payload.v1.Remove.Timestamp.deserializeBinaryFromReader); - msg.addTimestamps(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.payload.v1.Remove.TimestampRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.payload.v1.Remove.TimestampRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.payload.v1.Remove.TimestampRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.payload.v1.Remove.TimestampRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getTimestampsList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 1, - f, - proto.payload.v1.Remove.Timestamp.serializeBinaryToWriter - ); - } -}; - - -/** - * repeated Timestamp timestamps = 1; - * @return {!Array} - */ -proto.payload.v1.Remove.TimestampRequest.prototype.getTimestampsList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.payload.v1.Remove.Timestamp, 1)); -}; - - -/** - * @param {!Array} value - * @return {!proto.payload.v1.Remove.TimestampRequest} returns this -*/ -proto.payload.v1.Remove.TimestampRequest.prototype.setTimestampsList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 1, value); -}; - - -/** - * @param {!proto.payload.v1.Remove.Timestamp=} opt_value - * @param {number=} opt_index - * @return {!proto.payload.v1.Remove.Timestamp} - */ -proto.payload.v1.Remove.TimestampRequest.prototype.addTimestamps = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.payload.v1.Remove.Timestamp, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.payload.v1.Remove.TimestampRequest} returns this - */ -proto.payload.v1.Remove.TimestampRequest.prototype.clearTimestampsList = function() { - return this.setTimestampsList([]); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.payload.v1.Remove.Timestamp.prototype.toObject = function(opt_includeInstance) { - return proto.payload.v1.Remove.Timestamp.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.payload.v1.Remove.Timestamp} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.payload.v1.Remove.Timestamp.toObject = function(includeInstance, msg) { - var f, obj = { - timestamp: jspb.Message.getFieldWithDefault(msg, 1, 0), - operator: jspb.Message.getFieldWithDefault(msg, 2, 0) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.payload.v1.Remove.Timestamp} - */ -proto.payload.v1.Remove.Timestamp.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.payload.v1.Remove.Timestamp; - return proto.payload.v1.Remove.Timestamp.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.payload.v1.Remove.Timestamp} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.payload.v1.Remove.Timestamp} - */ -proto.payload.v1.Remove.Timestamp.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {number} */ (reader.readInt64()); - msg.setTimestamp(value); - break; - case 2: - var value = /** @type {!proto.payload.v1.Remove.Timestamp.Operator} */ (reader.readEnum()); - msg.setOperator(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.payload.v1.Remove.Timestamp.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.payload.v1.Remove.Timestamp.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.payload.v1.Remove.Timestamp} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.payload.v1.Remove.Timestamp.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getTimestamp(); - if (f !== 0) { - writer.writeInt64( - 1, - f - ); - } - f = message.getOperator(); - if (f !== 0.0) { - writer.writeEnum( - 2, - f - ); - } -}; - - -/** - * @enum {number} - */ -proto.payload.v1.Remove.Timestamp.Operator = { - EQ: 0, - NE: 1, - GE: 2, - GT: 3, - LE: 4, - LT: 5 -}; - -/** - * optional int64 timestamp = 1; - * @return {number} - */ -proto.payload.v1.Remove.Timestamp.prototype.getTimestamp = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.payload.v1.Remove.Timestamp} returns this - */ -proto.payload.v1.Remove.Timestamp.prototype.setTimestamp = function(value) { - return jspb.Message.setProto3IntField(this, 1, value); -}; - - -/** - * optional Operator operator = 2; - * @return {!proto.payload.v1.Remove.Timestamp.Operator} - */ -proto.payload.v1.Remove.Timestamp.prototype.getOperator = function() { - return /** @type {!proto.payload.v1.Remove.Timestamp.Operator} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** - * @param {!proto.payload.v1.Remove.Timestamp.Operator} value - * @return {!proto.payload.v1.Remove.Timestamp} returns this - */ -proto.payload.v1.Remove.Timestamp.prototype.setOperator = function(value) { - return jspb.Message.setProto3EnumField(this, 2, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.payload.v1.Remove.Config.prototype.toObject = function(opt_includeInstance) { - return proto.payload.v1.Remove.Config.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.payload.v1.Remove.Config} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.payload.v1.Remove.Config.toObject = function(includeInstance, msg) { - var f, obj = { - skipStrictExistCheck: jspb.Message.getBooleanFieldWithDefault(msg, 1, false), - timestamp: jspb.Message.getFieldWithDefault(msg, 3, 0) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.payload.v1.Remove.Config} - */ -proto.payload.v1.Remove.Config.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.payload.v1.Remove.Config; - return proto.payload.v1.Remove.Config.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.payload.v1.Remove.Config} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.payload.v1.Remove.Config} - */ -proto.payload.v1.Remove.Config.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setSkipStrictExistCheck(value); - break; - case 3: - var value = /** @type {number} */ (reader.readInt64()); - msg.setTimestamp(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.payload.v1.Remove.Config.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.payload.v1.Remove.Config.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.payload.v1.Remove.Config} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.payload.v1.Remove.Config.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getSkipStrictExistCheck(); - if (f) { - writer.writeBool( - 1, - f - ); - } - f = message.getTimestamp(); - if (f !== 0) { - writer.writeInt64( - 3, - f - ); - } -}; - - -/** - * optional bool skip_strict_exist_check = 1; - * @return {boolean} - */ -proto.payload.v1.Remove.Config.prototype.getSkipStrictExistCheck = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 1, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.payload.v1.Remove.Config} returns this - */ -proto.payload.v1.Remove.Config.prototype.setSkipStrictExistCheck = function(value) { - return jspb.Message.setProto3BooleanField(this, 1, value); -}; - - -/** - * optional int64 timestamp = 3; - * @return {number} - */ -proto.payload.v1.Remove.Config.prototype.getTimestamp = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.payload.v1.Remove.Config} returns this - */ -proto.payload.v1.Remove.Config.prototype.setTimestamp = function(value) { - return jspb.Message.setProto3IntField(this, 3, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.payload.v1.Object.prototype.toObject = function(opt_includeInstance) { - return proto.payload.v1.Object.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.payload.v1.Object} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.payload.v1.Object.toObject = function(includeInstance, msg) { - var f, obj = { - - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.payload.v1.Object} - */ -proto.payload.v1.Object.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.payload.v1.Object; - return proto.payload.v1.Object.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.payload.v1.Object} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.payload.v1.Object} - */ -proto.payload.v1.Object.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.payload.v1.Object.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.payload.v1.Object.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.payload.v1.Object} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.payload.v1.Object.serializeBinaryToWriter = function(message, writer) { - var f = undefined; -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.payload.v1.Object.VectorRequest.prototype.toObject = function(opt_includeInstance) { - return proto.payload.v1.Object.VectorRequest.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.payload.v1.Object.VectorRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.payload.v1.Object.VectorRequest.toObject = function(includeInstance, msg) { - var f, obj = { - id: (f = msg.getId()) && proto.payload.v1.Object.ID.toObject(includeInstance, f), - filters: (f = msg.getFilters()) && proto.payload.v1.Filter.Config.toObject(includeInstance, f) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.payload.v1.Object.VectorRequest} - */ -proto.payload.v1.Object.VectorRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.payload.v1.Object.VectorRequest; - return proto.payload.v1.Object.VectorRequest.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.payload.v1.Object.VectorRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.payload.v1.Object.VectorRequest} - */ -proto.payload.v1.Object.VectorRequest.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.payload.v1.Object.ID; - reader.readMessage(value,proto.payload.v1.Object.ID.deserializeBinaryFromReader); - msg.setId(value); - break; - case 2: - var value = new proto.payload.v1.Filter.Config; - reader.readMessage(value,proto.payload.v1.Filter.Config.deserializeBinaryFromReader); - msg.setFilters(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.payload.v1.Object.VectorRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.payload.v1.Object.VectorRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.payload.v1.Object.VectorRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.payload.v1.Object.VectorRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getId(); - if (f != null) { - writer.writeMessage( - 1, - f, - proto.payload.v1.Object.ID.serializeBinaryToWriter - ); - } - f = message.getFilters(); - if (f != null) { - writer.writeMessage( - 2, - f, - proto.payload.v1.Filter.Config.serializeBinaryToWriter - ); - } -}; - - -/** - * optional ID id = 1; - * @return {?proto.payload.v1.Object.ID} - */ -proto.payload.v1.Object.VectorRequest.prototype.getId = function() { - return /** @type{?proto.payload.v1.Object.ID} */ ( - jspb.Message.getWrapperField(this, proto.payload.v1.Object.ID, 1)); -}; - - -/** - * @param {?proto.payload.v1.Object.ID|undefined} value - * @return {!proto.payload.v1.Object.VectorRequest} returns this -*/ -proto.payload.v1.Object.VectorRequest.prototype.setId = function(value) { - return jspb.Message.setWrapperField(this, 1, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.payload.v1.Object.VectorRequest} returns this - */ -proto.payload.v1.Object.VectorRequest.prototype.clearId = function() { - return this.setId(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.payload.v1.Object.VectorRequest.prototype.hasId = function() { - return jspb.Message.getField(this, 1) != null; -}; - - -/** - * optional Filter.Config filters = 2; - * @return {?proto.payload.v1.Filter.Config} - */ -proto.payload.v1.Object.VectorRequest.prototype.getFilters = function() { - return /** @type{?proto.payload.v1.Filter.Config} */ ( - jspb.Message.getWrapperField(this, proto.payload.v1.Filter.Config, 2)); -}; - - -/** - * @param {?proto.payload.v1.Filter.Config|undefined} value - * @return {!proto.payload.v1.Object.VectorRequest} returns this -*/ -proto.payload.v1.Object.VectorRequest.prototype.setFilters = function(value) { - return jspb.Message.setWrapperField(this, 2, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.payload.v1.Object.VectorRequest} returns this - */ -proto.payload.v1.Object.VectorRequest.prototype.clearFilters = function() { - return this.setFilters(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.payload.v1.Object.VectorRequest.prototype.hasFilters = function() { - return jspb.Message.getField(this, 2) != null; -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.payload.v1.Object.Distance.prototype.toObject = function(opt_includeInstance) { - return proto.payload.v1.Object.Distance.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.payload.v1.Object.Distance} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.payload.v1.Object.Distance.toObject = function(includeInstance, msg) { - var f, obj = { - id: jspb.Message.getFieldWithDefault(msg, 1, ""), - distance: jspb.Message.getFloatingPointFieldWithDefault(msg, 2, 0.0) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.payload.v1.Object.Distance} - */ -proto.payload.v1.Object.Distance.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.payload.v1.Object.Distance; - return proto.payload.v1.Object.Distance.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.payload.v1.Object.Distance} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.payload.v1.Object.Distance} - */ -proto.payload.v1.Object.Distance.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setId(value); - break; - case 2: - var value = /** @type {number} */ (reader.readFloat()); - msg.setDistance(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.payload.v1.Object.Distance.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.payload.v1.Object.Distance.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.payload.v1.Object.Distance} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.payload.v1.Object.Distance.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getId(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getDistance(); - if (f !== 0.0) { - writer.writeFloat( - 2, - f - ); - } -}; - - -/** - * optional string id = 1; - * @return {string} - */ -proto.payload.v1.Object.Distance.prototype.getId = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.payload.v1.Object.Distance} returns this - */ -proto.payload.v1.Object.Distance.prototype.setId = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - -/** - * optional float distance = 2; - * @return {number} - */ -proto.payload.v1.Object.Distance.prototype.getDistance = function() { - return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 2, 0.0)); -}; - - -/** - * @param {number} value - * @return {!proto.payload.v1.Object.Distance} returns this - */ -proto.payload.v1.Object.Distance.prototype.setDistance = function(value) { - return jspb.Message.setProto3FloatField(this, 2, value); -}; - - - -/** - * Oneof group definitions for this message. Each group defines the field - * numbers belonging to that group. When of these fields' value is set, all - * other fields in the group are cleared. During deserialization, if multiple - * fields are encountered for a group, only the last value seen will be kept. - * @private {!Array>} - * @const - */ -proto.payload.v1.Object.StreamDistance.oneofGroups_ = [[1,2]]; - -/** - * @enum {number} - */ -proto.payload.v1.Object.StreamDistance.PayloadCase = { - PAYLOAD_NOT_SET: 0, - DISTANCE: 1, - STATUS: 2 -}; - -/** - * @return {proto.payload.v1.Object.StreamDistance.PayloadCase} - */ -proto.payload.v1.Object.StreamDistance.prototype.getPayloadCase = function() { - return /** @type {proto.payload.v1.Object.StreamDistance.PayloadCase} */(jspb.Message.computeOneofCase(this, proto.payload.v1.Object.StreamDistance.oneofGroups_[0])); -}; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.payload.v1.Object.StreamDistance.prototype.toObject = function(opt_includeInstance) { - return proto.payload.v1.Object.StreamDistance.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.payload.v1.Object.StreamDistance} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.payload.v1.Object.StreamDistance.toObject = function(includeInstance, msg) { - var f, obj = { - distance: (f = msg.getDistance()) && proto.payload.v1.Object.Distance.toObject(includeInstance, f), - status: (f = msg.getStatus()) && google_rpc_status_pb.Status.toObject(includeInstance, f) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.payload.v1.Object.StreamDistance} - */ -proto.payload.v1.Object.StreamDistance.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.payload.v1.Object.StreamDistance; - return proto.payload.v1.Object.StreamDistance.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.payload.v1.Object.StreamDistance} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.payload.v1.Object.StreamDistance} - */ -proto.payload.v1.Object.StreamDistance.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.payload.v1.Object.Distance; - reader.readMessage(value,proto.payload.v1.Object.Distance.deserializeBinaryFromReader); - msg.setDistance(value); - break; - case 2: - var value = new google_rpc_status_pb.Status; - reader.readMessage(value,google_rpc_status_pb.Status.deserializeBinaryFromReader); - msg.setStatus(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.payload.v1.Object.StreamDistance.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.payload.v1.Object.StreamDistance.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.payload.v1.Object.StreamDistance} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.payload.v1.Object.StreamDistance.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getDistance(); - if (f != null) { - writer.writeMessage( - 1, - f, - proto.payload.v1.Object.Distance.serializeBinaryToWriter - ); - } - f = message.getStatus(); - if (f != null) { - writer.writeMessage( - 2, - f, - google_rpc_status_pb.Status.serializeBinaryToWriter - ); - } -}; - - -/** - * optional Distance distance = 1; - * @return {?proto.payload.v1.Object.Distance} - */ -proto.payload.v1.Object.StreamDistance.prototype.getDistance = function() { - return /** @type{?proto.payload.v1.Object.Distance} */ ( - jspb.Message.getWrapperField(this, proto.payload.v1.Object.Distance, 1)); -}; - - -/** - * @param {?proto.payload.v1.Object.Distance|undefined} value - * @return {!proto.payload.v1.Object.StreamDistance} returns this -*/ -proto.payload.v1.Object.StreamDistance.prototype.setDistance = function(value) { - return jspb.Message.setOneofWrapperField(this, 1, proto.payload.v1.Object.StreamDistance.oneofGroups_[0], value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.payload.v1.Object.StreamDistance} returns this - */ -proto.payload.v1.Object.StreamDistance.prototype.clearDistance = function() { - return this.setDistance(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.payload.v1.Object.StreamDistance.prototype.hasDistance = function() { - return jspb.Message.getField(this, 1) != null; -}; - - -/** - * optional google.rpc.Status status = 2; - * @return {?proto.google.rpc.Status} - */ -proto.payload.v1.Object.StreamDistance.prototype.getStatus = function() { - return /** @type{?proto.google.rpc.Status} */ ( - jspb.Message.getWrapperField(this, google_rpc_status_pb.Status, 2)); -}; - - -/** - * @param {?proto.google.rpc.Status|undefined} value - * @return {!proto.payload.v1.Object.StreamDistance} returns this -*/ -proto.payload.v1.Object.StreamDistance.prototype.setStatus = function(value) { - return jspb.Message.setOneofWrapperField(this, 2, proto.payload.v1.Object.StreamDistance.oneofGroups_[0], value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.payload.v1.Object.StreamDistance} returns this - */ -proto.payload.v1.Object.StreamDistance.prototype.clearStatus = function() { - return this.setStatus(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.payload.v1.Object.StreamDistance.prototype.hasStatus = function() { - return jspb.Message.getField(this, 2) != null; -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.payload.v1.Object.ID.prototype.toObject = function(opt_includeInstance) { - return proto.payload.v1.Object.ID.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.payload.v1.Object.ID} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.payload.v1.Object.ID.toObject = function(includeInstance, msg) { - var f, obj = { - id: jspb.Message.getFieldWithDefault(msg, 1, "") - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.payload.v1.Object.ID} - */ -proto.payload.v1.Object.ID.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.payload.v1.Object.ID; - return proto.payload.v1.Object.ID.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.payload.v1.Object.ID} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.payload.v1.Object.ID} - */ -proto.payload.v1.Object.ID.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setId(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.payload.v1.Object.ID.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.payload.v1.Object.ID.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.payload.v1.Object.ID} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.payload.v1.Object.ID.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getId(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } -}; - - -/** - * optional string id = 1; - * @return {string} - */ -proto.payload.v1.Object.ID.prototype.getId = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.payload.v1.Object.ID} returns this - */ -proto.payload.v1.Object.ID.prototype.setId = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.payload.v1.Object.IDs.repeatedFields_ = [1]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.payload.v1.Object.IDs.prototype.toObject = function(opt_includeInstance) { - return proto.payload.v1.Object.IDs.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.payload.v1.Object.IDs} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.payload.v1.Object.IDs.toObject = function(includeInstance, msg) { - var f, obj = { - idsList: (f = jspb.Message.getRepeatedField(msg, 1)) == null ? undefined : f - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.payload.v1.Object.IDs} - */ -proto.payload.v1.Object.IDs.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.payload.v1.Object.IDs; - return proto.payload.v1.Object.IDs.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.payload.v1.Object.IDs} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.payload.v1.Object.IDs} - */ -proto.payload.v1.Object.IDs.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()); - msg.addIds(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.payload.v1.Object.IDs.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.payload.v1.Object.IDs.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.payload.v1.Object.IDs} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.payload.v1.Object.IDs.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getIdsList(); - if (f.length > 0) { - writer.writeRepeatedString( - 1, - f - ); - } -}; - - -/** - * repeated string ids = 1; - * @return {!Array} - */ -proto.payload.v1.Object.IDs.prototype.getIdsList = function() { - return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 1)); -}; - - -/** - * @param {!Array} value - * @return {!proto.payload.v1.Object.IDs} returns this - */ -proto.payload.v1.Object.IDs.prototype.setIdsList = function(value) { - return jspb.Message.setField(this, 1, value || []); -}; - - -/** - * @param {string} value - * @param {number=} opt_index - * @return {!proto.payload.v1.Object.IDs} returns this - */ -proto.payload.v1.Object.IDs.prototype.addIds = function(value, opt_index) { - return jspb.Message.addToRepeatedField(this, 1, value, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.payload.v1.Object.IDs} returns this - */ -proto.payload.v1.Object.IDs.prototype.clearIdsList = function() { - return this.setIdsList([]); -}; - - - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.payload.v1.Object.Vector.repeatedFields_ = [2]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.payload.v1.Object.Vector.prototype.toObject = function(opt_includeInstance) { - return proto.payload.v1.Object.Vector.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.payload.v1.Object.Vector} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.payload.v1.Object.Vector.toObject = function(includeInstance, msg) { - var f, obj = { - id: jspb.Message.getFieldWithDefault(msg, 1, ""), - vectorList: (f = jspb.Message.getRepeatedFloatingPointField(msg, 2)) == null ? undefined : f, - timestamp: jspb.Message.getFieldWithDefault(msg, 3, 0) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.payload.v1.Object.Vector} - */ -proto.payload.v1.Object.Vector.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.payload.v1.Object.Vector; - return proto.payload.v1.Object.Vector.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.payload.v1.Object.Vector} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.payload.v1.Object.Vector} - */ -proto.payload.v1.Object.Vector.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setId(value); - break; - case 2: - var values = /** @type {!Array} */ (reader.isDelimited() ? reader.readPackedFloat() : [reader.readFloat()]); - for (var i = 0; i < values.length; i++) { - msg.addVector(values[i]); - } - break; - case 3: - var value = /** @type {number} */ (reader.readInt64()); - msg.setTimestamp(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.payload.v1.Object.Vector.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.payload.v1.Object.Vector.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.payload.v1.Object.Vector} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.payload.v1.Object.Vector.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getId(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getVectorList(); - if (f.length > 0) { - writer.writePackedFloat( - 2, - f - ); - } - f = message.getTimestamp(); - if (f !== 0) { - writer.writeInt64( - 3, - f - ); - } -}; - - -/** - * optional string id = 1; - * @return {string} - */ -proto.payload.v1.Object.Vector.prototype.getId = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.payload.v1.Object.Vector} returns this - */ -proto.payload.v1.Object.Vector.prototype.setId = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - -/** - * repeated float vector = 2; - * @return {!Array} - */ -proto.payload.v1.Object.Vector.prototype.getVectorList = function() { - return /** @type {!Array} */ (jspb.Message.getRepeatedFloatingPointField(this, 2)); -}; - - -/** - * @param {!Array} value - * @return {!proto.payload.v1.Object.Vector} returns this - */ -proto.payload.v1.Object.Vector.prototype.setVectorList = function(value) { - return jspb.Message.setField(this, 2, value || []); -}; - - -/** - * @param {number} value - * @param {number=} opt_index - * @return {!proto.payload.v1.Object.Vector} returns this - */ -proto.payload.v1.Object.Vector.prototype.addVector = function(value, opt_index) { - return jspb.Message.addToRepeatedField(this, 2, value, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.payload.v1.Object.Vector} returns this - */ -proto.payload.v1.Object.Vector.prototype.clearVectorList = function() { - return this.setVectorList([]); -}; - - -/** - * optional int64 timestamp = 3; - * @return {number} - */ -proto.payload.v1.Object.Vector.prototype.getTimestamp = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.payload.v1.Object.Vector} returns this - */ -proto.payload.v1.Object.Vector.prototype.setTimestamp = function(value) { - return jspb.Message.setProto3IntField(this, 3, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.payload.v1.Object.GetTimestampRequest.prototype.toObject = function(opt_includeInstance) { - return proto.payload.v1.Object.GetTimestampRequest.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.payload.v1.Object.GetTimestampRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.payload.v1.Object.GetTimestampRequest.toObject = function(includeInstance, msg) { - var f, obj = { - id: (f = msg.getId()) && proto.payload.v1.Object.ID.toObject(includeInstance, f) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.payload.v1.Object.GetTimestampRequest} - */ -proto.payload.v1.Object.GetTimestampRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.payload.v1.Object.GetTimestampRequest; - return proto.payload.v1.Object.GetTimestampRequest.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.payload.v1.Object.GetTimestampRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.payload.v1.Object.GetTimestampRequest} - */ -proto.payload.v1.Object.GetTimestampRequest.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.payload.v1.Object.ID; - reader.readMessage(value,proto.payload.v1.Object.ID.deserializeBinaryFromReader); - msg.setId(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.payload.v1.Object.GetTimestampRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.payload.v1.Object.GetTimestampRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.payload.v1.Object.GetTimestampRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.payload.v1.Object.GetTimestampRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getId(); - if (f != null) { - writer.writeMessage( - 1, - f, - proto.payload.v1.Object.ID.serializeBinaryToWriter - ); - } -}; - - -/** - * optional ID id = 1; - * @return {?proto.payload.v1.Object.ID} - */ -proto.payload.v1.Object.GetTimestampRequest.prototype.getId = function() { - return /** @type{?proto.payload.v1.Object.ID} */ ( - jspb.Message.getWrapperField(this, proto.payload.v1.Object.ID, 1)); -}; - - -/** - * @param {?proto.payload.v1.Object.ID|undefined} value - * @return {!proto.payload.v1.Object.GetTimestampRequest} returns this -*/ -proto.payload.v1.Object.GetTimestampRequest.prototype.setId = function(value) { - return jspb.Message.setWrapperField(this, 1, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.payload.v1.Object.GetTimestampRequest} returns this - */ -proto.payload.v1.Object.GetTimestampRequest.prototype.clearId = function() { - return this.setId(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.payload.v1.Object.GetTimestampRequest.prototype.hasId = function() { - return jspb.Message.getField(this, 1) != null; -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.payload.v1.Object.Timestamp.prototype.toObject = function(opt_includeInstance) { - return proto.payload.v1.Object.Timestamp.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.payload.v1.Object.Timestamp} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.payload.v1.Object.Timestamp.toObject = function(includeInstance, msg) { - var f, obj = { - id: jspb.Message.getFieldWithDefault(msg, 1, ""), - timestamp: jspb.Message.getFieldWithDefault(msg, 2, 0) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.payload.v1.Object.Timestamp} - */ -proto.payload.v1.Object.Timestamp.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.payload.v1.Object.Timestamp; - return proto.payload.v1.Object.Timestamp.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.payload.v1.Object.Timestamp} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.payload.v1.Object.Timestamp} - */ -proto.payload.v1.Object.Timestamp.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setId(value); - break; - case 2: - var value = /** @type {number} */ (reader.readInt64()); - msg.setTimestamp(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.payload.v1.Object.Timestamp.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.payload.v1.Object.Timestamp.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.payload.v1.Object.Timestamp} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.payload.v1.Object.Timestamp.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getId(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getTimestamp(); - if (f !== 0) { - writer.writeInt64( - 2, - f - ); - } -}; - - -/** - * optional string id = 1; - * @return {string} - */ -proto.payload.v1.Object.Timestamp.prototype.getId = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.payload.v1.Object.Timestamp} returns this - */ -proto.payload.v1.Object.Timestamp.prototype.setId = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - -/** - * optional int64 timestamp = 2; - * @return {number} - */ -proto.payload.v1.Object.Timestamp.prototype.getTimestamp = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.payload.v1.Object.Timestamp} returns this - */ -proto.payload.v1.Object.Timestamp.prototype.setTimestamp = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); -}; - - - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.payload.v1.Object.Vectors.repeatedFields_ = [1]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.payload.v1.Object.Vectors.prototype.toObject = function(opt_includeInstance) { - return proto.payload.v1.Object.Vectors.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.payload.v1.Object.Vectors} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.payload.v1.Object.Vectors.toObject = function(includeInstance, msg) { - var f, obj = { - vectorsList: jspb.Message.toObjectList(msg.getVectorsList(), - proto.payload.v1.Object.Vector.toObject, includeInstance) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.payload.v1.Object.Vectors} - */ -proto.payload.v1.Object.Vectors.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.payload.v1.Object.Vectors; - return proto.payload.v1.Object.Vectors.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.payload.v1.Object.Vectors} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.payload.v1.Object.Vectors} - */ -proto.payload.v1.Object.Vectors.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.payload.v1.Object.Vector; - reader.readMessage(value,proto.payload.v1.Object.Vector.deserializeBinaryFromReader); - msg.addVectors(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.payload.v1.Object.Vectors.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.payload.v1.Object.Vectors.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.payload.v1.Object.Vectors} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.payload.v1.Object.Vectors.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getVectorsList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 1, - f, - proto.payload.v1.Object.Vector.serializeBinaryToWriter - ); - } -}; - - -/** - * repeated Vector vectors = 1; - * @return {!Array} - */ -proto.payload.v1.Object.Vectors.prototype.getVectorsList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.payload.v1.Object.Vector, 1)); -}; - - -/** - * @param {!Array} value - * @return {!proto.payload.v1.Object.Vectors} returns this -*/ -proto.payload.v1.Object.Vectors.prototype.setVectorsList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 1, value); -}; - - -/** - * @param {!proto.payload.v1.Object.Vector=} opt_value - * @param {number=} opt_index - * @return {!proto.payload.v1.Object.Vector} - */ -proto.payload.v1.Object.Vectors.prototype.addVectors = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.payload.v1.Object.Vector, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.payload.v1.Object.Vectors} returns this - */ -proto.payload.v1.Object.Vectors.prototype.clearVectorsList = function() { - return this.setVectorsList([]); -}; - - - -/** - * Oneof group definitions for this message. Each group defines the field - * numbers belonging to that group. When of these fields' value is set, all - * other fields in the group are cleared. During deserialization, if multiple - * fields are encountered for a group, only the last value seen will be kept. - * @private {!Array>} - * @const - */ -proto.payload.v1.Object.StreamVector.oneofGroups_ = [[1,2]]; - -/** - * @enum {number} - */ -proto.payload.v1.Object.StreamVector.PayloadCase = { - PAYLOAD_NOT_SET: 0, - VECTOR: 1, - STATUS: 2 -}; - -/** - * @return {proto.payload.v1.Object.StreamVector.PayloadCase} - */ -proto.payload.v1.Object.StreamVector.prototype.getPayloadCase = function() { - return /** @type {proto.payload.v1.Object.StreamVector.PayloadCase} */(jspb.Message.computeOneofCase(this, proto.payload.v1.Object.StreamVector.oneofGroups_[0])); -}; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.payload.v1.Object.StreamVector.prototype.toObject = function(opt_includeInstance) { - return proto.payload.v1.Object.StreamVector.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.payload.v1.Object.StreamVector} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.payload.v1.Object.StreamVector.toObject = function(includeInstance, msg) { - var f, obj = { - vector: (f = msg.getVector()) && proto.payload.v1.Object.Vector.toObject(includeInstance, f), - status: (f = msg.getStatus()) && google_rpc_status_pb.Status.toObject(includeInstance, f) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.payload.v1.Object.StreamVector} - */ -proto.payload.v1.Object.StreamVector.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.payload.v1.Object.StreamVector; - return proto.payload.v1.Object.StreamVector.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.payload.v1.Object.StreamVector} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.payload.v1.Object.StreamVector} - */ -proto.payload.v1.Object.StreamVector.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.payload.v1.Object.Vector; - reader.readMessage(value,proto.payload.v1.Object.Vector.deserializeBinaryFromReader); - msg.setVector(value); - break; - case 2: - var value = new google_rpc_status_pb.Status; - reader.readMessage(value,google_rpc_status_pb.Status.deserializeBinaryFromReader); - msg.setStatus(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.payload.v1.Object.StreamVector.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.payload.v1.Object.StreamVector.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.payload.v1.Object.StreamVector} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.payload.v1.Object.StreamVector.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getVector(); - if (f != null) { - writer.writeMessage( - 1, - f, - proto.payload.v1.Object.Vector.serializeBinaryToWriter - ); - } - f = message.getStatus(); - if (f != null) { - writer.writeMessage( - 2, - f, - google_rpc_status_pb.Status.serializeBinaryToWriter - ); - } -}; - - -/** - * optional Vector vector = 1; - * @return {?proto.payload.v1.Object.Vector} - */ -proto.payload.v1.Object.StreamVector.prototype.getVector = function() { - return /** @type{?proto.payload.v1.Object.Vector} */ ( - jspb.Message.getWrapperField(this, proto.payload.v1.Object.Vector, 1)); -}; - - -/** - * @param {?proto.payload.v1.Object.Vector|undefined} value - * @return {!proto.payload.v1.Object.StreamVector} returns this -*/ -proto.payload.v1.Object.StreamVector.prototype.setVector = function(value) { - return jspb.Message.setOneofWrapperField(this, 1, proto.payload.v1.Object.StreamVector.oneofGroups_[0], value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.payload.v1.Object.StreamVector} returns this - */ -proto.payload.v1.Object.StreamVector.prototype.clearVector = function() { - return this.setVector(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.payload.v1.Object.StreamVector.prototype.hasVector = function() { - return jspb.Message.getField(this, 1) != null; -}; - - -/** - * optional google.rpc.Status status = 2; - * @return {?proto.google.rpc.Status} - */ -proto.payload.v1.Object.StreamVector.prototype.getStatus = function() { - return /** @type{?proto.google.rpc.Status} */ ( - jspb.Message.getWrapperField(this, google_rpc_status_pb.Status, 2)); -}; - - -/** - * @param {?proto.google.rpc.Status|undefined} value - * @return {!proto.payload.v1.Object.StreamVector} returns this -*/ -proto.payload.v1.Object.StreamVector.prototype.setStatus = function(value) { - return jspb.Message.setOneofWrapperField(this, 2, proto.payload.v1.Object.StreamVector.oneofGroups_[0], value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.payload.v1.Object.StreamVector} returns this - */ -proto.payload.v1.Object.StreamVector.prototype.clearStatus = function() { - return this.setStatus(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.payload.v1.Object.StreamVector.prototype.hasStatus = function() { - return jspb.Message.getField(this, 2) != null; -}; - - - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.payload.v1.Object.ReshapeVector.repeatedFields_ = [2]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.payload.v1.Object.ReshapeVector.prototype.toObject = function(opt_includeInstance) { - return proto.payload.v1.Object.ReshapeVector.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.payload.v1.Object.ReshapeVector} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.payload.v1.Object.ReshapeVector.toObject = function(includeInstance, msg) { - var f, obj = { - object: msg.getObject_asB64(), - shapeList: (f = jspb.Message.getRepeatedField(msg, 2)) == null ? undefined : f - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.payload.v1.Object.ReshapeVector} - */ -proto.payload.v1.Object.ReshapeVector.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.payload.v1.Object.ReshapeVector; - return proto.payload.v1.Object.ReshapeVector.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.payload.v1.Object.ReshapeVector} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.payload.v1.Object.ReshapeVector} - */ -proto.payload.v1.Object.ReshapeVector.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setObject(value); - break; - case 2: - var values = /** @type {!Array} */ (reader.isDelimited() ? reader.readPackedInt32() : [reader.readInt32()]); - for (var i = 0; i < values.length; i++) { - msg.addShape(values[i]); - } - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.payload.v1.Object.ReshapeVector.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.payload.v1.Object.ReshapeVector.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.payload.v1.Object.ReshapeVector} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.payload.v1.Object.ReshapeVector.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getObject_asU8(); - if (f.length > 0) { - writer.writeBytes( - 1, - f - ); - } - f = message.getShapeList(); - if (f.length > 0) { - writer.writePackedInt32( - 2, - f - ); - } -}; - - -/** - * optional bytes object = 1; - * @return {string} - */ -proto.payload.v1.Object.ReshapeVector.prototype.getObject = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * optional bytes object = 1; - * This is a type-conversion wrapper around `getObject()` - * @return {string} - */ -proto.payload.v1.Object.ReshapeVector.prototype.getObject_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getObject())); -}; - - -/** - * optional bytes object = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getObject()` - * @return {!Uint8Array} - */ -proto.payload.v1.Object.ReshapeVector.prototype.getObject_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getObject())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.payload.v1.Object.ReshapeVector} returns this - */ -proto.payload.v1.Object.ReshapeVector.prototype.setObject = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); -}; - - -/** - * repeated int32 shape = 2; - * @return {!Array} - */ -proto.payload.v1.Object.ReshapeVector.prototype.getShapeList = function() { - return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 2)); -}; - - -/** - * @param {!Array} value - * @return {!proto.payload.v1.Object.ReshapeVector} returns this - */ -proto.payload.v1.Object.ReshapeVector.prototype.setShapeList = function(value) { - return jspb.Message.setField(this, 2, value || []); -}; - - -/** - * @param {number} value - * @param {number=} opt_index - * @return {!proto.payload.v1.Object.ReshapeVector} returns this - */ -proto.payload.v1.Object.ReshapeVector.prototype.addShape = function(value, opt_index) { - return jspb.Message.addToRepeatedField(this, 2, value, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.payload.v1.Object.ReshapeVector} returns this - */ -proto.payload.v1.Object.ReshapeVector.prototype.clearShapeList = function() { - return this.setShapeList([]); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.payload.v1.Object.Blob.prototype.toObject = function(opt_includeInstance) { - return proto.payload.v1.Object.Blob.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.payload.v1.Object.Blob} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.payload.v1.Object.Blob.toObject = function(includeInstance, msg) { - var f, obj = { - id: jspb.Message.getFieldWithDefault(msg, 1, ""), - object: msg.getObject_asB64() - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.payload.v1.Object.Blob} - */ -proto.payload.v1.Object.Blob.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.payload.v1.Object.Blob; - return proto.payload.v1.Object.Blob.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.payload.v1.Object.Blob} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.payload.v1.Object.Blob} - */ -proto.payload.v1.Object.Blob.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setId(value); - break; - case 2: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setObject(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.payload.v1.Object.Blob.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.payload.v1.Object.Blob.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.payload.v1.Object.Blob} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.payload.v1.Object.Blob.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getId(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getObject_asU8(); - if (f.length > 0) { - writer.writeBytes( - 2, - f - ); - } -}; - - -/** - * optional string id = 1; - * @return {string} - */ -proto.payload.v1.Object.Blob.prototype.getId = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.payload.v1.Object.Blob} returns this - */ -proto.payload.v1.Object.Blob.prototype.setId = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - -/** - * optional bytes object = 2; - * @return {string} - */ -proto.payload.v1.Object.Blob.prototype.getObject = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * optional bytes object = 2; - * This is a type-conversion wrapper around `getObject()` - * @return {string} - */ -proto.payload.v1.Object.Blob.prototype.getObject_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getObject())); -}; - - -/** - * optional bytes object = 2; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getObject()` - * @return {!Uint8Array} - */ -proto.payload.v1.Object.Blob.prototype.getObject_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getObject())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.payload.v1.Object.Blob} returns this - */ -proto.payload.v1.Object.Blob.prototype.setObject = function(value) { - return jspb.Message.setProto3BytesField(this, 2, value); -}; - - - -/** - * Oneof group definitions for this message. Each group defines the field - * numbers belonging to that group. When of these fields' value is set, all - * other fields in the group are cleared. During deserialization, if multiple - * fields are encountered for a group, only the last value seen will be kept. - * @private {!Array>} - * @const - */ -proto.payload.v1.Object.StreamBlob.oneofGroups_ = [[1,2]]; - -/** - * @enum {number} - */ -proto.payload.v1.Object.StreamBlob.PayloadCase = { - PAYLOAD_NOT_SET: 0, - BLOB: 1, - STATUS: 2 -}; - -/** - * @return {proto.payload.v1.Object.StreamBlob.PayloadCase} - */ -proto.payload.v1.Object.StreamBlob.prototype.getPayloadCase = function() { - return /** @type {proto.payload.v1.Object.StreamBlob.PayloadCase} */(jspb.Message.computeOneofCase(this, proto.payload.v1.Object.StreamBlob.oneofGroups_[0])); -}; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.payload.v1.Object.StreamBlob.prototype.toObject = function(opt_includeInstance) { - return proto.payload.v1.Object.StreamBlob.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.payload.v1.Object.StreamBlob} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.payload.v1.Object.StreamBlob.toObject = function(includeInstance, msg) { - var f, obj = { - blob: (f = msg.getBlob()) && proto.payload.v1.Object.Blob.toObject(includeInstance, f), - status: (f = msg.getStatus()) && google_rpc_status_pb.Status.toObject(includeInstance, f) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.payload.v1.Object.StreamBlob} - */ -proto.payload.v1.Object.StreamBlob.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.payload.v1.Object.StreamBlob; - return proto.payload.v1.Object.StreamBlob.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.payload.v1.Object.StreamBlob} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.payload.v1.Object.StreamBlob} - */ -proto.payload.v1.Object.StreamBlob.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.payload.v1.Object.Blob; - reader.readMessage(value,proto.payload.v1.Object.Blob.deserializeBinaryFromReader); - msg.setBlob(value); - break; - case 2: - var value = new google_rpc_status_pb.Status; - reader.readMessage(value,google_rpc_status_pb.Status.deserializeBinaryFromReader); - msg.setStatus(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.payload.v1.Object.StreamBlob.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.payload.v1.Object.StreamBlob.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.payload.v1.Object.StreamBlob} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.payload.v1.Object.StreamBlob.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getBlob(); - if (f != null) { - writer.writeMessage( - 1, - f, - proto.payload.v1.Object.Blob.serializeBinaryToWriter - ); - } - f = message.getStatus(); - if (f != null) { - writer.writeMessage( - 2, - f, - google_rpc_status_pb.Status.serializeBinaryToWriter - ); - } -}; - - -/** - * optional Blob blob = 1; - * @return {?proto.payload.v1.Object.Blob} - */ -proto.payload.v1.Object.StreamBlob.prototype.getBlob = function() { - return /** @type{?proto.payload.v1.Object.Blob} */ ( - jspb.Message.getWrapperField(this, proto.payload.v1.Object.Blob, 1)); -}; - - -/** - * @param {?proto.payload.v1.Object.Blob|undefined} value - * @return {!proto.payload.v1.Object.StreamBlob} returns this -*/ -proto.payload.v1.Object.StreamBlob.prototype.setBlob = function(value) { - return jspb.Message.setOneofWrapperField(this, 1, proto.payload.v1.Object.StreamBlob.oneofGroups_[0], value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.payload.v1.Object.StreamBlob} returns this - */ -proto.payload.v1.Object.StreamBlob.prototype.clearBlob = function() { - return this.setBlob(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.payload.v1.Object.StreamBlob.prototype.hasBlob = function() { - return jspb.Message.getField(this, 1) != null; -}; - - -/** - * optional google.rpc.Status status = 2; - * @return {?proto.google.rpc.Status} - */ -proto.payload.v1.Object.StreamBlob.prototype.getStatus = function() { - return /** @type{?proto.google.rpc.Status} */ ( - jspb.Message.getWrapperField(this, google_rpc_status_pb.Status, 2)); -}; - - -/** - * @param {?proto.google.rpc.Status|undefined} value - * @return {!proto.payload.v1.Object.StreamBlob} returns this -*/ -proto.payload.v1.Object.StreamBlob.prototype.setStatus = function(value) { - return jspb.Message.setOneofWrapperField(this, 2, proto.payload.v1.Object.StreamBlob.oneofGroups_[0], value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.payload.v1.Object.StreamBlob} returns this - */ -proto.payload.v1.Object.StreamBlob.prototype.clearStatus = function() { - return this.setStatus(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.payload.v1.Object.StreamBlob.prototype.hasStatus = function() { - return jspb.Message.getField(this, 2) != null; -}; - - - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.payload.v1.Object.Location.repeatedFields_ = [3]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.payload.v1.Object.Location.prototype.toObject = function(opt_includeInstance) { - return proto.payload.v1.Object.Location.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.payload.v1.Object.Location} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.payload.v1.Object.Location.toObject = function(includeInstance, msg) { - var f, obj = { - name: jspb.Message.getFieldWithDefault(msg, 1, ""), - uuid: jspb.Message.getFieldWithDefault(msg, 2, ""), - ipsList: (f = jspb.Message.getRepeatedField(msg, 3)) == null ? undefined : f - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.payload.v1.Object.Location} - */ -proto.payload.v1.Object.Location.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.payload.v1.Object.Location; - return proto.payload.v1.Object.Location.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.payload.v1.Object.Location} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.payload.v1.Object.Location} - */ -proto.payload.v1.Object.Location.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setName(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setUuid(value); - break; - case 3: - var value = /** @type {string} */ (reader.readString()); - msg.addIps(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.payload.v1.Object.Location.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.payload.v1.Object.Location.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.payload.v1.Object.Location} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.payload.v1.Object.Location.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getName(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getUuid(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } - f = message.getIpsList(); - if (f.length > 0) { - writer.writeRepeatedString( - 3, - f - ); - } -}; - - -/** - * optional string name = 1; - * @return {string} - */ -proto.payload.v1.Object.Location.prototype.getName = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.payload.v1.Object.Location} returns this - */ -proto.payload.v1.Object.Location.prototype.setName = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - -/** - * optional string uuid = 2; - * @return {string} - */ -proto.payload.v1.Object.Location.prototype.getUuid = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * @param {string} value - * @return {!proto.payload.v1.Object.Location} returns this - */ -proto.payload.v1.Object.Location.prototype.setUuid = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); -}; - - -/** - * repeated string ips = 3; - * @return {!Array} - */ -proto.payload.v1.Object.Location.prototype.getIpsList = function() { - return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 3)); -}; - - -/** - * @param {!Array} value - * @return {!proto.payload.v1.Object.Location} returns this - */ -proto.payload.v1.Object.Location.prototype.setIpsList = function(value) { - return jspb.Message.setField(this, 3, value || []); -}; - - -/** - * @param {string} value - * @param {number=} opt_index - * @return {!proto.payload.v1.Object.Location} returns this - */ -proto.payload.v1.Object.Location.prototype.addIps = function(value, opt_index) { - return jspb.Message.addToRepeatedField(this, 3, value, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.payload.v1.Object.Location} returns this - */ -proto.payload.v1.Object.Location.prototype.clearIpsList = function() { - return this.setIpsList([]); -}; - - - -/** - * Oneof group definitions for this message. Each group defines the field - * numbers belonging to that group. When of these fields' value is set, all - * other fields in the group are cleared. During deserialization, if multiple - * fields are encountered for a group, only the last value seen will be kept. - * @private {!Array>} - * @const - */ -proto.payload.v1.Object.StreamLocation.oneofGroups_ = [[1,2]]; - -/** - * @enum {number} - */ -proto.payload.v1.Object.StreamLocation.PayloadCase = { - PAYLOAD_NOT_SET: 0, - LOCATION: 1, - STATUS: 2 -}; - -/** - * @return {proto.payload.v1.Object.StreamLocation.PayloadCase} - */ -proto.payload.v1.Object.StreamLocation.prototype.getPayloadCase = function() { - return /** @type {proto.payload.v1.Object.StreamLocation.PayloadCase} */(jspb.Message.computeOneofCase(this, proto.payload.v1.Object.StreamLocation.oneofGroups_[0])); -}; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.payload.v1.Object.StreamLocation.prototype.toObject = function(opt_includeInstance) { - return proto.payload.v1.Object.StreamLocation.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.payload.v1.Object.StreamLocation} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.payload.v1.Object.StreamLocation.toObject = function(includeInstance, msg) { - var f, obj = { - location: (f = msg.getLocation()) && proto.payload.v1.Object.Location.toObject(includeInstance, f), - status: (f = msg.getStatus()) && google_rpc_status_pb.Status.toObject(includeInstance, f) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.payload.v1.Object.StreamLocation} - */ -proto.payload.v1.Object.StreamLocation.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.payload.v1.Object.StreamLocation; - return proto.payload.v1.Object.StreamLocation.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.payload.v1.Object.StreamLocation} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.payload.v1.Object.StreamLocation} - */ -proto.payload.v1.Object.StreamLocation.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.payload.v1.Object.Location; - reader.readMessage(value,proto.payload.v1.Object.Location.deserializeBinaryFromReader); - msg.setLocation(value); - break; - case 2: - var value = new google_rpc_status_pb.Status; - reader.readMessage(value,google_rpc_status_pb.Status.deserializeBinaryFromReader); - msg.setStatus(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.payload.v1.Object.StreamLocation.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.payload.v1.Object.StreamLocation.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.payload.v1.Object.StreamLocation} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.payload.v1.Object.StreamLocation.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getLocation(); - if (f != null) { - writer.writeMessage( - 1, - f, - proto.payload.v1.Object.Location.serializeBinaryToWriter - ); - } - f = message.getStatus(); - if (f != null) { - writer.writeMessage( - 2, - f, - google_rpc_status_pb.Status.serializeBinaryToWriter - ); - } -}; - - -/** - * optional Location location = 1; - * @return {?proto.payload.v1.Object.Location} - */ -proto.payload.v1.Object.StreamLocation.prototype.getLocation = function() { - return /** @type{?proto.payload.v1.Object.Location} */ ( - jspb.Message.getWrapperField(this, proto.payload.v1.Object.Location, 1)); -}; - - -/** - * @param {?proto.payload.v1.Object.Location|undefined} value - * @return {!proto.payload.v1.Object.StreamLocation} returns this -*/ -proto.payload.v1.Object.StreamLocation.prototype.setLocation = function(value) { - return jspb.Message.setOneofWrapperField(this, 1, proto.payload.v1.Object.StreamLocation.oneofGroups_[0], value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.payload.v1.Object.StreamLocation} returns this - */ -proto.payload.v1.Object.StreamLocation.prototype.clearLocation = function() { - return this.setLocation(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.payload.v1.Object.StreamLocation.prototype.hasLocation = function() { - return jspb.Message.getField(this, 1) != null; -}; - - -/** - * optional google.rpc.Status status = 2; - * @return {?proto.google.rpc.Status} - */ -proto.payload.v1.Object.StreamLocation.prototype.getStatus = function() { - return /** @type{?proto.google.rpc.Status} */ ( - jspb.Message.getWrapperField(this, google_rpc_status_pb.Status, 2)); -}; - - -/** - * @param {?proto.google.rpc.Status|undefined} value - * @return {!proto.payload.v1.Object.StreamLocation} returns this -*/ -proto.payload.v1.Object.StreamLocation.prototype.setStatus = function(value) { - return jspb.Message.setOneofWrapperField(this, 2, proto.payload.v1.Object.StreamLocation.oneofGroups_[0], value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.payload.v1.Object.StreamLocation} returns this - */ -proto.payload.v1.Object.StreamLocation.prototype.clearStatus = function() { - return this.setStatus(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.payload.v1.Object.StreamLocation.prototype.hasStatus = function() { - return jspb.Message.getField(this, 2) != null; -}; - - - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.payload.v1.Object.Locations.repeatedFields_ = [1]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.payload.v1.Object.Locations.prototype.toObject = function(opt_includeInstance) { - return proto.payload.v1.Object.Locations.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.payload.v1.Object.Locations} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.payload.v1.Object.Locations.toObject = function(includeInstance, msg) { - var f, obj = { - locationsList: jspb.Message.toObjectList(msg.getLocationsList(), - proto.payload.v1.Object.Location.toObject, includeInstance) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.payload.v1.Object.Locations} - */ -proto.payload.v1.Object.Locations.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.payload.v1.Object.Locations; - return proto.payload.v1.Object.Locations.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.payload.v1.Object.Locations} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.payload.v1.Object.Locations} - */ -proto.payload.v1.Object.Locations.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.payload.v1.Object.Location; - reader.readMessage(value,proto.payload.v1.Object.Location.deserializeBinaryFromReader); - msg.addLocations(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.payload.v1.Object.Locations.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.payload.v1.Object.Locations.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.payload.v1.Object.Locations} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.payload.v1.Object.Locations.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getLocationsList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 1, - f, - proto.payload.v1.Object.Location.serializeBinaryToWriter - ); - } -}; - - -/** - * repeated Location locations = 1; - * @return {!Array} - */ -proto.payload.v1.Object.Locations.prototype.getLocationsList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.payload.v1.Object.Location, 1)); -}; - - -/** - * @param {!Array} value - * @return {!proto.payload.v1.Object.Locations} returns this -*/ -proto.payload.v1.Object.Locations.prototype.setLocationsList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 1, value); -}; - - -/** - * @param {!proto.payload.v1.Object.Location=} opt_value - * @param {number=} opt_index - * @return {!proto.payload.v1.Object.Location} - */ -proto.payload.v1.Object.Locations.prototype.addLocations = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.payload.v1.Object.Location, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.payload.v1.Object.Locations} returns this - */ -proto.payload.v1.Object.Locations.prototype.clearLocationsList = function() { - return this.setLocationsList([]); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.payload.v1.Object.List.prototype.toObject = function(opt_includeInstance) { - return proto.payload.v1.Object.List.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.payload.v1.Object.List} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.payload.v1.Object.List.toObject = function(includeInstance, msg) { - var f, obj = { - - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.payload.v1.Object.List} - */ -proto.payload.v1.Object.List.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.payload.v1.Object.List; - return proto.payload.v1.Object.List.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.payload.v1.Object.List} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.payload.v1.Object.List} - */ -proto.payload.v1.Object.List.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.payload.v1.Object.List.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.payload.v1.Object.List.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.payload.v1.Object.List} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.payload.v1.Object.List.serializeBinaryToWriter = function(message, writer) { - var f = undefined; -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.payload.v1.Object.List.Request.prototype.toObject = function(opt_includeInstance) { - return proto.payload.v1.Object.List.Request.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.payload.v1.Object.List.Request} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.payload.v1.Object.List.Request.toObject = function(includeInstance, msg) { - var f, obj = { - - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.payload.v1.Object.List.Request} - */ -proto.payload.v1.Object.List.Request.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.payload.v1.Object.List.Request; - return proto.payload.v1.Object.List.Request.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.payload.v1.Object.List.Request} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.payload.v1.Object.List.Request} - */ -proto.payload.v1.Object.List.Request.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.payload.v1.Object.List.Request.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.payload.v1.Object.List.Request.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.payload.v1.Object.List.Request} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.payload.v1.Object.List.Request.serializeBinaryToWriter = function(message, writer) { - var f = undefined; -}; - - - -/** - * Oneof group definitions for this message. Each group defines the field - * numbers belonging to that group. When of these fields' value is set, all - * other fields in the group are cleared. During deserialization, if multiple - * fields are encountered for a group, only the last value seen will be kept. - * @private {!Array>} - * @const - */ -proto.payload.v1.Object.List.Response.oneofGroups_ = [[1,2]]; - -/** - * @enum {number} - */ -proto.payload.v1.Object.List.Response.PayloadCase = { - PAYLOAD_NOT_SET: 0, - VECTOR: 1, - STATUS: 2 -}; - -/** - * @return {proto.payload.v1.Object.List.Response.PayloadCase} - */ -proto.payload.v1.Object.List.Response.prototype.getPayloadCase = function() { - return /** @type {proto.payload.v1.Object.List.Response.PayloadCase} */(jspb.Message.computeOneofCase(this, proto.payload.v1.Object.List.Response.oneofGroups_[0])); -}; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.payload.v1.Object.List.Response.prototype.toObject = function(opt_includeInstance) { - return proto.payload.v1.Object.List.Response.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.payload.v1.Object.List.Response} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.payload.v1.Object.List.Response.toObject = function(includeInstance, msg) { - var f, obj = { - vector: (f = msg.getVector()) && proto.payload.v1.Object.Vector.toObject(includeInstance, f), - status: (f = msg.getStatus()) && google_rpc_status_pb.Status.toObject(includeInstance, f) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.payload.v1.Object.List.Response} - */ -proto.payload.v1.Object.List.Response.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.payload.v1.Object.List.Response; - return proto.payload.v1.Object.List.Response.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.payload.v1.Object.List.Response} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.payload.v1.Object.List.Response} - */ -proto.payload.v1.Object.List.Response.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.payload.v1.Object.Vector; - reader.readMessage(value,proto.payload.v1.Object.Vector.deserializeBinaryFromReader); - msg.setVector(value); - break; - case 2: - var value = new google_rpc_status_pb.Status; - reader.readMessage(value,google_rpc_status_pb.Status.deserializeBinaryFromReader); - msg.setStatus(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.payload.v1.Object.List.Response.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.payload.v1.Object.List.Response.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.payload.v1.Object.List.Response} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.payload.v1.Object.List.Response.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getVector(); - if (f != null) { - writer.writeMessage( - 1, - f, - proto.payload.v1.Object.Vector.serializeBinaryToWriter - ); - } - f = message.getStatus(); - if (f != null) { - writer.writeMessage( - 2, - f, - google_rpc_status_pb.Status.serializeBinaryToWriter - ); - } -}; - - -/** - * optional Vector vector = 1; - * @return {?proto.payload.v1.Object.Vector} - */ -proto.payload.v1.Object.List.Response.prototype.getVector = function() { - return /** @type{?proto.payload.v1.Object.Vector} */ ( - jspb.Message.getWrapperField(this, proto.payload.v1.Object.Vector, 1)); -}; - - -/** - * @param {?proto.payload.v1.Object.Vector|undefined} value - * @return {!proto.payload.v1.Object.List.Response} returns this -*/ -proto.payload.v1.Object.List.Response.prototype.setVector = function(value) { - return jspb.Message.setOneofWrapperField(this, 1, proto.payload.v1.Object.List.Response.oneofGroups_[0], value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.payload.v1.Object.List.Response} returns this - */ -proto.payload.v1.Object.List.Response.prototype.clearVector = function() { - return this.setVector(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.payload.v1.Object.List.Response.prototype.hasVector = function() { - return jspb.Message.getField(this, 1) != null; -}; - - -/** - * optional google.rpc.Status status = 2; - * @return {?proto.google.rpc.Status} - */ -proto.payload.v1.Object.List.Response.prototype.getStatus = function() { - return /** @type{?proto.google.rpc.Status} */ ( - jspb.Message.getWrapperField(this, google_rpc_status_pb.Status, 2)); -}; - - -/** - * @param {?proto.google.rpc.Status|undefined} value - * @return {!proto.payload.v1.Object.List.Response} returns this -*/ -proto.payload.v1.Object.List.Response.prototype.setStatus = function(value) { - return jspb.Message.setOneofWrapperField(this, 2, proto.payload.v1.Object.List.Response.oneofGroups_[0], value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.payload.v1.Object.List.Response} returns this - */ -proto.payload.v1.Object.List.Response.prototype.clearStatus = function() { - return this.setStatus(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.payload.v1.Object.List.Response.prototype.hasStatus = function() { - return jspb.Message.getField(this, 2) != null; -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.payload.v1.Control.prototype.toObject = function(opt_includeInstance) { - return proto.payload.v1.Control.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.payload.v1.Control} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.payload.v1.Control.toObject = function(includeInstance, msg) { - var f, obj = { - - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.payload.v1.Control} - */ -proto.payload.v1.Control.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.payload.v1.Control; - return proto.payload.v1.Control.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.payload.v1.Control} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.payload.v1.Control} - */ -proto.payload.v1.Control.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.payload.v1.Control.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.payload.v1.Control.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.payload.v1.Control} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.payload.v1.Control.serializeBinaryToWriter = function(message, writer) { - var f = undefined; -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.payload.v1.Control.CreateIndexRequest.prototype.toObject = function(opt_includeInstance) { - return proto.payload.v1.Control.CreateIndexRequest.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.payload.v1.Control.CreateIndexRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.payload.v1.Control.CreateIndexRequest.toObject = function(includeInstance, msg) { - var f, obj = { - poolSize: jspb.Message.getFieldWithDefault(msg, 1, 0) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.payload.v1.Control.CreateIndexRequest} - */ -proto.payload.v1.Control.CreateIndexRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.payload.v1.Control.CreateIndexRequest; - return proto.payload.v1.Control.CreateIndexRequest.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.payload.v1.Control.CreateIndexRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.payload.v1.Control.CreateIndexRequest} - */ -proto.payload.v1.Control.CreateIndexRequest.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {number} */ (reader.readUint32()); - msg.setPoolSize(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.payload.v1.Control.CreateIndexRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.payload.v1.Control.CreateIndexRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.payload.v1.Control.CreateIndexRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.payload.v1.Control.CreateIndexRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getPoolSize(); - if (f !== 0) { - writer.writeUint32( - 1, - f - ); - } -}; - - -/** - * optional uint32 pool_size = 1; - * @return {number} - */ -proto.payload.v1.Control.CreateIndexRequest.prototype.getPoolSize = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.payload.v1.Control.CreateIndexRequest} returns this - */ -proto.payload.v1.Control.CreateIndexRequest.prototype.setPoolSize = function(value) { - return jspb.Message.setProto3IntField(this, 1, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.payload.v1.Discoverer.prototype.toObject = function(opt_includeInstance) { - return proto.payload.v1.Discoverer.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.payload.v1.Discoverer} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.payload.v1.Discoverer.toObject = function(includeInstance, msg) { - var f, obj = { - - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.payload.v1.Discoverer} - */ -proto.payload.v1.Discoverer.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.payload.v1.Discoverer; - return proto.payload.v1.Discoverer.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.payload.v1.Discoverer} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.payload.v1.Discoverer} - */ -proto.payload.v1.Discoverer.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.payload.v1.Discoverer.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.payload.v1.Discoverer.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.payload.v1.Discoverer} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.payload.v1.Discoverer.serializeBinaryToWriter = function(message, writer) { - var f = undefined; -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.payload.v1.Discoverer.Request.prototype.toObject = function(opt_includeInstance) { - return proto.payload.v1.Discoverer.Request.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.payload.v1.Discoverer.Request} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.payload.v1.Discoverer.Request.toObject = function(includeInstance, msg) { - var f, obj = { - name: jspb.Message.getFieldWithDefault(msg, 1, ""), - namespace: jspb.Message.getFieldWithDefault(msg, 2, ""), - node: jspb.Message.getFieldWithDefault(msg, 3, "") - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.payload.v1.Discoverer.Request} - */ -proto.payload.v1.Discoverer.Request.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.payload.v1.Discoverer.Request; - return proto.payload.v1.Discoverer.Request.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.payload.v1.Discoverer.Request} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.payload.v1.Discoverer.Request} - */ -proto.payload.v1.Discoverer.Request.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setName(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setNamespace(value); - break; - case 3: - var value = /** @type {string} */ (reader.readString()); - msg.setNode(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.payload.v1.Discoverer.Request.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.payload.v1.Discoverer.Request.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.payload.v1.Discoverer.Request} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.payload.v1.Discoverer.Request.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getName(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getNamespace(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } - f = message.getNode(); - if (f.length > 0) { - writer.writeString( - 3, - f - ); - } -}; - - -/** - * optional string name = 1; - * @return {string} - */ -proto.payload.v1.Discoverer.Request.prototype.getName = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.payload.v1.Discoverer.Request} returns this - */ -proto.payload.v1.Discoverer.Request.prototype.setName = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - -/** - * optional string namespace = 2; - * @return {string} - */ -proto.payload.v1.Discoverer.Request.prototype.getNamespace = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * @param {string} value - * @return {!proto.payload.v1.Discoverer.Request} returns this - */ -proto.payload.v1.Discoverer.Request.prototype.setNamespace = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); -}; - - -/** - * optional string node = 3; - * @return {string} - */ -proto.payload.v1.Discoverer.Request.prototype.getNode = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); -}; - - -/** - * @param {string} value - * @return {!proto.payload.v1.Discoverer.Request} returns this - */ -proto.payload.v1.Discoverer.Request.prototype.setNode = function(value) { - return jspb.Message.setProto3StringField(this, 3, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.payload.v1.Info.prototype.toObject = function(opt_includeInstance) { - return proto.payload.v1.Info.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.payload.v1.Info} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.payload.v1.Info.toObject = function(includeInstance, msg) { - var f, obj = { - - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.payload.v1.Info} - */ -proto.payload.v1.Info.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.payload.v1.Info; - return proto.payload.v1.Info.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.payload.v1.Info} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.payload.v1.Info} - */ -proto.payload.v1.Info.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.payload.v1.Info.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.payload.v1.Info.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.payload.v1.Info} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.payload.v1.Info.serializeBinaryToWriter = function(message, writer) { - var f = undefined; -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.payload.v1.Info.Index.prototype.toObject = function(opt_includeInstance) { - return proto.payload.v1.Info.Index.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.payload.v1.Info.Index} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.payload.v1.Info.Index.toObject = function(includeInstance, msg) { - var f, obj = { - - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.payload.v1.Info.Index} - */ -proto.payload.v1.Info.Index.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.payload.v1.Info.Index; - return proto.payload.v1.Info.Index.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.payload.v1.Info.Index} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.payload.v1.Info.Index} - */ -proto.payload.v1.Info.Index.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.payload.v1.Info.Index.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.payload.v1.Info.Index.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.payload.v1.Info.Index} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.payload.v1.Info.Index.serializeBinaryToWriter = function(message, writer) { - var f = undefined; -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.payload.v1.Info.Index.Count.prototype.toObject = function(opt_includeInstance) { - return proto.payload.v1.Info.Index.Count.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.payload.v1.Info.Index.Count} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.payload.v1.Info.Index.Count.toObject = function(includeInstance, msg) { - var f, obj = { - stored: jspb.Message.getFieldWithDefault(msg, 1, 0), - uncommitted: jspb.Message.getFieldWithDefault(msg, 2, 0), - indexing: jspb.Message.getBooleanFieldWithDefault(msg, 3, false), - saving: jspb.Message.getBooleanFieldWithDefault(msg, 4, false) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.payload.v1.Info.Index.Count} - */ -proto.payload.v1.Info.Index.Count.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.payload.v1.Info.Index.Count; - return proto.payload.v1.Info.Index.Count.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.payload.v1.Info.Index.Count} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.payload.v1.Info.Index.Count} - */ -proto.payload.v1.Info.Index.Count.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {number} */ (reader.readUint32()); - msg.setStored(value); - break; - case 2: - var value = /** @type {number} */ (reader.readUint32()); - msg.setUncommitted(value); - break; - case 3: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setIndexing(value); - break; - case 4: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setSaving(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.payload.v1.Info.Index.Count.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.payload.v1.Info.Index.Count.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.payload.v1.Info.Index.Count} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.payload.v1.Info.Index.Count.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getStored(); - if (f !== 0) { - writer.writeUint32( - 1, - f - ); - } - f = message.getUncommitted(); - if (f !== 0) { - writer.writeUint32( - 2, - f - ); - } - f = message.getIndexing(); - if (f) { - writer.writeBool( - 3, - f - ); - } - f = message.getSaving(); - if (f) { - writer.writeBool( - 4, - f - ); - } -}; - - -/** - * optional uint32 stored = 1; - * @return {number} - */ -proto.payload.v1.Info.Index.Count.prototype.getStored = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.payload.v1.Info.Index.Count} returns this - */ -proto.payload.v1.Info.Index.Count.prototype.setStored = function(value) { - return jspb.Message.setProto3IntField(this, 1, value); -}; - - -/** - * optional uint32 uncommitted = 2; - * @return {number} - */ -proto.payload.v1.Info.Index.Count.prototype.getUncommitted = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.payload.v1.Info.Index.Count} returns this - */ -proto.payload.v1.Info.Index.Count.prototype.setUncommitted = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); -}; - - -/** - * optional bool indexing = 3; - * @return {boolean} - */ -proto.payload.v1.Info.Index.Count.prototype.getIndexing = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 3, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.payload.v1.Info.Index.Count} returns this - */ -proto.payload.v1.Info.Index.Count.prototype.setIndexing = function(value) { - return jspb.Message.setProto3BooleanField(this, 3, value); -}; - - -/** - * optional bool saving = 4; - * @return {boolean} - */ -proto.payload.v1.Info.Index.Count.prototype.getSaving = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 4, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.payload.v1.Info.Index.Count} returns this - */ -proto.payload.v1.Info.Index.Count.prototype.setSaving = function(value) { - return jspb.Message.setProto3BooleanField(this, 4, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.payload.v1.Info.Index.UUID.prototype.toObject = function(opt_includeInstance) { - return proto.payload.v1.Info.Index.UUID.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.payload.v1.Info.Index.UUID} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.payload.v1.Info.Index.UUID.toObject = function(includeInstance, msg) { - var f, obj = { - - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.payload.v1.Info.Index.UUID} - */ -proto.payload.v1.Info.Index.UUID.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.payload.v1.Info.Index.UUID; - return proto.payload.v1.Info.Index.UUID.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.payload.v1.Info.Index.UUID} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.payload.v1.Info.Index.UUID} - */ -proto.payload.v1.Info.Index.UUID.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.payload.v1.Info.Index.UUID.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.payload.v1.Info.Index.UUID.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.payload.v1.Info.Index.UUID} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.payload.v1.Info.Index.UUID.serializeBinaryToWriter = function(message, writer) { - var f = undefined; -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.payload.v1.Info.Index.UUID.Committed.prototype.toObject = function(opt_includeInstance) { - return proto.payload.v1.Info.Index.UUID.Committed.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.payload.v1.Info.Index.UUID.Committed} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.payload.v1.Info.Index.UUID.Committed.toObject = function(includeInstance, msg) { - var f, obj = { - uuid: jspb.Message.getFieldWithDefault(msg, 1, "") - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.payload.v1.Info.Index.UUID.Committed} - */ -proto.payload.v1.Info.Index.UUID.Committed.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.payload.v1.Info.Index.UUID.Committed; - return proto.payload.v1.Info.Index.UUID.Committed.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.payload.v1.Info.Index.UUID.Committed} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.payload.v1.Info.Index.UUID.Committed} - */ -proto.payload.v1.Info.Index.UUID.Committed.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setUuid(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.payload.v1.Info.Index.UUID.Committed.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.payload.v1.Info.Index.UUID.Committed.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.payload.v1.Info.Index.UUID.Committed} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.payload.v1.Info.Index.UUID.Committed.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getUuid(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } -}; - - -/** - * optional string uuid = 1; - * @return {string} - */ -proto.payload.v1.Info.Index.UUID.Committed.prototype.getUuid = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.payload.v1.Info.Index.UUID.Committed} returns this - */ -proto.payload.v1.Info.Index.UUID.Committed.prototype.setUuid = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.payload.v1.Info.Index.UUID.Uncommitted.prototype.toObject = function(opt_includeInstance) { - return proto.payload.v1.Info.Index.UUID.Uncommitted.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.payload.v1.Info.Index.UUID.Uncommitted} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.payload.v1.Info.Index.UUID.Uncommitted.toObject = function(includeInstance, msg) { - var f, obj = { - uuid: jspb.Message.getFieldWithDefault(msg, 1, "") - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.payload.v1.Info.Index.UUID.Uncommitted} - */ -proto.payload.v1.Info.Index.UUID.Uncommitted.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.payload.v1.Info.Index.UUID.Uncommitted; - return proto.payload.v1.Info.Index.UUID.Uncommitted.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.payload.v1.Info.Index.UUID.Uncommitted} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.payload.v1.Info.Index.UUID.Uncommitted} - */ -proto.payload.v1.Info.Index.UUID.Uncommitted.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setUuid(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.payload.v1.Info.Index.UUID.Uncommitted.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.payload.v1.Info.Index.UUID.Uncommitted.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.payload.v1.Info.Index.UUID.Uncommitted} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.payload.v1.Info.Index.UUID.Uncommitted.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getUuid(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } -}; - - -/** - * optional string uuid = 1; - * @return {string} - */ -proto.payload.v1.Info.Index.UUID.Uncommitted.prototype.getUuid = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.payload.v1.Info.Index.UUID.Uncommitted} returns this - */ -proto.payload.v1.Info.Index.UUID.Uncommitted.prototype.setUuid = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.payload.v1.Info.Pod.prototype.toObject = function(opt_includeInstance) { - return proto.payload.v1.Info.Pod.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.payload.v1.Info.Pod} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.payload.v1.Info.Pod.toObject = function(includeInstance, msg) { - var f, obj = { - appName: jspb.Message.getFieldWithDefault(msg, 1, ""), - name: jspb.Message.getFieldWithDefault(msg, 2, ""), - namespace: jspb.Message.getFieldWithDefault(msg, 3, ""), - ip: jspb.Message.getFieldWithDefault(msg, 4, ""), - cpu: (f = msg.getCpu()) && proto.payload.v1.Info.CPU.toObject(includeInstance, f), - memory: (f = msg.getMemory()) && proto.payload.v1.Info.Memory.toObject(includeInstance, f), - node: (f = msg.getNode()) && proto.payload.v1.Info.Node.toObject(includeInstance, f) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.payload.v1.Info.Pod} - */ -proto.payload.v1.Info.Pod.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.payload.v1.Info.Pod; - return proto.payload.v1.Info.Pod.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.payload.v1.Info.Pod} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.payload.v1.Info.Pod} - */ -proto.payload.v1.Info.Pod.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setAppName(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setName(value); - break; - case 3: - var value = /** @type {string} */ (reader.readString()); - msg.setNamespace(value); - break; - case 4: - var value = /** @type {string} */ (reader.readString()); - msg.setIp(value); - break; - case 5: - var value = new proto.payload.v1.Info.CPU; - reader.readMessage(value,proto.payload.v1.Info.CPU.deserializeBinaryFromReader); - msg.setCpu(value); - break; - case 6: - var value = new proto.payload.v1.Info.Memory; - reader.readMessage(value,proto.payload.v1.Info.Memory.deserializeBinaryFromReader); - msg.setMemory(value); - break; - case 7: - var value = new proto.payload.v1.Info.Node; - reader.readMessage(value,proto.payload.v1.Info.Node.deserializeBinaryFromReader); - msg.setNode(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.payload.v1.Info.Pod.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.payload.v1.Info.Pod.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.payload.v1.Info.Pod} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.payload.v1.Info.Pod.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getAppName(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getName(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } - f = message.getNamespace(); - if (f.length > 0) { - writer.writeString( - 3, - f - ); - } - f = message.getIp(); - if (f.length > 0) { - writer.writeString( - 4, - f - ); - } - f = message.getCpu(); - if (f != null) { - writer.writeMessage( - 5, - f, - proto.payload.v1.Info.CPU.serializeBinaryToWriter - ); - } - f = message.getMemory(); - if (f != null) { - writer.writeMessage( - 6, - f, - proto.payload.v1.Info.Memory.serializeBinaryToWriter - ); - } - f = message.getNode(); - if (f != null) { - writer.writeMessage( - 7, - f, - proto.payload.v1.Info.Node.serializeBinaryToWriter - ); - } -}; - - -/** - * optional string app_name = 1; - * @return {string} - */ -proto.payload.v1.Info.Pod.prototype.getAppName = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.payload.v1.Info.Pod} returns this - */ -proto.payload.v1.Info.Pod.prototype.setAppName = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - -/** - * optional string name = 2; - * @return {string} - */ -proto.payload.v1.Info.Pod.prototype.getName = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * @param {string} value - * @return {!proto.payload.v1.Info.Pod} returns this - */ -proto.payload.v1.Info.Pod.prototype.setName = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); -}; - - -/** - * optional string namespace = 3; - * @return {string} - */ -proto.payload.v1.Info.Pod.prototype.getNamespace = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); -}; - - -/** - * @param {string} value - * @return {!proto.payload.v1.Info.Pod} returns this - */ -proto.payload.v1.Info.Pod.prototype.setNamespace = function(value) { - return jspb.Message.setProto3StringField(this, 3, value); -}; - - -/** - * optional string ip = 4; - * @return {string} - */ -proto.payload.v1.Info.Pod.prototype.getIp = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); -}; - - -/** - * @param {string} value - * @return {!proto.payload.v1.Info.Pod} returns this - */ -proto.payload.v1.Info.Pod.prototype.setIp = function(value) { - return jspb.Message.setProto3StringField(this, 4, value); -}; - - -/** - * optional CPU cpu = 5; - * @return {?proto.payload.v1.Info.CPU} - */ -proto.payload.v1.Info.Pod.prototype.getCpu = function() { - return /** @type{?proto.payload.v1.Info.CPU} */ ( - jspb.Message.getWrapperField(this, proto.payload.v1.Info.CPU, 5)); -}; - - -/** - * @param {?proto.payload.v1.Info.CPU|undefined} value - * @return {!proto.payload.v1.Info.Pod} returns this -*/ -proto.payload.v1.Info.Pod.prototype.setCpu = function(value) { - return jspb.Message.setWrapperField(this, 5, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.payload.v1.Info.Pod} returns this - */ -proto.payload.v1.Info.Pod.prototype.clearCpu = function() { - return this.setCpu(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.payload.v1.Info.Pod.prototype.hasCpu = function() { - return jspb.Message.getField(this, 5) != null; -}; - - -/** - * optional Memory memory = 6; - * @return {?proto.payload.v1.Info.Memory} - */ -proto.payload.v1.Info.Pod.prototype.getMemory = function() { - return /** @type{?proto.payload.v1.Info.Memory} */ ( - jspb.Message.getWrapperField(this, proto.payload.v1.Info.Memory, 6)); -}; - - -/** - * @param {?proto.payload.v1.Info.Memory|undefined} value - * @return {!proto.payload.v1.Info.Pod} returns this -*/ -proto.payload.v1.Info.Pod.prototype.setMemory = function(value) { - return jspb.Message.setWrapperField(this, 6, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.payload.v1.Info.Pod} returns this - */ -proto.payload.v1.Info.Pod.prototype.clearMemory = function() { - return this.setMemory(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.payload.v1.Info.Pod.prototype.hasMemory = function() { - return jspb.Message.getField(this, 6) != null; -}; - - -/** - * optional Node node = 7; - * @return {?proto.payload.v1.Info.Node} - */ -proto.payload.v1.Info.Pod.prototype.getNode = function() { - return /** @type{?proto.payload.v1.Info.Node} */ ( - jspb.Message.getWrapperField(this, proto.payload.v1.Info.Node, 7)); -}; - - -/** - * @param {?proto.payload.v1.Info.Node|undefined} value - * @return {!proto.payload.v1.Info.Pod} returns this -*/ -proto.payload.v1.Info.Pod.prototype.setNode = function(value) { - return jspb.Message.setWrapperField(this, 7, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.payload.v1.Info.Pod} returns this - */ -proto.payload.v1.Info.Pod.prototype.clearNode = function() { - return this.setNode(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.payload.v1.Info.Pod.prototype.hasNode = function() { - return jspb.Message.getField(this, 7) != null; -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.payload.v1.Info.Node.prototype.toObject = function(opt_includeInstance) { - return proto.payload.v1.Info.Node.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.payload.v1.Info.Node} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.payload.v1.Info.Node.toObject = function(includeInstance, msg) { - var f, obj = { - name: jspb.Message.getFieldWithDefault(msg, 1, ""), - internalAddr: jspb.Message.getFieldWithDefault(msg, 2, ""), - externalAddr: jspb.Message.getFieldWithDefault(msg, 3, ""), - cpu: (f = msg.getCpu()) && proto.payload.v1.Info.CPU.toObject(includeInstance, f), - memory: (f = msg.getMemory()) && proto.payload.v1.Info.Memory.toObject(includeInstance, f), - pods: (f = msg.getPods()) && proto.payload.v1.Info.Pods.toObject(includeInstance, f) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.payload.v1.Info.Node} - */ -proto.payload.v1.Info.Node.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.payload.v1.Info.Node; - return proto.payload.v1.Info.Node.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.payload.v1.Info.Node} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.payload.v1.Info.Node} - */ -proto.payload.v1.Info.Node.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setName(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setInternalAddr(value); - break; - case 3: - var value = /** @type {string} */ (reader.readString()); - msg.setExternalAddr(value); - break; - case 4: - var value = new proto.payload.v1.Info.CPU; - reader.readMessage(value,proto.payload.v1.Info.CPU.deserializeBinaryFromReader); - msg.setCpu(value); - break; - case 5: - var value = new proto.payload.v1.Info.Memory; - reader.readMessage(value,proto.payload.v1.Info.Memory.deserializeBinaryFromReader); - msg.setMemory(value); - break; - case 6: - var value = new proto.payload.v1.Info.Pods; - reader.readMessage(value,proto.payload.v1.Info.Pods.deserializeBinaryFromReader); - msg.setPods(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.payload.v1.Info.Node.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.payload.v1.Info.Node.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.payload.v1.Info.Node} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.payload.v1.Info.Node.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getName(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getInternalAddr(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } - f = message.getExternalAddr(); - if (f.length > 0) { - writer.writeString( - 3, - f - ); - } - f = message.getCpu(); - if (f != null) { - writer.writeMessage( - 4, - f, - proto.payload.v1.Info.CPU.serializeBinaryToWriter - ); - } - f = message.getMemory(); - if (f != null) { - writer.writeMessage( - 5, - f, - proto.payload.v1.Info.Memory.serializeBinaryToWriter - ); - } - f = message.getPods(); - if (f != null) { - writer.writeMessage( - 6, - f, - proto.payload.v1.Info.Pods.serializeBinaryToWriter - ); - } -}; - - -/** - * optional string name = 1; - * @return {string} - */ -proto.payload.v1.Info.Node.prototype.getName = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.payload.v1.Info.Node} returns this - */ -proto.payload.v1.Info.Node.prototype.setName = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - -/** - * optional string internal_addr = 2; - * @return {string} - */ -proto.payload.v1.Info.Node.prototype.getInternalAddr = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * @param {string} value - * @return {!proto.payload.v1.Info.Node} returns this - */ -proto.payload.v1.Info.Node.prototype.setInternalAddr = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); -}; - - -/** - * optional string external_addr = 3; - * @return {string} - */ -proto.payload.v1.Info.Node.prototype.getExternalAddr = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); -}; - - -/** - * @param {string} value - * @return {!proto.payload.v1.Info.Node} returns this - */ -proto.payload.v1.Info.Node.prototype.setExternalAddr = function(value) { - return jspb.Message.setProto3StringField(this, 3, value); -}; - - -/** - * optional CPU cpu = 4; - * @return {?proto.payload.v1.Info.CPU} - */ -proto.payload.v1.Info.Node.prototype.getCpu = function() { - return /** @type{?proto.payload.v1.Info.CPU} */ ( - jspb.Message.getWrapperField(this, proto.payload.v1.Info.CPU, 4)); -}; - - -/** - * @param {?proto.payload.v1.Info.CPU|undefined} value - * @return {!proto.payload.v1.Info.Node} returns this -*/ -proto.payload.v1.Info.Node.prototype.setCpu = function(value) { - return jspb.Message.setWrapperField(this, 4, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.payload.v1.Info.Node} returns this - */ -proto.payload.v1.Info.Node.prototype.clearCpu = function() { - return this.setCpu(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.payload.v1.Info.Node.prototype.hasCpu = function() { - return jspb.Message.getField(this, 4) != null; -}; - - -/** - * optional Memory memory = 5; - * @return {?proto.payload.v1.Info.Memory} - */ -proto.payload.v1.Info.Node.prototype.getMemory = function() { - return /** @type{?proto.payload.v1.Info.Memory} */ ( - jspb.Message.getWrapperField(this, proto.payload.v1.Info.Memory, 5)); -}; - - -/** - * @param {?proto.payload.v1.Info.Memory|undefined} value - * @return {!proto.payload.v1.Info.Node} returns this -*/ -proto.payload.v1.Info.Node.prototype.setMemory = function(value) { - return jspb.Message.setWrapperField(this, 5, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.payload.v1.Info.Node} returns this - */ -proto.payload.v1.Info.Node.prototype.clearMemory = function() { - return this.setMemory(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.payload.v1.Info.Node.prototype.hasMemory = function() { - return jspb.Message.getField(this, 5) != null; -}; - - -/** - * optional Pods Pods = 6; - * @return {?proto.payload.v1.Info.Pods} - */ -proto.payload.v1.Info.Node.prototype.getPods = function() { - return /** @type{?proto.payload.v1.Info.Pods} */ ( - jspb.Message.getWrapperField(this, proto.payload.v1.Info.Pods, 6)); -}; - - -/** - * @param {?proto.payload.v1.Info.Pods|undefined} value - * @return {!proto.payload.v1.Info.Node} returns this -*/ -proto.payload.v1.Info.Node.prototype.setPods = function(value) { - return jspb.Message.setWrapperField(this, 6, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.payload.v1.Info.Node} returns this - */ -proto.payload.v1.Info.Node.prototype.clearPods = function() { - return this.setPods(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.payload.v1.Info.Node.prototype.hasPods = function() { - return jspb.Message.getField(this, 6) != null; -}; - - - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.payload.v1.Info.Service.repeatedFields_ = [3,4]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.payload.v1.Info.Service.prototype.toObject = function(opt_includeInstance) { - return proto.payload.v1.Info.Service.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.payload.v1.Info.Service} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.payload.v1.Info.Service.toObject = function(includeInstance, msg) { - var f, obj = { - name: jspb.Message.getFieldWithDefault(msg, 1, ""), - clusterIp: jspb.Message.getFieldWithDefault(msg, 2, ""), - clusterIpsList: (f = jspb.Message.getRepeatedField(msg, 3)) == null ? undefined : f, - portsList: jspb.Message.toObjectList(msg.getPortsList(), - proto.payload.v1.Info.ServicePort.toObject, includeInstance), - labels: (f = msg.getLabels()) && proto.payload.v1.Info.Labels.toObject(includeInstance, f), - annotations: (f = msg.getAnnotations()) && proto.payload.v1.Info.Annotations.toObject(includeInstance, f) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.payload.v1.Info.Service} - */ -proto.payload.v1.Info.Service.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.payload.v1.Info.Service; - return proto.payload.v1.Info.Service.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.payload.v1.Info.Service} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.payload.v1.Info.Service} - */ -proto.payload.v1.Info.Service.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setName(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setClusterIp(value); - break; - case 3: - var value = /** @type {string} */ (reader.readString()); - msg.addClusterIps(value); - break; - case 4: - var value = new proto.payload.v1.Info.ServicePort; - reader.readMessage(value,proto.payload.v1.Info.ServicePort.deserializeBinaryFromReader); - msg.addPorts(value); - break; - case 5: - var value = new proto.payload.v1.Info.Labels; - reader.readMessage(value,proto.payload.v1.Info.Labels.deserializeBinaryFromReader); - msg.setLabels(value); - break; - case 6: - var value = new proto.payload.v1.Info.Annotations; - reader.readMessage(value,proto.payload.v1.Info.Annotations.deserializeBinaryFromReader); - msg.setAnnotations(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.payload.v1.Info.Service.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.payload.v1.Info.Service.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.payload.v1.Info.Service} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.payload.v1.Info.Service.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getName(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getClusterIp(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } - f = message.getClusterIpsList(); - if (f.length > 0) { - writer.writeRepeatedString( - 3, - f - ); - } - f = message.getPortsList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 4, - f, - proto.payload.v1.Info.ServicePort.serializeBinaryToWriter - ); - } - f = message.getLabels(); - if (f != null) { - writer.writeMessage( - 5, - f, - proto.payload.v1.Info.Labels.serializeBinaryToWriter - ); - } - f = message.getAnnotations(); - if (f != null) { - writer.writeMessage( - 6, - f, - proto.payload.v1.Info.Annotations.serializeBinaryToWriter - ); - } -}; - - -/** - * optional string name = 1; - * @return {string} - */ -proto.payload.v1.Info.Service.prototype.getName = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.payload.v1.Info.Service} returns this - */ -proto.payload.v1.Info.Service.prototype.setName = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - -/** - * optional string cluster_ip = 2; - * @return {string} - */ -proto.payload.v1.Info.Service.prototype.getClusterIp = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * @param {string} value - * @return {!proto.payload.v1.Info.Service} returns this - */ -proto.payload.v1.Info.Service.prototype.setClusterIp = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); -}; - - -/** - * repeated string cluster_ips = 3; - * @return {!Array} - */ -proto.payload.v1.Info.Service.prototype.getClusterIpsList = function() { - return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 3)); -}; - - -/** - * @param {!Array} value - * @return {!proto.payload.v1.Info.Service} returns this - */ -proto.payload.v1.Info.Service.prototype.setClusterIpsList = function(value) { - return jspb.Message.setField(this, 3, value || []); -}; - - -/** - * @param {string} value - * @param {number=} opt_index - * @return {!proto.payload.v1.Info.Service} returns this - */ -proto.payload.v1.Info.Service.prototype.addClusterIps = function(value, opt_index) { - return jspb.Message.addToRepeatedField(this, 3, value, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.payload.v1.Info.Service} returns this - */ -proto.payload.v1.Info.Service.prototype.clearClusterIpsList = function() { - return this.setClusterIpsList([]); -}; - - -/** - * repeated ServicePort ports = 4; - * @return {!Array} - */ -proto.payload.v1.Info.Service.prototype.getPortsList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.payload.v1.Info.ServicePort, 4)); -}; - - -/** - * @param {!Array} value - * @return {!proto.payload.v1.Info.Service} returns this -*/ -proto.payload.v1.Info.Service.prototype.setPortsList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 4, value); -}; - - -/** - * @param {!proto.payload.v1.Info.ServicePort=} opt_value - * @param {number=} opt_index - * @return {!proto.payload.v1.Info.ServicePort} - */ -proto.payload.v1.Info.Service.prototype.addPorts = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 4, opt_value, proto.payload.v1.Info.ServicePort, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.payload.v1.Info.Service} returns this - */ -proto.payload.v1.Info.Service.prototype.clearPortsList = function() { - return this.setPortsList([]); -}; - - -/** - * optional Labels labels = 5; - * @return {?proto.payload.v1.Info.Labels} - */ -proto.payload.v1.Info.Service.prototype.getLabels = function() { - return /** @type{?proto.payload.v1.Info.Labels} */ ( - jspb.Message.getWrapperField(this, proto.payload.v1.Info.Labels, 5)); -}; - - -/** - * @param {?proto.payload.v1.Info.Labels|undefined} value - * @return {!proto.payload.v1.Info.Service} returns this -*/ -proto.payload.v1.Info.Service.prototype.setLabels = function(value) { - return jspb.Message.setWrapperField(this, 5, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.payload.v1.Info.Service} returns this - */ -proto.payload.v1.Info.Service.prototype.clearLabels = function() { - return this.setLabels(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.payload.v1.Info.Service.prototype.hasLabels = function() { - return jspb.Message.getField(this, 5) != null; -}; - - -/** - * optional Annotations annotations = 6; - * @return {?proto.payload.v1.Info.Annotations} - */ -proto.payload.v1.Info.Service.prototype.getAnnotations = function() { - return /** @type{?proto.payload.v1.Info.Annotations} */ ( - jspb.Message.getWrapperField(this, proto.payload.v1.Info.Annotations, 6)); -}; - - -/** - * @param {?proto.payload.v1.Info.Annotations|undefined} value - * @return {!proto.payload.v1.Info.Service} returns this -*/ -proto.payload.v1.Info.Service.prototype.setAnnotations = function(value) { - return jspb.Message.setWrapperField(this, 6, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.payload.v1.Info.Service} returns this - */ -proto.payload.v1.Info.Service.prototype.clearAnnotations = function() { - return this.setAnnotations(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.payload.v1.Info.Service.prototype.hasAnnotations = function() { - return jspb.Message.getField(this, 6) != null; -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.payload.v1.Info.ServicePort.prototype.toObject = function(opt_includeInstance) { - return proto.payload.v1.Info.ServicePort.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.payload.v1.Info.ServicePort} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.payload.v1.Info.ServicePort.toObject = function(includeInstance, msg) { - var f, obj = { - name: jspb.Message.getFieldWithDefault(msg, 1, ""), - port: jspb.Message.getFieldWithDefault(msg, 2, 0) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.payload.v1.Info.ServicePort} - */ -proto.payload.v1.Info.ServicePort.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.payload.v1.Info.ServicePort; - return proto.payload.v1.Info.ServicePort.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.payload.v1.Info.ServicePort} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.payload.v1.Info.ServicePort} - */ -proto.payload.v1.Info.ServicePort.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setName(value); - break; - case 2: - var value = /** @type {number} */ (reader.readInt32()); - msg.setPort(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.payload.v1.Info.ServicePort.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.payload.v1.Info.ServicePort.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.payload.v1.Info.ServicePort} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.payload.v1.Info.ServicePort.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getName(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getPort(); - if (f !== 0) { - writer.writeInt32( - 2, - f - ); - } -}; - - -/** - * optional string name = 1; - * @return {string} - */ -proto.payload.v1.Info.ServicePort.prototype.getName = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.payload.v1.Info.ServicePort} returns this - */ -proto.payload.v1.Info.ServicePort.prototype.setName = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - -/** - * optional int32 port = 2; - * @return {number} - */ -proto.payload.v1.Info.ServicePort.prototype.getPort = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.payload.v1.Info.ServicePort} returns this - */ -proto.payload.v1.Info.ServicePort.prototype.setPort = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.payload.v1.Info.Labels.prototype.toObject = function(opt_includeInstance) { - return proto.payload.v1.Info.Labels.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.payload.v1.Info.Labels} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.payload.v1.Info.Labels.toObject = function(includeInstance, msg) { - var f, obj = { - labelsMap: (f = msg.getLabelsMap()) ? f.toObject(includeInstance, undefined) : [] - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.payload.v1.Info.Labels} - */ -proto.payload.v1.Info.Labels.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.payload.v1.Info.Labels; - return proto.payload.v1.Info.Labels.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.payload.v1.Info.Labels} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.payload.v1.Info.Labels} - */ -proto.payload.v1.Info.Labels.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = msg.getLabelsMap(); - reader.readMessage(value, function(message, reader) { - jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readString, null, "", ""); - }); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.payload.v1.Info.Labels.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.payload.v1.Info.Labels.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.payload.v1.Info.Labels} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.payload.v1.Info.Labels.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getLabelsMap(true); - if (f && f.getLength() > 0) { - f.serializeBinary(1, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeString); - } -}; - - -/** - * map labels = 1; - * @param {boolean=} opt_noLazyCreate Do not create the map if - * empty, instead returning `undefined` - * @return {!jspb.Map} - */ -proto.payload.v1.Info.Labels.prototype.getLabelsMap = function(opt_noLazyCreate) { - return /** @type {!jspb.Map} */ ( - jspb.Message.getMapField(this, 1, opt_noLazyCreate, - null)); -}; - - -/** - * Clears values from the map. The map will be non-null. - * @return {!proto.payload.v1.Info.Labels} returns this - */ -proto.payload.v1.Info.Labels.prototype.clearLabelsMap = function() { - this.getLabelsMap().clear(); - return this; -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.payload.v1.Info.Annotations.prototype.toObject = function(opt_includeInstance) { - return proto.payload.v1.Info.Annotations.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.payload.v1.Info.Annotations} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.payload.v1.Info.Annotations.toObject = function(includeInstance, msg) { - var f, obj = { - annotationsMap: (f = msg.getAnnotationsMap()) ? f.toObject(includeInstance, undefined) : [] - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.payload.v1.Info.Annotations} - */ -proto.payload.v1.Info.Annotations.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.payload.v1.Info.Annotations; - return proto.payload.v1.Info.Annotations.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.payload.v1.Info.Annotations} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.payload.v1.Info.Annotations} - */ -proto.payload.v1.Info.Annotations.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = msg.getAnnotationsMap(); - reader.readMessage(value, function(message, reader) { - jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readString, null, "", ""); - }); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.payload.v1.Info.Annotations.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.payload.v1.Info.Annotations.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.payload.v1.Info.Annotations} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.payload.v1.Info.Annotations.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getAnnotationsMap(true); - if (f && f.getLength() > 0) { - f.serializeBinary(1, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeString); - } -}; - - -/** - * map annotations = 1; - * @param {boolean=} opt_noLazyCreate Do not create the map if - * empty, instead returning `undefined` - * @return {!jspb.Map} - */ -proto.payload.v1.Info.Annotations.prototype.getAnnotationsMap = function(opt_noLazyCreate) { - return /** @type {!jspb.Map} */ ( - jspb.Message.getMapField(this, 1, opt_noLazyCreate, - null)); -}; - - -/** - * Clears values from the map. The map will be non-null. - * @return {!proto.payload.v1.Info.Annotations} returns this - */ -proto.payload.v1.Info.Annotations.prototype.clearAnnotationsMap = function() { - this.getAnnotationsMap().clear(); - return this; -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.payload.v1.Info.CPU.prototype.toObject = function(opt_includeInstance) { - return proto.payload.v1.Info.CPU.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.payload.v1.Info.CPU} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.payload.v1.Info.CPU.toObject = function(includeInstance, msg) { - var f, obj = { - limit: jspb.Message.getFloatingPointFieldWithDefault(msg, 1, 0.0), - request: jspb.Message.getFloatingPointFieldWithDefault(msg, 2, 0.0), - usage: jspb.Message.getFloatingPointFieldWithDefault(msg, 3, 0.0) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.payload.v1.Info.CPU} - */ -proto.payload.v1.Info.CPU.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.payload.v1.Info.CPU; - return proto.payload.v1.Info.CPU.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.payload.v1.Info.CPU} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.payload.v1.Info.CPU} - */ -proto.payload.v1.Info.CPU.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {number} */ (reader.readDouble()); - msg.setLimit(value); - break; - case 2: - var value = /** @type {number} */ (reader.readDouble()); - msg.setRequest(value); - break; - case 3: - var value = /** @type {number} */ (reader.readDouble()); - msg.setUsage(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.payload.v1.Info.CPU.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.payload.v1.Info.CPU.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.payload.v1.Info.CPU} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.payload.v1.Info.CPU.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getLimit(); - if (f !== 0.0) { - writer.writeDouble( - 1, - f - ); - } - f = message.getRequest(); - if (f !== 0.0) { - writer.writeDouble( - 2, - f - ); - } - f = message.getUsage(); - if (f !== 0.0) { - writer.writeDouble( - 3, - f - ); - } -}; - - -/** - * optional double limit = 1; - * @return {number} - */ -proto.payload.v1.Info.CPU.prototype.getLimit = function() { - return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 1, 0.0)); -}; - - -/** - * @param {number} value - * @return {!proto.payload.v1.Info.CPU} returns this - */ -proto.payload.v1.Info.CPU.prototype.setLimit = function(value) { - return jspb.Message.setProto3FloatField(this, 1, value); -}; - - -/** - * optional double request = 2; - * @return {number} - */ -proto.payload.v1.Info.CPU.prototype.getRequest = function() { - return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 2, 0.0)); -}; - - -/** - * @param {number} value - * @return {!proto.payload.v1.Info.CPU} returns this - */ -proto.payload.v1.Info.CPU.prototype.setRequest = function(value) { - return jspb.Message.setProto3FloatField(this, 2, value); -}; - - -/** - * optional double usage = 3; - * @return {number} - */ -proto.payload.v1.Info.CPU.prototype.getUsage = function() { - return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 3, 0.0)); -}; - - -/** - * @param {number} value - * @return {!proto.payload.v1.Info.CPU} returns this - */ -proto.payload.v1.Info.CPU.prototype.setUsage = function(value) { - return jspb.Message.setProto3FloatField(this, 3, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.payload.v1.Info.Memory.prototype.toObject = function(opt_includeInstance) { - return proto.payload.v1.Info.Memory.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.payload.v1.Info.Memory} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.payload.v1.Info.Memory.toObject = function(includeInstance, msg) { - var f, obj = { - limit: jspb.Message.getFloatingPointFieldWithDefault(msg, 1, 0.0), - request: jspb.Message.getFloatingPointFieldWithDefault(msg, 2, 0.0), - usage: jspb.Message.getFloatingPointFieldWithDefault(msg, 3, 0.0) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.payload.v1.Info.Memory} - */ -proto.payload.v1.Info.Memory.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.payload.v1.Info.Memory; - return proto.payload.v1.Info.Memory.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.payload.v1.Info.Memory} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.payload.v1.Info.Memory} - */ -proto.payload.v1.Info.Memory.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {number} */ (reader.readDouble()); - msg.setLimit(value); - break; - case 2: - var value = /** @type {number} */ (reader.readDouble()); - msg.setRequest(value); - break; - case 3: - var value = /** @type {number} */ (reader.readDouble()); - msg.setUsage(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.payload.v1.Info.Memory.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.payload.v1.Info.Memory.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.payload.v1.Info.Memory} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.payload.v1.Info.Memory.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getLimit(); - if (f !== 0.0) { - writer.writeDouble( - 1, - f - ); - } - f = message.getRequest(); - if (f !== 0.0) { - writer.writeDouble( - 2, - f - ); - } - f = message.getUsage(); - if (f !== 0.0) { - writer.writeDouble( - 3, - f - ); - } -}; - - -/** - * optional double limit = 1; - * @return {number} - */ -proto.payload.v1.Info.Memory.prototype.getLimit = function() { - return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 1, 0.0)); -}; - - -/** - * @param {number} value - * @return {!proto.payload.v1.Info.Memory} returns this - */ -proto.payload.v1.Info.Memory.prototype.setLimit = function(value) { - return jspb.Message.setProto3FloatField(this, 1, value); -}; - - -/** - * optional double request = 2; - * @return {number} - */ -proto.payload.v1.Info.Memory.prototype.getRequest = function() { - return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 2, 0.0)); -}; - - -/** - * @param {number} value - * @return {!proto.payload.v1.Info.Memory} returns this - */ -proto.payload.v1.Info.Memory.prototype.setRequest = function(value) { - return jspb.Message.setProto3FloatField(this, 2, value); -}; - - -/** - * optional double usage = 3; - * @return {number} - */ -proto.payload.v1.Info.Memory.prototype.getUsage = function() { - return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 3, 0.0)); -}; - - -/** - * @param {number} value - * @return {!proto.payload.v1.Info.Memory} returns this - */ -proto.payload.v1.Info.Memory.prototype.setUsage = function(value) { - return jspb.Message.setProto3FloatField(this, 3, value); -}; - - - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.payload.v1.Info.Pods.repeatedFields_ = [1]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.payload.v1.Info.Pods.prototype.toObject = function(opt_includeInstance) { - return proto.payload.v1.Info.Pods.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.payload.v1.Info.Pods} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.payload.v1.Info.Pods.toObject = function(includeInstance, msg) { - var f, obj = { - podsList: jspb.Message.toObjectList(msg.getPodsList(), - proto.payload.v1.Info.Pod.toObject, includeInstance) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.payload.v1.Info.Pods} - */ -proto.payload.v1.Info.Pods.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.payload.v1.Info.Pods; - return proto.payload.v1.Info.Pods.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.payload.v1.Info.Pods} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.payload.v1.Info.Pods} - */ -proto.payload.v1.Info.Pods.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.payload.v1.Info.Pod; - reader.readMessage(value,proto.payload.v1.Info.Pod.deserializeBinaryFromReader); - msg.addPods(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.payload.v1.Info.Pods.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.payload.v1.Info.Pods.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.payload.v1.Info.Pods} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.payload.v1.Info.Pods.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getPodsList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 1, - f, - proto.payload.v1.Info.Pod.serializeBinaryToWriter - ); - } -}; - - -/** - * repeated Pod pods = 1; - * @return {!Array} - */ -proto.payload.v1.Info.Pods.prototype.getPodsList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.payload.v1.Info.Pod, 1)); -}; - - -/** - * @param {!Array} value - * @return {!proto.payload.v1.Info.Pods} returns this -*/ -proto.payload.v1.Info.Pods.prototype.setPodsList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 1, value); -}; - - -/** - * @param {!proto.payload.v1.Info.Pod=} opt_value - * @param {number=} opt_index - * @return {!proto.payload.v1.Info.Pod} - */ -proto.payload.v1.Info.Pods.prototype.addPods = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.payload.v1.Info.Pod, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.payload.v1.Info.Pods} returns this - */ -proto.payload.v1.Info.Pods.prototype.clearPodsList = function() { - return this.setPodsList([]); -}; - - - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.payload.v1.Info.Nodes.repeatedFields_ = [1]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.payload.v1.Info.Nodes.prototype.toObject = function(opt_includeInstance) { - return proto.payload.v1.Info.Nodes.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.payload.v1.Info.Nodes} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.payload.v1.Info.Nodes.toObject = function(includeInstance, msg) { - var f, obj = { - nodesList: jspb.Message.toObjectList(msg.getNodesList(), - proto.payload.v1.Info.Node.toObject, includeInstance) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.payload.v1.Info.Nodes} - */ -proto.payload.v1.Info.Nodes.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.payload.v1.Info.Nodes; - return proto.payload.v1.Info.Nodes.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.payload.v1.Info.Nodes} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.payload.v1.Info.Nodes} - */ -proto.payload.v1.Info.Nodes.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.payload.v1.Info.Node; - reader.readMessage(value,proto.payload.v1.Info.Node.deserializeBinaryFromReader); - msg.addNodes(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.payload.v1.Info.Nodes.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.payload.v1.Info.Nodes.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.payload.v1.Info.Nodes} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.payload.v1.Info.Nodes.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getNodesList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 1, - f, - proto.payload.v1.Info.Node.serializeBinaryToWriter - ); - } -}; - - -/** - * repeated Node nodes = 1; - * @return {!Array} - */ -proto.payload.v1.Info.Nodes.prototype.getNodesList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.payload.v1.Info.Node, 1)); -}; - - -/** - * @param {!Array} value - * @return {!proto.payload.v1.Info.Nodes} returns this -*/ -proto.payload.v1.Info.Nodes.prototype.setNodesList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 1, value); -}; - - -/** - * @param {!proto.payload.v1.Info.Node=} opt_value - * @param {number=} opt_index - * @return {!proto.payload.v1.Info.Node} - */ -proto.payload.v1.Info.Nodes.prototype.addNodes = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.payload.v1.Info.Node, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.payload.v1.Info.Nodes} returns this - */ -proto.payload.v1.Info.Nodes.prototype.clearNodesList = function() { - return this.setNodesList([]); -}; - - - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.payload.v1.Info.Services.repeatedFields_ = [1]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.payload.v1.Info.Services.prototype.toObject = function(opt_includeInstance) { - return proto.payload.v1.Info.Services.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.payload.v1.Info.Services} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.payload.v1.Info.Services.toObject = function(includeInstance, msg) { - var f, obj = { - servicesList: jspb.Message.toObjectList(msg.getServicesList(), - proto.payload.v1.Info.Service.toObject, includeInstance) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.payload.v1.Info.Services} - */ -proto.payload.v1.Info.Services.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.payload.v1.Info.Services; - return proto.payload.v1.Info.Services.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.payload.v1.Info.Services} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.payload.v1.Info.Services} - */ -proto.payload.v1.Info.Services.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.payload.v1.Info.Service; - reader.readMessage(value,proto.payload.v1.Info.Service.deserializeBinaryFromReader); - msg.addServices(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.payload.v1.Info.Services.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.payload.v1.Info.Services.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.payload.v1.Info.Services} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.payload.v1.Info.Services.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getServicesList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 1, - f, - proto.payload.v1.Info.Service.serializeBinaryToWriter - ); - } -}; - - -/** - * repeated Service services = 1; - * @return {!Array} - */ -proto.payload.v1.Info.Services.prototype.getServicesList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.payload.v1.Info.Service, 1)); -}; - - -/** - * @param {!Array} value - * @return {!proto.payload.v1.Info.Services} returns this -*/ -proto.payload.v1.Info.Services.prototype.setServicesList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 1, value); -}; - - -/** - * @param {!proto.payload.v1.Info.Service=} opt_value - * @param {number=} opt_index - * @return {!proto.payload.v1.Info.Service} - */ -proto.payload.v1.Info.Services.prototype.addServices = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.payload.v1.Info.Service, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.payload.v1.Info.Services} returns this - */ -proto.payload.v1.Info.Services.prototype.clearServicesList = function() { - return this.setServicesList([]); -}; - - - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.payload.v1.Info.IPs.repeatedFields_ = [1]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.payload.v1.Info.IPs.prototype.toObject = function(opt_includeInstance) { - return proto.payload.v1.Info.IPs.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.payload.v1.Info.IPs} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.payload.v1.Info.IPs.toObject = function(includeInstance, msg) { - var f, obj = { - ipList: (f = jspb.Message.getRepeatedField(msg, 1)) == null ? undefined : f - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.payload.v1.Info.IPs} - */ -proto.payload.v1.Info.IPs.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.payload.v1.Info.IPs; - return proto.payload.v1.Info.IPs.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.payload.v1.Info.IPs} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.payload.v1.Info.IPs} - */ -proto.payload.v1.Info.IPs.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()); - msg.addIp(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.payload.v1.Info.IPs.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.payload.v1.Info.IPs.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.payload.v1.Info.IPs} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.payload.v1.Info.IPs.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getIpList(); - if (f.length > 0) { - writer.writeRepeatedString( - 1, - f - ); - } -}; - - -/** - * repeated string ip = 1; - * @return {!Array} - */ -proto.payload.v1.Info.IPs.prototype.getIpList = function() { - return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 1)); -}; - - -/** - * @param {!Array} value - * @return {!proto.payload.v1.Info.IPs} returns this - */ -proto.payload.v1.Info.IPs.prototype.setIpList = function(value) { - return jspb.Message.setField(this, 1, value || []); -}; - - -/** - * @param {string} value - * @param {number=} opt_index - * @return {!proto.payload.v1.Info.IPs} returns this - */ -proto.payload.v1.Info.IPs.prototype.addIp = function(value, opt_index) { - return jspb.Message.addToRepeatedField(this, 1, value, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.payload.v1.Info.IPs} returns this - */ -proto.payload.v1.Info.IPs.prototype.clearIpList = function() { - return this.setIpList([]); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.payload.v1.Empty.prototype.toObject = function(opt_includeInstance) { - return proto.payload.v1.Empty.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.payload.v1.Empty} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.payload.v1.Empty.toObject = function(includeInstance, msg) { - var f, obj = { - - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.payload.v1.Empty} - */ -proto.payload.v1.Empty.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.payload.v1.Empty; - return proto.payload.v1.Empty.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.payload.v1.Empty} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.payload.v1.Empty} - */ -proto.payload.v1.Empty.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.payload.v1.Empty.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.payload.v1.Empty.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.payload.v1.Empty} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.payload.v1.Empty.serializeBinaryToWriter = function(message, writer) { - var f = undefined; -}; - - -goog.object.extend(exports, proto.payload.v1); +// +// +// Copyright (C) 2019-2023 vdaas.org vald team +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// You may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.Empty = exports.Info_IPs = exports.Info_Services = exports.Info_Nodes = exports.Info_Pods = exports.Info_Memory = exports.Info_CPU = exports.Info_Annotations = exports.Info_Labels = exports.Info_ServicePort = exports.Info_Service = exports.Info_Node = exports.Info_Pod = exports.Info_Index_UUID_Uncommitted = exports.Info_Index_UUID_Committed = exports.Info_Index_UUID = exports.Info_Index_Count = exports.Info_Index = exports.Info = exports.Discoverer_Request = exports.Discoverer = exports.Control_CreateIndexRequest = exports.Control = exports.Object_List_Response = exports.Object_List_Request = exports.Object_List = exports.Object_Locations = exports.Object_StreamLocation = exports.Object_Location = exports.Object_StreamBlob = exports.Object_Blob = exports.Object_ReshapeVector = exports.Object_StreamVector = exports.Object_Vectors = exports.Object_Timestamp = exports.Object_GetTimestampRequest = exports.Object_Vector = exports.Object_IDs = exports.Object_ID = exports.Object_StreamDistance = exports.Object_Distance = exports.Object_VectorRequest = exports.Object = exports.Remove_Config = exports.Remove_Timestamp = exports.Remove_TimestampRequest = exports.Remove_MultiRequest = exports.Remove_Request = exports.Remove = exports.Upsert_Config = exports.Upsert_MultiObjectRequest = exports.Upsert_ObjectRequest = exports.Upsert_MultiRequest = exports.Upsert_Request = exports.Upsert = exports.Update_Config = exports.Update_MultiObjectRequest = exports.Update_ObjectRequest = exports.Update_MultiRequest = exports.Update_Request = exports.Update = exports.Insert_Config = exports.Insert_MultiObjectRequest = exports.Insert_ObjectRequest = exports.Insert_MultiRequest = exports.Insert_Request = exports.Insert = exports.Filter_Config = exports.Filter_Target = exports.Filter = exports.Search_StreamResponse = exports.Search_Responses = exports.Search_Response = exports.Search_Config = exports.Search_MultiObjectRequest = exports.Search_ObjectRequest = exports.Search_MultiIDRequest = exports.Search_IDRequest = exports.Search_MultiRequest = exports.Search_Request = exports.Search = exports.Remove_Timestamp_Operator = exports.Search_AggregationAlgorithm = void 0; +/* eslint-disable */ +// @generated by protobuf-ts 2.9.3 with parameter add_pb_suffix,client_grpc1,generate_dependencies,keep_enum_prefix,ts_nocheck,use_proto_field_name,output_javascript,output_legacy_commonjs,eslint_disable +// @generated from protobuf file "vald/v1/payload/payload.proto" (package "payload.v1", syntax proto3) +// tslint:disable +// @ts-nocheck +// +// +// Copyright (C) 2019-2023 vdaas.org vald team +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// You may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +const runtime_1 = require("@protobuf-ts/runtime"); +const runtime_2 = require("@protobuf-ts/runtime"); +const runtime_3 = require("@protobuf-ts/runtime"); +const runtime_4 = require("@protobuf-ts/runtime"); +const status_pb_1 = require("../../../google/rpc/status_pb"); +/** + * AggregationAlgorithm is enum of each aggregation algorithms + * + * @generated from protobuf enum payload.v1.Search.AggregationAlgorithm + */ +var Search_AggregationAlgorithm; +(function (Search_AggregationAlgorithm) { + /** + * @generated from protobuf enum value: Unknown = 0; + */ + Search_AggregationAlgorithm[Search_AggregationAlgorithm["Unknown"] = 0] = "Unknown"; + /** + * @generated from protobuf enum value: ConcurrentQueue = 1; + */ + Search_AggregationAlgorithm[Search_AggregationAlgorithm["ConcurrentQueue"] = 1] = "ConcurrentQueue"; + /** + * @generated from protobuf enum value: SortSlice = 2; + */ + Search_AggregationAlgorithm[Search_AggregationAlgorithm["SortSlice"] = 2] = "SortSlice"; + /** + * @generated from protobuf enum value: SortPoolSlice = 3; + */ + Search_AggregationAlgorithm[Search_AggregationAlgorithm["SortPoolSlice"] = 3] = "SortPoolSlice"; + /** + * @generated from protobuf enum value: PairingHeap = 4; + */ + Search_AggregationAlgorithm[Search_AggregationAlgorithm["PairingHeap"] = 4] = "PairingHeap"; +})(Search_AggregationAlgorithm = exports.Search_AggregationAlgorithm || (exports.Search_AggregationAlgorithm = {})); +/** + * Operator is enum of each conditional operator. + * + * @generated from protobuf enum payload.v1.Remove.Timestamp.Operator + */ +var Remove_Timestamp_Operator; +(function (Remove_Timestamp_Operator) { + /** + * The timestamp is equal to the specified value in the request. + * + * @generated from protobuf enum value: Eq = 0; + */ + Remove_Timestamp_Operator[Remove_Timestamp_Operator["Eq"] = 0] = "Eq"; + /** + * The timestamp is not equal to the specified value in the request. + * + * @generated from protobuf enum value: Ne = 1; + */ + Remove_Timestamp_Operator[Remove_Timestamp_Operator["Ne"] = 1] = "Ne"; + /** + * The timestamp is greater than or equal to the specified value in the request. + * + * @generated from protobuf enum value: Ge = 2; + */ + Remove_Timestamp_Operator[Remove_Timestamp_Operator["Ge"] = 2] = "Ge"; + /** + * The timestamp is greater than the specified value in the request. + * + * @generated from protobuf enum value: Gt = 3; + */ + Remove_Timestamp_Operator[Remove_Timestamp_Operator["Gt"] = 3] = "Gt"; + /** + * The timestamp is less than or equal to the specified value in the request. + * + * @generated from protobuf enum value: Le = 4; + */ + Remove_Timestamp_Operator[Remove_Timestamp_Operator["Le"] = 4] = "Le"; + /** + * The timestamp is less than the specified value in the request. + * + * @generated from protobuf enum value: Lt = 5; + */ + Remove_Timestamp_Operator[Remove_Timestamp_Operator["Lt"] = 5] = "Lt"; +})(Remove_Timestamp_Operator = exports.Remove_Timestamp_Operator || (exports.Remove_Timestamp_Operator = {})); +// @generated message type with reflection information, may provide speed optimized methods +class Search$Type extends runtime_4.MessageType { + constructor() { + super("payload.v1.Search", []); + } + create(value) { + const message = globalThis.Object.create((this.messagePrototype)); + if (value !== undefined) + runtime_3.reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader, length, options, target) { + return target ?? this.create(); + } + internalBinaryWrite(message, writer, options) { + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message payload.v1.Search + */ +exports.Search = new Search$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class Search_Request$Type extends runtime_4.MessageType { + constructor() { + super("payload.v1.Search.Request", [ + { no: 1, name: "vector", kind: "scalar", repeat: 1 /*RepeatType.PACKED*/, T: 2 /*ScalarType.FLOAT*/, options: { "buf.validate.field": { repeated: { minItems: "2" } } } }, + { no: 2, name: "config", kind: "message", T: () => exports.Search_Config } + ]); + } + create(value) { + const message = globalThis.Object.create((this.messagePrototype)); + message.vector = []; + if (value !== undefined) + runtime_3.reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader, length, options, target) { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* repeated float vector */ 1: + if (wireType === runtime_1.WireType.LengthDelimited) + for (let e = reader.int32() + reader.pos; reader.pos < e;) + message.vector.push(reader.float()); + else + message.vector.push(reader.float()); + break; + case /* payload.v1.Search.Config config */ 2: + message.config = exports.Search_Config.internalBinaryRead(reader, reader.uint32(), options, message.config); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? runtime_2.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message, writer, options) { + /* repeated float vector = 1; */ + if (message.vector.length) { + writer.tag(1, runtime_1.WireType.LengthDelimited).fork(); + for (let i = 0; i < message.vector.length; i++) + writer.float(message.vector[i]); + writer.join(); + } + /* payload.v1.Search.Config config = 2; */ + if (message.config) + exports.Search_Config.internalBinaryWrite(message.config, writer.tag(2, runtime_1.WireType.LengthDelimited).fork(), options).join(); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message payload.v1.Search.Request + */ +exports.Search_Request = new Search_Request$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class Search_MultiRequest$Type extends runtime_4.MessageType { + constructor() { + super("payload.v1.Search.MultiRequest", [ + { no: 1, name: "requests", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => exports.Search_Request } + ]); + } + create(value) { + const message = globalThis.Object.create((this.messagePrototype)); + message.requests = []; + if (value !== undefined) + runtime_3.reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader, length, options, target) { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* repeated payload.v1.Search.Request requests */ 1: + message.requests.push(exports.Search_Request.internalBinaryRead(reader, reader.uint32(), options)); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? runtime_2.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message, writer, options) { + /* repeated payload.v1.Search.Request requests = 1; */ + for (let i = 0; i < message.requests.length; i++) + exports.Search_Request.internalBinaryWrite(message.requests[i], writer.tag(1, runtime_1.WireType.LengthDelimited).fork(), options).join(); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message payload.v1.Search.MultiRequest + */ +exports.Search_MultiRequest = new Search_MultiRequest$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class Search_IDRequest$Type extends runtime_4.MessageType { + constructor() { + super("payload.v1.Search.IDRequest", [ + { no: 1, name: "id", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, + { no: 2, name: "config", kind: "message", T: () => exports.Search_Config } + ]); + } + create(value) { + const message = globalThis.Object.create((this.messagePrototype)); + message.id = ""; + if (value !== undefined) + runtime_3.reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader, length, options, target) { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* string id */ 1: + message.id = reader.string(); + break; + case /* payload.v1.Search.Config config */ 2: + message.config = exports.Search_Config.internalBinaryRead(reader, reader.uint32(), options, message.config); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? runtime_2.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message, writer, options) { + /* string id = 1; */ + if (message.id !== "") + writer.tag(1, runtime_1.WireType.LengthDelimited).string(message.id); + /* payload.v1.Search.Config config = 2; */ + if (message.config) + exports.Search_Config.internalBinaryWrite(message.config, writer.tag(2, runtime_1.WireType.LengthDelimited).fork(), options).join(); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message payload.v1.Search.IDRequest + */ +exports.Search_IDRequest = new Search_IDRequest$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class Search_MultiIDRequest$Type extends runtime_4.MessageType { + constructor() { + super("payload.v1.Search.MultiIDRequest", [ + { no: 1, name: "requests", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => exports.Search_IDRequest } + ]); + } + create(value) { + const message = globalThis.Object.create((this.messagePrototype)); + message.requests = []; + if (value !== undefined) + runtime_3.reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader, length, options, target) { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* repeated payload.v1.Search.IDRequest requests */ 1: + message.requests.push(exports.Search_IDRequest.internalBinaryRead(reader, reader.uint32(), options)); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? runtime_2.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message, writer, options) { + /* repeated payload.v1.Search.IDRequest requests = 1; */ + for (let i = 0; i < message.requests.length; i++) + exports.Search_IDRequest.internalBinaryWrite(message.requests[i], writer.tag(1, runtime_1.WireType.LengthDelimited).fork(), options).join(); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message payload.v1.Search.MultiIDRequest + */ +exports.Search_MultiIDRequest = new Search_MultiIDRequest$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class Search_ObjectRequest$Type extends runtime_4.MessageType { + constructor() { + super("payload.v1.Search.ObjectRequest", [ + { no: 1, name: "object", kind: "scalar", T: 12 /*ScalarType.BYTES*/ }, + { no: 2, name: "config", kind: "message", T: () => exports.Search_Config }, + { no: 3, name: "vectorizer", kind: "message", T: () => exports.Filter_Target } + ]); + } + create(value) { + const message = globalThis.Object.create((this.messagePrototype)); + message.object = new Uint8Array(0); + if (value !== undefined) + runtime_3.reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader, length, options, target) { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* bytes object */ 1: + message.object = reader.bytes(); + break; + case /* payload.v1.Search.Config config */ 2: + message.config = exports.Search_Config.internalBinaryRead(reader, reader.uint32(), options, message.config); + break; + case /* payload.v1.Filter.Target vectorizer */ 3: + message.vectorizer = exports.Filter_Target.internalBinaryRead(reader, reader.uint32(), options, message.vectorizer); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? runtime_2.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message, writer, options) { + /* bytes object = 1; */ + if (message.object.length) + writer.tag(1, runtime_1.WireType.LengthDelimited).bytes(message.object); + /* payload.v1.Search.Config config = 2; */ + if (message.config) + exports.Search_Config.internalBinaryWrite(message.config, writer.tag(2, runtime_1.WireType.LengthDelimited).fork(), options).join(); + /* payload.v1.Filter.Target vectorizer = 3; */ + if (message.vectorizer) + exports.Filter_Target.internalBinaryWrite(message.vectorizer, writer.tag(3, runtime_1.WireType.LengthDelimited).fork(), options).join(); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message payload.v1.Search.ObjectRequest + */ +exports.Search_ObjectRequest = new Search_ObjectRequest$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class Search_MultiObjectRequest$Type extends runtime_4.MessageType { + constructor() { + super("payload.v1.Search.MultiObjectRequest", [ + { no: 1, name: "requests", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => exports.Search_ObjectRequest } + ]); + } + create(value) { + const message = globalThis.Object.create((this.messagePrototype)); + message.requests = []; + if (value !== undefined) + runtime_3.reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader, length, options, target) { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* repeated payload.v1.Search.ObjectRequest requests */ 1: + message.requests.push(exports.Search_ObjectRequest.internalBinaryRead(reader, reader.uint32(), options)); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? runtime_2.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message, writer, options) { + /* repeated payload.v1.Search.ObjectRequest requests = 1; */ + for (let i = 0; i < message.requests.length; i++) + exports.Search_ObjectRequest.internalBinaryWrite(message.requests[i], writer.tag(1, runtime_1.WireType.LengthDelimited).fork(), options).join(); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message payload.v1.Search.MultiObjectRequest + */ +exports.Search_MultiObjectRequest = new Search_MultiObjectRequest$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class Search_Config$Type extends runtime_4.MessageType { + constructor() { + super("payload.v1.Search.Config", [ + { no: 1, name: "request_id", kind: "scalar", localName: "request_id", T: 9 /*ScalarType.STRING*/ }, + { no: 2, name: "num", kind: "scalar", T: 13 /*ScalarType.UINT32*/, options: { "buf.validate.field": { uint32: { gte: 1 } } } }, + { no: 3, name: "radius", kind: "scalar", T: 2 /*ScalarType.FLOAT*/ }, + { no: 4, name: "epsilon", kind: "scalar", T: 2 /*ScalarType.FLOAT*/ }, + { no: 5, name: "timeout", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 0 /*LongType.BIGINT*/ }, + { no: 6, name: "ingress_filters", kind: "message", localName: "ingress_filters", T: () => exports.Filter_Config }, + { no: 7, name: "egress_filters", kind: "message", localName: "egress_filters", T: () => exports.Filter_Config }, + { no: 8, name: "min_num", kind: "scalar", localName: "min_num", T: 13 /*ScalarType.UINT32*/, options: { "buf.validate.field": { uint32: { gte: 0 } } } }, + { no: 9, name: "aggregation_algorithm", kind: "enum", localName: "aggregation_algorithm", T: () => ["payload.v1.Search.AggregationAlgorithm", Search_AggregationAlgorithm] } + ]); + } + create(value) { + const message = globalThis.Object.create((this.messagePrototype)); + message.request_id = ""; + message.num = 0; + message.radius = 0; + message.epsilon = 0; + message.timeout = 0n; + message.min_num = 0; + message.aggregation_algorithm = 0; + if (value !== undefined) + runtime_3.reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader, length, options, target) { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* string request_id */ 1: + message.request_id = reader.string(); + break; + case /* uint32 num */ 2: + message.num = reader.uint32(); + break; + case /* float radius */ 3: + message.radius = reader.float(); + break; + case /* float epsilon */ 4: + message.epsilon = reader.float(); + break; + case /* int64 timeout */ 5: + message.timeout = reader.int64().toBigInt(); + break; + case /* payload.v1.Filter.Config ingress_filters */ 6: + message.ingress_filters = exports.Filter_Config.internalBinaryRead(reader, reader.uint32(), options, message.ingress_filters); + break; + case /* payload.v1.Filter.Config egress_filters */ 7: + message.egress_filters = exports.Filter_Config.internalBinaryRead(reader, reader.uint32(), options, message.egress_filters); + break; + case /* uint32 min_num */ 8: + message.min_num = reader.uint32(); + break; + case /* payload.v1.Search.AggregationAlgorithm aggregation_algorithm */ 9: + message.aggregation_algorithm = reader.int32(); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? runtime_2.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message, writer, options) { + /* string request_id = 1; */ + if (message.request_id !== "") + writer.tag(1, runtime_1.WireType.LengthDelimited).string(message.request_id); + /* uint32 num = 2; */ + if (message.num !== 0) + writer.tag(2, runtime_1.WireType.Varint).uint32(message.num); + /* float radius = 3; */ + if (message.radius !== 0) + writer.tag(3, runtime_1.WireType.Bit32).float(message.radius); + /* float epsilon = 4; */ + if (message.epsilon !== 0) + writer.tag(4, runtime_1.WireType.Bit32).float(message.epsilon); + /* int64 timeout = 5; */ + if (message.timeout !== 0n) + writer.tag(5, runtime_1.WireType.Varint).int64(message.timeout); + /* payload.v1.Filter.Config ingress_filters = 6; */ + if (message.ingress_filters) + exports.Filter_Config.internalBinaryWrite(message.ingress_filters, writer.tag(6, runtime_1.WireType.LengthDelimited).fork(), options).join(); + /* payload.v1.Filter.Config egress_filters = 7; */ + if (message.egress_filters) + exports.Filter_Config.internalBinaryWrite(message.egress_filters, writer.tag(7, runtime_1.WireType.LengthDelimited).fork(), options).join(); + /* uint32 min_num = 8; */ + if (message.min_num !== 0) + writer.tag(8, runtime_1.WireType.Varint).uint32(message.min_num); + /* payload.v1.Search.AggregationAlgorithm aggregation_algorithm = 9; */ + if (message.aggregation_algorithm !== 0) + writer.tag(9, runtime_1.WireType.Varint).int32(message.aggregation_algorithm); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message payload.v1.Search.Config + */ +exports.Search_Config = new Search_Config$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class Search_Response$Type extends runtime_4.MessageType { + constructor() { + super("payload.v1.Search.Response", [ + { no: 1, name: "request_id", kind: "scalar", localName: "request_id", T: 9 /*ScalarType.STRING*/ }, + { no: 2, name: "results", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => exports.Object_Distance } + ]); + } + create(value) { + const message = globalThis.Object.create((this.messagePrototype)); + message.request_id = ""; + message.results = []; + if (value !== undefined) + runtime_3.reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader, length, options, target) { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* string request_id */ 1: + message.request_id = reader.string(); + break; + case /* repeated payload.v1.Object.Distance results */ 2: + message.results.push(exports.Object_Distance.internalBinaryRead(reader, reader.uint32(), options)); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? runtime_2.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message, writer, options) { + /* string request_id = 1; */ + if (message.request_id !== "") + writer.tag(1, runtime_1.WireType.LengthDelimited).string(message.request_id); + /* repeated payload.v1.Object.Distance results = 2; */ + for (let i = 0; i < message.results.length; i++) + exports.Object_Distance.internalBinaryWrite(message.results[i], writer.tag(2, runtime_1.WireType.LengthDelimited).fork(), options).join(); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message payload.v1.Search.Response + */ +exports.Search_Response = new Search_Response$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class Search_Responses$Type extends runtime_4.MessageType { + constructor() { + super("payload.v1.Search.Responses", [ + { no: 1, name: "responses", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => exports.Search_Response } + ]); + } + create(value) { + const message = globalThis.Object.create((this.messagePrototype)); + message.responses = []; + if (value !== undefined) + runtime_3.reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader, length, options, target) { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* repeated payload.v1.Search.Response responses */ 1: + message.responses.push(exports.Search_Response.internalBinaryRead(reader, reader.uint32(), options)); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? runtime_2.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message, writer, options) { + /* repeated payload.v1.Search.Response responses = 1; */ + for (let i = 0; i < message.responses.length; i++) + exports.Search_Response.internalBinaryWrite(message.responses[i], writer.tag(1, runtime_1.WireType.LengthDelimited).fork(), options).join(); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message payload.v1.Search.Responses + */ +exports.Search_Responses = new Search_Responses$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class Search_StreamResponse$Type extends runtime_4.MessageType { + constructor() { + super("payload.v1.Search.StreamResponse", [ + { no: 1, name: "response", kind: "message", oneof: "payload", T: () => exports.Search_Response }, + { no: 2, name: "status", kind: "message", oneof: "payload", T: () => status_pb_1.Status } + ]); + } + create(value) { + const message = globalThis.Object.create((this.messagePrototype)); + message.payload = { oneofKind: undefined }; + if (value !== undefined) + runtime_3.reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader, length, options, target) { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* payload.v1.Search.Response response */ 1: + message.payload = { + oneofKind: "response", + response: exports.Search_Response.internalBinaryRead(reader, reader.uint32(), options, message.payload.response) + }; + break; + case /* google.rpc.Status status */ 2: + message.payload = { + oneofKind: "status", + status: status_pb_1.Status.internalBinaryRead(reader, reader.uint32(), options, message.payload.status) + }; + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? runtime_2.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message, writer, options) { + /* payload.v1.Search.Response response = 1; */ + if (message.payload.oneofKind === "response") + exports.Search_Response.internalBinaryWrite(message.payload.response, writer.tag(1, runtime_1.WireType.LengthDelimited).fork(), options).join(); + /* google.rpc.Status status = 2; */ + if (message.payload.oneofKind === "status") + status_pb_1.Status.internalBinaryWrite(message.payload.status, writer.tag(2, runtime_1.WireType.LengthDelimited).fork(), options).join(); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message payload.v1.Search.StreamResponse + */ +exports.Search_StreamResponse = new Search_StreamResponse$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class Filter$Type extends runtime_4.MessageType { + constructor() { + super("payload.v1.Filter", []); + } + create(value) { + const message = globalThis.Object.create((this.messagePrototype)); + if (value !== undefined) + runtime_3.reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader, length, options, target) { + return target ?? this.create(); + } + internalBinaryWrite(message, writer, options) { + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message payload.v1.Filter + */ +exports.Filter = new Filter$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class Filter_Target$Type extends runtime_4.MessageType { + constructor() { + super("payload.v1.Filter.Target", [ + { no: 1, name: "host", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, + { no: 2, name: "port", kind: "scalar", T: 13 /*ScalarType.UINT32*/ } + ]); + } + create(value) { + const message = globalThis.Object.create((this.messagePrototype)); + message.host = ""; + message.port = 0; + if (value !== undefined) + runtime_3.reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader, length, options, target) { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* string host */ 1: + message.host = reader.string(); + break; + case /* uint32 port */ 2: + message.port = reader.uint32(); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? runtime_2.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message, writer, options) { + /* string host = 1; */ + if (message.host !== "") + writer.tag(1, runtime_1.WireType.LengthDelimited).string(message.host); + /* uint32 port = 2; */ + if (message.port !== 0) + writer.tag(2, runtime_1.WireType.Varint).uint32(message.port); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message payload.v1.Filter.Target + */ +exports.Filter_Target = new Filter_Target$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class Filter_Config$Type extends runtime_4.MessageType { + constructor() { + super("payload.v1.Filter.Config", [ + { no: 1, name: "targets", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => exports.Filter_Target } + ]); + } + create(value) { + const message = globalThis.Object.create((this.messagePrototype)); + message.targets = []; + if (value !== undefined) + runtime_3.reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader, length, options, target) { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* repeated payload.v1.Filter.Target targets */ 1: + message.targets.push(exports.Filter_Target.internalBinaryRead(reader, reader.uint32(), options)); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? runtime_2.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message, writer, options) { + /* repeated payload.v1.Filter.Target targets = 1; */ + for (let i = 0; i < message.targets.length; i++) + exports.Filter_Target.internalBinaryWrite(message.targets[i], writer.tag(1, runtime_1.WireType.LengthDelimited).fork(), options).join(); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message payload.v1.Filter.Config + */ +exports.Filter_Config = new Filter_Config$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class Insert$Type extends runtime_4.MessageType { + constructor() { + super("payload.v1.Insert", []); + } + create(value) { + const message = globalThis.Object.create((this.messagePrototype)); + if (value !== undefined) + runtime_3.reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader, length, options, target) { + return target ?? this.create(); + } + internalBinaryWrite(message, writer, options) { + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message payload.v1.Insert + */ +exports.Insert = new Insert$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class Insert_Request$Type extends runtime_4.MessageType { + constructor() { + super("payload.v1.Insert.Request", [ + { no: 1, name: "vector", kind: "message", T: () => exports.Object_Vector, options: { "buf.validate.field": { repeated: { minItems: "2" } } } }, + { no: 2, name: "config", kind: "message", T: () => exports.Insert_Config } + ]); + } + create(value) { + const message = globalThis.Object.create((this.messagePrototype)); + if (value !== undefined) + runtime_3.reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader, length, options, target) { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* payload.v1.Object.Vector vector */ 1: + message.vector = exports.Object_Vector.internalBinaryRead(reader, reader.uint32(), options, message.vector); + break; + case /* payload.v1.Insert.Config config */ 2: + message.config = exports.Insert_Config.internalBinaryRead(reader, reader.uint32(), options, message.config); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? runtime_2.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message, writer, options) { + /* payload.v1.Object.Vector vector = 1; */ + if (message.vector) + exports.Object_Vector.internalBinaryWrite(message.vector, writer.tag(1, runtime_1.WireType.LengthDelimited).fork(), options).join(); + /* payload.v1.Insert.Config config = 2; */ + if (message.config) + exports.Insert_Config.internalBinaryWrite(message.config, writer.tag(2, runtime_1.WireType.LengthDelimited).fork(), options).join(); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message payload.v1.Insert.Request + */ +exports.Insert_Request = new Insert_Request$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class Insert_MultiRequest$Type extends runtime_4.MessageType { + constructor() { + super("payload.v1.Insert.MultiRequest", [ + { no: 1, name: "requests", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => exports.Insert_Request } + ]); + } + create(value) { + const message = globalThis.Object.create((this.messagePrototype)); + message.requests = []; + if (value !== undefined) + runtime_3.reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader, length, options, target) { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* repeated payload.v1.Insert.Request requests */ 1: + message.requests.push(exports.Insert_Request.internalBinaryRead(reader, reader.uint32(), options)); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? runtime_2.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message, writer, options) { + /* repeated payload.v1.Insert.Request requests = 1; */ + for (let i = 0; i < message.requests.length; i++) + exports.Insert_Request.internalBinaryWrite(message.requests[i], writer.tag(1, runtime_1.WireType.LengthDelimited).fork(), options).join(); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message payload.v1.Insert.MultiRequest + */ +exports.Insert_MultiRequest = new Insert_MultiRequest$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class Insert_ObjectRequest$Type extends runtime_4.MessageType { + constructor() { + super("payload.v1.Insert.ObjectRequest", [ + { no: 1, name: "object", kind: "message", T: () => exports.Object_Blob }, + { no: 2, name: "config", kind: "message", T: () => exports.Insert_Config }, + { no: 3, name: "vectorizer", kind: "message", T: () => exports.Filter_Target } + ]); + } + create(value) { + const message = globalThis.Object.create((this.messagePrototype)); + if (value !== undefined) + runtime_3.reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader, length, options, target) { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* payload.v1.Object.Blob object */ 1: + message.object = exports.Object_Blob.internalBinaryRead(reader, reader.uint32(), options, message.object); + break; + case /* payload.v1.Insert.Config config */ 2: + message.config = exports.Insert_Config.internalBinaryRead(reader, reader.uint32(), options, message.config); + break; + case /* payload.v1.Filter.Target vectorizer */ 3: + message.vectorizer = exports.Filter_Target.internalBinaryRead(reader, reader.uint32(), options, message.vectorizer); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? runtime_2.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message, writer, options) { + /* payload.v1.Object.Blob object = 1; */ + if (message.object) + exports.Object_Blob.internalBinaryWrite(message.object, writer.tag(1, runtime_1.WireType.LengthDelimited).fork(), options).join(); + /* payload.v1.Insert.Config config = 2; */ + if (message.config) + exports.Insert_Config.internalBinaryWrite(message.config, writer.tag(2, runtime_1.WireType.LengthDelimited).fork(), options).join(); + /* payload.v1.Filter.Target vectorizer = 3; */ + if (message.vectorizer) + exports.Filter_Target.internalBinaryWrite(message.vectorizer, writer.tag(3, runtime_1.WireType.LengthDelimited).fork(), options).join(); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message payload.v1.Insert.ObjectRequest + */ +exports.Insert_ObjectRequest = new Insert_ObjectRequest$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class Insert_MultiObjectRequest$Type extends runtime_4.MessageType { + constructor() { + super("payload.v1.Insert.MultiObjectRequest", [ + { no: 1, name: "requests", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => exports.Insert_ObjectRequest } + ]); + } + create(value) { + const message = globalThis.Object.create((this.messagePrototype)); + message.requests = []; + if (value !== undefined) + runtime_3.reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader, length, options, target) { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* repeated payload.v1.Insert.ObjectRequest requests */ 1: + message.requests.push(exports.Insert_ObjectRequest.internalBinaryRead(reader, reader.uint32(), options)); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? runtime_2.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message, writer, options) { + /* repeated payload.v1.Insert.ObjectRequest requests = 1; */ + for (let i = 0; i < message.requests.length; i++) + exports.Insert_ObjectRequest.internalBinaryWrite(message.requests[i], writer.tag(1, runtime_1.WireType.LengthDelimited).fork(), options).join(); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message payload.v1.Insert.MultiObjectRequest + */ +exports.Insert_MultiObjectRequest = new Insert_MultiObjectRequest$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class Insert_Config$Type extends runtime_4.MessageType { + constructor() { + super("payload.v1.Insert.Config", [ + { no: 1, name: "skip_strict_exist_check", kind: "scalar", localName: "skip_strict_exist_check", T: 8 /*ScalarType.BOOL*/ }, + { no: 2, name: "filters", kind: "message", T: () => exports.Filter_Config }, + { no: 3, name: "timestamp", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 0 /*LongType.BIGINT*/ } + ]); + } + create(value) { + const message = globalThis.Object.create((this.messagePrototype)); + message.skip_strict_exist_check = false; + message.timestamp = 0n; + if (value !== undefined) + runtime_3.reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader, length, options, target) { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* bool skip_strict_exist_check */ 1: + message.skip_strict_exist_check = reader.bool(); + break; + case /* payload.v1.Filter.Config filters */ 2: + message.filters = exports.Filter_Config.internalBinaryRead(reader, reader.uint32(), options, message.filters); + break; + case /* int64 timestamp */ 3: + message.timestamp = reader.int64().toBigInt(); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? runtime_2.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message, writer, options) { + /* bool skip_strict_exist_check = 1; */ + if (message.skip_strict_exist_check !== false) + writer.tag(1, runtime_1.WireType.Varint).bool(message.skip_strict_exist_check); + /* payload.v1.Filter.Config filters = 2; */ + if (message.filters) + exports.Filter_Config.internalBinaryWrite(message.filters, writer.tag(2, runtime_1.WireType.LengthDelimited).fork(), options).join(); + /* int64 timestamp = 3; */ + if (message.timestamp !== 0n) + writer.tag(3, runtime_1.WireType.Varint).int64(message.timestamp); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message payload.v1.Insert.Config + */ +exports.Insert_Config = new Insert_Config$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class Update$Type extends runtime_4.MessageType { + constructor() { + super("payload.v1.Update", []); + } + create(value) { + const message = globalThis.Object.create((this.messagePrototype)); + if (value !== undefined) + runtime_3.reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader, length, options, target) { + return target ?? this.create(); + } + internalBinaryWrite(message, writer, options) { + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message payload.v1.Update + */ +exports.Update = new Update$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class Update_Request$Type extends runtime_4.MessageType { + constructor() { + super("payload.v1.Update.Request", [ + { no: 1, name: "vector", kind: "message", T: () => exports.Object_Vector, options: { "buf.validate.field": { repeated: { minItems: "2" } } } }, + { no: 2, name: "config", kind: "message", T: () => exports.Update_Config } + ]); + } + create(value) { + const message = globalThis.Object.create((this.messagePrototype)); + if (value !== undefined) + runtime_3.reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader, length, options, target) { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* payload.v1.Object.Vector vector */ 1: + message.vector = exports.Object_Vector.internalBinaryRead(reader, reader.uint32(), options, message.vector); + break; + case /* payload.v1.Update.Config config */ 2: + message.config = exports.Update_Config.internalBinaryRead(reader, reader.uint32(), options, message.config); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? runtime_2.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message, writer, options) { + /* payload.v1.Object.Vector vector = 1; */ + if (message.vector) + exports.Object_Vector.internalBinaryWrite(message.vector, writer.tag(1, runtime_1.WireType.LengthDelimited).fork(), options).join(); + /* payload.v1.Update.Config config = 2; */ + if (message.config) + exports.Update_Config.internalBinaryWrite(message.config, writer.tag(2, runtime_1.WireType.LengthDelimited).fork(), options).join(); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message payload.v1.Update.Request + */ +exports.Update_Request = new Update_Request$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class Update_MultiRequest$Type extends runtime_4.MessageType { + constructor() { + super("payload.v1.Update.MultiRequest", [ + { no: 1, name: "requests", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => exports.Update_Request } + ]); + } + create(value) { + const message = globalThis.Object.create((this.messagePrototype)); + message.requests = []; + if (value !== undefined) + runtime_3.reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader, length, options, target) { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* repeated payload.v1.Update.Request requests */ 1: + message.requests.push(exports.Update_Request.internalBinaryRead(reader, reader.uint32(), options)); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? runtime_2.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message, writer, options) { + /* repeated payload.v1.Update.Request requests = 1; */ + for (let i = 0; i < message.requests.length; i++) + exports.Update_Request.internalBinaryWrite(message.requests[i], writer.tag(1, runtime_1.WireType.LengthDelimited).fork(), options).join(); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message payload.v1.Update.MultiRequest + */ +exports.Update_MultiRequest = new Update_MultiRequest$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class Update_ObjectRequest$Type extends runtime_4.MessageType { + constructor() { + super("payload.v1.Update.ObjectRequest", [ + { no: 1, name: "object", kind: "message", T: () => exports.Object_Blob }, + { no: 2, name: "config", kind: "message", T: () => exports.Update_Config }, + { no: 3, name: "vectorizer", kind: "message", T: () => exports.Filter_Target } + ]); + } + create(value) { + const message = globalThis.Object.create((this.messagePrototype)); + if (value !== undefined) + runtime_3.reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader, length, options, target) { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* payload.v1.Object.Blob object */ 1: + message.object = exports.Object_Blob.internalBinaryRead(reader, reader.uint32(), options, message.object); + break; + case /* payload.v1.Update.Config config */ 2: + message.config = exports.Update_Config.internalBinaryRead(reader, reader.uint32(), options, message.config); + break; + case /* payload.v1.Filter.Target vectorizer */ 3: + message.vectorizer = exports.Filter_Target.internalBinaryRead(reader, reader.uint32(), options, message.vectorizer); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? runtime_2.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message, writer, options) { + /* payload.v1.Object.Blob object = 1; */ + if (message.object) + exports.Object_Blob.internalBinaryWrite(message.object, writer.tag(1, runtime_1.WireType.LengthDelimited).fork(), options).join(); + /* payload.v1.Update.Config config = 2; */ + if (message.config) + exports.Update_Config.internalBinaryWrite(message.config, writer.tag(2, runtime_1.WireType.LengthDelimited).fork(), options).join(); + /* payload.v1.Filter.Target vectorizer = 3; */ + if (message.vectorizer) + exports.Filter_Target.internalBinaryWrite(message.vectorizer, writer.tag(3, runtime_1.WireType.LengthDelimited).fork(), options).join(); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message payload.v1.Update.ObjectRequest + */ +exports.Update_ObjectRequest = new Update_ObjectRequest$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class Update_MultiObjectRequest$Type extends runtime_4.MessageType { + constructor() { + super("payload.v1.Update.MultiObjectRequest", [ + { no: 1, name: "requests", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => exports.Update_ObjectRequest } + ]); + } + create(value) { + const message = globalThis.Object.create((this.messagePrototype)); + message.requests = []; + if (value !== undefined) + runtime_3.reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader, length, options, target) { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* repeated payload.v1.Update.ObjectRequest requests */ 1: + message.requests.push(exports.Update_ObjectRequest.internalBinaryRead(reader, reader.uint32(), options)); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? runtime_2.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message, writer, options) { + /* repeated payload.v1.Update.ObjectRequest requests = 1; */ + for (let i = 0; i < message.requests.length; i++) + exports.Update_ObjectRequest.internalBinaryWrite(message.requests[i], writer.tag(1, runtime_1.WireType.LengthDelimited).fork(), options).join(); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message payload.v1.Update.MultiObjectRequest + */ +exports.Update_MultiObjectRequest = new Update_MultiObjectRequest$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class Update_Config$Type extends runtime_4.MessageType { + constructor() { + super("payload.v1.Update.Config", [ + { no: 1, name: "skip_strict_exist_check", kind: "scalar", localName: "skip_strict_exist_check", T: 8 /*ScalarType.BOOL*/ }, + { no: 2, name: "filters", kind: "message", T: () => exports.Filter_Config }, + { no: 3, name: "timestamp", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 0 /*LongType.BIGINT*/ }, + { no: 4, name: "disable_balanced_update", kind: "scalar", localName: "disable_balanced_update", T: 8 /*ScalarType.BOOL*/ } + ]); + } + create(value) { + const message = globalThis.Object.create((this.messagePrototype)); + message.skip_strict_exist_check = false; + message.timestamp = 0n; + message.disable_balanced_update = false; + if (value !== undefined) + runtime_3.reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader, length, options, target) { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* bool skip_strict_exist_check */ 1: + message.skip_strict_exist_check = reader.bool(); + break; + case /* payload.v1.Filter.Config filters */ 2: + message.filters = exports.Filter_Config.internalBinaryRead(reader, reader.uint32(), options, message.filters); + break; + case /* int64 timestamp */ 3: + message.timestamp = reader.int64().toBigInt(); + break; + case /* bool disable_balanced_update */ 4: + message.disable_balanced_update = reader.bool(); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? runtime_2.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message, writer, options) { + /* bool skip_strict_exist_check = 1; */ + if (message.skip_strict_exist_check !== false) + writer.tag(1, runtime_1.WireType.Varint).bool(message.skip_strict_exist_check); + /* payload.v1.Filter.Config filters = 2; */ + if (message.filters) + exports.Filter_Config.internalBinaryWrite(message.filters, writer.tag(2, runtime_1.WireType.LengthDelimited).fork(), options).join(); + /* int64 timestamp = 3; */ + if (message.timestamp !== 0n) + writer.tag(3, runtime_1.WireType.Varint).int64(message.timestamp); + /* bool disable_balanced_update = 4; */ + if (message.disable_balanced_update !== false) + writer.tag(4, runtime_1.WireType.Varint).bool(message.disable_balanced_update); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message payload.v1.Update.Config + */ +exports.Update_Config = new Update_Config$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class Upsert$Type extends runtime_4.MessageType { + constructor() { + super("payload.v1.Upsert", []); + } + create(value) { + const message = globalThis.Object.create((this.messagePrototype)); + if (value !== undefined) + runtime_3.reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader, length, options, target) { + return target ?? this.create(); + } + internalBinaryWrite(message, writer, options) { + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message payload.v1.Upsert + */ +exports.Upsert = new Upsert$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class Upsert_Request$Type extends runtime_4.MessageType { + constructor() { + super("payload.v1.Upsert.Request", [ + { no: 1, name: "vector", kind: "message", T: () => exports.Object_Vector, options: { "buf.validate.field": { repeated: { minItems: "2" } } } }, + { no: 2, name: "config", kind: "message", T: () => exports.Upsert_Config } + ]); + } + create(value) { + const message = globalThis.Object.create((this.messagePrototype)); + if (value !== undefined) + runtime_3.reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader, length, options, target) { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* payload.v1.Object.Vector vector */ 1: + message.vector = exports.Object_Vector.internalBinaryRead(reader, reader.uint32(), options, message.vector); + break; + case /* payload.v1.Upsert.Config config */ 2: + message.config = exports.Upsert_Config.internalBinaryRead(reader, reader.uint32(), options, message.config); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? runtime_2.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message, writer, options) { + /* payload.v1.Object.Vector vector = 1; */ + if (message.vector) + exports.Object_Vector.internalBinaryWrite(message.vector, writer.tag(1, runtime_1.WireType.LengthDelimited).fork(), options).join(); + /* payload.v1.Upsert.Config config = 2; */ + if (message.config) + exports.Upsert_Config.internalBinaryWrite(message.config, writer.tag(2, runtime_1.WireType.LengthDelimited).fork(), options).join(); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message payload.v1.Upsert.Request + */ +exports.Upsert_Request = new Upsert_Request$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class Upsert_MultiRequest$Type extends runtime_4.MessageType { + constructor() { + super("payload.v1.Upsert.MultiRequest", [ + { no: 1, name: "requests", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => exports.Upsert_Request } + ]); + } + create(value) { + const message = globalThis.Object.create((this.messagePrototype)); + message.requests = []; + if (value !== undefined) + runtime_3.reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader, length, options, target) { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* repeated payload.v1.Upsert.Request requests */ 1: + message.requests.push(exports.Upsert_Request.internalBinaryRead(reader, reader.uint32(), options)); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? runtime_2.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message, writer, options) { + /* repeated payload.v1.Upsert.Request requests = 1; */ + for (let i = 0; i < message.requests.length; i++) + exports.Upsert_Request.internalBinaryWrite(message.requests[i], writer.tag(1, runtime_1.WireType.LengthDelimited).fork(), options).join(); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message payload.v1.Upsert.MultiRequest + */ +exports.Upsert_MultiRequest = new Upsert_MultiRequest$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class Upsert_ObjectRequest$Type extends runtime_4.MessageType { + constructor() { + super("payload.v1.Upsert.ObjectRequest", [ + { no: 1, name: "object", kind: "message", T: () => exports.Object_Blob }, + { no: 2, name: "config", kind: "message", T: () => exports.Upsert_Config }, + { no: 3, name: "vectorizer", kind: "message", T: () => exports.Filter_Target } + ]); + } + create(value) { + const message = globalThis.Object.create((this.messagePrototype)); + if (value !== undefined) + runtime_3.reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader, length, options, target) { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* payload.v1.Object.Blob object */ 1: + message.object = exports.Object_Blob.internalBinaryRead(reader, reader.uint32(), options, message.object); + break; + case /* payload.v1.Upsert.Config config */ 2: + message.config = exports.Upsert_Config.internalBinaryRead(reader, reader.uint32(), options, message.config); + break; + case /* payload.v1.Filter.Target vectorizer */ 3: + message.vectorizer = exports.Filter_Target.internalBinaryRead(reader, reader.uint32(), options, message.vectorizer); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? runtime_2.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message, writer, options) { + /* payload.v1.Object.Blob object = 1; */ + if (message.object) + exports.Object_Blob.internalBinaryWrite(message.object, writer.tag(1, runtime_1.WireType.LengthDelimited).fork(), options).join(); + /* payload.v1.Upsert.Config config = 2; */ + if (message.config) + exports.Upsert_Config.internalBinaryWrite(message.config, writer.tag(2, runtime_1.WireType.LengthDelimited).fork(), options).join(); + /* payload.v1.Filter.Target vectorizer = 3; */ + if (message.vectorizer) + exports.Filter_Target.internalBinaryWrite(message.vectorizer, writer.tag(3, runtime_1.WireType.LengthDelimited).fork(), options).join(); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message payload.v1.Upsert.ObjectRequest + */ +exports.Upsert_ObjectRequest = new Upsert_ObjectRequest$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class Upsert_MultiObjectRequest$Type extends runtime_4.MessageType { + constructor() { + super("payload.v1.Upsert.MultiObjectRequest", [ + { no: 1, name: "requests", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => exports.Upsert_ObjectRequest } + ]); + } + create(value) { + const message = globalThis.Object.create((this.messagePrototype)); + message.requests = []; + if (value !== undefined) + runtime_3.reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader, length, options, target) { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* repeated payload.v1.Upsert.ObjectRequest requests */ 1: + message.requests.push(exports.Upsert_ObjectRequest.internalBinaryRead(reader, reader.uint32(), options)); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? runtime_2.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message, writer, options) { + /* repeated payload.v1.Upsert.ObjectRequest requests = 1; */ + for (let i = 0; i < message.requests.length; i++) + exports.Upsert_ObjectRequest.internalBinaryWrite(message.requests[i], writer.tag(1, runtime_1.WireType.LengthDelimited).fork(), options).join(); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message payload.v1.Upsert.MultiObjectRequest + */ +exports.Upsert_MultiObjectRequest = new Upsert_MultiObjectRequest$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class Upsert_Config$Type extends runtime_4.MessageType { + constructor() { + super("payload.v1.Upsert.Config", [ + { no: 1, name: "skip_strict_exist_check", kind: "scalar", localName: "skip_strict_exist_check", T: 8 /*ScalarType.BOOL*/ }, + { no: 2, name: "filters", kind: "message", T: () => exports.Filter_Config }, + { no: 3, name: "timestamp", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 0 /*LongType.BIGINT*/ }, + { no: 4, name: "disable_balanced_update", kind: "scalar", localName: "disable_balanced_update", T: 8 /*ScalarType.BOOL*/ } + ]); + } + create(value) { + const message = globalThis.Object.create((this.messagePrototype)); + message.skip_strict_exist_check = false; + message.timestamp = 0n; + message.disable_balanced_update = false; + if (value !== undefined) + runtime_3.reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader, length, options, target) { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* bool skip_strict_exist_check */ 1: + message.skip_strict_exist_check = reader.bool(); + break; + case /* payload.v1.Filter.Config filters */ 2: + message.filters = exports.Filter_Config.internalBinaryRead(reader, reader.uint32(), options, message.filters); + break; + case /* int64 timestamp */ 3: + message.timestamp = reader.int64().toBigInt(); + break; + case /* bool disable_balanced_update */ 4: + message.disable_balanced_update = reader.bool(); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? runtime_2.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message, writer, options) { + /* bool skip_strict_exist_check = 1; */ + if (message.skip_strict_exist_check !== false) + writer.tag(1, runtime_1.WireType.Varint).bool(message.skip_strict_exist_check); + /* payload.v1.Filter.Config filters = 2; */ + if (message.filters) + exports.Filter_Config.internalBinaryWrite(message.filters, writer.tag(2, runtime_1.WireType.LengthDelimited).fork(), options).join(); + /* int64 timestamp = 3; */ + if (message.timestamp !== 0n) + writer.tag(3, runtime_1.WireType.Varint).int64(message.timestamp); + /* bool disable_balanced_update = 4; */ + if (message.disable_balanced_update !== false) + writer.tag(4, runtime_1.WireType.Varint).bool(message.disable_balanced_update); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message payload.v1.Upsert.Config + */ +exports.Upsert_Config = new Upsert_Config$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class Remove$Type extends runtime_4.MessageType { + constructor() { + super("payload.v1.Remove", []); + } + create(value) { + const message = globalThis.Object.create((this.messagePrototype)); + if (value !== undefined) + runtime_3.reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader, length, options, target) { + return target ?? this.create(); + } + internalBinaryWrite(message, writer, options) { + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message payload.v1.Remove + */ +exports.Remove = new Remove$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class Remove_Request$Type extends runtime_4.MessageType { + constructor() { + super("payload.v1.Remove.Request", [ + { no: 1, name: "id", kind: "message", T: () => exports.Object_ID }, + { no: 2, name: "config", kind: "message", T: () => exports.Remove_Config } + ]); + } + create(value) { + const message = globalThis.Object.create((this.messagePrototype)); + if (value !== undefined) + runtime_3.reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader, length, options, target) { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* payload.v1.Object.ID id */ 1: + message.id = exports.Object_ID.internalBinaryRead(reader, reader.uint32(), options, message.id); + break; + case /* payload.v1.Remove.Config config */ 2: + message.config = exports.Remove_Config.internalBinaryRead(reader, reader.uint32(), options, message.config); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? runtime_2.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message, writer, options) { + /* payload.v1.Object.ID id = 1; */ + if (message.id) + exports.Object_ID.internalBinaryWrite(message.id, writer.tag(1, runtime_1.WireType.LengthDelimited).fork(), options).join(); + /* payload.v1.Remove.Config config = 2; */ + if (message.config) + exports.Remove_Config.internalBinaryWrite(message.config, writer.tag(2, runtime_1.WireType.LengthDelimited).fork(), options).join(); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message payload.v1.Remove.Request + */ +exports.Remove_Request = new Remove_Request$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class Remove_MultiRequest$Type extends runtime_4.MessageType { + constructor() { + super("payload.v1.Remove.MultiRequest", [ + { no: 1, name: "requests", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => exports.Remove_Request } + ]); + } + create(value) { + const message = globalThis.Object.create((this.messagePrototype)); + message.requests = []; + if (value !== undefined) + runtime_3.reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader, length, options, target) { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* repeated payload.v1.Remove.Request requests */ 1: + message.requests.push(exports.Remove_Request.internalBinaryRead(reader, reader.uint32(), options)); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? runtime_2.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message, writer, options) { + /* repeated payload.v1.Remove.Request requests = 1; */ + for (let i = 0; i < message.requests.length; i++) + exports.Remove_Request.internalBinaryWrite(message.requests[i], writer.tag(1, runtime_1.WireType.LengthDelimited).fork(), options).join(); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message payload.v1.Remove.MultiRequest + */ +exports.Remove_MultiRequest = new Remove_MultiRequest$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class Remove_TimestampRequest$Type extends runtime_4.MessageType { + constructor() { + super("payload.v1.Remove.TimestampRequest", [ + { no: 1, name: "timestamps", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => exports.Remove_Timestamp } + ]); + } + create(value) { + const message = globalThis.Object.create((this.messagePrototype)); + message.timestamps = []; + if (value !== undefined) + runtime_3.reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader, length, options, target) { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* repeated payload.v1.Remove.Timestamp timestamps */ 1: + message.timestamps.push(exports.Remove_Timestamp.internalBinaryRead(reader, reader.uint32(), options)); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? runtime_2.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message, writer, options) { + /* repeated payload.v1.Remove.Timestamp timestamps = 1; */ + for (let i = 0; i < message.timestamps.length; i++) + exports.Remove_Timestamp.internalBinaryWrite(message.timestamps[i], writer.tag(1, runtime_1.WireType.LengthDelimited).fork(), options).join(); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message payload.v1.Remove.TimestampRequest + */ +exports.Remove_TimestampRequest = new Remove_TimestampRequest$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class Remove_Timestamp$Type extends runtime_4.MessageType { + constructor() { + super("payload.v1.Remove.Timestamp", [ + { no: 1, name: "timestamp", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 0 /*LongType.BIGINT*/ }, + { no: 2, name: "operator", kind: "enum", T: () => ["payload.v1.Remove.Timestamp.Operator", Remove_Timestamp_Operator] } + ]); + } + create(value) { + const message = globalThis.Object.create((this.messagePrototype)); + message.timestamp = 0n; + message.operator = 0; + if (value !== undefined) + runtime_3.reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader, length, options, target) { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* int64 timestamp */ 1: + message.timestamp = reader.int64().toBigInt(); + break; + case /* payload.v1.Remove.Timestamp.Operator operator */ 2: + message.operator = reader.int32(); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? runtime_2.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message, writer, options) { + /* int64 timestamp = 1; */ + if (message.timestamp !== 0n) + writer.tag(1, runtime_1.WireType.Varint).int64(message.timestamp); + /* payload.v1.Remove.Timestamp.Operator operator = 2; */ + if (message.operator !== 0) + writer.tag(2, runtime_1.WireType.Varint).int32(message.operator); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message payload.v1.Remove.Timestamp + */ +exports.Remove_Timestamp = new Remove_Timestamp$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class Remove_Config$Type extends runtime_4.MessageType { + constructor() { + super("payload.v1.Remove.Config", [ + { no: 1, name: "skip_strict_exist_check", kind: "scalar", localName: "skip_strict_exist_check", T: 8 /*ScalarType.BOOL*/ }, + { no: 3, name: "timestamp", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 0 /*LongType.BIGINT*/ } + ]); + } + create(value) { + const message = globalThis.Object.create((this.messagePrototype)); + message.skip_strict_exist_check = false; + message.timestamp = 0n; + if (value !== undefined) + runtime_3.reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader, length, options, target) { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* bool skip_strict_exist_check */ 1: + message.skip_strict_exist_check = reader.bool(); + break; + case /* int64 timestamp */ 3: + message.timestamp = reader.int64().toBigInt(); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? runtime_2.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message, writer, options) { + /* bool skip_strict_exist_check = 1; */ + if (message.skip_strict_exist_check !== false) + writer.tag(1, runtime_1.WireType.Varint).bool(message.skip_strict_exist_check); + /* int64 timestamp = 3; */ + if (message.timestamp !== 0n) + writer.tag(3, runtime_1.WireType.Varint).int64(message.timestamp); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message payload.v1.Remove.Config + */ +exports.Remove_Config = new Remove_Config$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class Object$Type extends runtime_4.MessageType { + constructor() { + super("payload.v1.Object", []); + } + create(value) { + const message = globalThis.Object.create((this.messagePrototype)); + if (value !== undefined) + runtime_3.reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader, length, options, target) { + return target ?? this.create(); + } + internalBinaryWrite(message, writer, options) { + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message payload.v1.Object + */ +exports.Object = new Object$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class Object_VectorRequest$Type extends runtime_4.MessageType { + constructor() { + super("payload.v1.Object.VectorRequest", [ + { no: 1, name: "id", kind: "message", T: () => exports.Object_ID, options: { "buf.validate.field": { repeated: { minItems: "2" } } } }, + { no: 2, name: "filters", kind: "message", T: () => exports.Filter_Config } + ]); + } + create(value) { + const message = globalThis.Object.create((this.messagePrototype)); + if (value !== undefined) + runtime_3.reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader, length, options, target) { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* payload.v1.Object.ID id */ 1: + message.id = exports.Object_ID.internalBinaryRead(reader, reader.uint32(), options, message.id); + break; + case /* payload.v1.Filter.Config filters */ 2: + message.filters = exports.Filter_Config.internalBinaryRead(reader, reader.uint32(), options, message.filters); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? runtime_2.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message, writer, options) { + /* payload.v1.Object.ID id = 1; */ + if (message.id) + exports.Object_ID.internalBinaryWrite(message.id, writer.tag(1, runtime_1.WireType.LengthDelimited).fork(), options).join(); + /* payload.v1.Filter.Config filters = 2; */ + if (message.filters) + exports.Filter_Config.internalBinaryWrite(message.filters, writer.tag(2, runtime_1.WireType.LengthDelimited).fork(), options).join(); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message payload.v1.Object.VectorRequest + */ +exports.Object_VectorRequest = new Object_VectorRequest$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class Object_Distance$Type extends runtime_4.MessageType { + constructor() { + super("payload.v1.Object.Distance", [ + { no: 1, name: "id", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, + { no: 2, name: "distance", kind: "scalar", T: 2 /*ScalarType.FLOAT*/ } + ]); + } + create(value) { + const message = globalThis.Object.create((this.messagePrototype)); + message.id = ""; + message.distance = 0; + if (value !== undefined) + runtime_3.reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader, length, options, target) { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* string id */ 1: + message.id = reader.string(); + break; + case /* float distance */ 2: + message.distance = reader.float(); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? runtime_2.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message, writer, options) { + /* string id = 1; */ + if (message.id !== "") + writer.tag(1, runtime_1.WireType.LengthDelimited).string(message.id); + /* float distance = 2; */ + if (message.distance !== 0) + writer.tag(2, runtime_1.WireType.Bit32).float(message.distance); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message payload.v1.Object.Distance + */ +exports.Object_Distance = new Object_Distance$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class Object_StreamDistance$Type extends runtime_4.MessageType { + constructor() { + super("payload.v1.Object.StreamDistance", [ + { no: 1, name: "distance", kind: "message", oneof: "payload", T: () => exports.Object_Distance }, + { no: 2, name: "status", kind: "message", oneof: "payload", T: () => status_pb_1.Status } + ]); + } + create(value) { + const message = globalThis.Object.create((this.messagePrototype)); + message.payload = { oneofKind: undefined }; + if (value !== undefined) + runtime_3.reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader, length, options, target) { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* payload.v1.Object.Distance distance */ 1: + message.payload = { + oneofKind: "distance", + distance: exports.Object_Distance.internalBinaryRead(reader, reader.uint32(), options, message.payload.distance) + }; + break; + case /* google.rpc.Status status */ 2: + message.payload = { + oneofKind: "status", + status: status_pb_1.Status.internalBinaryRead(reader, reader.uint32(), options, message.payload.status) + }; + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? runtime_2.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message, writer, options) { + /* payload.v1.Object.Distance distance = 1; */ + if (message.payload.oneofKind === "distance") + exports.Object_Distance.internalBinaryWrite(message.payload.distance, writer.tag(1, runtime_1.WireType.LengthDelimited).fork(), options).join(); + /* google.rpc.Status status = 2; */ + if (message.payload.oneofKind === "status") + status_pb_1.Status.internalBinaryWrite(message.payload.status, writer.tag(2, runtime_1.WireType.LengthDelimited).fork(), options).join(); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message payload.v1.Object.StreamDistance + */ +exports.Object_StreamDistance = new Object_StreamDistance$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class Object_ID$Type extends runtime_4.MessageType { + constructor() { + super("payload.v1.Object.ID", [ + { no: 1, name: "id", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { minLen: "1" } } } } + ]); + } + create(value) { + const message = globalThis.Object.create((this.messagePrototype)); + message.id = ""; + if (value !== undefined) + runtime_3.reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader, length, options, target) { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* string id */ 1: + message.id = reader.string(); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? runtime_2.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message, writer, options) { + /* string id = 1; */ + if (message.id !== "") + writer.tag(1, runtime_1.WireType.LengthDelimited).string(message.id); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message payload.v1.Object.ID + */ +exports.Object_ID = new Object_ID$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class Object_IDs$Type extends runtime_4.MessageType { + constructor() { + super("payload.v1.Object.IDs", [ + { no: 1, name: "ids", kind: "scalar", repeat: 2 /*RepeatType.UNPACKED*/, T: 9 /*ScalarType.STRING*/ } + ]); + } + create(value) { + const message = globalThis.Object.create((this.messagePrototype)); + message.ids = []; + if (value !== undefined) + runtime_3.reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader, length, options, target) { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* repeated string ids */ 1: + message.ids.push(reader.string()); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? runtime_2.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message, writer, options) { + /* repeated string ids = 1; */ + for (let i = 0; i < message.ids.length; i++) + writer.tag(1, runtime_1.WireType.LengthDelimited).string(message.ids[i]); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message payload.v1.Object.IDs + */ +exports.Object_IDs = new Object_IDs$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class Object_Vector$Type extends runtime_4.MessageType { + constructor() { + super("payload.v1.Object.Vector", [ + { no: 1, name: "id", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { minLen: "1" } } } }, + { no: 2, name: "vector", kind: "scalar", repeat: 1 /*RepeatType.PACKED*/, T: 2 /*ScalarType.FLOAT*/, options: { "buf.validate.field": { repeated: { minItems: "2" } } } }, + { no: 3, name: "timestamp", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 0 /*LongType.BIGINT*/ } + ]); + } + create(value) { + const message = globalThis.Object.create((this.messagePrototype)); + message.id = ""; + message.vector = []; + message.timestamp = 0n; + if (value !== undefined) + runtime_3.reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader, length, options, target) { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* string id */ 1: + message.id = reader.string(); + break; + case /* repeated float vector */ 2: + if (wireType === runtime_1.WireType.LengthDelimited) + for (let e = reader.int32() + reader.pos; reader.pos < e;) + message.vector.push(reader.float()); + else + message.vector.push(reader.float()); + break; + case /* int64 timestamp */ 3: + message.timestamp = reader.int64().toBigInt(); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? runtime_2.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message, writer, options) { + /* string id = 1; */ + if (message.id !== "") + writer.tag(1, runtime_1.WireType.LengthDelimited).string(message.id); + /* repeated float vector = 2; */ + if (message.vector.length) { + writer.tag(2, runtime_1.WireType.LengthDelimited).fork(); + for (let i = 0; i < message.vector.length; i++) + writer.float(message.vector[i]); + writer.join(); + } + /* int64 timestamp = 3; */ + if (message.timestamp !== 0n) + writer.tag(3, runtime_1.WireType.Varint).int64(message.timestamp); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message payload.v1.Object.Vector + */ +exports.Object_Vector = new Object_Vector$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class Object_GetTimestampRequest$Type extends runtime_4.MessageType { + constructor() { + super("payload.v1.Object.GetTimestampRequest", [ + { no: 1, name: "id", kind: "message", T: () => exports.Object_ID, options: { "buf.validate.field": { repeated: { minItems: "2" } } } } + ]); + } + create(value) { + const message = globalThis.Object.create((this.messagePrototype)); + if (value !== undefined) + runtime_3.reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader, length, options, target) { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* payload.v1.Object.ID id */ 1: + message.id = exports.Object_ID.internalBinaryRead(reader, reader.uint32(), options, message.id); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? runtime_2.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message, writer, options) { + /* payload.v1.Object.ID id = 1; */ + if (message.id) + exports.Object_ID.internalBinaryWrite(message.id, writer.tag(1, runtime_1.WireType.LengthDelimited).fork(), options).join(); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message payload.v1.Object.GetTimestampRequest + */ +exports.Object_GetTimestampRequest = new Object_GetTimestampRequest$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class Object_Timestamp$Type extends runtime_4.MessageType { + constructor() { + super("payload.v1.Object.Timestamp", [ + { no: 1, name: "id", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { minLen: "1" } } } }, + { no: 2, name: "timestamp", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 0 /*LongType.BIGINT*/ } + ]); + } + create(value) { + const message = globalThis.Object.create((this.messagePrototype)); + message.id = ""; + message.timestamp = 0n; + if (value !== undefined) + runtime_3.reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader, length, options, target) { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* string id */ 1: + message.id = reader.string(); + break; + case /* int64 timestamp */ 2: + message.timestamp = reader.int64().toBigInt(); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? runtime_2.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message, writer, options) { + /* string id = 1; */ + if (message.id !== "") + writer.tag(1, runtime_1.WireType.LengthDelimited).string(message.id); + /* int64 timestamp = 2; */ + if (message.timestamp !== 0n) + writer.tag(2, runtime_1.WireType.Varint).int64(message.timestamp); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message payload.v1.Object.Timestamp + */ +exports.Object_Timestamp = new Object_Timestamp$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class Object_Vectors$Type extends runtime_4.MessageType { + constructor() { + super("payload.v1.Object.Vectors", [ + { no: 1, name: "vectors", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => exports.Object_Vector } + ]); + } + create(value) { + const message = globalThis.Object.create((this.messagePrototype)); + message.vectors = []; + if (value !== undefined) + runtime_3.reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader, length, options, target) { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* repeated payload.v1.Object.Vector vectors */ 1: + message.vectors.push(exports.Object_Vector.internalBinaryRead(reader, reader.uint32(), options)); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? runtime_2.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message, writer, options) { + /* repeated payload.v1.Object.Vector vectors = 1; */ + for (let i = 0; i < message.vectors.length; i++) + exports.Object_Vector.internalBinaryWrite(message.vectors[i], writer.tag(1, runtime_1.WireType.LengthDelimited).fork(), options).join(); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message payload.v1.Object.Vectors + */ +exports.Object_Vectors = new Object_Vectors$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class Object_StreamVector$Type extends runtime_4.MessageType { + constructor() { + super("payload.v1.Object.StreamVector", [ + { no: 1, name: "vector", kind: "message", oneof: "payload", T: () => exports.Object_Vector }, + { no: 2, name: "status", kind: "message", oneof: "payload", T: () => status_pb_1.Status } + ]); + } + create(value) { + const message = globalThis.Object.create((this.messagePrototype)); + message.payload = { oneofKind: undefined }; + if (value !== undefined) + runtime_3.reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader, length, options, target) { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* payload.v1.Object.Vector vector */ 1: + message.payload = { + oneofKind: "vector", + vector: exports.Object_Vector.internalBinaryRead(reader, reader.uint32(), options, message.payload.vector) + }; + break; + case /* google.rpc.Status status */ 2: + message.payload = { + oneofKind: "status", + status: status_pb_1.Status.internalBinaryRead(reader, reader.uint32(), options, message.payload.status) + }; + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? runtime_2.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message, writer, options) { + /* payload.v1.Object.Vector vector = 1; */ + if (message.payload.oneofKind === "vector") + exports.Object_Vector.internalBinaryWrite(message.payload.vector, writer.tag(1, runtime_1.WireType.LengthDelimited).fork(), options).join(); + /* google.rpc.Status status = 2; */ + if (message.payload.oneofKind === "status") + status_pb_1.Status.internalBinaryWrite(message.payload.status, writer.tag(2, runtime_1.WireType.LengthDelimited).fork(), options).join(); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message payload.v1.Object.StreamVector + */ +exports.Object_StreamVector = new Object_StreamVector$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class Object_ReshapeVector$Type extends runtime_4.MessageType { + constructor() { + super("payload.v1.Object.ReshapeVector", [ + { no: 1, name: "object", kind: "scalar", T: 12 /*ScalarType.BYTES*/ }, + { no: 2, name: "shape", kind: "scalar", repeat: 1 /*RepeatType.PACKED*/, T: 5 /*ScalarType.INT32*/ } + ]); + } + create(value) { + const message = globalThis.Object.create((this.messagePrototype)); + message.object = new Uint8Array(0); + message.shape = []; + if (value !== undefined) + runtime_3.reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader, length, options, target) { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* bytes object */ 1: + message.object = reader.bytes(); + break; + case /* repeated int32 shape */ 2: + if (wireType === runtime_1.WireType.LengthDelimited) + for (let e = reader.int32() + reader.pos; reader.pos < e;) + message.shape.push(reader.int32()); + else + message.shape.push(reader.int32()); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? runtime_2.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message, writer, options) { + /* bytes object = 1; */ + if (message.object.length) + writer.tag(1, runtime_1.WireType.LengthDelimited).bytes(message.object); + /* repeated int32 shape = 2; */ + if (message.shape.length) { + writer.tag(2, runtime_1.WireType.LengthDelimited).fork(); + for (let i = 0; i < message.shape.length; i++) + writer.int32(message.shape[i]); + writer.join(); + } + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message payload.v1.Object.ReshapeVector + */ +exports.Object_ReshapeVector = new Object_ReshapeVector$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class Object_Blob$Type extends runtime_4.MessageType { + constructor() { + super("payload.v1.Object.Blob", [ + { no: 1, name: "id", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { minLen: "1" } } } }, + { no: 2, name: "object", kind: "scalar", T: 12 /*ScalarType.BYTES*/ } + ]); + } + create(value) { + const message = globalThis.Object.create((this.messagePrototype)); + message.id = ""; + message.object = new Uint8Array(0); + if (value !== undefined) + runtime_3.reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader, length, options, target) { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* string id */ 1: + message.id = reader.string(); + break; + case /* bytes object */ 2: + message.object = reader.bytes(); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? runtime_2.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message, writer, options) { + /* string id = 1; */ + if (message.id !== "") + writer.tag(1, runtime_1.WireType.LengthDelimited).string(message.id); + /* bytes object = 2; */ + if (message.object.length) + writer.tag(2, runtime_1.WireType.LengthDelimited).bytes(message.object); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message payload.v1.Object.Blob + */ +exports.Object_Blob = new Object_Blob$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class Object_StreamBlob$Type extends runtime_4.MessageType { + constructor() { + super("payload.v1.Object.StreamBlob", [ + { no: 1, name: "blob", kind: "message", oneof: "payload", T: () => exports.Object_Blob }, + { no: 2, name: "status", kind: "message", oneof: "payload", T: () => status_pb_1.Status } + ]); + } + create(value) { + const message = globalThis.Object.create((this.messagePrototype)); + message.payload = { oneofKind: undefined }; + if (value !== undefined) + runtime_3.reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader, length, options, target) { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* payload.v1.Object.Blob blob */ 1: + message.payload = { + oneofKind: "blob", + blob: exports.Object_Blob.internalBinaryRead(reader, reader.uint32(), options, message.payload.blob) + }; + break; + case /* google.rpc.Status status */ 2: + message.payload = { + oneofKind: "status", + status: status_pb_1.Status.internalBinaryRead(reader, reader.uint32(), options, message.payload.status) + }; + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? runtime_2.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message, writer, options) { + /* payload.v1.Object.Blob blob = 1; */ + if (message.payload.oneofKind === "blob") + exports.Object_Blob.internalBinaryWrite(message.payload.blob, writer.tag(1, runtime_1.WireType.LengthDelimited).fork(), options).join(); + /* google.rpc.Status status = 2; */ + if (message.payload.oneofKind === "status") + status_pb_1.Status.internalBinaryWrite(message.payload.status, writer.tag(2, runtime_1.WireType.LengthDelimited).fork(), options).join(); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message payload.v1.Object.StreamBlob + */ +exports.Object_StreamBlob = new Object_StreamBlob$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class Object_Location$Type extends runtime_4.MessageType { + constructor() { + super("payload.v1.Object.Location", [ + { no: 1, name: "name", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, + { no: 2, name: "uuid", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, + { no: 3, name: "ips", kind: "scalar", repeat: 2 /*RepeatType.UNPACKED*/, T: 9 /*ScalarType.STRING*/ } + ]); + } + create(value) { + const message = globalThis.Object.create((this.messagePrototype)); + message.name = ""; + message.uuid = ""; + message.ips = []; + if (value !== undefined) + runtime_3.reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader, length, options, target) { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* string name */ 1: + message.name = reader.string(); + break; + case /* string uuid */ 2: + message.uuid = reader.string(); + break; + case /* repeated string ips */ 3: + message.ips.push(reader.string()); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? runtime_2.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message, writer, options) { + /* string name = 1; */ + if (message.name !== "") + writer.tag(1, runtime_1.WireType.LengthDelimited).string(message.name); + /* string uuid = 2; */ + if (message.uuid !== "") + writer.tag(2, runtime_1.WireType.LengthDelimited).string(message.uuid); + /* repeated string ips = 3; */ + for (let i = 0; i < message.ips.length; i++) + writer.tag(3, runtime_1.WireType.LengthDelimited).string(message.ips[i]); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message payload.v1.Object.Location + */ +exports.Object_Location = new Object_Location$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class Object_StreamLocation$Type extends runtime_4.MessageType { + constructor() { + super("payload.v1.Object.StreamLocation", [ + { no: 1, name: "location", kind: "message", oneof: "payload", T: () => exports.Object_Location }, + { no: 2, name: "status", kind: "message", oneof: "payload", T: () => status_pb_1.Status } + ]); + } + create(value) { + const message = globalThis.Object.create((this.messagePrototype)); + message.payload = { oneofKind: undefined }; + if (value !== undefined) + runtime_3.reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader, length, options, target) { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* payload.v1.Object.Location location */ 1: + message.payload = { + oneofKind: "location", + location: exports.Object_Location.internalBinaryRead(reader, reader.uint32(), options, message.payload.location) + }; + break; + case /* google.rpc.Status status */ 2: + message.payload = { + oneofKind: "status", + status: status_pb_1.Status.internalBinaryRead(reader, reader.uint32(), options, message.payload.status) + }; + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? runtime_2.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message, writer, options) { + /* payload.v1.Object.Location location = 1; */ + if (message.payload.oneofKind === "location") + exports.Object_Location.internalBinaryWrite(message.payload.location, writer.tag(1, runtime_1.WireType.LengthDelimited).fork(), options).join(); + /* google.rpc.Status status = 2; */ + if (message.payload.oneofKind === "status") + status_pb_1.Status.internalBinaryWrite(message.payload.status, writer.tag(2, runtime_1.WireType.LengthDelimited).fork(), options).join(); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message payload.v1.Object.StreamLocation + */ +exports.Object_StreamLocation = new Object_StreamLocation$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class Object_Locations$Type extends runtime_4.MessageType { + constructor() { + super("payload.v1.Object.Locations", [ + { no: 1, name: "locations", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => exports.Object_Location } + ]); + } + create(value) { + const message = globalThis.Object.create((this.messagePrototype)); + message.locations = []; + if (value !== undefined) + runtime_3.reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader, length, options, target) { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* repeated payload.v1.Object.Location locations */ 1: + message.locations.push(exports.Object_Location.internalBinaryRead(reader, reader.uint32(), options)); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? runtime_2.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message, writer, options) { + /* repeated payload.v1.Object.Location locations = 1; */ + for (let i = 0; i < message.locations.length; i++) + exports.Object_Location.internalBinaryWrite(message.locations[i], writer.tag(1, runtime_1.WireType.LengthDelimited).fork(), options).join(); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message payload.v1.Object.Locations + */ +exports.Object_Locations = new Object_Locations$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class Object_List$Type extends runtime_4.MessageType { + constructor() { + super("payload.v1.Object.List", []); + } + create(value) { + const message = globalThis.Object.create((this.messagePrototype)); + if (value !== undefined) + runtime_3.reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader, length, options, target) { + return target ?? this.create(); + } + internalBinaryWrite(message, writer, options) { + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message payload.v1.Object.List + */ +exports.Object_List = new Object_List$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class Object_List_Request$Type extends runtime_4.MessageType { + constructor() { + super("payload.v1.Object.List.Request", []); + } + create(value) { + const message = globalThis.Object.create((this.messagePrototype)); + if (value !== undefined) + runtime_3.reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader, length, options, target) { + return target ?? this.create(); + } + internalBinaryWrite(message, writer, options) { + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message payload.v1.Object.List.Request + */ +exports.Object_List_Request = new Object_List_Request$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class Object_List_Response$Type extends runtime_4.MessageType { + constructor() { + super("payload.v1.Object.List.Response", [ + { no: 1, name: "vector", kind: "message", oneof: "payload", T: () => exports.Object_Vector }, + { no: 2, name: "status", kind: "message", oneof: "payload", T: () => status_pb_1.Status } + ]); + } + create(value) { + const message = globalThis.Object.create((this.messagePrototype)); + message.payload = { oneofKind: undefined }; + if (value !== undefined) + runtime_3.reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader, length, options, target) { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* payload.v1.Object.Vector vector */ 1: + message.payload = { + oneofKind: "vector", + vector: exports.Object_Vector.internalBinaryRead(reader, reader.uint32(), options, message.payload.vector) + }; + break; + case /* google.rpc.Status status */ 2: + message.payload = { + oneofKind: "status", + status: status_pb_1.Status.internalBinaryRead(reader, reader.uint32(), options, message.payload.status) + }; + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? runtime_2.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message, writer, options) { + /* payload.v1.Object.Vector vector = 1; */ + if (message.payload.oneofKind === "vector") + exports.Object_Vector.internalBinaryWrite(message.payload.vector, writer.tag(1, runtime_1.WireType.LengthDelimited).fork(), options).join(); + /* google.rpc.Status status = 2; */ + if (message.payload.oneofKind === "status") + status_pb_1.Status.internalBinaryWrite(message.payload.status, writer.tag(2, runtime_1.WireType.LengthDelimited).fork(), options).join(); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message payload.v1.Object.List.Response + */ +exports.Object_List_Response = new Object_List_Response$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class Control$Type extends runtime_4.MessageType { + constructor() { + super("payload.v1.Control", []); + } + create(value) { + const message = globalThis.Object.create((this.messagePrototype)); + if (value !== undefined) + runtime_3.reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader, length, options, target) { + return target ?? this.create(); + } + internalBinaryWrite(message, writer, options) { + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message payload.v1.Control + */ +exports.Control = new Control$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class Control_CreateIndexRequest$Type extends runtime_4.MessageType { + constructor() { + super("payload.v1.Control.CreateIndexRequest", [ + { no: 1, name: "pool_size", kind: "scalar", localName: "pool_size", T: 13 /*ScalarType.UINT32*/, options: { "buf.validate.field": { uint32: { gte: 0 } } } } + ]); + } + create(value) { + const message = globalThis.Object.create((this.messagePrototype)); + message.pool_size = 0; + if (value !== undefined) + runtime_3.reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader, length, options, target) { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* uint32 pool_size */ 1: + message.pool_size = reader.uint32(); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? runtime_2.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message, writer, options) { + /* uint32 pool_size = 1; */ + if (message.pool_size !== 0) + writer.tag(1, runtime_1.WireType.Varint).uint32(message.pool_size); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message payload.v1.Control.CreateIndexRequest + */ +exports.Control_CreateIndexRequest = new Control_CreateIndexRequest$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class Discoverer$Type extends runtime_4.MessageType { + constructor() { + super("payload.v1.Discoverer", []); + } + create(value) { + const message = globalThis.Object.create((this.messagePrototype)); + if (value !== undefined) + runtime_3.reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader, length, options, target) { + return target ?? this.create(); + } + internalBinaryWrite(message, writer, options) { + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message payload.v1.Discoverer + */ +exports.Discoverer = new Discoverer$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class Discoverer_Request$Type extends runtime_4.MessageType { + constructor() { + super("payload.v1.Discoverer.Request", [ + { no: 1, name: "name", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { minLen: "1" } } } }, + { no: 2, name: "namespace", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, + { no: 3, name: "node", kind: "scalar", T: 9 /*ScalarType.STRING*/ } + ]); + } + create(value) { + const message = globalThis.Object.create((this.messagePrototype)); + message.name = ""; + message.namespace = ""; + message.node = ""; + if (value !== undefined) + runtime_3.reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader, length, options, target) { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* string name */ 1: + message.name = reader.string(); + break; + case /* string namespace */ 2: + message.namespace = reader.string(); + break; + case /* string node */ 3: + message.node = reader.string(); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? runtime_2.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message, writer, options) { + /* string name = 1; */ + if (message.name !== "") + writer.tag(1, runtime_1.WireType.LengthDelimited).string(message.name); + /* string namespace = 2; */ + if (message.namespace !== "") + writer.tag(2, runtime_1.WireType.LengthDelimited).string(message.namespace); + /* string node = 3; */ + if (message.node !== "") + writer.tag(3, runtime_1.WireType.LengthDelimited).string(message.node); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message payload.v1.Discoverer.Request + */ +exports.Discoverer_Request = new Discoverer_Request$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class Info$Type extends runtime_4.MessageType { + constructor() { + super("payload.v1.Info", []); + } + create(value) { + const message = globalThis.Object.create((this.messagePrototype)); + if (value !== undefined) + runtime_3.reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader, length, options, target) { + return target ?? this.create(); + } + internalBinaryWrite(message, writer, options) { + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message payload.v1.Info + */ +exports.Info = new Info$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class Info_Index$Type extends runtime_4.MessageType { + constructor() { + super("payload.v1.Info.Index", []); + } + create(value) { + const message = globalThis.Object.create((this.messagePrototype)); + if (value !== undefined) + runtime_3.reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader, length, options, target) { + return target ?? this.create(); + } + internalBinaryWrite(message, writer, options) { + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message payload.v1.Info.Index + */ +exports.Info_Index = new Info_Index$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class Info_Index_Count$Type extends runtime_4.MessageType { + constructor() { + super("payload.v1.Info.Index.Count", [ + { no: 1, name: "stored", kind: "scalar", T: 13 /*ScalarType.UINT32*/ }, + { no: 2, name: "uncommitted", kind: "scalar", T: 13 /*ScalarType.UINT32*/ }, + { no: 3, name: "indexing", kind: "scalar", T: 8 /*ScalarType.BOOL*/ }, + { no: 4, name: "saving", kind: "scalar", T: 8 /*ScalarType.BOOL*/ } + ]); + } + create(value) { + const message = globalThis.Object.create((this.messagePrototype)); + message.stored = 0; + message.uncommitted = 0; + message.indexing = false; + message.saving = false; + if (value !== undefined) + runtime_3.reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader, length, options, target) { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* uint32 stored */ 1: + message.stored = reader.uint32(); + break; + case /* uint32 uncommitted */ 2: + message.uncommitted = reader.uint32(); + break; + case /* bool indexing */ 3: + message.indexing = reader.bool(); + break; + case /* bool saving */ 4: + message.saving = reader.bool(); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? runtime_2.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message, writer, options) { + /* uint32 stored = 1; */ + if (message.stored !== 0) + writer.tag(1, runtime_1.WireType.Varint).uint32(message.stored); + /* uint32 uncommitted = 2; */ + if (message.uncommitted !== 0) + writer.tag(2, runtime_1.WireType.Varint).uint32(message.uncommitted); + /* bool indexing = 3; */ + if (message.indexing !== false) + writer.tag(3, runtime_1.WireType.Varint).bool(message.indexing); + /* bool saving = 4; */ + if (message.saving !== false) + writer.tag(4, runtime_1.WireType.Varint).bool(message.saving); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message payload.v1.Info.Index.Count + */ +exports.Info_Index_Count = new Info_Index_Count$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class Info_Index_UUID$Type extends runtime_4.MessageType { + constructor() { + super("payload.v1.Info.Index.UUID", []); + } + create(value) { + const message = globalThis.Object.create((this.messagePrototype)); + if (value !== undefined) + runtime_3.reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader, length, options, target) { + return target ?? this.create(); + } + internalBinaryWrite(message, writer, options) { + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message payload.v1.Info.Index.UUID + */ +exports.Info_Index_UUID = new Info_Index_UUID$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class Info_Index_UUID_Committed$Type extends runtime_4.MessageType { + constructor() { + super("payload.v1.Info.Index.UUID.Committed", [ + { no: 1, name: "uuid", kind: "scalar", T: 9 /*ScalarType.STRING*/ } + ]); + } + create(value) { + const message = globalThis.Object.create((this.messagePrototype)); + message.uuid = ""; + if (value !== undefined) + runtime_3.reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader, length, options, target) { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* string uuid */ 1: + message.uuid = reader.string(); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? runtime_2.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message, writer, options) { + /* string uuid = 1; */ + if (message.uuid !== "") + writer.tag(1, runtime_1.WireType.LengthDelimited).string(message.uuid); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message payload.v1.Info.Index.UUID.Committed + */ +exports.Info_Index_UUID_Committed = new Info_Index_UUID_Committed$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class Info_Index_UUID_Uncommitted$Type extends runtime_4.MessageType { + constructor() { + super("payload.v1.Info.Index.UUID.Uncommitted", [ + { no: 1, name: "uuid", kind: "scalar", T: 9 /*ScalarType.STRING*/ } + ]); + } + create(value) { + const message = globalThis.Object.create((this.messagePrototype)); + message.uuid = ""; + if (value !== undefined) + runtime_3.reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader, length, options, target) { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* string uuid */ 1: + message.uuid = reader.string(); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? runtime_2.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message, writer, options) { + /* string uuid = 1; */ + if (message.uuid !== "") + writer.tag(1, runtime_1.WireType.LengthDelimited).string(message.uuid); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message payload.v1.Info.Index.UUID.Uncommitted + */ +exports.Info_Index_UUID_Uncommitted = new Info_Index_UUID_Uncommitted$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class Info_Pod$Type extends runtime_4.MessageType { + constructor() { + super("payload.v1.Info.Pod", [ + { no: 1, name: "app_name", kind: "scalar", localName: "app_name", T: 9 /*ScalarType.STRING*/ }, + { no: 2, name: "name", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, + { no: 3, name: "namespace", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, + { no: 4, name: "ip", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { ipv4: true } } } }, + { no: 5, name: "cpu", kind: "message", T: () => exports.Info_CPU }, + { no: 6, name: "memory", kind: "message", T: () => exports.Info_Memory }, + { no: 7, name: "node", kind: "message", T: () => exports.Info_Node } + ]); + } + create(value) { + const message = globalThis.Object.create((this.messagePrototype)); + message.app_name = ""; + message.name = ""; + message.namespace = ""; + message.ip = ""; + if (value !== undefined) + runtime_3.reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader, length, options, target) { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* string app_name */ 1: + message.app_name = reader.string(); + break; + case /* string name */ 2: + message.name = reader.string(); + break; + case /* string namespace */ 3: + message.namespace = reader.string(); + break; + case /* string ip */ 4: + message.ip = reader.string(); + break; + case /* payload.v1.Info.CPU cpu */ 5: + message.cpu = exports.Info_CPU.internalBinaryRead(reader, reader.uint32(), options, message.cpu); + break; + case /* payload.v1.Info.Memory memory */ 6: + message.memory = exports.Info_Memory.internalBinaryRead(reader, reader.uint32(), options, message.memory); + break; + case /* payload.v1.Info.Node node */ 7: + message.node = exports.Info_Node.internalBinaryRead(reader, reader.uint32(), options, message.node); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? runtime_2.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message, writer, options) { + /* string app_name = 1; */ + if (message.app_name !== "") + writer.tag(1, runtime_1.WireType.LengthDelimited).string(message.app_name); + /* string name = 2; */ + if (message.name !== "") + writer.tag(2, runtime_1.WireType.LengthDelimited).string(message.name); + /* string namespace = 3; */ + if (message.namespace !== "") + writer.tag(3, runtime_1.WireType.LengthDelimited).string(message.namespace); + /* string ip = 4; */ + if (message.ip !== "") + writer.tag(4, runtime_1.WireType.LengthDelimited).string(message.ip); + /* payload.v1.Info.CPU cpu = 5; */ + if (message.cpu) + exports.Info_CPU.internalBinaryWrite(message.cpu, writer.tag(5, runtime_1.WireType.LengthDelimited).fork(), options).join(); + /* payload.v1.Info.Memory memory = 6; */ + if (message.memory) + exports.Info_Memory.internalBinaryWrite(message.memory, writer.tag(6, runtime_1.WireType.LengthDelimited).fork(), options).join(); + /* payload.v1.Info.Node node = 7; */ + if (message.node) + exports.Info_Node.internalBinaryWrite(message.node, writer.tag(7, runtime_1.WireType.LengthDelimited).fork(), options).join(); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message payload.v1.Info.Pod + */ +exports.Info_Pod = new Info_Pod$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class Info_Node$Type extends runtime_4.MessageType { + constructor() { + super("payload.v1.Info.Node", [ + { no: 1, name: "name", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, + { no: 2, name: "internal_addr", kind: "scalar", localName: "internal_addr", T: 9 /*ScalarType.STRING*/ }, + { no: 3, name: "external_addr", kind: "scalar", localName: "external_addr", T: 9 /*ScalarType.STRING*/ }, + { no: 4, name: "cpu", kind: "message", T: () => exports.Info_CPU }, + { no: 5, name: "memory", kind: "message", T: () => exports.Info_Memory }, + { no: 6, name: "Pods", kind: "message", localName: "Pods", jsonName: "Pods", T: () => exports.Info_Pods } + ]); + } + create(value) { + const message = globalThis.Object.create((this.messagePrototype)); + message.name = ""; + message.internal_addr = ""; + message.external_addr = ""; + if (value !== undefined) + runtime_3.reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader, length, options, target) { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* string name */ 1: + message.name = reader.string(); + break; + case /* string internal_addr */ 2: + message.internal_addr = reader.string(); + break; + case /* string external_addr */ 3: + message.external_addr = reader.string(); + break; + case /* payload.v1.Info.CPU cpu */ 4: + message.cpu = exports.Info_CPU.internalBinaryRead(reader, reader.uint32(), options, message.cpu); + break; + case /* payload.v1.Info.Memory memory */ 5: + message.memory = exports.Info_Memory.internalBinaryRead(reader, reader.uint32(), options, message.memory); + break; + case /* payload.v1.Info.Pods Pods = 6 [json_name = "Pods"];*/ 6: + message.Pods = exports.Info_Pods.internalBinaryRead(reader, reader.uint32(), options, message.Pods); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? runtime_2.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message, writer, options) { + /* string name = 1; */ + if (message.name !== "") + writer.tag(1, runtime_1.WireType.LengthDelimited).string(message.name); + /* string internal_addr = 2; */ + if (message.internal_addr !== "") + writer.tag(2, runtime_1.WireType.LengthDelimited).string(message.internal_addr); + /* string external_addr = 3; */ + if (message.external_addr !== "") + writer.tag(3, runtime_1.WireType.LengthDelimited).string(message.external_addr); + /* payload.v1.Info.CPU cpu = 4; */ + if (message.cpu) + exports.Info_CPU.internalBinaryWrite(message.cpu, writer.tag(4, runtime_1.WireType.LengthDelimited).fork(), options).join(); + /* payload.v1.Info.Memory memory = 5; */ + if (message.memory) + exports.Info_Memory.internalBinaryWrite(message.memory, writer.tag(5, runtime_1.WireType.LengthDelimited).fork(), options).join(); + /* payload.v1.Info.Pods Pods = 6 [json_name = "Pods"]; */ + if (message.Pods) + exports.Info_Pods.internalBinaryWrite(message.Pods, writer.tag(6, runtime_1.WireType.LengthDelimited).fork(), options).join(); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message payload.v1.Info.Node + */ +exports.Info_Node = new Info_Node$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class Info_Service$Type extends runtime_4.MessageType { + constructor() { + super("payload.v1.Info.Service", [ + { no: 1, name: "name", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, + { no: 2, name: "cluster_ip", kind: "scalar", localName: "cluster_ip", T: 9 /*ScalarType.STRING*/ }, + { no: 3, name: "cluster_ips", kind: "scalar", localName: "cluster_ips", repeat: 2 /*RepeatType.UNPACKED*/, T: 9 /*ScalarType.STRING*/ }, + { no: 4, name: "ports", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => exports.Info_ServicePort }, + { no: 5, name: "labels", kind: "message", T: () => exports.Info_Labels }, + { no: 6, name: "annotations", kind: "message", T: () => exports.Info_Annotations } + ]); + } + create(value) { + const message = globalThis.Object.create((this.messagePrototype)); + message.name = ""; + message.cluster_ip = ""; + message.cluster_ips = []; + message.ports = []; + if (value !== undefined) + runtime_3.reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader, length, options, target) { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* string name */ 1: + message.name = reader.string(); + break; + case /* string cluster_ip */ 2: + message.cluster_ip = reader.string(); + break; + case /* repeated string cluster_ips */ 3: + message.cluster_ips.push(reader.string()); + break; + case /* repeated payload.v1.Info.ServicePort ports */ 4: + message.ports.push(exports.Info_ServicePort.internalBinaryRead(reader, reader.uint32(), options)); + break; + case /* payload.v1.Info.Labels labels */ 5: + message.labels = exports.Info_Labels.internalBinaryRead(reader, reader.uint32(), options, message.labels); + break; + case /* payload.v1.Info.Annotations annotations */ 6: + message.annotations = exports.Info_Annotations.internalBinaryRead(reader, reader.uint32(), options, message.annotations); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? runtime_2.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message, writer, options) { + /* string name = 1; */ + if (message.name !== "") + writer.tag(1, runtime_1.WireType.LengthDelimited).string(message.name); + /* string cluster_ip = 2; */ + if (message.cluster_ip !== "") + writer.tag(2, runtime_1.WireType.LengthDelimited).string(message.cluster_ip); + /* repeated string cluster_ips = 3; */ + for (let i = 0; i < message.cluster_ips.length; i++) + writer.tag(3, runtime_1.WireType.LengthDelimited).string(message.cluster_ips[i]); + /* repeated payload.v1.Info.ServicePort ports = 4; */ + for (let i = 0; i < message.ports.length; i++) + exports.Info_ServicePort.internalBinaryWrite(message.ports[i], writer.tag(4, runtime_1.WireType.LengthDelimited).fork(), options).join(); + /* payload.v1.Info.Labels labels = 5; */ + if (message.labels) + exports.Info_Labels.internalBinaryWrite(message.labels, writer.tag(5, runtime_1.WireType.LengthDelimited).fork(), options).join(); + /* payload.v1.Info.Annotations annotations = 6; */ + if (message.annotations) + exports.Info_Annotations.internalBinaryWrite(message.annotations, writer.tag(6, runtime_1.WireType.LengthDelimited).fork(), options).join(); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message payload.v1.Info.Service + */ +exports.Info_Service = new Info_Service$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class Info_ServicePort$Type extends runtime_4.MessageType { + constructor() { + super("payload.v1.Info.ServicePort", [ + { no: 1, name: "name", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, + { no: 2, name: "port", kind: "scalar", T: 5 /*ScalarType.INT32*/ } + ]); + } + create(value) { + const message = globalThis.Object.create((this.messagePrototype)); + message.name = ""; + message.port = 0; + if (value !== undefined) + runtime_3.reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader, length, options, target) { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* string name */ 1: + message.name = reader.string(); + break; + case /* int32 port */ 2: + message.port = reader.int32(); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? runtime_2.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message, writer, options) { + /* string name = 1; */ + if (message.name !== "") + writer.tag(1, runtime_1.WireType.LengthDelimited).string(message.name); + /* int32 port = 2; */ + if (message.port !== 0) + writer.tag(2, runtime_1.WireType.Varint).int32(message.port); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message payload.v1.Info.ServicePort + */ +exports.Info_ServicePort = new Info_ServicePort$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class Info_Labels$Type extends runtime_4.MessageType { + constructor() { + super("payload.v1.Info.Labels", [ + { no: 1, name: "labels", kind: "map", K: 9 /*ScalarType.STRING*/, V: { kind: "scalar", T: 9 /*ScalarType.STRING*/ } } + ]); + } + create(value) { + const message = globalThis.Object.create((this.messagePrototype)); + message.labels = {}; + if (value !== undefined) + runtime_3.reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader, length, options, target) { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* map labels */ 1: + this.binaryReadMap1(message.labels, reader, options); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? runtime_2.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + binaryReadMap1(map, reader, options) { + let len = reader.uint32(), end = reader.pos + len, key, val; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case 1: + key = reader.string(); + break; + case 2: + val = reader.string(); + break; + default: throw new globalThis.Error("unknown map entry field for field payload.v1.Info.Labels.labels"); + } + } + map[key ?? ""] = val ?? ""; + } + internalBinaryWrite(message, writer, options) { + /* map labels = 1; */ + for (let k of globalThis.Object.keys(message.labels)) + writer.tag(1, runtime_1.WireType.LengthDelimited).fork().tag(1, runtime_1.WireType.LengthDelimited).string(k).tag(2, runtime_1.WireType.LengthDelimited).string(message.labels[k]).join(); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message payload.v1.Info.Labels + */ +exports.Info_Labels = new Info_Labels$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class Info_Annotations$Type extends runtime_4.MessageType { + constructor() { + super("payload.v1.Info.Annotations", [ + { no: 1, name: "annotations", kind: "map", K: 9 /*ScalarType.STRING*/, V: { kind: "scalar", T: 9 /*ScalarType.STRING*/ } } + ]); + } + create(value) { + const message = globalThis.Object.create((this.messagePrototype)); + message.annotations = {}; + if (value !== undefined) + runtime_3.reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader, length, options, target) { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* map annotations */ 1: + this.binaryReadMap1(message.annotations, reader, options); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? runtime_2.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + binaryReadMap1(map, reader, options) { + let len = reader.uint32(), end = reader.pos + len, key, val; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case 1: + key = reader.string(); + break; + case 2: + val = reader.string(); + break; + default: throw new globalThis.Error("unknown map entry field for field payload.v1.Info.Annotations.annotations"); + } + } + map[key ?? ""] = val ?? ""; + } + internalBinaryWrite(message, writer, options) { + /* map annotations = 1; */ + for (let k of globalThis.Object.keys(message.annotations)) + writer.tag(1, runtime_1.WireType.LengthDelimited).fork().tag(1, runtime_1.WireType.LengthDelimited).string(k).tag(2, runtime_1.WireType.LengthDelimited).string(message.annotations[k]).join(); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message payload.v1.Info.Annotations + */ +exports.Info_Annotations = new Info_Annotations$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class Info_CPU$Type extends runtime_4.MessageType { + constructor() { + super("payload.v1.Info.CPU", [ + { no: 1, name: "limit", kind: "scalar", T: 1 /*ScalarType.DOUBLE*/ }, + { no: 2, name: "request", kind: "scalar", T: 1 /*ScalarType.DOUBLE*/ }, + { no: 3, name: "usage", kind: "scalar", T: 1 /*ScalarType.DOUBLE*/ } + ]); + } + create(value) { + const message = globalThis.Object.create((this.messagePrototype)); + message.limit = 0; + message.request = 0; + message.usage = 0; + if (value !== undefined) + runtime_3.reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader, length, options, target) { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* double limit */ 1: + message.limit = reader.double(); + break; + case /* double request */ 2: + message.request = reader.double(); + break; + case /* double usage */ 3: + message.usage = reader.double(); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? runtime_2.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message, writer, options) { + /* double limit = 1; */ + if (message.limit !== 0) + writer.tag(1, runtime_1.WireType.Bit64).double(message.limit); + /* double request = 2; */ + if (message.request !== 0) + writer.tag(2, runtime_1.WireType.Bit64).double(message.request); + /* double usage = 3; */ + if (message.usage !== 0) + writer.tag(3, runtime_1.WireType.Bit64).double(message.usage); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message payload.v1.Info.CPU + */ +exports.Info_CPU = new Info_CPU$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class Info_Memory$Type extends runtime_4.MessageType { + constructor() { + super("payload.v1.Info.Memory", [ + { no: 1, name: "limit", kind: "scalar", T: 1 /*ScalarType.DOUBLE*/ }, + { no: 2, name: "request", kind: "scalar", T: 1 /*ScalarType.DOUBLE*/ }, + { no: 3, name: "usage", kind: "scalar", T: 1 /*ScalarType.DOUBLE*/ } + ]); + } + create(value) { + const message = globalThis.Object.create((this.messagePrototype)); + message.limit = 0; + message.request = 0; + message.usage = 0; + if (value !== undefined) + runtime_3.reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader, length, options, target) { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* double limit */ 1: + message.limit = reader.double(); + break; + case /* double request */ 2: + message.request = reader.double(); + break; + case /* double usage */ 3: + message.usage = reader.double(); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? runtime_2.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message, writer, options) { + /* double limit = 1; */ + if (message.limit !== 0) + writer.tag(1, runtime_1.WireType.Bit64).double(message.limit); + /* double request = 2; */ + if (message.request !== 0) + writer.tag(2, runtime_1.WireType.Bit64).double(message.request); + /* double usage = 3; */ + if (message.usage !== 0) + writer.tag(3, runtime_1.WireType.Bit64).double(message.usage); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message payload.v1.Info.Memory + */ +exports.Info_Memory = new Info_Memory$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class Info_Pods$Type extends runtime_4.MessageType { + constructor() { + super("payload.v1.Info.Pods", [ + { no: 1, name: "pods", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => exports.Info_Pod, options: { "buf.validate.field": { repeated: { minItems: "1" } } } } + ]); + } + create(value) { + const message = globalThis.Object.create((this.messagePrototype)); + message.pods = []; + if (value !== undefined) + runtime_3.reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader, length, options, target) { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* repeated payload.v1.Info.Pod pods */ 1: + message.pods.push(exports.Info_Pod.internalBinaryRead(reader, reader.uint32(), options)); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? runtime_2.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message, writer, options) { + /* repeated payload.v1.Info.Pod pods = 1; */ + for (let i = 0; i < message.pods.length; i++) + exports.Info_Pod.internalBinaryWrite(message.pods[i], writer.tag(1, runtime_1.WireType.LengthDelimited).fork(), options).join(); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message payload.v1.Info.Pods + */ +exports.Info_Pods = new Info_Pods$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class Info_Nodes$Type extends runtime_4.MessageType { + constructor() { + super("payload.v1.Info.Nodes", [ + { no: 1, name: "nodes", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => exports.Info_Node, options: { "buf.validate.field": { repeated: { minItems: "1" } } } } + ]); + } + create(value) { + const message = globalThis.Object.create((this.messagePrototype)); + message.nodes = []; + if (value !== undefined) + runtime_3.reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader, length, options, target) { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* repeated payload.v1.Info.Node nodes */ 1: + message.nodes.push(exports.Info_Node.internalBinaryRead(reader, reader.uint32(), options)); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? runtime_2.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message, writer, options) { + /* repeated payload.v1.Info.Node nodes = 1; */ + for (let i = 0; i < message.nodes.length; i++) + exports.Info_Node.internalBinaryWrite(message.nodes[i], writer.tag(1, runtime_1.WireType.LengthDelimited).fork(), options).join(); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message payload.v1.Info.Nodes + */ +exports.Info_Nodes = new Info_Nodes$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class Info_Services$Type extends runtime_4.MessageType { + constructor() { + super("payload.v1.Info.Services", [ + { no: 1, name: "services", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => exports.Info_Service, options: { "buf.validate.field": { repeated: { minItems: "1" } } } } + ]); + } + create(value) { + const message = globalThis.Object.create((this.messagePrototype)); + message.services = []; + if (value !== undefined) + runtime_3.reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader, length, options, target) { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* repeated payload.v1.Info.Service services */ 1: + message.services.push(exports.Info_Service.internalBinaryRead(reader, reader.uint32(), options)); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? runtime_2.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message, writer, options) { + /* repeated payload.v1.Info.Service services = 1; */ + for (let i = 0; i < message.services.length; i++) + exports.Info_Service.internalBinaryWrite(message.services[i], writer.tag(1, runtime_1.WireType.LengthDelimited).fork(), options).join(); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message payload.v1.Info.Services + */ +exports.Info_Services = new Info_Services$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class Info_IPs$Type extends runtime_4.MessageType { + constructor() { + super("payload.v1.Info.IPs", [ + { no: 1, name: "ip", kind: "scalar", repeat: 2 /*RepeatType.UNPACKED*/, T: 9 /*ScalarType.STRING*/ } + ]); + } + create(value) { + const message = globalThis.Object.create((this.messagePrototype)); + message.ip = []; + if (value !== undefined) + runtime_3.reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader, length, options, target) { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* repeated string ip */ 1: + message.ip.push(reader.string()); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? runtime_2.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message, writer, options) { + /* repeated string ip = 1; */ + for (let i = 0; i < message.ip.length; i++) + writer.tag(1, runtime_1.WireType.LengthDelimited).string(message.ip[i]); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message payload.v1.Info.IPs + */ +exports.Info_IPs = new Info_IPs$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class Empty$Type extends runtime_4.MessageType { + constructor() { + super("payload.v1.Empty", []); + } + create(value) { + const message = globalThis.Object.create((this.messagePrototype)); + if (value !== undefined) + runtime_3.reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader, length, options, target) { + return target ?? this.create(); + } + internalBinaryWrite(message, writer, options) { + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message payload.v1.Empty + */ +exports.Empty = new Empty$Type(); diff --git a/src/vald/v1/payload/payload_pb.ts b/src/vald/v1/payload/payload_pb.ts deleted file mode 100644 index 1f101ee..0000000 --- a/src/vald/v1/payload/payload_pb.ts +++ /dev/null @@ -1,5684 +0,0 @@ -// @generated by protobuf-ts 2.9.3 with parameter add_pb_suffix,client_grpc1,generate_dependencies,keep_enum_prefix,ts_nocheck,use_proto_field_name -// @generated from protobuf file "vald/v1/payload/payload.proto" (package "payload.v1", syntax proto3) -// tslint:disable -// @ts-nocheck -// -// -// Copyright (C) 2019-2023 vdaas.org vald team -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// You may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// -import { WireType } from "@protobuf-ts/runtime"; -import type { BinaryWriteOptions } from "@protobuf-ts/runtime"; -import type { IBinaryWriter } from "@protobuf-ts/runtime"; -import { UnknownFieldHandler } from "@protobuf-ts/runtime"; -import type { BinaryReadOptions } from "@protobuf-ts/runtime"; -import type { IBinaryReader } from "@protobuf-ts/runtime"; -import type { PartialMessage } from "@protobuf-ts/runtime"; -import { reflectionMergePartial } from "@protobuf-ts/runtime"; -import { MessageType } from "@protobuf-ts/runtime"; -import { Status } from "../../../google/rpc/status_pb"; -/** - * Search related messages. - * - * @generated from protobuf message payload.v1.Search - */ -export interface Search { -} -/** - * Represent a search request. - * - * @generated from protobuf message payload.v1.Search.Request - */ -export interface Search_Request { - /** - * The vector to be searched. - * - * @generated from protobuf field: repeated float vector = 1; - */ - vector: number[]; - /** - * The configuration of the search request. - * - * @generated from protobuf field: payload.v1.Search.Config config = 2; - */ - config?: Search_Config; -} -/** - * Represent the multiple search request. - * - * @generated from protobuf message payload.v1.Search.MultiRequest - */ -export interface Search_MultiRequest { - /** - * Represent the multiple search request content. - * - * @generated from protobuf field: repeated payload.v1.Search.Request requests = 1; - */ - requests: Search_Request[]; -} -/** - * Represent a search by ID request. - * - * @generated from protobuf message payload.v1.Search.IDRequest - */ -export interface Search_IDRequest { - /** - * The vector ID to be searched. - * - * @generated from protobuf field: string id = 1; - */ - id: string; - /** - * The configuration of the search request. - * - * @generated from protobuf field: payload.v1.Search.Config config = 2; - */ - config?: Search_Config; -} -/** - * Represent the multiple search by ID request. - * - * @generated from protobuf message payload.v1.Search.MultiIDRequest - */ -export interface Search_MultiIDRequest { - /** - * Represent the multiple search by ID request content. - * - * @generated from protobuf field: repeated payload.v1.Search.IDRequest requests = 1; - */ - requests: Search_IDRequest[]; -} -/** - * Represent a search by binary object request. - * - * @generated from protobuf message payload.v1.Search.ObjectRequest - */ -export interface Search_ObjectRequest { - /** - * The binary object to be searched. - * - * @generated from protobuf field: bytes object = 1; - */ - object: Uint8Array; - /** - * The configuration of the search request. - * - * @generated from protobuf field: payload.v1.Search.Config config = 2; - */ - config?: Search_Config; - /** - * Filter configuration. - * - * @generated from protobuf field: payload.v1.Filter.Target vectorizer = 3; - */ - vectorizer?: Filter_Target; -} -/** - * Represent the multiple search by binary object request. - * - * @generated from protobuf message payload.v1.Search.MultiObjectRequest - */ -export interface Search_MultiObjectRequest { - /** - * Represent the multiple search by binary object request content. - * - * @generated from protobuf field: repeated payload.v1.Search.ObjectRequest requests = 1; - */ - requests: Search_ObjectRequest[]; -} -/** - * Represent search configuration. - * - * @generated from protobuf message payload.v1.Search.Config - */ -export interface Search_Config { - /** - * Unique request ID. - * - * @generated from protobuf field: string request_id = 1; - */ - request_id: string; - /** - * Maximum number of result to be returned. - * - * @generated from protobuf field: uint32 num = 2; - */ - num: number; - /** - * Search radius. - * - * @generated from protobuf field: float radius = 3; - */ - radius: number; - /** - * Search coefficient. - * - * @generated from protobuf field: float epsilon = 4; - */ - epsilon: number; - /** - * Search timeout in nanoseconds. - * - * @generated from protobuf field: int64 timeout = 5; - */ - timeout: bigint; - /** - * Ingress filter configurations. - * - * @generated from protobuf field: payload.v1.Filter.Config ingress_filters = 6; - */ - ingress_filters?: Filter_Config; - /** - * Egress filter configurations. - * - * @generated from protobuf field: payload.v1.Filter.Config egress_filters = 7; - */ - egress_filters?: Filter_Config; - /** - * Minimum number of result to be returned. - * - * @generated from protobuf field: uint32 min_num = 8; - */ - min_num: number; - /** - * Aggregation Algorithm - * - * @generated from protobuf field: payload.v1.Search.AggregationAlgorithm aggregation_algorithm = 9; - */ - aggregation_algorithm: Search_AggregationAlgorithm; -} -/** - * Represent a search response. - * - * @generated from protobuf message payload.v1.Search.Response - */ -export interface Search_Response { - /** - * The unique request ID. - * - * @generated from protobuf field: string request_id = 1; - */ - request_id: string; - /** - * Search results. - * - * @generated from protobuf field: repeated payload.v1.Object.Distance results = 2; - */ - results: Object_Distance[]; -} -/** - * Represent multiple search responses. - * - * @generated from protobuf message payload.v1.Search.Responses - */ -export interface Search_Responses { - /** - * Represent the multiple search response content. - * - * @generated from protobuf field: repeated payload.v1.Search.Response responses = 1; - */ - responses: Search_Response[]; -} -/** - * Represent stream search response. - * - * @generated from protobuf message payload.v1.Search.StreamResponse - */ -export interface Search_StreamResponse { - /** - * @generated from protobuf oneof: payload - */ - payload: { - oneofKind: "response"; - /** - * Represent the search response. - * - * @generated from protobuf field: payload.v1.Search.Response response = 1; - */ - response: Search_Response; - } | { - oneofKind: "status"; - /** - * The RPC error status. - * - * @generated from protobuf field: google.rpc.Status status = 2; - */ - status: Status; - } | { - oneofKind: undefined; - }; -} -/** - * AggregationAlgorithm is enum of each aggregation algorithms - * - * @generated from protobuf enum payload.v1.Search.AggregationAlgorithm - */ -export enum Search_AggregationAlgorithm { - /** - * @generated from protobuf enum value: Unknown = 0; - */ - Unknown = 0, - /** - * @generated from protobuf enum value: ConcurrentQueue = 1; - */ - ConcurrentQueue = 1, - /** - * @generated from protobuf enum value: SortSlice = 2; - */ - SortSlice = 2, - /** - * @generated from protobuf enum value: SortPoolSlice = 3; - */ - SortPoolSlice = 3, - /** - * @generated from protobuf enum value: PairingHeap = 4; - */ - PairingHeap = 4 -} -/** - * Filter related messages. - * - * @generated from protobuf message payload.v1.Filter - */ -export interface Filter { -} -/** - * Represent the target filter server. - * - * @generated from protobuf message payload.v1.Filter.Target - */ -export interface Filter_Target { - /** - * The target hostname. - * - * @generated from protobuf field: string host = 1; - */ - host: string; - /** - * The target port. - * - * @generated from protobuf field: uint32 port = 2; - */ - port: number; -} -/** - * Represent filter configuration. - * - * @generated from protobuf message payload.v1.Filter.Config - */ -export interface Filter_Config { - /** - * Represent the filter target configuration. - * - * @generated from protobuf field: repeated payload.v1.Filter.Target targets = 1; - */ - targets: Filter_Target[]; -} -/** - * Insert related messages. - * - * @generated from protobuf message payload.v1.Insert - */ -export interface Insert { -} -/** - * Represent the insert request. - * - * @generated from protobuf message payload.v1.Insert.Request - */ -export interface Insert_Request { - /** - * The vector to be inserted. - * - * @generated from protobuf field: payload.v1.Object.Vector vector = 1; - */ - vector?: Object_Vector; - /** - * The configuration of the insert request. - * - * @generated from protobuf field: payload.v1.Insert.Config config = 2; - */ - config?: Insert_Config; -} -/** - * Represent the multiple insert request. - * - * @generated from protobuf message payload.v1.Insert.MultiRequest - */ -export interface Insert_MultiRequest { - /** - * Represent multiple insert request content. - * - * @generated from protobuf field: repeated payload.v1.Insert.Request requests = 1; - */ - requests: Insert_Request[]; -} -/** - * Represent the insert by binary object request. - * - * @generated from protobuf message payload.v1.Insert.ObjectRequest - */ -export interface Insert_ObjectRequest { - /** - * The binary object to be inserted. - * - * @generated from protobuf field: payload.v1.Object.Blob object = 1; - */ - object?: Object_Blob; - /** - * The configuration of the insert request. - * - * @generated from protobuf field: payload.v1.Insert.Config config = 2; - */ - config?: Insert_Config; - /** - * Filter configurations. - * - * @generated from protobuf field: payload.v1.Filter.Target vectorizer = 3; - */ - vectorizer?: Filter_Target; -} -/** - * Represent the multiple insert by binary object request. - * - * @generated from protobuf message payload.v1.Insert.MultiObjectRequest - */ -export interface Insert_MultiObjectRequest { - /** - * Represent multiple insert by object content. - * - * @generated from protobuf field: repeated payload.v1.Insert.ObjectRequest requests = 1; - */ - requests: Insert_ObjectRequest[]; -} -/** - * Represent insert configurations. - * - * @generated from protobuf message payload.v1.Insert.Config - */ -export interface Insert_Config { - /** - * A flag to skip exist check during insert operation. - * - * @generated from protobuf field: bool skip_strict_exist_check = 1; - */ - skip_strict_exist_check: boolean; - /** - * Filter configurations. - * - * @generated from protobuf field: payload.v1.Filter.Config filters = 2; - */ - filters?: Filter_Config; - /** - * Insert timestamp. - * - * @generated from protobuf field: int64 timestamp = 3; - */ - timestamp: bigint; -} -/** - * Update related messages - * - * @generated from protobuf message payload.v1.Update - */ -export interface Update { -} -/** - * Represent the update request. - * - * @generated from protobuf message payload.v1.Update.Request - */ -export interface Update_Request { - /** - * The vector to be updated. - * - * @generated from protobuf field: payload.v1.Object.Vector vector = 1; - */ - vector?: Object_Vector; - /** - * The configuration of the update request. - * - * @generated from protobuf field: payload.v1.Update.Config config = 2; - */ - config?: Update_Config; -} -/** - * Represent the multiple update request. - * - * @generated from protobuf message payload.v1.Update.MultiRequest - */ -export interface Update_MultiRequest { - /** - * Represent the multiple update request content. - * - * @generated from protobuf field: repeated payload.v1.Update.Request requests = 1; - */ - requests: Update_Request[]; -} -/** - * Represent the update binary object request. - * - * @generated from protobuf message payload.v1.Update.ObjectRequest - */ -export interface Update_ObjectRequest { - /** - * The binary object to be updated. - * - * @generated from protobuf field: payload.v1.Object.Blob object = 1; - */ - object?: Object_Blob; - /** - * The configuration of the update request. - * - * @generated from protobuf field: payload.v1.Update.Config config = 2; - */ - config?: Update_Config; - /** - * Filter target. - * - * @generated from protobuf field: payload.v1.Filter.Target vectorizer = 3; - */ - vectorizer?: Filter_Target; -} -/** - * Represent the multiple update binary object request. - * - * @generated from protobuf message payload.v1.Update.MultiObjectRequest - */ -export interface Update_MultiObjectRequest { - /** - * Represent the multiple update object request content. - * - * @generated from protobuf field: repeated payload.v1.Update.ObjectRequest requests = 1; - */ - requests: Update_ObjectRequest[]; -} -/** - * Represent the update configuration. - * - * @generated from protobuf message payload.v1.Update.Config - */ -export interface Update_Config { - /** - * A flag to skip exist check during update operation. - * - * @generated from protobuf field: bool skip_strict_exist_check = 1; - */ - skip_strict_exist_check: boolean; - /** - * Filter configuration. - * - * @generated from protobuf field: payload.v1.Filter.Config filters = 2; - */ - filters?: Filter_Config; - /** - * Update timestamp. - * - * @generated from protobuf field: int64 timestamp = 3; - */ - timestamp: bigint; - /** - * A flag to disable balanced update (split remove -> insert operation) - * during update operation. - * - * @generated from protobuf field: bool disable_balanced_update = 4; - */ - disable_balanced_update: boolean; -} -/** - * Upsert related messages. - * - * @generated from protobuf message payload.v1.Upsert - */ -export interface Upsert { -} -/** - * Represent the upsert request. - * - * @generated from protobuf message payload.v1.Upsert.Request - */ -export interface Upsert_Request { - /** - * The vector to be upserted. - * - * @generated from protobuf field: payload.v1.Object.Vector vector = 1; - */ - vector?: Object_Vector; - /** - * The configuration of the upsert request. - * - * @generated from protobuf field: payload.v1.Upsert.Config config = 2; - */ - config?: Upsert_Config; -} -/** - * Represent mthe ultiple upsert request. - * - * @generated from protobuf message payload.v1.Upsert.MultiRequest - */ -export interface Upsert_MultiRequest { - /** - * Represent the multiple upsert request content. - * - * @generated from protobuf field: repeated payload.v1.Upsert.Request requests = 1; - */ - requests: Upsert_Request[]; -} -/** - * Represent the upsert binary object request. - * - * @generated from protobuf message payload.v1.Upsert.ObjectRequest - */ -export interface Upsert_ObjectRequest { - /** - * The binary object to be upserted. - * - * @generated from protobuf field: payload.v1.Object.Blob object = 1; - */ - object?: Object_Blob; - /** - * The configuration of the upsert request. - * - * @generated from protobuf field: payload.v1.Upsert.Config config = 2; - */ - config?: Upsert_Config; - /** - * Filter target. - * - * @generated from protobuf field: payload.v1.Filter.Target vectorizer = 3; - */ - vectorizer?: Filter_Target; -} -/** - * Represent the multiple upsert binary object request. - * - * @generated from protobuf message payload.v1.Upsert.MultiObjectRequest - */ -export interface Upsert_MultiObjectRequest { - /** - * Represent the multiple upsert object request content. - * - * @generated from protobuf field: repeated payload.v1.Upsert.ObjectRequest requests = 1; - */ - requests: Upsert_ObjectRequest[]; -} -/** - * Represent the upsert configuration. - * - * @generated from protobuf message payload.v1.Upsert.Config - */ -export interface Upsert_Config { - /** - * A flag to skip exist check during upsert operation. - * - * @generated from protobuf field: bool skip_strict_exist_check = 1; - */ - skip_strict_exist_check: boolean; - /** - * Filter configuration. - * - * @generated from protobuf field: payload.v1.Filter.Config filters = 2; - */ - filters?: Filter_Config; - /** - * Upsert timestamp. - * - * @generated from protobuf field: int64 timestamp = 3; - */ - timestamp: bigint; - /** - * A flag to disable balanced update (split remove -> insert operation) - * during update operation. - * - * @generated from protobuf field: bool disable_balanced_update = 4; - */ - disable_balanced_update: boolean; -} -/** - * Remove related messages. - * - * @generated from protobuf message payload.v1.Remove - */ -export interface Remove { -} -/** - * Represent the remove request. - * - * @generated from protobuf message payload.v1.Remove.Request - */ -export interface Remove_Request { - /** - * The object ID to be removed. - * - * @generated from protobuf field: payload.v1.Object.ID id = 1; - */ - id?: Object_ID; - /** - * The configuration of the remove request. - * - * @generated from protobuf field: payload.v1.Remove.Config config = 2; - */ - config?: Remove_Config; -} -/** - * Represent the multiple remove request. - * - * @generated from protobuf message payload.v1.Remove.MultiRequest - */ -export interface Remove_MultiRequest { - /** - * Represent the multiple remove request content. - * - * @generated from protobuf field: repeated payload.v1.Remove.Request requests = 1; - */ - requests: Remove_Request[]; -} -/** - * Represent the remove request based on timestamp. - * - * @generated from protobuf message payload.v1.Remove.TimestampRequest - */ -export interface Remove_TimestampRequest { - /** - * The timestamp comparison list. If more than one is specified, the `AND` search is applied. - * - * @generated from protobuf field: repeated payload.v1.Remove.Timestamp timestamps = 1; - */ - timestamps: Remove_Timestamp[]; -} -/** - * Represent the timestamp comparison. - * - * @generated from protobuf message payload.v1.Remove.Timestamp - */ -export interface Remove_Timestamp { - /** - * The timestamp. - * - * @generated from protobuf field: int64 timestamp = 1; - */ - timestamp: bigint; - /** - * The conditional operator. - * - * @generated from protobuf field: payload.v1.Remove.Timestamp.Operator operator = 2; - */ - operator: Remove_Timestamp_Operator; -} -/** - * Operator is enum of each conditional operator. - * - * @generated from protobuf enum payload.v1.Remove.Timestamp.Operator - */ -export enum Remove_Timestamp_Operator { - /** - * The timestamp is equal to the specified value in the request. - * - * @generated from protobuf enum value: Eq = 0; - */ - Eq = 0, - /** - * The timestamp is not equal to the specified value in the request. - * - * @generated from protobuf enum value: Ne = 1; - */ - Ne = 1, - /** - * The timestamp is greater than or equal to the specified value in the request. - * - * @generated from protobuf enum value: Ge = 2; - */ - Ge = 2, - /** - * The timestamp is greater than the specified value in the request. - * - * @generated from protobuf enum value: Gt = 3; - */ - Gt = 3, - /** - * The timestamp is less than or equal to the specified value in the request. - * - * @generated from protobuf enum value: Le = 4; - */ - Le = 4, - /** - * The timestamp is less than the specified value in the request. - * - * @generated from protobuf enum value: Lt = 5; - */ - Lt = 5 -} -/** - * Represent the remove configuration. - * - * @generated from protobuf message payload.v1.Remove.Config - */ -export interface Remove_Config { - /** - * A flag to skip exist check during upsert operation. - * - * @generated from protobuf field: bool skip_strict_exist_check = 1; - */ - skip_strict_exist_check: boolean; - /** - * Remove timestamp. - * - * @generated from protobuf field: int64 timestamp = 3; - */ - timestamp: bigint; -} -/** - * Common messages. - * - * @generated from protobuf message payload.v1.Object - */ -export interface Object { -} -/** - * Represent a request to fetch raw vector. - * - * @generated from protobuf message payload.v1.Object.VectorRequest - */ -export interface Object_VectorRequest { - /** - * The vector ID to be fetched. - * - * @generated from protobuf field: payload.v1.Object.ID id = 1; - */ - id?: Object_ID; - /** - * Filter configurations. - * - * @generated from protobuf field: payload.v1.Filter.Config filters = 2; - */ - filters?: Filter_Config; -} -/** - * Represent the ID and distance pair. - * - * @generated from protobuf message payload.v1.Object.Distance - */ -export interface Object_Distance { - /** - * The vector ID. - * - * @generated from protobuf field: string id = 1; - */ - id: string; - /** - * The distance. - * - * @generated from protobuf field: float distance = 2; - */ - distance: number; -} -/** - * Represent stream response of distances. - * - * @generated from protobuf message payload.v1.Object.StreamDistance - */ -export interface Object_StreamDistance { - /** - * @generated from protobuf oneof: payload - */ - payload: { - oneofKind: "distance"; - /** - * The distance. - * - * @generated from protobuf field: payload.v1.Object.Distance distance = 1; - */ - distance: Object_Distance; - } | { - oneofKind: "status"; - /** - * The RPC error status. - * - * @generated from protobuf field: google.rpc.Status status = 2; - */ - status: Status; - } | { - oneofKind: undefined; - }; -} -/** - * Represent the vector ID. - * - * @generated from protobuf message payload.v1.Object.ID - */ -export interface Object_ID { - /** - * @generated from protobuf field: string id = 1; - */ - id: string; -} -/** - * Represent multiple vector IDs. - * - * @generated from protobuf message payload.v1.Object.IDs - */ -export interface Object_IDs { - /** - * @generated from protobuf field: repeated string ids = 1; - */ - ids: string[]; -} -/** - * Represent a vector. - * - * @generated from protobuf message payload.v1.Object.Vector - */ -export interface Object_Vector { - /** - * The vector ID. - * - * @generated from protobuf field: string id = 1; - */ - id: string; - /** - * The vector. - * - * @generated from protobuf field: repeated float vector = 2; - */ - vector: number[]; - /** - * timestamp represents when this vector inserted. - * - * @generated from protobuf field: int64 timestamp = 3; - */ - timestamp: bigint; -} -/** - * Represent a request to fetch vector meta data. - * - * @generated from protobuf message payload.v1.Object.GetTimestampRequest - */ -export interface Object_GetTimestampRequest { - /** - * The vector ID to be fetched. - * - * @generated from protobuf field: payload.v1.Object.ID id = 1; - */ - id?: Object_ID; -} -/** - * Represent a vector meta data. - * - * @generated from protobuf message payload.v1.Object.Timestamp - */ -export interface Object_Timestamp { - /** - * The vector ID. - * - * @generated from protobuf field: string id = 1; - */ - id: string; - /** - * timestamp represents when this vector inserted. - * - * @generated from protobuf field: int64 timestamp = 2; - */ - timestamp: bigint; -} -/** - * Represent multiple vectors. - * - * @generated from protobuf message payload.v1.Object.Vectors - */ -export interface Object_Vectors { - /** - * @generated from protobuf field: repeated payload.v1.Object.Vector vectors = 1; - */ - vectors: Object_Vector[]; -} -/** - * Represent stream response of the vector. - * - * @generated from protobuf message payload.v1.Object.StreamVector - */ -export interface Object_StreamVector { - /** - * @generated from protobuf oneof: payload - */ - payload: { - oneofKind: "vector"; - /** - * The vector. - * - * @generated from protobuf field: payload.v1.Object.Vector vector = 1; - */ - vector: Object_Vector; - } | { - oneofKind: "status"; - /** - * The RPC error status. - * - * @generated from protobuf field: google.rpc.Status status = 2; - */ - status: Status; - } | { - oneofKind: undefined; - }; -} -/** - * Represent reshape vector. - * - * @generated from protobuf message payload.v1.Object.ReshapeVector - */ -export interface Object_ReshapeVector { - /** - * The binary object. - * - * @generated from protobuf field: bytes object = 1; - */ - object: Uint8Array; - /** - * The new shape. - * - * @generated from protobuf field: repeated int32 shape = 2; - */ - shape: number[]; -} -/** - * Represent the binary object. - * - * @generated from protobuf message payload.v1.Object.Blob - */ -export interface Object_Blob { - /** - * The object ID. - * - * @generated from protobuf field: string id = 1; - */ - id: string; - /** - * The binary object. - * - * @generated from protobuf field: bytes object = 2; - */ - object: Uint8Array; -} -/** - * Represent stream response of binary objects. - * - * @generated from protobuf message payload.v1.Object.StreamBlob - */ -export interface Object_StreamBlob { - /** - * @generated from protobuf oneof: payload - */ - payload: { - oneofKind: "blob"; - /** - * The binary object. - * - * @generated from protobuf field: payload.v1.Object.Blob blob = 1; - */ - blob: Object_Blob; - } | { - oneofKind: "status"; - /** - * The RPC error status. - * - * @generated from protobuf field: google.rpc.Status status = 2; - */ - status: Status; - } | { - oneofKind: undefined; - }; -} -/** - * Represent the vector location. - * - * @generated from protobuf message payload.v1.Object.Location - */ -export interface Object_Location { - /** - * The name of the location. - * - * @generated from protobuf field: string name = 1; - */ - name: string; - /** - * The UUID of the vector. - * - * @generated from protobuf field: string uuid = 2; - */ - uuid: string; - /** - * The IP list. - * - * @generated from protobuf field: repeated string ips = 3; - */ - ips: string[]; -} -/** - * Represent the stream response of the vector location. - * - * @generated from protobuf message payload.v1.Object.StreamLocation - */ -export interface Object_StreamLocation { - /** - * @generated from protobuf oneof: payload - */ - payload: { - oneofKind: "location"; - /** - * The vector location. - * - * @generated from protobuf field: payload.v1.Object.Location location = 1; - */ - location: Object_Location; - } | { - oneofKind: "status"; - /** - * The RPC error status. - * - * @generated from protobuf field: google.rpc.Status status = 2; - */ - status: Status; - } | { - oneofKind: undefined; - }; -} -/** - * Represent multiple vector locations. - * - * @generated from protobuf message payload.v1.Object.Locations - */ -export interface Object_Locations { - /** - * @generated from protobuf field: repeated payload.v1.Object.Location locations = 1; - */ - locations: Object_Location[]; -} -/** - * Represent the list object vector stream request and response. - * - * @generated from protobuf message payload.v1.Object.List - */ -export interface Object_List { -} -/** - * @generated from protobuf message payload.v1.Object.List.Request - */ -export interface Object_List_Request { -} -/** - * @generated from protobuf message payload.v1.Object.List.Response - */ -export interface Object_List_Response { - /** - * @generated from protobuf oneof: payload - */ - payload: { - oneofKind: "vector"; - /** - * The vector - * - * @generated from protobuf field: payload.v1.Object.Vector vector = 1; - */ - vector: Object_Vector; - } | { - oneofKind: "status"; - /** - * The RPC error status. - * - * @generated from protobuf field: google.rpc.Status status = 2; - */ - status: Status; - } | { - oneofKind: undefined; - }; -} -/** - * Control related messages. - * - * @generated from protobuf message payload.v1.Control - */ -export interface Control { -} -/** - * Represent the create index request. - * - * @generated from protobuf message payload.v1.Control.CreateIndexRequest - */ -export interface Control_CreateIndexRequest { - /** - * The pool size of the create index operation. - * - * @generated from protobuf field: uint32 pool_size = 1; - */ - pool_size: number; -} -/** - * Discoverer related messages. - * - * @generated from protobuf message payload.v1.Discoverer - */ -export interface Discoverer { -} -/** - * Represent the dicoverer request. - * - * @generated from protobuf message payload.v1.Discoverer.Request - */ -export interface Discoverer_Request { - /** - * The agent name to be discovered. - * - * @generated from protobuf field: string name = 1; - */ - name: string; - /** - * The namespace to be discovered. - * - * @generated from protobuf field: string namespace = 2; - */ - namespace: string; - /** - * The node to be discovered. - * - * @generated from protobuf field: string node = 3; - */ - node: string; -} -/** - * Info related messages. - * - * @generated from protobuf message payload.v1.Info - */ -export interface Info { -} -/** - * Represent the index information messages. - * - * @generated from protobuf message payload.v1.Info.Index - */ -export interface Info_Index { -} -/** - * Represent the index count message. - * - * @generated from protobuf message payload.v1.Info.Index.Count - */ -export interface Info_Index_Count { - /** - * The stored index count. - * - * @generated from protobuf field: uint32 stored = 1; - */ - stored: number; - /** - * The uncommitted index count. - * - * @generated from protobuf field: uint32 uncommitted = 2; - */ - uncommitted: number; - /** - * The indexing index count. - * - * @generated from protobuf field: bool indexing = 3; - */ - indexing: boolean; - /** - * The saving index count. - * - * @generated from protobuf field: bool saving = 4; - */ - saving: boolean; -} -/** - * Represent the UUID message. - * - * @generated from protobuf message payload.v1.Info.Index.UUID - */ -export interface Info_Index_UUID { -} -/** - * The committed UUID. - * - * @generated from protobuf message payload.v1.Info.Index.UUID.Committed - */ -export interface Info_Index_UUID_Committed { - /** - * @generated from protobuf field: string uuid = 1; - */ - uuid: string; -} -/** - * The uncommitted UUID. - * - * @generated from protobuf message payload.v1.Info.Index.UUID.Uncommitted - */ -export interface Info_Index_UUID_Uncommitted { - /** - * @generated from protobuf field: string uuid = 1; - */ - uuid: string; -} -/** - * Represent the pod information message. - * - * @generated from protobuf message payload.v1.Info.Pod - */ -export interface Info_Pod { - /** - * The app name of the pod on the label. - * - * @generated from protobuf field: string app_name = 1; - */ - app_name: string; - /** - * The name of the pod. - * - * @generated from protobuf field: string name = 2; - */ - name: string; - /** - * The namespace of the pod. - * - * @generated from protobuf field: string namespace = 3; - */ - namespace: string; - /** - * The IP of the pod. - * - * @generated from protobuf field: string ip = 4; - */ - ip: string; - /** - * The CPU information of the pod. - * - * @generated from protobuf field: payload.v1.Info.CPU cpu = 5; - */ - cpu?: Info_CPU; - /** - * The memory information of the pod. - * - * @generated from protobuf field: payload.v1.Info.Memory memory = 6; - */ - memory?: Info_Memory; - /** - * The node information of the pod. - * - * @generated from protobuf field: payload.v1.Info.Node node = 7; - */ - node?: Info_Node; -} -/** - * Represent the node information message. - * - * @generated from protobuf message payload.v1.Info.Node - */ -export interface Info_Node { - /** - * The name of the node. - * - * @generated from protobuf field: string name = 1; - */ - name: string; - /** - * The internal IP address of the node. - * - * @generated from protobuf field: string internal_addr = 2; - */ - internal_addr: string; - /** - * The external IP address of the node. - * - * @generated from protobuf field: string external_addr = 3; - */ - external_addr: string; - /** - * The CPU information of the node. - * - * @generated from protobuf field: payload.v1.Info.CPU cpu = 4; - */ - cpu?: Info_CPU; - /** - * The memory information of the node. - * - * @generated from protobuf field: payload.v1.Info.Memory memory = 5; - */ - memory?: Info_Memory; - /** - * The pod information of the node. - * - * @generated from protobuf field: payload.v1.Info.Pods Pods = 6 [json_name = "Pods"]; - */ - Pods?: Info_Pods; -} -/** - * Represent the service information message. - * - * @generated from protobuf message payload.v1.Info.Service - */ -export interface Info_Service { - /** - * The name of the svc. - * - * @generated from protobuf field: string name = 1; - */ - name: string; - /** - * The cluster ip of the svc. - * - * @generated from protobuf field: string cluster_ip = 2; - */ - cluster_ip: string; - /** - * The cluster ips of the svc. - * - * @generated from protobuf field: repeated string cluster_ips = 3; - */ - cluster_ips: string[]; - /** - * The port of the svc. - * - * @generated from protobuf field: repeated payload.v1.Info.ServicePort ports = 4; - */ - ports: Info_ServicePort[]; - /** - * The labels of the service. - * - * @generated from protobuf field: payload.v1.Info.Labels labels = 5; - */ - labels?: Info_Labels; - /** - * The annotations of the service. - * - * @generated from protobuf field: payload.v1.Info.Annotations annotations = 6; - */ - annotations?: Info_Annotations; -} -/** - * Represets the service port information message. - * - * @generated from protobuf message payload.v1.Info.ServicePort - */ -export interface Info_ServicePort { - /** - * The name of the port. - * - * @generated from protobuf field: string name = 1; - */ - name: string; - /** - * The port number - * - * @generated from protobuf field: int32 port = 2; - */ - port: number; -} -/** - * Represent the kubernetes labels. - * - * @generated from protobuf message payload.v1.Info.Labels - */ -export interface Info_Labels { - /** - * @generated from protobuf field: map labels = 1; - */ - labels: { - [key: string]: string; - }; -} -/** - * Represent the kubernetes annotations. - * - * @generated from protobuf message payload.v1.Info.Annotations - */ -export interface Info_Annotations { - /** - * @generated from protobuf field: map annotations = 1; - */ - annotations: { - [key: string]: string; - }; -} -/** - * Represent the CPU information message. - * - * @generated from protobuf message payload.v1.Info.CPU - */ -export interface Info_CPU { - /** - * The CPU resource limit. - * - * @generated from protobuf field: double limit = 1; - */ - limit: number; - /** - * The CPU resource requested. - * - * @generated from protobuf field: double request = 2; - */ - request: number; - /** - * The CPU usage. - * - * @generated from protobuf field: double usage = 3; - */ - usage: number; -} -/** - * Represent the memory information message. - * - * @generated from protobuf message payload.v1.Info.Memory - */ -export interface Info_Memory { - /** - * The memory limit. - * - * @generated from protobuf field: double limit = 1; - */ - limit: number; - /** - * The memory requested. - * - * @generated from protobuf field: double request = 2; - */ - request: number; - /** - * The memory usage. - * - * @generated from protobuf field: double usage = 3; - */ - usage: number; -} -/** - * Represent the multiple pod information message. - * - * @generated from protobuf message payload.v1.Info.Pods - */ -export interface Info_Pods { - /** - * The multiple pod information. - * - * @generated from protobuf field: repeated payload.v1.Info.Pod pods = 1; - */ - pods: Info_Pod[]; -} -/** - * Represent the multiple node information message. - * - * @generated from protobuf message payload.v1.Info.Nodes - */ -export interface Info_Nodes { - /** - * The multiple node information. - * - * @generated from protobuf field: repeated payload.v1.Info.Node nodes = 1; - */ - nodes: Info_Node[]; -} -/** - * Represent the multiple service information message. - * - * @generated from protobuf message payload.v1.Info.Services - */ -export interface Info_Services { - /** - * The multiple service information. - * - * @generated from protobuf field: repeated payload.v1.Info.Service services = 1; - */ - services: Info_Service[]; -} -/** - * Represent the multiple IP message. - * - * @generated from protobuf message payload.v1.Info.IPs - */ -export interface Info_IPs { - /** - * @generated from protobuf field: repeated string ip = 1; - */ - ip: string[]; -} -/** - * Represent an empty message. - * - * @generated from protobuf message payload.v1.Empty - */ -export interface Empty { -} -// @generated message type with reflection information, may provide speed optimized methods -class Search$Type extends MessageType { - constructor() { - super("payload.v1.Search", []); - } - create(value?: PartialMessage): Search { - const message = globalThis.Object.create((this.messagePrototype!)); - if (value !== undefined) - reflectionMergePartial(this, message, value); - return message; - } - internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Search): Search { - return target ?? this.create(); - } - internalBinaryWrite(message: Search, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { - let u = options.writeUnknownFields; - if (u !== false) - (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); - return writer; - } -} -/** - * @generated MessageType for protobuf message payload.v1.Search - */ -export const Search = new Search$Type(); -// @generated message type with reflection information, may provide speed optimized methods -class Search_Request$Type extends MessageType { - constructor() { - super("payload.v1.Search.Request", [ - { no: 1, name: "vector", kind: "scalar", repeat: 1 /*RepeatType.PACKED*/, T: 2 /*ScalarType.FLOAT*/, options: { "buf.validate.field": { repeated: { minItems: "2" } } } }, - { no: 2, name: "config", kind: "message", T: () => Search_Config } - ]); - } - create(value?: PartialMessage): Search_Request { - const message = globalThis.Object.create((this.messagePrototype!)); - message.vector = []; - if (value !== undefined) - reflectionMergePartial(this, message, value); - return message; - } - internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Search_Request): Search_Request { - let message = target ?? this.create(), end = reader.pos + length; - while (reader.pos < end) { - let [fieldNo, wireType] = reader.tag(); - switch (fieldNo) { - case /* repeated float vector */ 1: - if (wireType === WireType.LengthDelimited) - for (let e = reader.int32() + reader.pos; reader.pos < e;) - message.vector.push(reader.float()); - else - message.vector.push(reader.float()); - break; - case /* payload.v1.Search.Config config */ 2: - message.config = Search_Config.internalBinaryRead(reader, reader.uint32(), options, message.config); - break; - default: - let u = options.readUnknownField; - if (u === "throw") - throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); - let d = reader.skip(wireType); - if (u !== false) - (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); - } - } - return message; - } - internalBinaryWrite(message: Search_Request, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { - /* repeated float vector = 1; */ - if (message.vector.length) { - writer.tag(1, WireType.LengthDelimited).fork(); - for (let i = 0; i < message.vector.length; i++) - writer.float(message.vector[i]); - writer.join(); - } - /* payload.v1.Search.Config config = 2; */ - if (message.config) - Search_Config.internalBinaryWrite(message.config, writer.tag(2, WireType.LengthDelimited).fork(), options).join(); - let u = options.writeUnknownFields; - if (u !== false) - (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); - return writer; - } -} -/** - * @generated MessageType for protobuf message payload.v1.Search.Request - */ -export const Search_Request = new Search_Request$Type(); -// @generated message type with reflection information, may provide speed optimized methods -class Search_MultiRequest$Type extends MessageType { - constructor() { - super("payload.v1.Search.MultiRequest", [ - { no: 1, name: "requests", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => Search_Request } - ]); - } - create(value?: PartialMessage): Search_MultiRequest { - const message = globalThis.Object.create((this.messagePrototype!)); - message.requests = []; - if (value !== undefined) - reflectionMergePartial(this, message, value); - return message; - } - internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Search_MultiRequest): Search_MultiRequest { - let message = target ?? this.create(), end = reader.pos + length; - while (reader.pos < end) { - let [fieldNo, wireType] = reader.tag(); - switch (fieldNo) { - case /* repeated payload.v1.Search.Request requests */ 1: - message.requests.push(Search_Request.internalBinaryRead(reader, reader.uint32(), options)); - break; - default: - let u = options.readUnknownField; - if (u === "throw") - throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); - let d = reader.skip(wireType); - if (u !== false) - (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); - } - } - return message; - } - internalBinaryWrite(message: Search_MultiRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { - /* repeated payload.v1.Search.Request requests = 1; */ - for (let i = 0; i < message.requests.length; i++) - Search_Request.internalBinaryWrite(message.requests[i], writer.tag(1, WireType.LengthDelimited).fork(), options).join(); - let u = options.writeUnknownFields; - if (u !== false) - (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); - return writer; - } -} -/** - * @generated MessageType for protobuf message payload.v1.Search.MultiRequest - */ -export const Search_MultiRequest = new Search_MultiRequest$Type(); -// @generated message type with reflection information, may provide speed optimized methods -class Search_IDRequest$Type extends MessageType { - constructor() { - super("payload.v1.Search.IDRequest", [ - { no: 1, name: "id", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, - { no: 2, name: "config", kind: "message", T: () => Search_Config } - ]); - } - create(value?: PartialMessage): Search_IDRequest { - const message = globalThis.Object.create((this.messagePrototype!)); - message.id = ""; - if (value !== undefined) - reflectionMergePartial(this, message, value); - return message; - } - internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Search_IDRequest): Search_IDRequest { - let message = target ?? this.create(), end = reader.pos + length; - while (reader.pos < end) { - let [fieldNo, wireType] = reader.tag(); - switch (fieldNo) { - case /* string id */ 1: - message.id = reader.string(); - break; - case /* payload.v1.Search.Config config */ 2: - message.config = Search_Config.internalBinaryRead(reader, reader.uint32(), options, message.config); - break; - default: - let u = options.readUnknownField; - if (u === "throw") - throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); - let d = reader.skip(wireType); - if (u !== false) - (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); - } - } - return message; - } - internalBinaryWrite(message: Search_IDRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { - /* string id = 1; */ - if (message.id !== "") - writer.tag(1, WireType.LengthDelimited).string(message.id); - /* payload.v1.Search.Config config = 2; */ - if (message.config) - Search_Config.internalBinaryWrite(message.config, writer.tag(2, WireType.LengthDelimited).fork(), options).join(); - let u = options.writeUnknownFields; - if (u !== false) - (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); - return writer; - } -} -/** - * @generated MessageType for protobuf message payload.v1.Search.IDRequest - */ -export const Search_IDRequest = new Search_IDRequest$Type(); -// @generated message type with reflection information, may provide speed optimized methods -class Search_MultiIDRequest$Type extends MessageType { - constructor() { - super("payload.v1.Search.MultiIDRequest", [ - { no: 1, name: "requests", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => Search_IDRequest } - ]); - } - create(value?: PartialMessage): Search_MultiIDRequest { - const message = globalThis.Object.create((this.messagePrototype!)); - message.requests = []; - if (value !== undefined) - reflectionMergePartial(this, message, value); - return message; - } - internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Search_MultiIDRequest): Search_MultiIDRequest { - let message = target ?? this.create(), end = reader.pos + length; - while (reader.pos < end) { - let [fieldNo, wireType] = reader.tag(); - switch (fieldNo) { - case /* repeated payload.v1.Search.IDRequest requests */ 1: - message.requests.push(Search_IDRequest.internalBinaryRead(reader, reader.uint32(), options)); - break; - default: - let u = options.readUnknownField; - if (u === "throw") - throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); - let d = reader.skip(wireType); - if (u !== false) - (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); - } - } - return message; - } - internalBinaryWrite(message: Search_MultiIDRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { - /* repeated payload.v1.Search.IDRequest requests = 1; */ - for (let i = 0; i < message.requests.length; i++) - Search_IDRequest.internalBinaryWrite(message.requests[i], writer.tag(1, WireType.LengthDelimited).fork(), options).join(); - let u = options.writeUnknownFields; - if (u !== false) - (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); - return writer; - } -} -/** - * @generated MessageType for protobuf message payload.v1.Search.MultiIDRequest - */ -export const Search_MultiIDRequest = new Search_MultiIDRequest$Type(); -// @generated message type with reflection information, may provide speed optimized methods -class Search_ObjectRequest$Type extends MessageType { - constructor() { - super("payload.v1.Search.ObjectRequest", [ - { no: 1, name: "object", kind: "scalar", T: 12 /*ScalarType.BYTES*/ }, - { no: 2, name: "config", kind: "message", T: () => Search_Config }, - { no: 3, name: "vectorizer", kind: "message", T: () => Filter_Target } - ]); - } - create(value?: PartialMessage): Search_ObjectRequest { - const message = globalThis.Object.create((this.messagePrototype!)); - message.object = new Uint8Array(0); - if (value !== undefined) - reflectionMergePartial(this, message, value); - return message; - } - internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Search_ObjectRequest): Search_ObjectRequest { - let message = target ?? this.create(), end = reader.pos + length; - while (reader.pos < end) { - let [fieldNo, wireType] = reader.tag(); - switch (fieldNo) { - case /* bytes object */ 1: - message.object = reader.bytes(); - break; - case /* payload.v1.Search.Config config */ 2: - message.config = Search_Config.internalBinaryRead(reader, reader.uint32(), options, message.config); - break; - case /* payload.v1.Filter.Target vectorizer */ 3: - message.vectorizer = Filter_Target.internalBinaryRead(reader, reader.uint32(), options, message.vectorizer); - break; - default: - let u = options.readUnknownField; - if (u === "throw") - throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); - let d = reader.skip(wireType); - if (u !== false) - (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); - } - } - return message; - } - internalBinaryWrite(message: Search_ObjectRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { - /* bytes object = 1; */ - if (message.object.length) - writer.tag(1, WireType.LengthDelimited).bytes(message.object); - /* payload.v1.Search.Config config = 2; */ - if (message.config) - Search_Config.internalBinaryWrite(message.config, writer.tag(2, WireType.LengthDelimited).fork(), options).join(); - /* payload.v1.Filter.Target vectorizer = 3; */ - if (message.vectorizer) - Filter_Target.internalBinaryWrite(message.vectorizer, writer.tag(3, WireType.LengthDelimited).fork(), options).join(); - let u = options.writeUnknownFields; - if (u !== false) - (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); - return writer; - } -} -/** - * @generated MessageType for protobuf message payload.v1.Search.ObjectRequest - */ -export const Search_ObjectRequest = new Search_ObjectRequest$Type(); -// @generated message type with reflection information, may provide speed optimized methods -class Search_MultiObjectRequest$Type extends MessageType { - constructor() { - super("payload.v1.Search.MultiObjectRequest", [ - { no: 1, name: "requests", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => Search_ObjectRequest } - ]); - } - create(value?: PartialMessage): Search_MultiObjectRequest { - const message = globalThis.Object.create((this.messagePrototype!)); - message.requests = []; - if (value !== undefined) - reflectionMergePartial(this, message, value); - return message; - } - internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Search_MultiObjectRequest): Search_MultiObjectRequest { - let message = target ?? this.create(), end = reader.pos + length; - while (reader.pos < end) { - let [fieldNo, wireType] = reader.tag(); - switch (fieldNo) { - case /* repeated payload.v1.Search.ObjectRequest requests */ 1: - message.requests.push(Search_ObjectRequest.internalBinaryRead(reader, reader.uint32(), options)); - break; - default: - let u = options.readUnknownField; - if (u === "throw") - throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); - let d = reader.skip(wireType); - if (u !== false) - (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); - } - } - return message; - } - internalBinaryWrite(message: Search_MultiObjectRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { - /* repeated payload.v1.Search.ObjectRequest requests = 1; */ - for (let i = 0; i < message.requests.length; i++) - Search_ObjectRequest.internalBinaryWrite(message.requests[i], writer.tag(1, WireType.LengthDelimited).fork(), options).join(); - let u = options.writeUnknownFields; - if (u !== false) - (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); - return writer; - } -} -/** - * @generated MessageType for protobuf message payload.v1.Search.MultiObjectRequest - */ -export const Search_MultiObjectRequest = new Search_MultiObjectRequest$Type(); -// @generated message type with reflection information, may provide speed optimized methods -class Search_Config$Type extends MessageType { - constructor() { - super("payload.v1.Search.Config", [ - { no: 1, name: "request_id", kind: "scalar", localName: "request_id", T: 9 /*ScalarType.STRING*/ }, - { no: 2, name: "num", kind: "scalar", T: 13 /*ScalarType.UINT32*/, options: { "buf.validate.field": { uint32: { gte: 1 } } } }, - { no: 3, name: "radius", kind: "scalar", T: 2 /*ScalarType.FLOAT*/ }, - { no: 4, name: "epsilon", kind: "scalar", T: 2 /*ScalarType.FLOAT*/ }, - { no: 5, name: "timeout", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 0 /*LongType.BIGINT*/ }, - { no: 6, name: "ingress_filters", kind: "message", localName: "ingress_filters", T: () => Filter_Config }, - { no: 7, name: "egress_filters", kind: "message", localName: "egress_filters", T: () => Filter_Config }, - { no: 8, name: "min_num", kind: "scalar", localName: "min_num", T: 13 /*ScalarType.UINT32*/, options: { "buf.validate.field": { uint32: { gte: 0 } } } }, - { no: 9, name: "aggregation_algorithm", kind: "enum", localName: "aggregation_algorithm", T: () => ["payload.v1.Search.AggregationAlgorithm", Search_AggregationAlgorithm] } - ]); - } - create(value?: PartialMessage): Search_Config { - const message = globalThis.Object.create((this.messagePrototype!)); - message.request_id = ""; - message.num = 0; - message.radius = 0; - message.epsilon = 0; - message.timeout = 0n; - message.min_num = 0; - message.aggregation_algorithm = 0; - if (value !== undefined) - reflectionMergePartial(this, message, value); - return message; - } - internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Search_Config): Search_Config { - let message = target ?? this.create(), end = reader.pos + length; - while (reader.pos < end) { - let [fieldNo, wireType] = reader.tag(); - switch (fieldNo) { - case /* string request_id */ 1: - message.request_id = reader.string(); - break; - case /* uint32 num */ 2: - message.num = reader.uint32(); - break; - case /* float radius */ 3: - message.radius = reader.float(); - break; - case /* float epsilon */ 4: - message.epsilon = reader.float(); - break; - case /* int64 timeout */ 5: - message.timeout = reader.int64().toBigInt(); - break; - case /* payload.v1.Filter.Config ingress_filters */ 6: - message.ingress_filters = Filter_Config.internalBinaryRead(reader, reader.uint32(), options, message.ingress_filters); - break; - case /* payload.v1.Filter.Config egress_filters */ 7: - message.egress_filters = Filter_Config.internalBinaryRead(reader, reader.uint32(), options, message.egress_filters); - break; - case /* uint32 min_num */ 8: - message.min_num = reader.uint32(); - break; - case /* payload.v1.Search.AggregationAlgorithm aggregation_algorithm */ 9: - message.aggregation_algorithm = reader.int32(); - break; - default: - let u = options.readUnknownField; - if (u === "throw") - throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); - let d = reader.skip(wireType); - if (u !== false) - (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); - } - } - return message; - } - internalBinaryWrite(message: Search_Config, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { - /* string request_id = 1; */ - if (message.request_id !== "") - writer.tag(1, WireType.LengthDelimited).string(message.request_id); - /* uint32 num = 2; */ - if (message.num !== 0) - writer.tag(2, WireType.Varint).uint32(message.num); - /* float radius = 3; */ - if (message.radius !== 0) - writer.tag(3, WireType.Bit32).float(message.radius); - /* float epsilon = 4; */ - if (message.epsilon !== 0) - writer.tag(4, WireType.Bit32).float(message.epsilon); - /* int64 timeout = 5; */ - if (message.timeout !== 0n) - writer.tag(5, WireType.Varint).int64(message.timeout); - /* payload.v1.Filter.Config ingress_filters = 6; */ - if (message.ingress_filters) - Filter_Config.internalBinaryWrite(message.ingress_filters, writer.tag(6, WireType.LengthDelimited).fork(), options).join(); - /* payload.v1.Filter.Config egress_filters = 7; */ - if (message.egress_filters) - Filter_Config.internalBinaryWrite(message.egress_filters, writer.tag(7, WireType.LengthDelimited).fork(), options).join(); - /* uint32 min_num = 8; */ - if (message.min_num !== 0) - writer.tag(8, WireType.Varint).uint32(message.min_num); - /* payload.v1.Search.AggregationAlgorithm aggregation_algorithm = 9; */ - if (message.aggregation_algorithm !== 0) - writer.tag(9, WireType.Varint).int32(message.aggregation_algorithm); - let u = options.writeUnknownFields; - if (u !== false) - (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); - return writer; - } -} -/** - * @generated MessageType for protobuf message payload.v1.Search.Config - */ -export const Search_Config = new Search_Config$Type(); -// @generated message type with reflection information, may provide speed optimized methods -class Search_Response$Type extends MessageType { - constructor() { - super("payload.v1.Search.Response", [ - { no: 1, name: "request_id", kind: "scalar", localName: "request_id", T: 9 /*ScalarType.STRING*/ }, - { no: 2, name: "results", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => Object_Distance } - ]); - } - create(value?: PartialMessage): Search_Response { - const message = globalThis.Object.create((this.messagePrototype!)); - message.request_id = ""; - message.results = []; - if (value !== undefined) - reflectionMergePartial(this, message, value); - return message; - } - internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Search_Response): Search_Response { - let message = target ?? this.create(), end = reader.pos + length; - while (reader.pos < end) { - let [fieldNo, wireType] = reader.tag(); - switch (fieldNo) { - case /* string request_id */ 1: - message.request_id = reader.string(); - break; - case /* repeated payload.v1.Object.Distance results */ 2: - message.results.push(Object_Distance.internalBinaryRead(reader, reader.uint32(), options)); - break; - default: - let u = options.readUnknownField; - if (u === "throw") - throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); - let d = reader.skip(wireType); - if (u !== false) - (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); - } - } - return message; - } - internalBinaryWrite(message: Search_Response, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { - /* string request_id = 1; */ - if (message.request_id !== "") - writer.tag(1, WireType.LengthDelimited).string(message.request_id); - /* repeated payload.v1.Object.Distance results = 2; */ - for (let i = 0; i < message.results.length; i++) - Object_Distance.internalBinaryWrite(message.results[i], writer.tag(2, WireType.LengthDelimited).fork(), options).join(); - let u = options.writeUnknownFields; - if (u !== false) - (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); - return writer; - } -} -/** - * @generated MessageType for protobuf message payload.v1.Search.Response - */ -export const Search_Response = new Search_Response$Type(); -// @generated message type with reflection information, may provide speed optimized methods -class Search_Responses$Type extends MessageType { - constructor() { - super("payload.v1.Search.Responses", [ - { no: 1, name: "responses", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => Search_Response } - ]); - } - create(value?: PartialMessage): Search_Responses { - const message = globalThis.Object.create((this.messagePrototype!)); - message.responses = []; - if (value !== undefined) - reflectionMergePartial(this, message, value); - return message; - } - internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Search_Responses): Search_Responses { - let message = target ?? this.create(), end = reader.pos + length; - while (reader.pos < end) { - let [fieldNo, wireType] = reader.tag(); - switch (fieldNo) { - case /* repeated payload.v1.Search.Response responses */ 1: - message.responses.push(Search_Response.internalBinaryRead(reader, reader.uint32(), options)); - break; - default: - let u = options.readUnknownField; - if (u === "throw") - throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); - let d = reader.skip(wireType); - if (u !== false) - (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); - } - } - return message; - } - internalBinaryWrite(message: Search_Responses, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { - /* repeated payload.v1.Search.Response responses = 1; */ - for (let i = 0; i < message.responses.length; i++) - Search_Response.internalBinaryWrite(message.responses[i], writer.tag(1, WireType.LengthDelimited).fork(), options).join(); - let u = options.writeUnknownFields; - if (u !== false) - (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); - return writer; - } -} -/** - * @generated MessageType for protobuf message payload.v1.Search.Responses - */ -export const Search_Responses = new Search_Responses$Type(); -// @generated message type with reflection information, may provide speed optimized methods -class Search_StreamResponse$Type extends MessageType { - constructor() { - super("payload.v1.Search.StreamResponse", [ - { no: 1, name: "response", kind: "message", oneof: "payload", T: () => Search_Response }, - { no: 2, name: "status", kind: "message", oneof: "payload", T: () => Status } - ]); - } - create(value?: PartialMessage): Search_StreamResponse { - const message = globalThis.Object.create((this.messagePrototype!)); - message.payload = { oneofKind: undefined }; - if (value !== undefined) - reflectionMergePartial(this, message, value); - return message; - } - internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Search_StreamResponse): Search_StreamResponse { - let message = target ?? this.create(), end = reader.pos + length; - while (reader.pos < end) { - let [fieldNo, wireType] = reader.tag(); - switch (fieldNo) { - case /* payload.v1.Search.Response response */ 1: - message.payload = { - oneofKind: "response", - response: Search_Response.internalBinaryRead(reader, reader.uint32(), options, (message.payload as any).response) - }; - break; - case /* google.rpc.Status status */ 2: - message.payload = { - oneofKind: "status", - status: Status.internalBinaryRead(reader, reader.uint32(), options, (message.payload as any).status) - }; - break; - default: - let u = options.readUnknownField; - if (u === "throw") - throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); - let d = reader.skip(wireType); - if (u !== false) - (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); - } - } - return message; - } - internalBinaryWrite(message: Search_StreamResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { - /* payload.v1.Search.Response response = 1; */ - if (message.payload.oneofKind === "response") - Search_Response.internalBinaryWrite(message.payload.response, writer.tag(1, WireType.LengthDelimited).fork(), options).join(); - /* google.rpc.Status status = 2; */ - if (message.payload.oneofKind === "status") - Status.internalBinaryWrite(message.payload.status, writer.tag(2, WireType.LengthDelimited).fork(), options).join(); - let u = options.writeUnknownFields; - if (u !== false) - (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); - return writer; - } -} -/** - * @generated MessageType for protobuf message payload.v1.Search.StreamResponse - */ -export const Search_StreamResponse = new Search_StreamResponse$Type(); -// @generated message type with reflection information, may provide speed optimized methods -class Filter$Type extends MessageType { - constructor() { - super("payload.v1.Filter", []); - } - create(value?: PartialMessage): Filter { - const message = globalThis.Object.create((this.messagePrototype!)); - if (value !== undefined) - reflectionMergePartial(this, message, value); - return message; - } - internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Filter): Filter { - return target ?? this.create(); - } - internalBinaryWrite(message: Filter, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { - let u = options.writeUnknownFields; - if (u !== false) - (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); - return writer; - } -} -/** - * @generated MessageType for protobuf message payload.v1.Filter - */ -export const Filter = new Filter$Type(); -// @generated message type with reflection information, may provide speed optimized methods -class Filter_Target$Type extends MessageType { - constructor() { - super("payload.v1.Filter.Target", [ - { no: 1, name: "host", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, - { no: 2, name: "port", kind: "scalar", T: 13 /*ScalarType.UINT32*/ } - ]); - } - create(value?: PartialMessage): Filter_Target { - const message = globalThis.Object.create((this.messagePrototype!)); - message.host = ""; - message.port = 0; - if (value !== undefined) - reflectionMergePartial(this, message, value); - return message; - } - internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Filter_Target): Filter_Target { - let message = target ?? this.create(), end = reader.pos + length; - while (reader.pos < end) { - let [fieldNo, wireType] = reader.tag(); - switch (fieldNo) { - case /* string host */ 1: - message.host = reader.string(); - break; - case /* uint32 port */ 2: - message.port = reader.uint32(); - break; - default: - let u = options.readUnknownField; - if (u === "throw") - throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); - let d = reader.skip(wireType); - if (u !== false) - (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); - } - } - return message; - } - internalBinaryWrite(message: Filter_Target, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { - /* string host = 1; */ - if (message.host !== "") - writer.tag(1, WireType.LengthDelimited).string(message.host); - /* uint32 port = 2; */ - if (message.port !== 0) - writer.tag(2, WireType.Varint).uint32(message.port); - let u = options.writeUnknownFields; - if (u !== false) - (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); - return writer; - } -} -/** - * @generated MessageType for protobuf message payload.v1.Filter.Target - */ -export const Filter_Target = new Filter_Target$Type(); -// @generated message type with reflection information, may provide speed optimized methods -class Filter_Config$Type extends MessageType { - constructor() { - super("payload.v1.Filter.Config", [ - { no: 1, name: "targets", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => Filter_Target } - ]); - } - create(value?: PartialMessage): Filter_Config { - const message = globalThis.Object.create((this.messagePrototype!)); - message.targets = []; - if (value !== undefined) - reflectionMergePartial(this, message, value); - return message; - } - internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Filter_Config): Filter_Config { - let message = target ?? this.create(), end = reader.pos + length; - while (reader.pos < end) { - let [fieldNo, wireType] = reader.tag(); - switch (fieldNo) { - case /* repeated payload.v1.Filter.Target targets */ 1: - message.targets.push(Filter_Target.internalBinaryRead(reader, reader.uint32(), options)); - break; - default: - let u = options.readUnknownField; - if (u === "throw") - throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); - let d = reader.skip(wireType); - if (u !== false) - (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); - } - } - return message; - } - internalBinaryWrite(message: Filter_Config, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { - /* repeated payload.v1.Filter.Target targets = 1; */ - for (let i = 0; i < message.targets.length; i++) - Filter_Target.internalBinaryWrite(message.targets[i], writer.tag(1, WireType.LengthDelimited).fork(), options).join(); - let u = options.writeUnknownFields; - if (u !== false) - (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); - return writer; - } -} -/** - * @generated MessageType for protobuf message payload.v1.Filter.Config - */ -export const Filter_Config = new Filter_Config$Type(); -// @generated message type with reflection information, may provide speed optimized methods -class Insert$Type extends MessageType { - constructor() { - super("payload.v1.Insert", []); - } - create(value?: PartialMessage): Insert { - const message = globalThis.Object.create((this.messagePrototype!)); - if (value !== undefined) - reflectionMergePartial(this, message, value); - return message; - } - internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Insert): Insert { - return target ?? this.create(); - } - internalBinaryWrite(message: Insert, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { - let u = options.writeUnknownFields; - if (u !== false) - (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); - return writer; - } -} -/** - * @generated MessageType for protobuf message payload.v1.Insert - */ -export const Insert = new Insert$Type(); -// @generated message type with reflection information, may provide speed optimized methods -class Insert_Request$Type extends MessageType { - constructor() { - super("payload.v1.Insert.Request", [ - { no: 1, name: "vector", kind: "message", T: () => Object_Vector, options: { "buf.validate.field": { repeated: { minItems: "2" } } } }, - { no: 2, name: "config", kind: "message", T: () => Insert_Config } - ]); - } - create(value?: PartialMessage): Insert_Request { - const message = globalThis.Object.create((this.messagePrototype!)); - if (value !== undefined) - reflectionMergePartial(this, message, value); - return message; - } - internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Insert_Request): Insert_Request { - let message = target ?? this.create(), end = reader.pos + length; - while (reader.pos < end) { - let [fieldNo, wireType] = reader.tag(); - switch (fieldNo) { - case /* payload.v1.Object.Vector vector */ 1: - message.vector = Object_Vector.internalBinaryRead(reader, reader.uint32(), options, message.vector); - break; - case /* payload.v1.Insert.Config config */ 2: - message.config = Insert_Config.internalBinaryRead(reader, reader.uint32(), options, message.config); - break; - default: - let u = options.readUnknownField; - if (u === "throw") - throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); - let d = reader.skip(wireType); - if (u !== false) - (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); - } - } - return message; - } - internalBinaryWrite(message: Insert_Request, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { - /* payload.v1.Object.Vector vector = 1; */ - if (message.vector) - Object_Vector.internalBinaryWrite(message.vector, writer.tag(1, WireType.LengthDelimited).fork(), options).join(); - /* payload.v1.Insert.Config config = 2; */ - if (message.config) - Insert_Config.internalBinaryWrite(message.config, writer.tag(2, WireType.LengthDelimited).fork(), options).join(); - let u = options.writeUnknownFields; - if (u !== false) - (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); - return writer; - } -} -/** - * @generated MessageType for protobuf message payload.v1.Insert.Request - */ -export const Insert_Request = new Insert_Request$Type(); -// @generated message type with reflection information, may provide speed optimized methods -class Insert_MultiRequest$Type extends MessageType { - constructor() { - super("payload.v1.Insert.MultiRequest", [ - { no: 1, name: "requests", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => Insert_Request } - ]); - } - create(value?: PartialMessage): Insert_MultiRequest { - const message = globalThis.Object.create((this.messagePrototype!)); - message.requests = []; - if (value !== undefined) - reflectionMergePartial(this, message, value); - return message; - } - internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Insert_MultiRequest): Insert_MultiRequest { - let message = target ?? this.create(), end = reader.pos + length; - while (reader.pos < end) { - let [fieldNo, wireType] = reader.tag(); - switch (fieldNo) { - case /* repeated payload.v1.Insert.Request requests */ 1: - message.requests.push(Insert_Request.internalBinaryRead(reader, reader.uint32(), options)); - break; - default: - let u = options.readUnknownField; - if (u === "throw") - throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); - let d = reader.skip(wireType); - if (u !== false) - (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); - } - } - return message; - } - internalBinaryWrite(message: Insert_MultiRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { - /* repeated payload.v1.Insert.Request requests = 1; */ - for (let i = 0; i < message.requests.length; i++) - Insert_Request.internalBinaryWrite(message.requests[i], writer.tag(1, WireType.LengthDelimited).fork(), options).join(); - let u = options.writeUnknownFields; - if (u !== false) - (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); - return writer; - } -} -/** - * @generated MessageType for protobuf message payload.v1.Insert.MultiRequest - */ -export const Insert_MultiRequest = new Insert_MultiRequest$Type(); -// @generated message type with reflection information, may provide speed optimized methods -class Insert_ObjectRequest$Type extends MessageType { - constructor() { - super("payload.v1.Insert.ObjectRequest", [ - { no: 1, name: "object", kind: "message", T: () => Object_Blob }, - { no: 2, name: "config", kind: "message", T: () => Insert_Config }, - { no: 3, name: "vectorizer", kind: "message", T: () => Filter_Target } - ]); - } - create(value?: PartialMessage): Insert_ObjectRequest { - const message = globalThis.Object.create((this.messagePrototype!)); - if (value !== undefined) - reflectionMergePartial(this, message, value); - return message; - } - internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Insert_ObjectRequest): Insert_ObjectRequest { - let message = target ?? this.create(), end = reader.pos + length; - while (reader.pos < end) { - let [fieldNo, wireType] = reader.tag(); - switch (fieldNo) { - case /* payload.v1.Object.Blob object */ 1: - message.object = Object_Blob.internalBinaryRead(reader, reader.uint32(), options, message.object); - break; - case /* payload.v1.Insert.Config config */ 2: - message.config = Insert_Config.internalBinaryRead(reader, reader.uint32(), options, message.config); - break; - case /* payload.v1.Filter.Target vectorizer */ 3: - message.vectorizer = Filter_Target.internalBinaryRead(reader, reader.uint32(), options, message.vectorizer); - break; - default: - let u = options.readUnknownField; - if (u === "throw") - throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); - let d = reader.skip(wireType); - if (u !== false) - (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); - } - } - return message; - } - internalBinaryWrite(message: Insert_ObjectRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { - /* payload.v1.Object.Blob object = 1; */ - if (message.object) - Object_Blob.internalBinaryWrite(message.object, writer.tag(1, WireType.LengthDelimited).fork(), options).join(); - /* payload.v1.Insert.Config config = 2; */ - if (message.config) - Insert_Config.internalBinaryWrite(message.config, writer.tag(2, WireType.LengthDelimited).fork(), options).join(); - /* payload.v1.Filter.Target vectorizer = 3; */ - if (message.vectorizer) - Filter_Target.internalBinaryWrite(message.vectorizer, writer.tag(3, WireType.LengthDelimited).fork(), options).join(); - let u = options.writeUnknownFields; - if (u !== false) - (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); - return writer; - } -} -/** - * @generated MessageType for protobuf message payload.v1.Insert.ObjectRequest - */ -export const Insert_ObjectRequest = new Insert_ObjectRequest$Type(); -// @generated message type with reflection information, may provide speed optimized methods -class Insert_MultiObjectRequest$Type extends MessageType { - constructor() { - super("payload.v1.Insert.MultiObjectRequest", [ - { no: 1, name: "requests", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => Insert_ObjectRequest } - ]); - } - create(value?: PartialMessage): Insert_MultiObjectRequest { - const message = globalThis.Object.create((this.messagePrototype!)); - message.requests = []; - if (value !== undefined) - reflectionMergePartial(this, message, value); - return message; - } - internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Insert_MultiObjectRequest): Insert_MultiObjectRequest { - let message = target ?? this.create(), end = reader.pos + length; - while (reader.pos < end) { - let [fieldNo, wireType] = reader.tag(); - switch (fieldNo) { - case /* repeated payload.v1.Insert.ObjectRequest requests */ 1: - message.requests.push(Insert_ObjectRequest.internalBinaryRead(reader, reader.uint32(), options)); - break; - default: - let u = options.readUnknownField; - if (u === "throw") - throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); - let d = reader.skip(wireType); - if (u !== false) - (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); - } - } - return message; - } - internalBinaryWrite(message: Insert_MultiObjectRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { - /* repeated payload.v1.Insert.ObjectRequest requests = 1; */ - for (let i = 0; i < message.requests.length; i++) - Insert_ObjectRequest.internalBinaryWrite(message.requests[i], writer.tag(1, WireType.LengthDelimited).fork(), options).join(); - let u = options.writeUnknownFields; - if (u !== false) - (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); - return writer; - } -} -/** - * @generated MessageType for protobuf message payload.v1.Insert.MultiObjectRequest - */ -export const Insert_MultiObjectRequest = new Insert_MultiObjectRequest$Type(); -// @generated message type with reflection information, may provide speed optimized methods -class Insert_Config$Type extends MessageType { - constructor() { - super("payload.v1.Insert.Config", [ - { no: 1, name: "skip_strict_exist_check", kind: "scalar", localName: "skip_strict_exist_check", T: 8 /*ScalarType.BOOL*/ }, - { no: 2, name: "filters", kind: "message", T: () => Filter_Config }, - { no: 3, name: "timestamp", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 0 /*LongType.BIGINT*/ } - ]); - } - create(value?: PartialMessage): Insert_Config { - const message = globalThis.Object.create((this.messagePrototype!)); - message.skip_strict_exist_check = false; - message.timestamp = 0n; - if (value !== undefined) - reflectionMergePartial(this, message, value); - return message; - } - internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Insert_Config): Insert_Config { - let message = target ?? this.create(), end = reader.pos + length; - while (reader.pos < end) { - let [fieldNo, wireType] = reader.tag(); - switch (fieldNo) { - case /* bool skip_strict_exist_check */ 1: - message.skip_strict_exist_check = reader.bool(); - break; - case /* payload.v1.Filter.Config filters */ 2: - message.filters = Filter_Config.internalBinaryRead(reader, reader.uint32(), options, message.filters); - break; - case /* int64 timestamp */ 3: - message.timestamp = reader.int64().toBigInt(); - break; - default: - let u = options.readUnknownField; - if (u === "throw") - throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); - let d = reader.skip(wireType); - if (u !== false) - (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); - } - } - return message; - } - internalBinaryWrite(message: Insert_Config, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { - /* bool skip_strict_exist_check = 1; */ - if (message.skip_strict_exist_check !== false) - writer.tag(1, WireType.Varint).bool(message.skip_strict_exist_check); - /* payload.v1.Filter.Config filters = 2; */ - if (message.filters) - Filter_Config.internalBinaryWrite(message.filters, writer.tag(2, WireType.LengthDelimited).fork(), options).join(); - /* int64 timestamp = 3; */ - if (message.timestamp !== 0n) - writer.tag(3, WireType.Varint).int64(message.timestamp); - let u = options.writeUnknownFields; - if (u !== false) - (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); - return writer; - } -} -/** - * @generated MessageType for protobuf message payload.v1.Insert.Config - */ -export const Insert_Config = new Insert_Config$Type(); -// @generated message type with reflection information, may provide speed optimized methods -class Update$Type extends MessageType { - constructor() { - super("payload.v1.Update", []); - } - create(value?: PartialMessage): Update { - const message = globalThis.Object.create((this.messagePrototype!)); - if (value !== undefined) - reflectionMergePartial(this, message, value); - return message; - } - internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Update): Update { - return target ?? this.create(); - } - internalBinaryWrite(message: Update, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { - let u = options.writeUnknownFields; - if (u !== false) - (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); - return writer; - } -} -/** - * @generated MessageType for protobuf message payload.v1.Update - */ -export const Update = new Update$Type(); -// @generated message type with reflection information, may provide speed optimized methods -class Update_Request$Type extends MessageType { - constructor() { - super("payload.v1.Update.Request", [ - { no: 1, name: "vector", kind: "message", T: () => Object_Vector, options: { "buf.validate.field": { repeated: { minItems: "2" } } } }, - { no: 2, name: "config", kind: "message", T: () => Update_Config } - ]); - } - create(value?: PartialMessage): Update_Request { - const message = globalThis.Object.create((this.messagePrototype!)); - if (value !== undefined) - reflectionMergePartial(this, message, value); - return message; - } - internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Update_Request): Update_Request { - let message = target ?? this.create(), end = reader.pos + length; - while (reader.pos < end) { - let [fieldNo, wireType] = reader.tag(); - switch (fieldNo) { - case /* payload.v1.Object.Vector vector */ 1: - message.vector = Object_Vector.internalBinaryRead(reader, reader.uint32(), options, message.vector); - break; - case /* payload.v1.Update.Config config */ 2: - message.config = Update_Config.internalBinaryRead(reader, reader.uint32(), options, message.config); - break; - default: - let u = options.readUnknownField; - if (u === "throw") - throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); - let d = reader.skip(wireType); - if (u !== false) - (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); - } - } - return message; - } - internalBinaryWrite(message: Update_Request, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { - /* payload.v1.Object.Vector vector = 1; */ - if (message.vector) - Object_Vector.internalBinaryWrite(message.vector, writer.tag(1, WireType.LengthDelimited).fork(), options).join(); - /* payload.v1.Update.Config config = 2; */ - if (message.config) - Update_Config.internalBinaryWrite(message.config, writer.tag(2, WireType.LengthDelimited).fork(), options).join(); - let u = options.writeUnknownFields; - if (u !== false) - (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); - return writer; - } -} -/** - * @generated MessageType for protobuf message payload.v1.Update.Request - */ -export const Update_Request = new Update_Request$Type(); -// @generated message type with reflection information, may provide speed optimized methods -class Update_MultiRequest$Type extends MessageType { - constructor() { - super("payload.v1.Update.MultiRequest", [ - { no: 1, name: "requests", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => Update_Request } - ]); - } - create(value?: PartialMessage): Update_MultiRequest { - const message = globalThis.Object.create((this.messagePrototype!)); - message.requests = []; - if (value !== undefined) - reflectionMergePartial(this, message, value); - return message; - } - internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Update_MultiRequest): Update_MultiRequest { - let message = target ?? this.create(), end = reader.pos + length; - while (reader.pos < end) { - let [fieldNo, wireType] = reader.tag(); - switch (fieldNo) { - case /* repeated payload.v1.Update.Request requests */ 1: - message.requests.push(Update_Request.internalBinaryRead(reader, reader.uint32(), options)); - break; - default: - let u = options.readUnknownField; - if (u === "throw") - throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); - let d = reader.skip(wireType); - if (u !== false) - (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); - } - } - return message; - } - internalBinaryWrite(message: Update_MultiRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { - /* repeated payload.v1.Update.Request requests = 1; */ - for (let i = 0; i < message.requests.length; i++) - Update_Request.internalBinaryWrite(message.requests[i], writer.tag(1, WireType.LengthDelimited).fork(), options).join(); - let u = options.writeUnknownFields; - if (u !== false) - (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); - return writer; - } -} -/** - * @generated MessageType for protobuf message payload.v1.Update.MultiRequest - */ -export const Update_MultiRequest = new Update_MultiRequest$Type(); -// @generated message type with reflection information, may provide speed optimized methods -class Update_ObjectRequest$Type extends MessageType { - constructor() { - super("payload.v1.Update.ObjectRequest", [ - { no: 1, name: "object", kind: "message", T: () => Object_Blob }, - { no: 2, name: "config", kind: "message", T: () => Update_Config }, - { no: 3, name: "vectorizer", kind: "message", T: () => Filter_Target } - ]); - } - create(value?: PartialMessage): Update_ObjectRequest { - const message = globalThis.Object.create((this.messagePrototype!)); - if (value !== undefined) - reflectionMergePartial(this, message, value); - return message; - } - internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Update_ObjectRequest): Update_ObjectRequest { - let message = target ?? this.create(), end = reader.pos + length; - while (reader.pos < end) { - let [fieldNo, wireType] = reader.tag(); - switch (fieldNo) { - case /* payload.v1.Object.Blob object */ 1: - message.object = Object_Blob.internalBinaryRead(reader, reader.uint32(), options, message.object); - break; - case /* payload.v1.Update.Config config */ 2: - message.config = Update_Config.internalBinaryRead(reader, reader.uint32(), options, message.config); - break; - case /* payload.v1.Filter.Target vectorizer */ 3: - message.vectorizer = Filter_Target.internalBinaryRead(reader, reader.uint32(), options, message.vectorizer); - break; - default: - let u = options.readUnknownField; - if (u === "throw") - throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); - let d = reader.skip(wireType); - if (u !== false) - (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); - } - } - return message; - } - internalBinaryWrite(message: Update_ObjectRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { - /* payload.v1.Object.Blob object = 1; */ - if (message.object) - Object_Blob.internalBinaryWrite(message.object, writer.tag(1, WireType.LengthDelimited).fork(), options).join(); - /* payload.v1.Update.Config config = 2; */ - if (message.config) - Update_Config.internalBinaryWrite(message.config, writer.tag(2, WireType.LengthDelimited).fork(), options).join(); - /* payload.v1.Filter.Target vectorizer = 3; */ - if (message.vectorizer) - Filter_Target.internalBinaryWrite(message.vectorizer, writer.tag(3, WireType.LengthDelimited).fork(), options).join(); - let u = options.writeUnknownFields; - if (u !== false) - (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); - return writer; - } -} -/** - * @generated MessageType for protobuf message payload.v1.Update.ObjectRequest - */ -export const Update_ObjectRequest = new Update_ObjectRequest$Type(); -// @generated message type with reflection information, may provide speed optimized methods -class Update_MultiObjectRequest$Type extends MessageType { - constructor() { - super("payload.v1.Update.MultiObjectRequest", [ - { no: 1, name: "requests", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => Update_ObjectRequest } - ]); - } - create(value?: PartialMessage): Update_MultiObjectRequest { - const message = globalThis.Object.create((this.messagePrototype!)); - message.requests = []; - if (value !== undefined) - reflectionMergePartial(this, message, value); - return message; - } - internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Update_MultiObjectRequest): Update_MultiObjectRequest { - let message = target ?? this.create(), end = reader.pos + length; - while (reader.pos < end) { - let [fieldNo, wireType] = reader.tag(); - switch (fieldNo) { - case /* repeated payload.v1.Update.ObjectRequest requests */ 1: - message.requests.push(Update_ObjectRequest.internalBinaryRead(reader, reader.uint32(), options)); - break; - default: - let u = options.readUnknownField; - if (u === "throw") - throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); - let d = reader.skip(wireType); - if (u !== false) - (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); - } - } - return message; - } - internalBinaryWrite(message: Update_MultiObjectRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { - /* repeated payload.v1.Update.ObjectRequest requests = 1; */ - for (let i = 0; i < message.requests.length; i++) - Update_ObjectRequest.internalBinaryWrite(message.requests[i], writer.tag(1, WireType.LengthDelimited).fork(), options).join(); - let u = options.writeUnknownFields; - if (u !== false) - (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); - return writer; - } -} -/** - * @generated MessageType for protobuf message payload.v1.Update.MultiObjectRequest - */ -export const Update_MultiObjectRequest = new Update_MultiObjectRequest$Type(); -// @generated message type with reflection information, may provide speed optimized methods -class Update_Config$Type extends MessageType { - constructor() { - super("payload.v1.Update.Config", [ - { no: 1, name: "skip_strict_exist_check", kind: "scalar", localName: "skip_strict_exist_check", T: 8 /*ScalarType.BOOL*/ }, - { no: 2, name: "filters", kind: "message", T: () => Filter_Config }, - { no: 3, name: "timestamp", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 0 /*LongType.BIGINT*/ }, - { no: 4, name: "disable_balanced_update", kind: "scalar", localName: "disable_balanced_update", T: 8 /*ScalarType.BOOL*/ } - ]); - } - create(value?: PartialMessage): Update_Config { - const message = globalThis.Object.create((this.messagePrototype!)); - message.skip_strict_exist_check = false; - message.timestamp = 0n; - message.disable_balanced_update = false; - if (value !== undefined) - reflectionMergePartial(this, message, value); - return message; - } - internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Update_Config): Update_Config { - let message = target ?? this.create(), end = reader.pos + length; - while (reader.pos < end) { - let [fieldNo, wireType] = reader.tag(); - switch (fieldNo) { - case /* bool skip_strict_exist_check */ 1: - message.skip_strict_exist_check = reader.bool(); - break; - case /* payload.v1.Filter.Config filters */ 2: - message.filters = Filter_Config.internalBinaryRead(reader, reader.uint32(), options, message.filters); - break; - case /* int64 timestamp */ 3: - message.timestamp = reader.int64().toBigInt(); - break; - case /* bool disable_balanced_update */ 4: - message.disable_balanced_update = reader.bool(); - break; - default: - let u = options.readUnknownField; - if (u === "throw") - throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); - let d = reader.skip(wireType); - if (u !== false) - (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); - } - } - return message; - } - internalBinaryWrite(message: Update_Config, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { - /* bool skip_strict_exist_check = 1; */ - if (message.skip_strict_exist_check !== false) - writer.tag(1, WireType.Varint).bool(message.skip_strict_exist_check); - /* payload.v1.Filter.Config filters = 2; */ - if (message.filters) - Filter_Config.internalBinaryWrite(message.filters, writer.tag(2, WireType.LengthDelimited).fork(), options).join(); - /* int64 timestamp = 3; */ - if (message.timestamp !== 0n) - writer.tag(3, WireType.Varint).int64(message.timestamp); - /* bool disable_balanced_update = 4; */ - if (message.disable_balanced_update !== false) - writer.tag(4, WireType.Varint).bool(message.disable_balanced_update); - let u = options.writeUnknownFields; - if (u !== false) - (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); - return writer; - } -} -/** - * @generated MessageType for protobuf message payload.v1.Update.Config - */ -export const Update_Config = new Update_Config$Type(); -// @generated message type with reflection information, may provide speed optimized methods -class Upsert$Type extends MessageType { - constructor() { - super("payload.v1.Upsert", []); - } - create(value?: PartialMessage): Upsert { - const message = globalThis.Object.create((this.messagePrototype!)); - if (value !== undefined) - reflectionMergePartial(this, message, value); - return message; - } - internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Upsert): Upsert { - return target ?? this.create(); - } - internalBinaryWrite(message: Upsert, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { - let u = options.writeUnknownFields; - if (u !== false) - (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); - return writer; - } -} -/** - * @generated MessageType for protobuf message payload.v1.Upsert - */ -export const Upsert = new Upsert$Type(); -// @generated message type with reflection information, may provide speed optimized methods -class Upsert_Request$Type extends MessageType { - constructor() { - super("payload.v1.Upsert.Request", [ - { no: 1, name: "vector", kind: "message", T: () => Object_Vector, options: { "buf.validate.field": { repeated: { minItems: "2" } } } }, - { no: 2, name: "config", kind: "message", T: () => Upsert_Config } - ]); - } - create(value?: PartialMessage): Upsert_Request { - const message = globalThis.Object.create((this.messagePrototype!)); - if (value !== undefined) - reflectionMergePartial(this, message, value); - return message; - } - internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Upsert_Request): Upsert_Request { - let message = target ?? this.create(), end = reader.pos + length; - while (reader.pos < end) { - let [fieldNo, wireType] = reader.tag(); - switch (fieldNo) { - case /* payload.v1.Object.Vector vector */ 1: - message.vector = Object_Vector.internalBinaryRead(reader, reader.uint32(), options, message.vector); - break; - case /* payload.v1.Upsert.Config config */ 2: - message.config = Upsert_Config.internalBinaryRead(reader, reader.uint32(), options, message.config); - break; - default: - let u = options.readUnknownField; - if (u === "throw") - throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); - let d = reader.skip(wireType); - if (u !== false) - (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); - } - } - return message; - } - internalBinaryWrite(message: Upsert_Request, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { - /* payload.v1.Object.Vector vector = 1; */ - if (message.vector) - Object_Vector.internalBinaryWrite(message.vector, writer.tag(1, WireType.LengthDelimited).fork(), options).join(); - /* payload.v1.Upsert.Config config = 2; */ - if (message.config) - Upsert_Config.internalBinaryWrite(message.config, writer.tag(2, WireType.LengthDelimited).fork(), options).join(); - let u = options.writeUnknownFields; - if (u !== false) - (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); - return writer; - } -} -/** - * @generated MessageType for protobuf message payload.v1.Upsert.Request - */ -export const Upsert_Request = new Upsert_Request$Type(); -// @generated message type with reflection information, may provide speed optimized methods -class Upsert_MultiRequest$Type extends MessageType { - constructor() { - super("payload.v1.Upsert.MultiRequest", [ - { no: 1, name: "requests", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => Upsert_Request } - ]); - } - create(value?: PartialMessage): Upsert_MultiRequest { - const message = globalThis.Object.create((this.messagePrototype!)); - message.requests = []; - if (value !== undefined) - reflectionMergePartial(this, message, value); - return message; - } - internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Upsert_MultiRequest): Upsert_MultiRequest { - let message = target ?? this.create(), end = reader.pos + length; - while (reader.pos < end) { - let [fieldNo, wireType] = reader.tag(); - switch (fieldNo) { - case /* repeated payload.v1.Upsert.Request requests */ 1: - message.requests.push(Upsert_Request.internalBinaryRead(reader, reader.uint32(), options)); - break; - default: - let u = options.readUnknownField; - if (u === "throw") - throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); - let d = reader.skip(wireType); - if (u !== false) - (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); - } - } - return message; - } - internalBinaryWrite(message: Upsert_MultiRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { - /* repeated payload.v1.Upsert.Request requests = 1; */ - for (let i = 0; i < message.requests.length; i++) - Upsert_Request.internalBinaryWrite(message.requests[i], writer.tag(1, WireType.LengthDelimited).fork(), options).join(); - let u = options.writeUnknownFields; - if (u !== false) - (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); - return writer; - } -} -/** - * @generated MessageType for protobuf message payload.v1.Upsert.MultiRequest - */ -export const Upsert_MultiRequest = new Upsert_MultiRequest$Type(); -// @generated message type with reflection information, may provide speed optimized methods -class Upsert_ObjectRequest$Type extends MessageType { - constructor() { - super("payload.v1.Upsert.ObjectRequest", [ - { no: 1, name: "object", kind: "message", T: () => Object_Blob }, - { no: 2, name: "config", kind: "message", T: () => Upsert_Config }, - { no: 3, name: "vectorizer", kind: "message", T: () => Filter_Target } - ]); - } - create(value?: PartialMessage): Upsert_ObjectRequest { - const message = globalThis.Object.create((this.messagePrototype!)); - if (value !== undefined) - reflectionMergePartial(this, message, value); - return message; - } - internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Upsert_ObjectRequest): Upsert_ObjectRequest { - let message = target ?? this.create(), end = reader.pos + length; - while (reader.pos < end) { - let [fieldNo, wireType] = reader.tag(); - switch (fieldNo) { - case /* payload.v1.Object.Blob object */ 1: - message.object = Object_Blob.internalBinaryRead(reader, reader.uint32(), options, message.object); - break; - case /* payload.v1.Upsert.Config config */ 2: - message.config = Upsert_Config.internalBinaryRead(reader, reader.uint32(), options, message.config); - break; - case /* payload.v1.Filter.Target vectorizer */ 3: - message.vectorizer = Filter_Target.internalBinaryRead(reader, reader.uint32(), options, message.vectorizer); - break; - default: - let u = options.readUnknownField; - if (u === "throw") - throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); - let d = reader.skip(wireType); - if (u !== false) - (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); - } - } - return message; - } - internalBinaryWrite(message: Upsert_ObjectRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { - /* payload.v1.Object.Blob object = 1; */ - if (message.object) - Object_Blob.internalBinaryWrite(message.object, writer.tag(1, WireType.LengthDelimited).fork(), options).join(); - /* payload.v1.Upsert.Config config = 2; */ - if (message.config) - Upsert_Config.internalBinaryWrite(message.config, writer.tag(2, WireType.LengthDelimited).fork(), options).join(); - /* payload.v1.Filter.Target vectorizer = 3; */ - if (message.vectorizer) - Filter_Target.internalBinaryWrite(message.vectorizer, writer.tag(3, WireType.LengthDelimited).fork(), options).join(); - let u = options.writeUnknownFields; - if (u !== false) - (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); - return writer; - } -} -/** - * @generated MessageType for protobuf message payload.v1.Upsert.ObjectRequest - */ -export const Upsert_ObjectRequest = new Upsert_ObjectRequest$Type(); -// @generated message type with reflection information, may provide speed optimized methods -class Upsert_MultiObjectRequest$Type extends MessageType { - constructor() { - super("payload.v1.Upsert.MultiObjectRequest", [ - { no: 1, name: "requests", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => Upsert_ObjectRequest } - ]); - } - create(value?: PartialMessage): Upsert_MultiObjectRequest { - const message = globalThis.Object.create((this.messagePrototype!)); - message.requests = []; - if (value !== undefined) - reflectionMergePartial(this, message, value); - return message; - } - internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Upsert_MultiObjectRequest): Upsert_MultiObjectRequest { - let message = target ?? this.create(), end = reader.pos + length; - while (reader.pos < end) { - let [fieldNo, wireType] = reader.tag(); - switch (fieldNo) { - case /* repeated payload.v1.Upsert.ObjectRequest requests */ 1: - message.requests.push(Upsert_ObjectRequest.internalBinaryRead(reader, reader.uint32(), options)); - break; - default: - let u = options.readUnknownField; - if (u === "throw") - throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); - let d = reader.skip(wireType); - if (u !== false) - (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); - } - } - return message; - } - internalBinaryWrite(message: Upsert_MultiObjectRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { - /* repeated payload.v1.Upsert.ObjectRequest requests = 1; */ - for (let i = 0; i < message.requests.length; i++) - Upsert_ObjectRequest.internalBinaryWrite(message.requests[i], writer.tag(1, WireType.LengthDelimited).fork(), options).join(); - let u = options.writeUnknownFields; - if (u !== false) - (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); - return writer; - } -} -/** - * @generated MessageType for protobuf message payload.v1.Upsert.MultiObjectRequest - */ -export const Upsert_MultiObjectRequest = new Upsert_MultiObjectRequest$Type(); -// @generated message type with reflection information, may provide speed optimized methods -class Upsert_Config$Type extends MessageType { - constructor() { - super("payload.v1.Upsert.Config", [ - { no: 1, name: "skip_strict_exist_check", kind: "scalar", localName: "skip_strict_exist_check", T: 8 /*ScalarType.BOOL*/ }, - { no: 2, name: "filters", kind: "message", T: () => Filter_Config }, - { no: 3, name: "timestamp", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 0 /*LongType.BIGINT*/ }, - { no: 4, name: "disable_balanced_update", kind: "scalar", localName: "disable_balanced_update", T: 8 /*ScalarType.BOOL*/ } - ]); - } - create(value?: PartialMessage): Upsert_Config { - const message = globalThis.Object.create((this.messagePrototype!)); - message.skip_strict_exist_check = false; - message.timestamp = 0n; - message.disable_balanced_update = false; - if (value !== undefined) - reflectionMergePartial(this, message, value); - return message; - } - internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Upsert_Config): Upsert_Config { - let message = target ?? this.create(), end = reader.pos + length; - while (reader.pos < end) { - let [fieldNo, wireType] = reader.tag(); - switch (fieldNo) { - case /* bool skip_strict_exist_check */ 1: - message.skip_strict_exist_check = reader.bool(); - break; - case /* payload.v1.Filter.Config filters */ 2: - message.filters = Filter_Config.internalBinaryRead(reader, reader.uint32(), options, message.filters); - break; - case /* int64 timestamp */ 3: - message.timestamp = reader.int64().toBigInt(); - break; - case /* bool disable_balanced_update */ 4: - message.disable_balanced_update = reader.bool(); - break; - default: - let u = options.readUnknownField; - if (u === "throw") - throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); - let d = reader.skip(wireType); - if (u !== false) - (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); - } - } - return message; - } - internalBinaryWrite(message: Upsert_Config, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { - /* bool skip_strict_exist_check = 1; */ - if (message.skip_strict_exist_check !== false) - writer.tag(1, WireType.Varint).bool(message.skip_strict_exist_check); - /* payload.v1.Filter.Config filters = 2; */ - if (message.filters) - Filter_Config.internalBinaryWrite(message.filters, writer.tag(2, WireType.LengthDelimited).fork(), options).join(); - /* int64 timestamp = 3; */ - if (message.timestamp !== 0n) - writer.tag(3, WireType.Varint).int64(message.timestamp); - /* bool disable_balanced_update = 4; */ - if (message.disable_balanced_update !== false) - writer.tag(4, WireType.Varint).bool(message.disable_balanced_update); - let u = options.writeUnknownFields; - if (u !== false) - (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); - return writer; - } -} -/** - * @generated MessageType for protobuf message payload.v1.Upsert.Config - */ -export const Upsert_Config = new Upsert_Config$Type(); -// @generated message type with reflection information, may provide speed optimized methods -class Remove$Type extends MessageType { - constructor() { - super("payload.v1.Remove", []); - } - create(value?: PartialMessage): Remove { - const message = globalThis.Object.create((this.messagePrototype!)); - if (value !== undefined) - reflectionMergePartial(this, message, value); - return message; - } - internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Remove): Remove { - return target ?? this.create(); - } - internalBinaryWrite(message: Remove, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { - let u = options.writeUnknownFields; - if (u !== false) - (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); - return writer; - } -} -/** - * @generated MessageType for protobuf message payload.v1.Remove - */ -export const Remove = new Remove$Type(); -// @generated message type with reflection information, may provide speed optimized methods -class Remove_Request$Type extends MessageType { - constructor() { - super("payload.v1.Remove.Request", [ - { no: 1, name: "id", kind: "message", T: () => Object_ID }, - { no: 2, name: "config", kind: "message", T: () => Remove_Config } - ]); - } - create(value?: PartialMessage): Remove_Request { - const message = globalThis.Object.create((this.messagePrototype!)); - if (value !== undefined) - reflectionMergePartial(this, message, value); - return message; - } - internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Remove_Request): Remove_Request { - let message = target ?? this.create(), end = reader.pos + length; - while (reader.pos < end) { - let [fieldNo, wireType] = reader.tag(); - switch (fieldNo) { - case /* payload.v1.Object.ID id */ 1: - message.id = Object_ID.internalBinaryRead(reader, reader.uint32(), options, message.id); - break; - case /* payload.v1.Remove.Config config */ 2: - message.config = Remove_Config.internalBinaryRead(reader, reader.uint32(), options, message.config); - break; - default: - let u = options.readUnknownField; - if (u === "throw") - throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); - let d = reader.skip(wireType); - if (u !== false) - (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); - } - } - return message; - } - internalBinaryWrite(message: Remove_Request, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { - /* payload.v1.Object.ID id = 1; */ - if (message.id) - Object_ID.internalBinaryWrite(message.id, writer.tag(1, WireType.LengthDelimited).fork(), options).join(); - /* payload.v1.Remove.Config config = 2; */ - if (message.config) - Remove_Config.internalBinaryWrite(message.config, writer.tag(2, WireType.LengthDelimited).fork(), options).join(); - let u = options.writeUnknownFields; - if (u !== false) - (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); - return writer; - } -} -/** - * @generated MessageType for protobuf message payload.v1.Remove.Request - */ -export const Remove_Request = new Remove_Request$Type(); -// @generated message type with reflection information, may provide speed optimized methods -class Remove_MultiRequest$Type extends MessageType { - constructor() { - super("payload.v1.Remove.MultiRequest", [ - { no: 1, name: "requests", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => Remove_Request } - ]); - } - create(value?: PartialMessage): Remove_MultiRequest { - const message = globalThis.Object.create((this.messagePrototype!)); - message.requests = []; - if (value !== undefined) - reflectionMergePartial(this, message, value); - return message; - } - internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Remove_MultiRequest): Remove_MultiRequest { - let message = target ?? this.create(), end = reader.pos + length; - while (reader.pos < end) { - let [fieldNo, wireType] = reader.tag(); - switch (fieldNo) { - case /* repeated payload.v1.Remove.Request requests */ 1: - message.requests.push(Remove_Request.internalBinaryRead(reader, reader.uint32(), options)); - break; - default: - let u = options.readUnknownField; - if (u === "throw") - throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); - let d = reader.skip(wireType); - if (u !== false) - (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); - } - } - return message; - } - internalBinaryWrite(message: Remove_MultiRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { - /* repeated payload.v1.Remove.Request requests = 1; */ - for (let i = 0; i < message.requests.length; i++) - Remove_Request.internalBinaryWrite(message.requests[i], writer.tag(1, WireType.LengthDelimited).fork(), options).join(); - let u = options.writeUnknownFields; - if (u !== false) - (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); - return writer; - } -} -/** - * @generated MessageType for protobuf message payload.v1.Remove.MultiRequest - */ -export const Remove_MultiRequest = new Remove_MultiRequest$Type(); -// @generated message type with reflection information, may provide speed optimized methods -class Remove_TimestampRequest$Type extends MessageType { - constructor() { - super("payload.v1.Remove.TimestampRequest", [ - { no: 1, name: "timestamps", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => Remove_Timestamp } - ]); - } - create(value?: PartialMessage): Remove_TimestampRequest { - const message = globalThis.Object.create((this.messagePrototype!)); - message.timestamps = []; - if (value !== undefined) - reflectionMergePartial(this, message, value); - return message; - } - internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Remove_TimestampRequest): Remove_TimestampRequest { - let message = target ?? this.create(), end = reader.pos + length; - while (reader.pos < end) { - let [fieldNo, wireType] = reader.tag(); - switch (fieldNo) { - case /* repeated payload.v1.Remove.Timestamp timestamps */ 1: - message.timestamps.push(Remove_Timestamp.internalBinaryRead(reader, reader.uint32(), options)); - break; - default: - let u = options.readUnknownField; - if (u === "throw") - throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); - let d = reader.skip(wireType); - if (u !== false) - (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); - } - } - return message; - } - internalBinaryWrite(message: Remove_TimestampRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { - /* repeated payload.v1.Remove.Timestamp timestamps = 1; */ - for (let i = 0; i < message.timestamps.length; i++) - Remove_Timestamp.internalBinaryWrite(message.timestamps[i], writer.tag(1, WireType.LengthDelimited).fork(), options).join(); - let u = options.writeUnknownFields; - if (u !== false) - (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); - return writer; - } -} -/** - * @generated MessageType for protobuf message payload.v1.Remove.TimestampRequest - */ -export const Remove_TimestampRequest = new Remove_TimestampRequest$Type(); -// @generated message type with reflection information, may provide speed optimized methods -class Remove_Timestamp$Type extends MessageType { - constructor() { - super("payload.v1.Remove.Timestamp", [ - { no: 1, name: "timestamp", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 0 /*LongType.BIGINT*/ }, - { no: 2, name: "operator", kind: "enum", T: () => ["payload.v1.Remove.Timestamp.Operator", Remove_Timestamp_Operator] } - ]); - } - create(value?: PartialMessage): Remove_Timestamp { - const message = globalThis.Object.create((this.messagePrototype!)); - message.timestamp = 0n; - message.operator = 0; - if (value !== undefined) - reflectionMergePartial(this, message, value); - return message; - } - internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Remove_Timestamp): Remove_Timestamp { - let message = target ?? this.create(), end = reader.pos + length; - while (reader.pos < end) { - let [fieldNo, wireType] = reader.tag(); - switch (fieldNo) { - case /* int64 timestamp */ 1: - message.timestamp = reader.int64().toBigInt(); - break; - case /* payload.v1.Remove.Timestamp.Operator operator */ 2: - message.operator = reader.int32(); - break; - default: - let u = options.readUnknownField; - if (u === "throw") - throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); - let d = reader.skip(wireType); - if (u !== false) - (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); - } - } - return message; - } - internalBinaryWrite(message: Remove_Timestamp, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { - /* int64 timestamp = 1; */ - if (message.timestamp !== 0n) - writer.tag(1, WireType.Varint).int64(message.timestamp); - /* payload.v1.Remove.Timestamp.Operator operator = 2; */ - if (message.operator !== 0) - writer.tag(2, WireType.Varint).int32(message.operator); - let u = options.writeUnknownFields; - if (u !== false) - (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); - return writer; - } -} -/** - * @generated MessageType for protobuf message payload.v1.Remove.Timestamp - */ -export const Remove_Timestamp = new Remove_Timestamp$Type(); -// @generated message type with reflection information, may provide speed optimized methods -class Remove_Config$Type extends MessageType { - constructor() { - super("payload.v1.Remove.Config", [ - { no: 1, name: "skip_strict_exist_check", kind: "scalar", localName: "skip_strict_exist_check", T: 8 /*ScalarType.BOOL*/ }, - { no: 3, name: "timestamp", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 0 /*LongType.BIGINT*/ } - ]); - } - create(value?: PartialMessage): Remove_Config { - const message = globalThis.Object.create((this.messagePrototype!)); - message.skip_strict_exist_check = false; - message.timestamp = 0n; - if (value !== undefined) - reflectionMergePartial(this, message, value); - return message; - } - internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Remove_Config): Remove_Config { - let message = target ?? this.create(), end = reader.pos + length; - while (reader.pos < end) { - let [fieldNo, wireType] = reader.tag(); - switch (fieldNo) { - case /* bool skip_strict_exist_check */ 1: - message.skip_strict_exist_check = reader.bool(); - break; - case /* int64 timestamp */ 3: - message.timestamp = reader.int64().toBigInt(); - break; - default: - let u = options.readUnknownField; - if (u === "throw") - throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); - let d = reader.skip(wireType); - if (u !== false) - (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); - } - } - return message; - } - internalBinaryWrite(message: Remove_Config, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { - /* bool skip_strict_exist_check = 1; */ - if (message.skip_strict_exist_check !== false) - writer.tag(1, WireType.Varint).bool(message.skip_strict_exist_check); - /* int64 timestamp = 3; */ - if (message.timestamp !== 0n) - writer.tag(3, WireType.Varint).int64(message.timestamp); - let u = options.writeUnknownFields; - if (u !== false) - (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); - return writer; - } -} -/** - * @generated MessageType for protobuf message payload.v1.Remove.Config - */ -export const Remove_Config = new Remove_Config$Type(); -// @generated message type with reflection information, may provide speed optimized methods -class Object$Type extends MessageType { - constructor() { - super("payload.v1.Object", []); - } - create(value?: PartialMessage): Object { - const message = globalThis.Object.create((this.messagePrototype!)); - if (value !== undefined) - reflectionMergePartial(this, message, value); - return message; - } - internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Object): Object { - return target ?? this.create(); - } - internalBinaryWrite(message: Object, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { - let u = options.writeUnknownFields; - if (u !== false) - (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); - return writer; - } -} -/** - * @generated MessageType for protobuf message payload.v1.Object - */ -export const Object = new Object$Type(); -// @generated message type with reflection information, may provide speed optimized methods -class Object_VectorRequest$Type extends MessageType { - constructor() { - super("payload.v1.Object.VectorRequest", [ - { no: 1, name: "id", kind: "message", T: () => Object_ID, options: { "buf.validate.field": { repeated: { minItems: "2" } } } }, - { no: 2, name: "filters", kind: "message", T: () => Filter_Config } - ]); - } - create(value?: PartialMessage): Object_VectorRequest { - const message = globalThis.Object.create((this.messagePrototype!)); - if (value !== undefined) - reflectionMergePartial(this, message, value); - return message; - } - internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Object_VectorRequest): Object_VectorRequest { - let message = target ?? this.create(), end = reader.pos + length; - while (reader.pos < end) { - let [fieldNo, wireType] = reader.tag(); - switch (fieldNo) { - case /* payload.v1.Object.ID id */ 1: - message.id = Object_ID.internalBinaryRead(reader, reader.uint32(), options, message.id); - break; - case /* payload.v1.Filter.Config filters */ 2: - message.filters = Filter_Config.internalBinaryRead(reader, reader.uint32(), options, message.filters); - break; - default: - let u = options.readUnknownField; - if (u === "throw") - throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); - let d = reader.skip(wireType); - if (u !== false) - (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); - } - } - return message; - } - internalBinaryWrite(message: Object_VectorRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { - /* payload.v1.Object.ID id = 1; */ - if (message.id) - Object_ID.internalBinaryWrite(message.id, writer.tag(1, WireType.LengthDelimited).fork(), options).join(); - /* payload.v1.Filter.Config filters = 2; */ - if (message.filters) - Filter_Config.internalBinaryWrite(message.filters, writer.tag(2, WireType.LengthDelimited).fork(), options).join(); - let u = options.writeUnknownFields; - if (u !== false) - (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); - return writer; - } -} -/** - * @generated MessageType for protobuf message payload.v1.Object.VectorRequest - */ -export const Object_VectorRequest = new Object_VectorRequest$Type(); -// @generated message type with reflection information, may provide speed optimized methods -class Object_Distance$Type extends MessageType { - constructor() { - super("payload.v1.Object.Distance", [ - { no: 1, name: "id", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, - { no: 2, name: "distance", kind: "scalar", T: 2 /*ScalarType.FLOAT*/ } - ]); - } - create(value?: PartialMessage): Object_Distance { - const message = globalThis.Object.create((this.messagePrototype!)); - message.id = ""; - message.distance = 0; - if (value !== undefined) - reflectionMergePartial(this, message, value); - return message; - } - internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Object_Distance): Object_Distance { - let message = target ?? this.create(), end = reader.pos + length; - while (reader.pos < end) { - let [fieldNo, wireType] = reader.tag(); - switch (fieldNo) { - case /* string id */ 1: - message.id = reader.string(); - break; - case /* float distance */ 2: - message.distance = reader.float(); - break; - default: - let u = options.readUnknownField; - if (u === "throw") - throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); - let d = reader.skip(wireType); - if (u !== false) - (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); - } - } - return message; - } - internalBinaryWrite(message: Object_Distance, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { - /* string id = 1; */ - if (message.id !== "") - writer.tag(1, WireType.LengthDelimited).string(message.id); - /* float distance = 2; */ - if (message.distance !== 0) - writer.tag(2, WireType.Bit32).float(message.distance); - let u = options.writeUnknownFields; - if (u !== false) - (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); - return writer; - } -} -/** - * @generated MessageType for protobuf message payload.v1.Object.Distance - */ -export const Object_Distance = new Object_Distance$Type(); -// @generated message type with reflection information, may provide speed optimized methods -class Object_StreamDistance$Type extends MessageType { - constructor() { - super("payload.v1.Object.StreamDistance", [ - { no: 1, name: "distance", kind: "message", oneof: "payload", T: () => Object_Distance }, - { no: 2, name: "status", kind: "message", oneof: "payload", T: () => Status } - ]); - } - create(value?: PartialMessage): Object_StreamDistance { - const message = globalThis.Object.create((this.messagePrototype!)); - message.payload = { oneofKind: undefined }; - if (value !== undefined) - reflectionMergePartial(this, message, value); - return message; - } - internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Object_StreamDistance): Object_StreamDistance { - let message = target ?? this.create(), end = reader.pos + length; - while (reader.pos < end) { - let [fieldNo, wireType] = reader.tag(); - switch (fieldNo) { - case /* payload.v1.Object.Distance distance */ 1: - message.payload = { - oneofKind: "distance", - distance: Object_Distance.internalBinaryRead(reader, reader.uint32(), options, (message.payload as any).distance) - }; - break; - case /* google.rpc.Status status */ 2: - message.payload = { - oneofKind: "status", - status: Status.internalBinaryRead(reader, reader.uint32(), options, (message.payload as any).status) - }; - break; - default: - let u = options.readUnknownField; - if (u === "throw") - throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); - let d = reader.skip(wireType); - if (u !== false) - (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); - } - } - return message; - } - internalBinaryWrite(message: Object_StreamDistance, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { - /* payload.v1.Object.Distance distance = 1; */ - if (message.payload.oneofKind === "distance") - Object_Distance.internalBinaryWrite(message.payload.distance, writer.tag(1, WireType.LengthDelimited).fork(), options).join(); - /* google.rpc.Status status = 2; */ - if (message.payload.oneofKind === "status") - Status.internalBinaryWrite(message.payload.status, writer.tag(2, WireType.LengthDelimited).fork(), options).join(); - let u = options.writeUnknownFields; - if (u !== false) - (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); - return writer; - } -} -/** - * @generated MessageType for protobuf message payload.v1.Object.StreamDistance - */ -export const Object_StreamDistance = new Object_StreamDistance$Type(); -// @generated message type with reflection information, may provide speed optimized methods -class Object_ID$Type extends MessageType { - constructor() { - super("payload.v1.Object.ID", [ - { no: 1, name: "id", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { minLen: "1" } } } } - ]); - } - create(value?: PartialMessage): Object_ID { - const message = globalThis.Object.create((this.messagePrototype!)); - message.id = ""; - if (value !== undefined) - reflectionMergePartial(this, message, value); - return message; - } - internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Object_ID): Object_ID { - let message = target ?? this.create(), end = reader.pos + length; - while (reader.pos < end) { - let [fieldNo, wireType] = reader.tag(); - switch (fieldNo) { - case /* string id */ 1: - message.id = reader.string(); - break; - default: - let u = options.readUnknownField; - if (u === "throw") - throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); - let d = reader.skip(wireType); - if (u !== false) - (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); - } - } - return message; - } - internalBinaryWrite(message: Object_ID, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { - /* string id = 1; */ - if (message.id !== "") - writer.tag(1, WireType.LengthDelimited).string(message.id); - let u = options.writeUnknownFields; - if (u !== false) - (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); - return writer; - } -} -/** - * @generated MessageType for protobuf message payload.v1.Object.ID - */ -export const Object_ID = new Object_ID$Type(); -// @generated message type with reflection information, may provide speed optimized methods -class Object_IDs$Type extends MessageType { - constructor() { - super("payload.v1.Object.IDs", [ - { no: 1, name: "ids", kind: "scalar", repeat: 2 /*RepeatType.UNPACKED*/, T: 9 /*ScalarType.STRING*/ } - ]); - } - create(value?: PartialMessage): Object_IDs { - const message = globalThis.Object.create((this.messagePrototype!)); - message.ids = []; - if (value !== undefined) - reflectionMergePartial(this, message, value); - return message; - } - internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Object_IDs): Object_IDs { - let message = target ?? this.create(), end = reader.pos + length; - while (reader.pos < end) { - let [fieldNo, wireType] = reader.tag(); - switch (fieldNo) { - case /* repeated string ids */ 1: - message.ids.push(reader.string()); - break; - default: - let u = options.readUnknownField; - if (u === "throw") - throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); - let d = reader.skip(wireType); - if (u !== false) - (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); - } - } - return message; - } - internalBinaryWrite(message: Object_IDs, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { - /* repeated string ids = 1; */ - for (let i = 0; i < message.ids.length; i++) - writer.tag(1, WireType.LengthDelimited).string(message.ids[i]); - let u = options.writeUnknownFields; - if (u !== false) - (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); - return writer; - } -} -/** - * @generated MessageType for protobuf message payload.v1.Object.IDs - */ -export const Object_IDs = new Object_IDs$Type(); -// @generated message type with reflection information, may provide speed optimized methods -class Object_Vector$Type extends MessageType { - constructor() { - super("payload.v1.Object.Vector", [ - { no: 1, name: "id", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { minLen: "1" } } } }, - { no: 2, name: "vector", kind: "scalar", repeat: 1 /*RepeatType.PACKED*/, T: 2 /*ScalarType.FLOAT*/, options: { "buf.validate.field": { repeated: { minItems: "2" } } } }, - { no: 3, name: "timestamp", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 0 /*LongType.BIGINT*/ } - ]); - } - create(value?: PartialMessage): Object_Vector { - const message = globalThis.Object.create((this.messagePrototype!)); - message.id = ""; - message.vector = []; - message.timestamp = 0n; - if (value !== undefined) - reflectionMergePartial(this, message, value); - return message; - } - internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Object_Vector): Object_Vector { - let message = target ?? this.create(), end = reader.pos + length; - while (reader.pos < end) { - let [fieldNo, wireType] = reader.tag(); - switch (fieldNo) { - case /* string id */ 1: - message.id = reader.string(); - break; - case /* repeated float vector */ 2: - if (wireType === WireType.LengthDelimited) - for (let e = reader.int32() + reader.pos; reader.pos < e;) - message.vector.push(reader.float()); - else - message.vector.push(reader.float()); - break; - case /* int64 timestamp */ 3: - message.timestamp = reader.int64().toBigInt(); - break; - default: - let u = options.readUnknownField; - if (u === "throw") - throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); - let d = reader.skip(wireType); - if (u !== false) - (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); - } - } - return message; - } - internalBinaryWrite(message: Object_Vector, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { - /* string id = 1; */ - if (message.id !== "") - writer.tag(1, WireType.LengthDelimited).string(message.id); - /* repeated float vector = 2; */ - if (message.vector.length) { - writer.tag(2, WireType.LengthDelimited).fork(); - for (let i = 0; i < message.vector.length; i++) - writer.float(message.vector[i]); - writer.join(); - } - /* int64 timestamp = 3; */ - if (message.timestamp !== 0n) - writer.tag(3, WireType.Varint).int64(message.timestamp); - let u = options.writeUnknownFields; - if (u !== false) - (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); - return writer; - } -} -/** - * @generated MessageType for protobuf message payload.v1.Object.Vector - */ -export const Object_Vector = new Object_Vector$Type(); -// @generated message type with reflection information, may provide speed optimized methods -class Object_GetTimestampRequest$Type extends MessageType { - constructor() { - super("payload.v1.Object.GetTimestampRequest", [ - { no: 1, name: "id", kind: "message", T: () => Object_ID, options: { "buf.validate.field": { repeated: { minItems: "2" } } } } - ]); - } - create(value?: PartialMessage): Object_GetTimestampRequest { - const message = globalThis.Object.create((this.messagePrototype!)); - if (value !== undefined) - reflectionMergePartial(this, message, value); - return message; - } - internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Object_GetTimestampRequest): Object_GetTimestampRequest { - let message = target ?? this.create(), end = reader.pos + length; - while (reader.pos < end) { - let [fieldNo, wireType] = reader.tag(); - switch (fieldNo) { - case /* payload.v1.Object.ID id */ 1: - message.id = Object_ID.internalBinaryRead(reader, reader.uint32(), options, message.id); - break; - default: - let u = options.readUnknownField; - if (u === "throw") - throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); - let d = reader.skip(wireType); - if (u !== false) - (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); - } - } - return message; - } - internalBinaryWrite(message: Object_GetTimestampRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { - /* payload.v1.Object.ID id = 1; */ - if (message.id) - Object_ID.internalBinaryWrite(message.id, writer.tag(1, WireType.LengthDelimited).fork(), options).join(); - let u = options.writeUnknownFields; - if (u !== false) - (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); - return writer; - } -} -/** - * @generated MessageType for protobuf message payload.v1.Object.GetTimestampRequest - */ -export const Object_GetTimestampRequest = new Object_GetTimestampRequest$Type(); -// @generated message type with reflection information, may provide speed optimized methods -class Object_Timestamp$Type extends MessageType { - constructor() { - super("payload.v1.Object.Timestamp", [ - { no: 1, name: "id", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { minLen: "1" } } } }, - { no: 2, name: "timestamp", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 0 /*LongType.BIGINT*/ } - ]); - } - create(value?: PartialMessage): Object_Timestamp { - const message = globalThis.Object.create((this.messagePrototype!)); - message.id = ""; - message.timestamp = 0n; - if (value !== undefined) - reflectionMergePartial(this, message, value); - return message; - } - internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Object_Timestamp): Object_Timestamp { - let message = target ?? this.create(), end = reader.pos + length; - while (reader.pos < end) { - let [fieldNo, wireType] = reader.tag(); - switch (fieldNo) { - case /* string id */ 1: - message.id = reader.string(); - break; - case /* int64 timestamp */ 2: - message.timestamp = reader.int64().toBigInt(); - break; - default: - let u = options.readUnknownField; - if (u === "throw") - throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); - let d = reader.skip(wireType); - if (u !== false) - (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); - } - } - return message; - } - internalBinaryWrite(message: Object_Timestamp, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { - /* string id = 1; */ - if (message.id !== "") - writer.tag(1, WireType.LengthDelimited).string(message.id); - /* int64 timestamp = 2; */ - if (message.timestamp !== 0n) - writer.tag(2, WireType.Varint).int64(message.timestamp); - let u = options.writeUnknownFields; - if (u !== false) - (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); - return writer; - } -} -/** - * @generated MessageType for protobuf message payload.v1.Object.Timestamp - */ -export const Object_Timestamp = new Object_Timestamp$Type(); -// @generated message type with reflection information, may provide speed optimized methods -class Object_Vectors$Type extends MessageType { - constructor() { - super("payload.v1.Object.Vectors", [ - { no: 1, name: "vectors", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => Object_Vector } - ]); - } - create(value?: PartialMessage): Object_Vectors { - const message = globalThis.Object.create((this.messagePrototype!)); - message.vectors = []; - if (value !== undefined) - reflectionMergePartial(this, message, value); - return message; - } - internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Object_Vectors): Object_Vectors { - let message = target ?? this.create(), end = reader.pos + length; - while (reader.pos < end) { - let [fieldNo, wireType] = reader.tag(); - switch (fieldNo) { - case /* repeated payload.v1.Object.Vector vectors */ 1: - message.vectors.push(Object_Vector.internalBinaryRead(reader, reader.uint32(), options)); - break; - default: - let u = options.readUnknownField; - if (u === "throw") - throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); - let d = reader.skip(wireType); - if (u !== false) - (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); - } - } - return message; - } - internalBinaryWrite(message: Object_Vectors, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { - /* repeated payload.v1.Object.Vector vectors = 1; */ - for (let i = 0; i < message.vectors.length; i++) - Object_Vector.internalBinaryWrite(message.vectors[i], writer.tag(1, WireType.LengthDelimited).fork(), options).join(); - let u = options.writeUnknownFields; - if (u !== false) - (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); - return writer; - } -} -/** - * @generated MessageType for protobuf message payload.v1.Object.Vectors - */ -export const Object_Vectors = new Object_Vectors$Type(); -// @generated message type with reflection information, may provide speed optimized methods -class Object_StreamVector$Type extends MessageType { - constructor() { - super("payload.v1.Object.StreamVector", [ - { no: 1, name: "vector", kind: "message", oneof: "payload", T: () => Object_Vector }, - { no: 2, name: "status", kind: "message", oneof: "payload", T: () => Status } - ]); - } - create(value?: PartialMessage): Object_StreamVector { - const message = globalThis.Object.create((this.messagePrototype!)); - message.payload = { oneofKind: undefined }; - if (value !== undefined) - reflectionMergePartial(this, message, value); - return message; - } - internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Object_StreamVector): Object_StreamVector { - let message = target ?? this.create(), end = reader.pos + length; - while (reader.pos < end) { - let [fieldNo, wireType] = reader.tag(); - switch (fieldNo) { - case /* payload.v1.Object.Vector vector */ 1: - message.payload = { - oneofKind: "vector", - vector: Object_Vector.internalBinaryRead(reader, reader.uint32(), options, (message.payload as any).vector) - }; - break; - case /* google.rpc.Status status */ 2: - message.payload = { - oneofKind: "status", - status: Status.internalBinaryRead(reader, reader.uint32(), options, (message.payload as any).status) - }; - break; - default: - let u = options.readUnknownField; - if (u === "throw") - throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); - let d = reader.skip(wireType); - if (u !== false) - (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); - } - } - return message; - } - internalBinaryWrite(message: Object_StreamVector, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { - /* payload.v1.Object.Vector vector = 1; */ - if (message.payload.oneofKind === "vector") - Object_Vector.internalBinaryWrite(message.payload.vector, writer.tag(1, WireType.LengthDelimited).fork(), options).join(); - /* google.rpc.Status status = 2; */ - if (message.payload.oneofKind === "status") - Status.internalBinaryWrite(message.payload.status, writer.tag(2, WireType.LengthDelimited).fork(), options).join(); - let u = options.writeUnknownFields; - if (u !== false) - (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); - return writer; - } -} -/** - * @generated MessageType for protobuf message payload.v1.Object.StreamVector - */ -export const Object_StreamVector = new Object_StreamVector$Type(); -// @generated message type with reflection information, may provide speed optimized methods -class Object_ReshapeVector$Type extends MessageType { - constructor() { - super("payload.v1.Object.ReshapeVector", [ - { no: 1, name: "object", kind: "scalar", T: 12 /*ScalarType.BYTES*/ }, - { no: 2, name: "shape", kind: "scalar", repeat: 1 /*RepeatType.PACKED*/, T: 5 /*ScalarType.INT32*/ } - ]); - } - create(value?: PartialMessage): Object_ReshapeVector { - const message = globalThis.Object.create((this.messagePrototype!)); - message.object = new Uint8Array(0); - message.shape = []; - if (value !== undefined) - reflectionMergePartial(this, message, value); - return message; - } - internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Object_ReshapeVector): Object_ReshapeVector { - let message = target ?? this.create(), end = reader.pos + length; - while (reader.pos < end) { - let [fieldNo, wireType] = reader.tag(); - switch (fieldNo) { - case /* bytes object */ 1: - message.object = reader.bytes(); - break; - case /* repeated int32 shape */ 2: - if (wireType === WireType.LengthDelimited) - for (let e = reader.int32() + reader.pos; reader.pos < e;) - message.shape.push(reader.int32()); - else - message.shape.push(reader.int32()); - break; - default: - let u = options.readUnknownField; - if (u === "throw") - throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); - let d = reader.skip(wireType); - if (u !== false) - (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); - } - } - return message; - } - internalBinaryWrite(message: Object_ReshapeVector, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { - /* bytes object = 1; */ - if (message.object.length) - writer.tag(1, WireType.LengthDelimited).bytes(message.object); - /* repeated int32 shape = 2; */ - if (message.shape.length) { - writer.tag(2, WireType.LengthDelimited).fork(); - for (let i = 0; i < message.shape.length; i++) - writer.int32(message.shape[i]); - writer.join(); - } - let u = options.writeUnknownFields; - if (u !== false) - (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); - return writer; - } -} -/** - * @generated MessageType for protobuf message payload.v1.Object.ReshapeVector - */ -export const Object_ReshapeVector = new Object_ReshapeVector$Type(); -// @generated message type with reflection information, may provide speed optimized methods -class Object_Blob$Type extends MessageType { - constructor() { - super("payload.v1.Object.Blob", [ - { no: 1, name: "id", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { minLen: "1" } } } }, - { no: 2, name: "object", kind: "scalar", T: 12 /*ScalarType.BYTES*/ } - ]); - } - create(value?: PartialMessage): Object_Blob { - const message = globalThis.Object.create((this.messagePrototype!)); - message.id = ""; - message.object = new Uint8Array(0); - if (value !== undefined) - reflectionMergePartial(this, message, value); - return message; - } - internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Object_Blob): Object_Blob { - let message = target ?? this.create(), end = reader.pos + length; - while (reader.pos < end) { - let [fieldNo, wireType] = reader.tag(); - switch (fieldNo) { - case /* string id */ 1: - message.id = reader.string(); - break; - case /* bytes object */ 2: - message.object = reader.bytes(); - break; - default: - let u = options.readUnknownField; - if (u === "throw") - throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); - let d = reader.skip(wireType); - if (u !== false) - (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); - } - } - return message; - } - internalBinaryWrite(message: Object_Blob, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { - /* string id = 1; */ - if (message.id !== "") - writer.tag(1, WireType.LengthDelimited).string(message.id); - /* bytes object = 2; */ - if (message.object.length) - writer.tag(2, WireType.LengthDelimited).bytes(message.object); - let u = options.writeUnknownFields; - if (u !== false) - (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); - return writer; - } -} -/** - * @generated MessageType for protobuf message payload.v1.Object.Blob - */ -export const Object_Blob = new Object_Blob$Type(); -// @generated message type with reflection information, may provide speed optimized methods -class Object_StreamBlob$Type extends MessageType { - constructor() { - super("payload.v1.Object.StreamBlob", [ - { no: 1, name: "blob", kind: "message", oneof: "payload", T: () => Object_Blob }, - { no: 2, name: "status", kind: "message", oneof: "payload", T: () => Status } - ]); - } - create(value?: PartialMessage): Object_StreamBlob { - const message = globalThis.Object.create((this.messagePrototype!)); - message.payload = { oneofKind: undefined }; - if (value !== undefined) - reflectionMergePartial(this, message, value); - return message; - } - internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Object_StreamBlob): Object_StreamBlob { - let message = target ?? this.create(), end = reader.pos + length; - while (reader.pos < end) { - let [fieldNo, wireType] = reader.tag(); - switch (fieldNo) { - case /* payload.v1.Object.Blob blob */ 1: - message.payload = { - oneofKind: "blob", - blob: Object_Blob.internalBinaryRead(reader, reader.uint32(), options, (message.payload as any).blob) - }; - break; - case /* google.rpc.Status status */ 2: - message.payload = { - oneofKind: "status", - status: Status.internalBinaryRead(reader, reader.uint32(), options, (message.payload as any).status) - }; - break; - default: - let u = options.readUnknownField; - if (u === "throw") - throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); - let d = reader.skip(wireType); - if (u !== false) - (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); - } - } - return message; - } - internalBinaryWrite(message: Object_StreamBlob, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { - /* payload.v1.Object.Blob blob = 1; */ - if (message.payload.oneofKind === "blob") - Object_Blob.internalBinaryWrite(message.payload.blob, writer.tag(1, WireType.LengthDelimited).fork(), options).join(); - /* google.rpc.Status status = 2; */ - if (message.payload.oneofKind === "status") - Status.internalBinaryWrite(message.payload.status, writer.tag(2, WireType.LengthDelimited).fork(), options).join(); - let u = options.writeUnknownFields; - if (u !== false) - (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); - return writer; - } -} -/** - * @generated MessageType for protobuf message payload.v1.Object.StreamBlob - */ -export const Object_StreamBlob = new Object_StreamBlob$Type(); -// @generated message type with reflection information, may provide speed optimized methods -class Object_Location$Type extends MessageType { - constructor() { - super("payload.v1.Object.Location", [ - { no: 1, name: "name", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, - { no: 2, name: "uuid", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, - { no: 3, name: "ips", kind: "scalar", repeat: 2 /*RepeatType.UNPACKED*/, T: 9 /*ScalarType.STRING*/ } - ]); - } - create(value?: PartialMessage): Object_Location { - const message = globalThis.Object.create((this.messagePrototype!)); - message.name = ""; - message.uuid = ""; - message.ips = []; - if (value !== undefined) - reflectionMergePartial(this, message, value); - return message; - } - internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Object_Location): Object_Location { - let message = target ?? this.create(), end = reader.pos + length; - while (reader.pos < end) { - let [fieldNo, wireType] = reader.tag(); - switch (fieldNo) { - case /* string name */ 1: - message.name = reader.string(); - break; - case /* string uuid */ 2: - message.uuid = reader.string(); - break; - case /* repeated string ips */ 3: - message.ips.push(reader.string()); - break; - default: - let u = options.readUnknownField; - if (u === "throw") - throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); - let d = reader.skip(wireType); - if (u !== false) - (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); - } - } - return message; - } - internalBinaryWrite(message: Object_Location, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { - /* string name = 1; */ - if (message.name !== "") - writer.tag(1, WireType.LengthDelimited).string(message.name); - /* string uuid = 2; */ - if (message.uuid !== "") - writer.tag(2, WireType.LengthDelimited).string(message.uuid); - /* repeated string ips = 3; */ - for (let i = 0; i < message.ips.length; i++) - writer.tag(3, WireType.LengthDelimited).string(message.ips[i]); - let u = options.writeUnknownFields; - if (u !== false) - (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); - return writer; - } -} -/** - * @generated MessageType for protobuf message payload.v1.Object.Location - */ -export const Object_Location = new Object_Location$Type(); -// @generated message type with reflection information, may provide speed optimized methods -class Object_StreamLocation$Type extends MessageType { - constructor() { - super("payload.v1.Object.StreamLocation", [ - { no: 1, name: "location", kind: "message", oneof: "payload", T: () => Object_Location }, - { no: 2, name: "status", kind: "message", oneof: "payload", T: () => Status } - ]); - } - create(value?: PartialMessage): Object_StreamLocation { - const message = globalThis.Object.create((this.messagePrototype!)); - message.payload = { oneofKind: undefined }; - if (value !== undefined) - reflectionMergePartial(this, message, value); - return message; - } - internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Object_StreamLocation): Object_StreamLocation { - let message = target ?? this.create(), end = reader.pos + length; - while (reader.pos < end) { - let [fieldNo, wireType] = reader.tag(); - switch (fieldNo) { - case /* payload.v1.Object.Location location */ 1: - message.payload = { - oneofKind: "location", - location: Object_Location.internalBinaryRead(reader, reader.uint32(), options, (message.payload as any).location) - }; - break; - case /* google.rpc.Status status */ 2: - message.payload = { - oneofKind: "status", - status: Status.internalBinaryRead(reader, reader.uint32(), options, (message.payload as any).status) - }; - break; - default: - let u = options.readUnknownField; - if (u === "throw") - throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); - let d = reader.skip(wireType); - if (u !== false) - (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); - } - } - return message; - } - internalBinaryWrite(message: Object_StreamLocation, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { - /* payload.v1.Object.Location location = 1; */ - if (message.payload.oneofKind === "location") - Object_Location.internalBinaryWrite(message.payload.location, writer.tag(1, WireType.LengthDelimited).fork(), options).join(); - /* google.rpc.Status status = 2; */ - if (message.payload.oneofKind === "status") - Status.internalBinaryWrite(message.payload.status, writer.tag(2, WireType.LengthDelimited).fork(), options).join(); - let u = options.writeUnknownFields; - if (u !== false) - (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); - return writer; - } -} -/** - * @generated MessageType for protobuf message payload.v1.Object.StreamLocation - */ -export const Object_StreamLocation = new Object_StreamLocation$Type(); -// @generated message type with reflection information, may provide speed optimized methods -class Object_Locations$Type extends MessageType { - constructor() { - super("payload.v1.Object.Locations", [ - { no: 1, name: "locations", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => Object_Location } - ]); - } - create(value?: PartialMessage): Object_Locations { - const message = globalThis.Object.create((this.messagePrototype!)); - message.locations = []; - if (value !== undefined) - reflectionMergePartial(this, message, value); - return message; - } - internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Object_Locations): Object_Locations { - let message = target ?? this.create(), end = reader.pos + length; - while (reader.pos < end) { - let [fieldNo, wireType] = reader.tag(); - switch (fieldNo) { - case /* repeated payload.v1.Object.Location locations */ 1: - message.locations.push(Object_Location.internalBinaryRead(reader, reader.uint32(), options)); - break; - default: - let u = options.readUnknownField; - if (u === "throw") - throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); - let d = reader.skip(wireType); - if (u !== false) - (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); - } - } - return message; - } - internalBinaryWrite(message: Object_Locations, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { - /* repeated payload.v1.Object.Location locations = 1; */ - for (let i = 0; i < message.locations.length; i++) - Object_Location.internalBinaryWrite(message.locations[i], writer.tag(1, WireType.LengthDelimited).fork(), options).join(); - let u = options.writeUnknownFields; - if (u !== false) - (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); - return writer; - } -} -/** - * @generated MessageType for protobuf message payload.v1.Object.Locations - */ -export const Object_Locations = new Object_Locations$Type(); -// @generated message type with reflection information, may provide speed optimized methods -class Object_List$Type extends MessageType { - constructor() { - super("payload.v1.Object.List", []); - } - create(value?: PartialMessage): Object_List { - const message = globalThis.Object.create((this.messagePrototype!)); - if (value !== undefined) - reflectionMergePartial(this, message, value); - return message; - } - internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Object_List): Object_List { - return target ?? this.create(); - } - internalBinaryWrite(message: Object_List, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { - let u = options.writeUnknownFields; - if (u !== false) - (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); - return writer; - } -} -/** - * @generated MessageType for protobuf message payload.v1.Object.List - */ -export const Object_List = new Object_List$Type(); -// @generated message type with reflection information, may provide speed optimized methods -class Object_List_Request$Type extends MessageType { - constructor() { - super("payload.v1.Object.List.Request", []); - } - create(value?: PartialMessage): Object_List_Request { - const message = globalThis.Object.create((this.messagePrototype!)); - if (value !== undefined) - reflectionMergePartial(this, message, value); - return message; - } - internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Object_List_Request): Object_List_Request { - return target ?? this.create(); - } - internalBinaryWrite(message: Object_List_Request, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { - let u = options.writeUnknownFields; - if (u !== false) - (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); - return writer; - } -} -/** - * @generated MessageType for protobuf message payload.v1.Object.List.Request - */ -export const Object_List_Request = new Object_List_Request$Type(); -// @generated message type with reflection information, may provide speed optimized methods -class Object_List_Response$Type extends MessageType { - constructor() { - super("payload.v1.Object.List.Response", [ - { no: 1, name: "vector", kind: "message", oneof: "payload", T: () => Object_Vector }, - { no: 2, name: "status", kind: "message", oneof: "payload", T: () => Status } - ]); - } - create(value?: PartialMessage): Object_List_Response { - const message = globalThis.Object.create((this.messagePrototype!)); - message.payload = { oneofKind: undefined }; - if (value !== undefined) - reflectionMergePartial(this, message, value); - return message; - } - internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Object_List_Response): Object_List_Response { - let message = target ?? this.create(), end = reader.pos + length; - while (reader.pos < end) { - let [fieldNo, wireType] = reader.tag(); - switch (fieldNo) { - case /* payload.v1.Object.Vector vector */ 1: - message.payload = { - oneofKind: "vector", - vector: Object_Vector.internalBinaryRead(reader, reader.uint32(), options, (message.payload as any).vector) - }; - break; - case /* google.rpc.Status status */ 2: - message.payload = { - oneofKind: "status", - status: Status.internalBinaryRead(reader, reader.uint32(), options, (message.payload as any).status) - }; - break; - default: - let u = options.readUnknownField; - if (u === "throw") - throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); - let d = reader.skip(wireType); - if (u !== false) - (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); - } - } - return message; - } - internalBinaryWrite(message: Object_List_Response, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { - /* payload.v1.Object.Vector vector = 1; */ - if (message.payload.oneofKind === "vector") - Object_Vector.internalBinaryWrite(message.payload.vector, writer.tag(1, WireType.LengthDelimited).fork(), options).join(); - /* google.rpc.Status status = 2; */ - if (message.payload.oneofKind === "status") - Status.internalBinaryWrite(message.payload.status, writer.tag(2, WireType.LengthDelimited).fork(), options).join(); - let u = options.writeUnknownFields; - if (u !== false) - (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); - return writer; - } -} -/** - * @generated MessageType for protobuf message payload.v1.Object.List.Response - */ -export const Object_List_Response = new Object_List_Response$Type(); -// @generated message type with reflection information, may provide speed optimized methods -class Control$Type extends MessageType { - constructor() { - super("payload.v1.Control", []); - } - create(value?: PartialMessage): Control { - const message = globalThis.Object.create((this.messagePrototype!)); - if (value !== undefined) - reflectionMergePartial(this, message, value); - return message; - } - internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Control): Control { - return target ?? this.create(); - } - internalBinaryWrite(message: Control, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { - let u = options.writeUnknownFields; - if (u !== false) - (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); - return writer; - } -} -/** - * @generated MessageType for protobuf message payload.v1.Control - */ -export const Control = new Control$Type(); -// @generated message type with reflection information, may provide speed optimized methods -class Control_CreateIndexRequest$Type extends MessageType { - constructor() { - super("payload.v1.Control.CreateIndexRequest", [ - { no: 1, name: "pool_size", kind: "scalar", localName: "pool_size", T: 13 /*ScalarType.UINT32*/, options: { "buf.validate.field": { uint32: { gte: 0 } } } } - ]); - } - create(value?: PartialMessage): Control_CreateIndexRequest { - const message = globalThis.Object.create((this.messagePrototype!)); - message.pool_size = 0; - if (value !== undefined) - reflectionMergePartial(this, message, value); - return message; - } - internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Control_CreateIndexRequest): Control_CreateIndexRequest { - let message = target ?? this.create(), end = reader.pos + length; - while (reader.pos < end) { - let [fieldNo, wireType] = reader.tag(); - switch (fieldNo) { - case /* uint32 pool_size */ 1: - message.pool_size = reader.uint32(); - break; - default: - let u = options.readUnknownField; - if (u === "throw") - throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); - let d = reader.skip(wireType); - if (u !== false) - (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); - } - } - return message; - } - internalBinaryWrite(message: Control_CreateIndexRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { - /* uint32 pool_size = 1; */ - if (message.pool_size !== 0) - writer.tag(1, WireType.Varint).uint32(message.pool_size); - let u = options.writeUnknownFields; - if (u !== false) - (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); - return writer; - } -} -/** - * @generated MessageType for protobuf message payload.v1.Control.CreateIndexRequest - */ -export const Control_CreateIndexRequest = new Control_CreateIndexRequest$Type(); -// @generated message type with reflection information, may provide speed optimized methods -class Discoverer$Type extends MessageType { - constructor() { - super("payload.v1.Discoverer", []); - } - create(value?: PartialMessage): Discoverer { - const message = globalThis.Object.create((this.messagePrototype!)); - if (value !== undefined) - reflectionMergePartial(this, message, value); - return message; - } - internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Discoverer): Discoverer { - return target ?? this.create(); - } - internalBinaryWrite(message: Discoverer, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { - let u = options.writeUnknownFields; - if (u !== false) - (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); - return writer; - } -} -/** - * @generated MessageType for protobuf message payload.v1.Discoverer - */ -export const Discoverer = new Discoverer$Type(); -// @generated message type with reflection information, may provide speed optimized methods -class Discoverer_Request$Type extends MessageType { - constructor() { - super("payload.v1.Discoverer.Request", [ - { no: 1, name: "name", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { minLen: "1" } } } }, - { no: 2, name: "namespace", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, - { no: 3, name: "node", kind: "scalar", T: 9 /*ScalarType.STRING*/ } - ]); - } - create(value?: PartialMessage): Discoverer_Request { - const message = globalThis.Object.create((this.messagePrototype!)); - message.name = ""; - message.namespace = ""; - message.node = ""; - if (value !== undefined) - reflectionMergePartial(this, message, value); - return message; - } - internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Discoverer_Request): Discoverer_Request { - let message = target ?? this.create(), end = reader.pos + length; - while (reader.pos < end) { - let [fieldNo, wireType] = reader.tag(); - switch (fieldNo) { - case /* string name */ 1: - message.name = reader.string(); - break; - case /* string namespace */ 2: - message.namespace = reader.string(); - break; - case /* string node */ 3: - message.node = reader.string(); - break; - default: - let u = options.readUnknownField; - if (u === "throw") - throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); - let d = reader.skip(wireType); - if (u !== false) - (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); - } - } - return message; - } - internalBinaryWrite(message: Discoverer_Request, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { - /* string name = 1; */ - if (message.name !== "") - writer.tag(1, WireType.LengthDelimited).string(message.name); - /* string namespace = 2; */ - if (message.namespace !== "") - writer.tag(2, WireType.LengthDelimited).string(message.namespace); - /* string node = 3; */ - if (message.node !== "") - writer.tag(3, WireType.LengthDelimited).string(message.node); - let u = options.writeUnknownFields; - if (u !== false) - (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); - return writer; - } -} -/** - * @generated MessageType for protobuf message payload.v1.Discoverer.Request - */ -export const Discoverer_Request = new Discoverer_Request$Type(); -// @generated message type with reflection information, may provide speed optimized methods -class Info$Type extends MessageType { - constructor() { - super("payload.v1.Info", []); - } - create(value?: PartialMessage): Info { - const message = globalThis.Object.create((this.messagePrototype!)); - if (value !== undefined) - reflectionMergePartial(this, message, value); - return message; - } - internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Info): Info { - return target ?? this.create(); - } - internalBinaryWrite(message: Info, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { - let u = options.writeUnknownFields; - if (u !== false) - (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); - return writer; - } -} -/** - * @generated MessageType for protobuf message payload.v1.Info - */ -export const Info = new Info$Type(); -// @generated message type with reflection information, may provide speed optimized methods -class Info_Index$Type extends MessageType { - constructor() { - super("payload.v1.Info.Index", []); - } - create(value?: PartialMessage): Info_Index { - const message = globalThis.Object.create((this.messagePrototype!)); - if (value !== undefined) - reflectionMergePartial(this, message, value); - return message; - } - internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Info_Index): Info_Index { - return target ?? this.create(); - } - internalBinaryWrite(message: Info_Index, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { - let u = options.writeUnknownFields; - if (u !== false) - (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); - return writer; - } -} -/** - * @generated MessageType for protobuf message payload.v1.Info.Index - */ -export const Info_Index = new Info_Index$Type(); -// @generated message type with reflection information, may provide speed optimized methods -class Info_Index_Count$Type extends MessageType { - constructor() { - super("payload.v1.Info.Index.Count", [ - { no: 1, name: "stored", kind: "scalar", T: 13 /*ScalarType.UINT32*/ }, - { no: 2, name: "uncommitted", kind: "scalar", T: 13 /*ScalarType.UINT32*/ }, - { no: 3, name: "indexing", kind: "scalar", T: 8 /*ScalarType.BOOL*/ }, - { no: 4, name: "saving", kind: "scalar", T: 8 /*ScalarType.BOOL*/ } - ]); - } - create(value?: PartialMessage): Info_Index_Count { - const message = globalThis.Object.create((this.messagePrototype!)); - message.stored = 0; - message.uncommitted = 0; - message.indexing = false; - message.saving = false; - if (value !== undefined) - reflectionMergePartial(this, message, value); - return message; - } - internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Info_Index_Count): Info_Index_Count { - let message = target ?? this.create(), end = reader.pos + length; - while (reader.pos < end) { - let [fieldNo, wireType] = reader.tag(); - switch (fieldNo) { - case /* uint32 stored */ 1: - message.stored = reader.uint32(); - break; - case /* uint32 uncommitted */ 2: - message.uncommitted = reader.uint32(); - break; - case /* bool indexing */ 3: - message.indexing = reader.bool(); - break; - case /* bool saving */ 4: - message.saving = reader.bool(); - break; - default: - let u = options.readUnknownField; - if (u === "throw") - throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); - let d = reader.skip(wireType); - if (u !== false) - (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); - } - } - return message; - } - internalBinaryWrite(message: Info_Index_Count, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { - /* uint32 stored = 1; */ - if (message.stored !== 0) - writer.tag(1, WireType.Varint).uint32(message.stored); - /* uint32 uncommitted = 2; */ - if (message.uncommitted !== 0) - writer.tag(2, WireType.Varint).uint32(message.uncommitted); - /* bool indexing = 3; */ - if (message.indexing !== false) - writer.tag(3, WireType.Varint).bool(message.indexing); - /* bool saving = 4; */ - if (message.saving !== false) - writer.tag(4, WireType.Varint).bool(message.saving); - let u = options.writeUnknownFields; - if (u !== false) - (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); - return writer; - } -} -/** - * @generated MessageType for protobuf message payload.v1.Info.Index.Count - */ -export const Info_Index_Count = new Info_Index_Count$Type(); -// @generated message type with reflection information, may provide speed optimized methods -class Info_Index_UUID$Type extends MessageType { - constructor() { - super("payload.v1.Info.Index.UUID", []); - } - create(value?: PartialMessage): Info_Index_UUID { - const message = globalThis.Object.create((this.messagePrototype!)); - if (value !== undefined) - reflectionMergePartial(this, message, value); - return message; - } - internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Info_Index_UUID): Info_Index_UUID { - return target ?? this.create(); - } - internalBinaryWrite(message: Info_Index_UUID, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { - let u = options.writeUnknownFields; - if (u !== false) - (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); - return writer; - } -} -/** - * @generated MessageType for protobuf message payload.v1.Info.Index.UUID - */ -export const Info_Index_UUID = new Info_Index_UUID$Type(); -// @generated message type with reflection information, may provide speed optimized methods -class Info_Index_UUID_Committed$Type extends MessageType { - constructor() { - super("payload.v1.Info.Index.UUID.Committed", [ - { no: 1, name: "uuid", kind: "scalar", T: 9 /*ScalarType.STRING*/ } - ]); - } - create(value?: PartialMessage): Info_Index_UUID_Committed { - const message = globalThis.Object.create((this.messagePrototype!)); - message.uuid = ""; - if (value !== undefined) - reflectionMergePartial(this, message, value); - return message; - } - internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Info_Index_UUID_Committed): Info_Index_UUID_Committed { - let message = target ?? this.create(), end = reader.pos + length; - while (reader.pos < end) { - let [fieldNo, wireType] = reader.tag(); - switch (fieldNo) { - case /* string uuid */ 1: - message.uuid = reader.string(); - break; - default: - let u = options.readUnknownField; - if (u === "throw") - throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); - let d = reader.skip(wireType); - if (u !== false) - (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); - } - } - return message; - } - internalBinaryWrite(message: Info_Index_UUID_Committed, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { - /* string uuid = 1; */ - if (message.uuid !== "") - writer.tag(1, WireType.LengthDelimited).string(message.uuid); - let u = options.writeUnknownFields; - if (u !== false) - (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); - return writer; - } -} -/** - * @generated MessageType for protobuf message payload.v1.Info.Index.UUID.Committed - */ -export const Info_Index_UUID_Committed = new Info_Index_UUID_Committed$Type(); -// @generated message type with reflection information, may provide speed optimized methods -class Info_Index_UUID_Uncommitted$Type extends MessageType { - constructor() { - super("payload.v1.Info.Index.UUID.Uncommitted", [ - { no: 1, name: "uuid", kind: "scalar", T: 9 /*ScalarType.STRING*/ } - ]); - } - create(value?: PartialMessage): Info_Index_UUID_Uncommitted { - const message = globalThis.Object.create((this.messagePrototype!)); - message.uuid = ""; - if (value !== undefined) - reflectionMergePartial(this, message, value); - return message; - } - internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Info_Index_UUID_Uncommitted): Info_Index_UUID_Uncommitted { - let message = target ?? this.create(), end = reader.pos + length; - while (reader.pos < end) { - let [fieldNo, wireType] = reader.tag(); - switch (fieldNo) { - case /* string uuid */ 1: - message.uuid = reader.string(); - break; - default: - let u = options.readUnknownField; - if (u === "throw") - throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); - let d = reader.skip(wireType); - if (u !== false) - (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); - } - } - return message; - } - internalBinaryWrite(message: Info_Index_UUID_Uncommitted, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { - /* string uuid = 1; */ - if (message.uuid !== "") - writer.tag(1, WireType.LengthDelimited).string(message.uuid); - let u = options.writeUnknownFields; - if (u !== false) - (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); - return writer; - } -} -/** - * @generated MessageType for protobuf message payload.v1.Info.Index.UUID.Uncommitted - */ -export const Info_Index_UUID_Uncommitted = new Info_Index_UUID_Uncommitted$Type(); -// @generated message type with reflection information, may provide speed optimized methods -class Info_Pod$Type extends MessageType { - constructor() { - super("payload.v1.Info.Pod", [ - { no: 1, name: "app_name", kind: "scalar", localName: "app_name", T: 9 /*ScalarType.STRING*/ }, - { no: 2, name: "name", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, - { no: 3, name: "namespace", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, - { no: 4, name: "ip", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { ipv4: true } } } }, - { no: 5, name: "cpu", kind: "message", T: () => Info_CPU }, - { no: 6, name: "memory", kind: "message", T: () => Info_Memory }, - { no: 7, name: "node", kind: "message", T: () => Info_Node } - ]); - } - create(value?: PartialMessage): Info_Pod { - const message = globalThis.Object.create((this.messagePrototype!)); - message.app_name = ""; - message.name = ""; - message.namespace = ""; - message.ip = ""; - if (value !== undefined) - reflectionMergePartial(this, message, value); - return message; - } - internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Info_Pod): Info_Pod { - let message = target ?? this.create(), end = reader.pos + length; - while (reader.pos < end) { - let [fieldNo, wireType] = reader.tag(); - switch (fieldNo) { - case /* string app_name */ 1: - message.app_name = reader.string(); - break; - case /* string name */ 2: - message.name = reader.string(); - break; - case /* string namespace */ 3: - message.namespace = reader.string(); - break; - case /* string ip */ 4: - message.ip = reader.string(); - break; - case /* payload.v1.Info.CPU cpu */ 5: - message.cpu = Info_CPU.internalBinaryRead(reader, reader.uint32(), options, message.cpu); - break; - case /* payload.v1.Info.Memory memory */ 6: - message.memory = Info_Memory.internalBinaryRead(reader, reader.uint32(), options, message.memory); - break; - case /* payload.v1.Info.Node node */ 7: - message.node = Info_Node.internalBinaryRead(reader, reader.uint32(), options, message.node); - break; - default: - let u = options.readUnknownField; - if (u === "throw") - throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); - let d = reader.skip(wireType); - if (u !== false) - (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); - } - } - return message; - } - internalBinaryWrite(message: Info_Pod, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { - /* string app_name = 1; */ - if (message.app_name !== "") - writer.tag(1, WireType.LengthDelimited).string(message.app_name); - /* string name = 2; */ - if (message.name !== "") - writer.tag(2, WireType.LengthDelimited).string(message.name); - /* string namespace = 3; */ - if (message.namespace !== "") - writer.tag(3, WireType.LengthDelimited).string(message.namespace); - /* string ip = 4; */ - if (message.ip !== "") - writer.tag(4, WireType.LengthDelimited).string(message.ip); - /* payload.v1.Info.CPU cpu = 5; */ - if (message.cpu) - Info_CPU.internalBinaryWrite(message.cpu, writer.tag(5, WireType.LengthDelimited).fork(), options).join(); - /* payload.v1.Info.Memory memory = 6; */ - if (message.memory) - Info_Memory.internalBinaryWrite(message.memory, writer.tag(6, WireType.LengthDelimited).fork(), options).join(); - /* payload.v1.Info.Node node = 7; */ - if (message.node) - Info_Node.internalBinaryWrite(message.node, writer.tag(7, WireType.LengthDelimited).fork(), options).join(); - let u = options.writeUnknownFields; - if (u !== false) - (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); - return writer; - } -} -/** - * @generated MessageType for protobuf message payload.v1.Info.Pod - */ -export const Info_Pod = new Info_Pod$Type(); -// @generated message type with reflection information, may provide speed optimized methods -class Info_Node$Type extends MessageType { - constructor() { - super("payload.v1.Info.Node", [ - { no: 1, name: "name", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, - { no: 2, name: "internal_addr", kind: "scalar", localName: "internal_addr", T: 9 /*ScalarType.STRING*/ }, - { no: 3, name: "external_addr", kind: "scalar", localName: "external_addr", T: 9 /*ScalarType.STRING*/ }, - { no: 4, name: "cpu", kind: "message", T: () => Info_CPU }, - { no: 5, name: "memory", kind: "message", T: () => Info_Memory }, - { no: 6, name: "Pods", kind: "message", localName: "Pods", jsonName: "Pods", T: () => Info_Pods } - ]); - } - create(value?: PartialMessage): Info_Node { - const message = globalThis.Object.create((this.messagePrototype!)); - message.name = ""; - message.internal_addr = ""; - message.external_addr = ""; - if (value !== undefined) - reflectionMergePartial(this, message, value); - return message; - } - internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Info_Node): Info_Node { - let message = target ?? this.create(), end = reader.pos + length; - while (reader.pos < end) { - let [fieldNo, wireType] = reader.tag(); - switch (fieldNo) { - case /* string name */ 1: - message.name = reader.string(); - break; - case /* string internal_addr */ 2: - message.internal_addr = reader.string(); - break; - case /* string external_addr */ 3: - message.external_addr = reader.string(); - break; - case /* payload.v1.Info.CPU cpu */ 4: - message.cpu = Info_CPU.internalBinaryRead(reader, reader.uint32(), options, message.cpu); - break; - case /* payload.v1.Info.Memory memory */ 5: - message.memory = Info_Memory.internalBinaryRead(reader, reader.uint32(), options, message.memory); - break; - case /* payload.v1.Info.Pods Pods = 6 [json_name = "Pods"];*/ 6: - message.Pods = Info_Pods.internalBinaryRead(reader, reader.uint32(), options, message.Pods); - break; - default: - let u = options.readUnknownField; - if (u === "throw") - throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); - let d = reader.skip(wireType); - if (u !== false) - (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); - } - } - return message; - } - internalBinaryWrite(message: Info_Node, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { - /* string name = 1; */ - if (message.name !== "") - writer.tag(1, WireType.LengthDelimited).string(message.name); - /* string internal_addr = 2; */ - if (message.internal_addr !== "") - writer.tag(2, WireType.LengthDelimited).string(message.internal_addr); - /* string external_addr = 3; */ - if (message.external_addr !== "") - writer.tag(3, WireType.LengthDelimited).string(message.external_addr); - /* payload.v1.Info.CPU cpu = 4; */ - if (message.cpu) - Info_CPU.internalBinaryWrite(message.cpu, writer.tag(4, WireType.LengthDelimited).fork(), options).join(); - /* payload.v1.Info.Memory memory = 5; */ - if (message.memory) - Info_Memory.internalBinaryWrite(message.memory, writer.tag(5, WireType.LengthDelimited).fork(), options).join(); - /* payload.v1.Info.Pods Pods = 6 [json_name = "Pods"]; */ - if (message.Pods) - Info_Pods.internalBinaryWrite(message.Pods, writer.tag(6, WireType.LengthDelimited).fork(), options).join(); - let u = options.writeUnknownFields; - if (u !== false) - (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); - return writer; - } -} -/** - * @generated MessageType for protobuf message payload.v1.Info.Node - */ -export const Info_Node = new Info_Node$Type(); -// @generated message type with reflection information, may provide speed optimized methods -class Info_Service$Type extends MessageType { - constructor() { - super("payload.v1.Info.Service", [ - { no: 1, name: "name", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, - { no: 2, name: "cluster_ip", kind: "scalar", localName: "cluster_ip", T: 9 /*ScalarType.STRING*/ }, - { no: 3, name: "cluster_ips", kind: "scalar", localName: "cluster_ips", repeat: 2 /*RepeatType.UNPACKED*/, T: 9 /*ScalarType.STRING*/ }, - { no: 4, name: "ports", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => Info_ServicePort }, - { no: 5, name: "labels", kind: "message", T: () => Info_Labels }, - { no: 6, name: "annotations", kind: "message", T: () => Info_Annotations } - ]); - } - create(value?: PartialMessage): Info_Service { - const message = globalThis.Object.create((this.messagePrototype!)); - message.name = ""; - message.cluster_ip = ""; - message.cluster_ips = []; - message.ports = []; - if (value !== undefined) - reflectionMergePartial(this, message, value); - return message; - } - internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Info_Service): Info_Service { - let message = target ?? this.create(), end = reader.pos + length; - while (reader.pos < end) { - let [fieldNo, wireType] = reader.tag(); - switch (fieldNo) { - case /* string name */ 1: - message.name = reader.string(); - break; - case /* string cluster_ip */ 2: - message.cluster_ip = reader.string(); - break; - case /* repeated string cluster_ips */ 3: - message.cluster_ips.push(reader.string()); - break; - case /* repeated payload.v1.Info.ServicePort ports */ 4: - message.ports.push(Info_ServicePort.internalBinaryRead(reader, reader.uint32(), options)); - break; - case /* payload.v1.Info.Labels labels */ 5: - message.labels = Info_Labels.internalBinaryRead(reader, reader.uint32(), options, message.labels); - break; - case /* payload.v1.Info.Annotations annotations */ 6: - message.annotations = Info_Annotations.internalBinaryRead(reader, reader.uint32(), options, message.annotations); - break; - default: - let u = options.readUnknownField; - if (u === "throw") - throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); - let d = reader.skip(wireType); - if (u !== false) - (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); - } - } - return message; - } - internalBinaryWrite(message: Info_Service, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { - /* string name = 1; */ - if (message.name !== "") - writer.tag(1, WireType.LengthDelimited).string(message.name); - /* string cluster_ip = 2; */ - if (message.cluster_ip !== "") - writer.tag(2, WireType.LengthDelimited).string(message.cluster_ip); - /* repeated string cluster_ips = 3; */ - for (let i = 0; i < message.cluster_ips.length; i++) - writer.tag(3, WireType.LengthDelimited).string(message.cluster_ips[i]); - /* repeated payload.v1.Info.ServicePort ports = 4; */ - for (let i = 0; i < message.ports.length; i++) - Info_ServicePort.internalBinaryWrite(message.ports[i], writer.tag(4, WireType.LengthDelimited).fork(), options).join(); - /* payload.v1.Info.Labels labels = 5; */ - if (message.labels) - Info_Labels.internalBinaryWrite(message.labels, writer.tag(5, WireType.LengthDelimited).fork(), options).join(); - /* payload.v1.Info.Annotations annotations = 6; */ - if (message.annotations) - Info_Annotations.internalBinaryWrite(message.annotations, writer.tag(6, WireType.LengthDelimited).fork(), options).join(); - let u = options.writeUnknownFields; - if (u !== false) - (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); - return writer; - } -} -/** - * @generated MessageType for protobuf message payload.v1.Info.Service - */ -export const Info_Service = new Info_Service$Type(); -// @generated message type with reflection information, may provide speed optimized methods -class Info_ServicePort$Type extends MessageType { - constructor() { - super("payload.v1.Info.ServicePort", [ - { no: 1, name: "name", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, - { no: 2, name: "port", kind: "scalar", T: 5 /*ScalarType.INT32*/ } - ]); - } - create(value?: PartialMessage): Info_ServicePort { - const message = globalThis.Object.create((this.messagePrototype!)); - message.name = ""; - message.port = 0; - if (value !== undefined) - reflectionMergePartial(this, message, value); - return message; - } - internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Info_ServicePort): Info_ServicePort { - let message = target ?? this.create(), end = reader.pos + length; - while (reader.pos < end) { - let [fieldNo, wireType] = reader.tag(); - switch (fieldNo) { - case /* string name */ 1: - message.name = reader.string(); - break; - case /* int32 port */ 2: - message.port = reader.int32(); - break; - default: - let u = options.readUnknownField; - if (u === "throw") - throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); - let d = reader.skip(wireType); - if (u !== false) - (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); - } - } - return message; - } - internalBinaryWrite(message: Info_ServicePort, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { - /* string name = 1; */ - if (message.name !== "") - writer.tag(1, WireType.LengthDelimited).string(message.name); - /* int32 port = 2; */ - if (message.port !== 0) - writer.tag(2, WireType.Varint).int32(message.port); - let u = options.writeUnknownFields; - if (u !== false) - (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); - return writer; - } -} -/** - * @generated MessageType for protobuf message payload.v1.Info.ServicePort - */ -export const Info_ServicePort = new Info_ServicePort$Type(); -// @generated message type with reflection information, may provide speed optimized methods -class Info_Labels$Type extends MessageType { - constructor() { - super("payload.v1.Info.Labels", [ - { no: 1, name: "labels", kind: "map", K: 9 /*ScalarType.STRING*/, V: { kind: "scalar", T: 9 /*ScalarType.STRING*/ } } - ]); - } - create(value?: PartialMessage): Info_Labels { - const message = globalThis.Object.create((this.messagePrototype!)); - message.labels = {}; - if (value !== undefined) - reflectionMergePartial(this, message, value); - return message; - } - internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Info_Labels): Info_Labels { - let message = target ?? this.create(), end = reader.pos + length; - while (reader.pos < end) { - let [fieldNo, wireType] = reader.tag(); - switch (fieldNo) { - case /* map labels */ 1: - this.binaryReadMap1(message.labels, reader, options); - break; - default: - let u = options.readUnknownField; - if (u === "throw") - throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); - let d = reader.skip(wireType); - if (u !== false) - (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); - } - } - return message; - } - private binaryReadMap1(map: Info_Labels["labels"], reader: IBinaryReader, options: BinaryReadOptions): void { - let len = reader.uint32(), end = reader.pos + len, key: keyof Info_Labels["labels"] | undefined, val: Info_Labels["labels"][any] | undefined; - while (reader.pos < end) { - let [fieldNo, wireType] = reader.tag(); - switch (fieldNo) { - case 1: - key = reader.string(); - break; - case 2: - val = reader.string(); - break; - default: throw new globalThis.Error("unknown map entry field for field payload.v1.Info.Labels.labels"); - } - } - map[key ?? ""] = val ?? ""; - } - internalBinaryWrite(message: Info_Labels, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { - /* map labels = 1; */ - for (let k of globalThis.Object.keys(message.labels)) - writer.tag(1, WireType.LengthDelimited).fork().tag(1, WireType.LengthDelimited).string(k).tag(2, WireType.LengthDelimited).string(message.labels[k]).join(); - let u = options.writeUnknownFields; - if (u !== false) - (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); - return writer; - } -} -/** - * @generated MessageType for protobuf message payload.v1.Info.Labels - */ -export const Info_Labels = new Info_Labels$Type(); -// @generated message type with reflection information, may provide speed optimized methods -class Info_Annotations$Type extends MessageType { - constructor() { - super("payload.v1.Info.Annotations", [ - { no: 1, name: "annotations", kind: "map", K: 9 /*ScalarType.STRING*/, V: { kind: "scalar", T: 9 /*ScalarType.STRING*/ } } - ]); - } - create(value?: PartialMessage): Info_Annotations { - const message = globalThis.Object.create((this.messagePrototype!)); - message.annotations = {}; - if (value !== undefined) - reflectionMergePartial(this, message, value); - return message; - } - internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Info_Annotations): Info_Annotations { - let message = target ?? this.create(), end = reader.pos + length; - while (reader.pos < end) { - let [fieldNo, wireType] = reader.tag(); - switch (fieldNo) { - case /* map annotations */ 1: - this.binaryReadMap1(message.annotations, reader, options); - break; - default: - let u = options.readUnknownField; - if (u === "throw") - throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); - let d = reader.skip(wireType); - if (u !== false) - (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); - } - } - return message; - } - private binaryReadMap1(map: Info_Annotations["annotations"], reader: IBinaryReader, options: BinaryReadOptions): void { - let len = reader.uint32(), end = reader.pos + len, key: keyof Info_Annotations["annotations"] | undefined, val: Info_Annotations["annotations"][any] | undefined; - while (reader.pos < end) { - let [fieldNo, wireType] = reader.tag(); - switch (fieldNo) { - case 1: - key = reader.string(); - break; - case 2: - val = reader.string(); - break; - default: throw new globalThis.Error("unknown map entry field for field payload.v1.Info.Annotations.annotations"); - } - } - map[key ?? ""] = val ?? ""; - } - internalBinaryWrite(message: Info_Annotations, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { - /* map annotations = 1; */ - for (let k of globalThis.Object.keys(message.annotations)) - writer.tag(1, WireType.LengthDelimited).fork().tag(1, WireType.LengthDelimited).string(k).tag(2, WireType.LengthDelimited).string(message.annotations[k]).join(); - let u = options.writeUnknownFields; - if (u !== false) - (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); - return writer; - } -} -/** - * @generated MessageType for protobuf message payload.v1.Info.Annotations - */ -export const Info_Annotations = new Info_Annotations$Type(); -// @generated message type with reflection information, may provide speed optimized methods -class Info_CPU$Type extends MessageType { - constructor() { - super("payload.v1.Info.CPU", [ - { no: 1, name: "limit", kind: "scalar", T: 1 /*ScalarType.DOUBLE*/ }, - { no: 2, name: "request", kind: "scalar", T: 1 /*ScalarType.DOUBLE*/ }, - { no: 3, name: "usage", kind: "scalar", T: 1 /*ScalarType.DOUBLE*/ } - ]); - } - create(value?: PartialMessage): Info_CPU { - const message = globalThis.Object.create((this.messagePrototype!)); - message.limit = 0; - message.request = 0; - message.usage = 0; - if (value !== undefined) - reflectionMergePartial(this, message, value); - return message; - } - internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Info_CPU): Info_CPU { - let message = target ?? this.create(), end = reader.pos + length; - while (reader.pos < end) { - let [fieldNo, wireType] = reader.tag(); - switch (fieldNo) { - case /* double limit */ 1: - message.limit = reader.double(); - break; - case /* double request */ 2: - message.request = reader.double(); - break; - case /* double usage */ 3: - message.usage = reader.double(); - break; - default: - let u = options.readUnknownField; - if (u === "throw") - throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); - let d = reader.skip(wireType); - if (u !== false) - (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); - } - } - return message; - } - internalBinaryWrite(message: Info_CPU, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { - /* double limit = 1; */ - if (message.limit !== 0) - writer.tag(1, WireType.Bit64).double(message.limit); - /* double request = 2; */ - if (message.request !== 0) - writer.tag(2, WireType.Bit64).double(message.request); - /* double usage = 3; */ - if (message.usage !== 0) - writer.tag(3, WireType.Bit64).double(message.usage); - let u = options.writeUnknownFields; - if (u !== false) - (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); - return writer; - } -} -/** - * @generated MessageType for protobuf message payload.v1.Info.CPU - */ -export const Info_CPU = new Info_CPU$Type(); -// @generated message type with reflection information, may provide speed optimized methods -class Info_Memory$Type extends MessageType { - constructor() { - super("payload.v1.Info.Memory", [ - { no: 1, name: "limit", kind: "scalar", T: 1 /*ScalarType.DOUBLE*/ }, - { no: 2, name: "request", kind: "scalar", T: 1 /*ScalarType.DOUBLE*/ }, - { no: 3, name: "usage", kind: "scalar", T: 1 /*ScalarType.DOUBLE*/ } - ]); - } - create(value?: PartialMessage): Info_Memory { - const message = globalThis.Object.create((this.messagePrototype!)); - message.limit = 0; - message.request = 0; - message.usage = 0; - if (value !== undefined) - reflectionMergePartial(this, message, value); - return message; - } - internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Info_Memory): Info_Memory { - let message = target ?? this.create(), end = reader.pos + length; - while (reader.pos < end) { - let [fieldNo, wireType] = reader.tag(); - switch (fieldNo) { - case /* double limit */ 1: - message.limit = reader.double(); - break; - case /* double request */ 2: - message.request = reader.double(); - break; - case /* double usage */ 3: - message.usage = reader.double(); - break; - default: - let u = options.readUnknownField; - if (u === "throw") - throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); - let d = reader.skip(wireType); - if (u !== false) - (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); - } - } - return message; - } - internalBinaryWrite(message: Info_Memory, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { - /* double limit = 1; */ - if (message.limit !== 0) - writer.tag(1, WireType.Bit64).double(message.limit); - /* double request = 2; */ - if (message.request !== 0) - writer.tag(2, WireType.Bit64).double(message.request); - /* double usage = 3; */ - if (message.usage !== 0) - writer.tag(3, WireType.Bit64).double(message.usage); - let u = options.writeUnknownFields; - if (u !== false) - (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); - return writer; - } -} -/** - * @generated MessageType for protobuf message payload.v1.Info.Memory - */ -export const Info_Memory = new Info_Memory$Type(); -// @generated message type with reflection information, may provide speed optimized methods -class Info_Pods$Type extends MessageType { - constructor() { - super("payload.v1.Info.Pods", [ - { no: 1, name: "pods", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => Info_Pod, options: { "buf.validate.field": { repeated: { minItems: "1" } } } } - ]); - } - create(value?: PartialMessage): Info_Pods { - const message = globalThis.Object.create((this.messagePrototype!)); - message.pods = []; - if (value !== undefined) - reflectionMergePartial(this, message, value); - return message; - } - internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Info_Pods): Info_Pods { - let message = target ?? this.create(), end = reader.pos + length; - while (reader.pos < end) { - let [fieldNo, wireType] = reader.tag(); - switch (fieldNo) { - case /* repeated payload.v1.Info.Pod pods */ 1: - message.pods.push(Info_Pod.internalBinaryRead(reader, reader.uint32(), options)); - break; - default: - let u = options.readUnknownField; - if (u === "throw") - throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); - let d = reader.skip(wireType); - if (u !== false) - (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); - } - } - return message; - } - internalBinaryWrite(message: Info_Pods, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { - /* repeated payload.v1.Info.Pod pods = 1; */ - for (let i = 0; i < message.pods.length; i++) - Info_Pod.internalBinaryWrite(message.pods[i], writer.tag(1, WireType.LengthDelimited).fork(), options).join(); - let u = options.writeUnknownFields; - if (u !== false) - (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); - return writer; - } -} -/** - * @generated MessageType for protobuf message payload.v1.Info.Pods - */ -export const Info_Pods = new Info_Pods$Type(); -// @generated message type with reflection information, may provide speed optimized methods -class Info_Nodes$Type extends MessageType { - constructor() { - super("payload.v1.Info.Nodes", [ - { no: 1, name: "nodes", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => Info_Node, options: { "buf.validate.field": { repeated: { minItems: "1" } } } } - ]); - } - create(value?: PartialMessage): Info_Nodes { - const message = globalThis.Object.create((this.messagePrototype!)); - message.nodes = []; - if (value !== undefined) - reflectionMergePartial(this, message, value); - return message; - } - internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Info_Nodes): Info_Nodes { - let message = target ?? this.create(), end = reader.pos + length; - while (reader.pos < end) { - let [fieldNo, wireType] = reader.tag(); - switch (fieldNo) { - case /* repeated payload.v1.Info.Node nodes */ 1: - message.nodes.push(Info_Node.internalBinaryRead(reader, reader.uint32(), options)); - break; - default: - let u = options.readUnknownField; - if (u === "throw") - throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); - let d = reader.skip(wireType); - if (u !== false) - (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); - } - } - return message; - } - internalBinaryWrite(message: Info_Nodes, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { - /* repeated payload.v1.Info.Node nodes = 1; */ - for (let i = 0; i < message.nodes.length; i++) - Info_Node.internalBinaryWrite(message.nodes[i], writer.tag(1, WireType.LengthDelimited).fork(), options).join(); - let u = options.writeUnknownFields; - if (u !== false) - (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); - return writer; - } -} -/** - * @generated MessageType for protobuf message payload.v1.Info.Nodes - */ -export const Info_Nodes = new Info_Nodes$Type(); -// @generated message type with reflection information, may provide speed optimized methods -class Info_Services$Type extends MessageType { - constructor() { - super("payload.v1.Info.Services", [ - { no: 1, name: "services", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => Info_Service, options: { "buf.validate.field": { repeated: { minItems: "1" } } } } - ]); - } - create(value?: PartialMessage): Info_Services { - const message = globalThis.Object.create((this.messagePrototype!)); - message.services = []; - if (value !== undefined) - reflectionMergePartial(this, message, value); - return message; - } - internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Info_Services): Info_Services { - let message = target ?? this.create(), end = reader.pos + length; - while (reader.pos < end) { - let [fieldNo, wireType] = reader.tag(); - switch (fieldNo) { - case /* repeated payload.v1.Info.Service services */ 1: - message.services.push(Info_Service.internalBinaryRead(reader, reader.uint32(), options)); - break; - default: - let u = options.readUnknownField; - if (u === "throw") - throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); - let d = reader.skip(wireType); - if (u !== false) - (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); - } - } - return message; - } - internalBinaryWrite(message: Info_Services, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { - /* repeated payload.v1.Info.Service services = 1; */ - for (let i = 0; i < message.services.length; i++) - Info_Service.internalBinaryWrite(message.services[i], writer.tag(1, WireType.LengthDelimited).fork(), options).join(); - let u = options.writeUnknownFields; - if (u !== false) - (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); - return writer; - } -} -/** - * @generated MessageType for protobuf message payload.v1.Info.Services - */ -export const Info_Services = new Info_Services$Type(); -// @generated message type with reflection information, may provide speed optimized methods -class Info_IPs$Type extends MessageType { - constructor() { - super("payload.v1.Info.IPs", [ - { no: 1, name: "ip", kind: "scalar", repeat: 2 /*RepeatType.UNPACKED*/, T: 9 /*ScalarType.STRING*/ } - ]); - } - create(value?: PartialMessage): Info_IPs { - const message = globalThis.Object.create((this.messagePrototype!)); - message.ip = []; - if (value !== undefined) - reflectionMergePartial(this, message, value); - return message; - } - internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Info_IPs): Info_IPs { - let message = target ?? this.create(), end = reader.pos + length; - while (reader.pos < end) { - let [fieldNo, wireType] = reader.tag(); - switch (fieldNo) { - case /* repeated string ip */ 1: - message.ip.push(reader.string()); - break; - default: - let u = options.readUnknownField; - if (u === "throw") - throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); - let d = reader.skip(wireType); - if (u !== false) - (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); - } - } - return message; - } - internalBinaryWrite(message: Info_IPs, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { - /* repeated string ip = 1; */ - for (let i = 0; i < message.ip.length; i++) - writer.tag(1, WireType.LengthDelimited).string(message.ip[i]); - let u = options.writeUnknownFields; - if (u !== false) - (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); - return writer; - } -} -/** - * @generated MessageType for protobuf message payload.v1.Info.IPs - */ -export const Info_IPs = new Info_IPs$Type(); -// @generated message type with reflection information, may provide speed optimized methods -class Empty$Type extends MessageType { - constructor() { - super("payload.v1.Empty", []); - } - create(value?: PartialMessage): Empty { - const message = globalThis.Object.create((this.messagePrototype!)); - if (value !== undefined) - reflectionMergePartial(this, message, value); - return message; - } - internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Empty): Empty { - return target ?? this.create(); - } - internalBinaryWrite(message: Empty, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { - let u = options.writeUnknownFields; - if (u !== false) - (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); - return writer; - } -} -/** - * @generated MessageType for protobuf message payload.v1.Empty - */ -export const Empty = new Empty$Type(); diff --git a/src/vald/v1/vald/filter_grpc_pb.js b/src/vald/v1/vald/filter_grpc_pb.js deleted file mode 100644 index 23a7b42..0000000 --- a/src/vald/v1/vald/filter_grpc_pb.js +++ /dev/null @@ -1,328 +0,0 @@ -// GENERATED CODE -- DO NOT EDIT! - -// Original file comments: -// -// Copyright (C) 2019-2023 vdaas.org vald team -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// You may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// -'use strict'; -var grpc = require('@grpc/grpc-js'); -var google_api_annotations_pb = require('../../../google/api/annotations_pb.js'); -var vald_v1_payload_payload_pb = require('../../../vald/v1/payload/payload_pb.js'); - -function serialize_payload_v1_Insert_MultiObjectRequest(arg) { - if (!(arg instanceof vald_v1_payload_payload_pb.Insert.MultiObjectRequest)) { - throw new Error('Expected argument of type payload.v1.Insert.MultiObjectRequest'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_payload_v1_Insert_MultiObjectRequest(buffer_arg) { - return vald_v1_payload_payload_pb.Insert.MultiObjectRequest.deserializeBinary(new Uint8Array(buffer_arg)); -} - -function serialize_payload_v1_Insert_ObjectRequest(arg) { - if (!(arg instanceof vald_v1_payload_payload_pb.Insert.ObjectRequest)) { - throw new Error('Expected argument of type payload.v1.Insert.ObjectRequest'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_payload_v1_Insert_ObjectRequest(buffer_arg) { - return vald_v1_payload_payload_pb.Insert.ObjectRequest.deserializeBinary(new Uint8Array(buffer_arg)); -} - -function serialize_payload_v1_Object_Location(arg) { - if (!(arg instanceof vald_v1_payload_payload_pb.Object.Location)) { - throw new Error('Expected argument of type payload.v1.Object.Location'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_payload_v1_Object_Location(buffer_arg) { - return vald_v1_payload_payload_pb.Object.Location.deserializeBinary(new Uint8Array(buffer_arg)); -} - -function serialize_payload_v1_Object_Locations(arg) { - if (!(arg instanceof vald_v1_payload_payload_pb.Object.Locations)) { - throw new Error('Expected argument of type payload.v1.Object.Locations'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_payload_v1_Object_Locations(buffer_arg) { - return vald_v1_payload_payload_pb.Object.Locations.deserializeBinary(new Uint8Array(buffer_arg)); -} - -function serialize_payload_v1_Object_StreamLocation(arg) { - if (!(arg instanceof vald_v1_payload_payload_pb.Object.StreamLocation)) { - throw new Error('Expected argument of type payload.v1.Object.StreamLocation'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_payload_v1_Object_StreamLocation(buffer_arg) { - return vald_v1_payload_payload_pb.Object.StreamLocation.deserializeBinary(new Uint8Array(buffer_arg)); -} - -function serialize_payload_v1_Search_MultiObjectRequest(arg) { - if (!(arg instanceof vald_v1_payload_payload_pb.Search.MultiObjectRequest)) { - throw new Error('Expected argument of type payload.v1.Search.MultiObjectRequest'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_payload_v1_Search_MultiObjectRequest(buffer_arg) { - return vald_v1_payload_payload_pb.Search.MultiObjectRequest.deserializeBinary(new Uint8Array(buffer_arg)); -} - -function serialize_payload_v1_Search_ObjectRequest(arg) { - if (!(arg instanceof vald_v1_payload_payload_pb.Search.ObjectRequest)) { - throw new Error('Expected argument of type payload.v1.Search.ObjectRequest'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_payload_v1_Search_ObjectRequest(buffer_arg) { - return vald_v1_payload_payload_pb.Search.ObjectRequest.deserializeBinary(new Uint8Array(buffer_arg)); -} - -function serialize_payload_v1_Search_Response(arg) { - if (!(arg instanceof vald_v1_payload_payload_pb.Search.Response)) { - throw new Error('Expected argument of type payload.v1.Search.Response'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_payload_v1_Search_Response(buffer_arg) { - return vald_v1_payload_payload_pb.Search.Response.deserializeBinary(new Uint8Array(buffer_arg)); -} - -function serialize_payload_v1_Search_Responses(arg) { - if (!(arg instanceof vald_v1_payload_payload_pb.Search.Responses)) { - throw new Error('Expected argument of type payload.v1.Search.Responses'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_payload_v1_Search_Responses(buffer_arg) { - return vald_v1_payload_payload_pb.Search.Responses.deserializeBinary(new Uint8Array(buffer_arg)); -} - -function serialize_payload_v1_Search_StreamResponse(arg) { - if (!(arg instanceof vald_v1_payload_payload_pb.Search.StreamResponse)) { - throw new Error('Expected argument of type payload.v1.Search.StreamResponse'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_payload_v1_Search_StreamResponse(buffer_arg) { - return vald_v1_payload_payload_pb.Search.StreamResponse.deserializeBinary(new Uint8Array(buffer_arg)); -} - -function serialize_payload_v1_Update_MultiObjectRequest(arg) { - if (!(arg instanceof vald_v1_payload_payload_pb.Update.MultiObjectRequest)) { - throw new Error('Expected argument of type payload.v1.Update.MultiObjectRequest'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_payload_v1_Update_MultiObjectRequest(buffer_arg) { - return vald_v1_payload_payload_pb.Update.MultiObjectRequest.deserializeBinary(new Uint8Array(buffer_arg)); -} - -function serialize_payload_v1_Update_ObjectRequest(arg) { - if (!(arg instanceof vald_v1_payload_payload_pb.Update.ObjectRequest)) { - throw new Error('Expected argument of type payload.v1.Update.ObjectRequest'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_payload_v1_Update_ObjectRequest(buffer_arg) { - return vald_v1_payload_payload_pb.Update.ObjectRequest.deserializeBinary(new Uint8Array(buffer_arg)); -} - -function serialize_payload_v1_Upsert_MultiObjectRequest(arg) { - if (!(arg instanceof vald_v1_payload_payload_pb.Upsert.MultiObjectRequest)) { - throw new Error('Expected argument of type payload.v1.Upsert.MultiObjectRequest'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_payload_v1_Upsert_MultiObjectRequest(buffer_arg) { - return vald_v1_payload_payload_pb.Upsert.MultiObjectRequest.deserializeBinary(new Uint8Array(buffer_arg)); -} - -function serialize_payload_v1_Upsert_ObjectRequest(arg) { - if (!(arg instanceof vald_v1_payload_payload_pb.Upsert.ObjectRequest)) { - throw new Error('Expected argument of type payload.v1.Upsert.ObjectRequest'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_payload_v1_Upsert_ObjectRequest(buffer_arg) { - return vald_v1_payload_payload_pb.Upsert.ObjectRequest.deserializeBinary(new Uint8Array(buffer_arg)); -} - - -// Filter service provides ways to connect to Vald through filter. -var FilterService = exports.FilterService = { - // A method to search object. -searchObject: { - path: '/vald.v1.Filter/SearchObject', - requestStream: false, - responseStream: false, - requestType: vald_v1_payload_payload_pb.Search.ObjectRequest, - responseType: vald_v1_payload_payload_pb.Search.Response, - requestSerialize: serialize_payload_v1_Search_ObjectRequest, - requestDeserialize: deserialize_payload_v1_Search_ObjectRequest, - responseSerialize: serialize_payload_v1_Search_Response, - responseDeserialize: deserialize_payload_v1_Search_Response, - }, - // A method to search multiple objects. -multiSearchObject: { - path: '/vald.v1.Filter/MultiSearchObject', - requestStream: false, - responseStream: false, - requestType: vald_v1_payload_payload_pb.Search.MultiObjectRequest, - responseType: vald_v1_payload_payload_pb.Search.Responses, - requestSerialize: serialize_payload_v1_Search_MultiObjectRequest, - requestDeserialize: deserialize_payload_v1_Search_MultiObjectRequest, - responseSerialize: serialize_payload_v1_Search_Responses, - responseDeserialize: deserialize_payload_v1_Search_Responses, - }, - // A method to search object by bidirectional streaming. -streamSearchObject: { - path: '/vald.v1.Filter/StreamSearchObject', - requestStream: true, - responseStream: true, - requestType: vald_v1_payload_payload_pb.Search.ObjectRequest, - responseType: vald_v1_payload_payload_pb.Search.StreamResponse, - requestSerialize: serialize_payload_v1_Search_ObjectRequest, - requestDeserialize: deserialize_payload_v1_Search_ObjectRequest, - responseSerialize: serialize_payload_v1_Search_StreamResponse, - responseDeserialize: deserialize_payload_v1_Search_StreamResponse, - }, - // A method insert object. -insertObject: { - path: '/vald.v1.Filter/InsertObject', - requestStream: false, - responseStream: false, - requestType: vald_v1_payload_payload_pb.Insert.ObjectRequest, - responseType: vald_v1_payload_payload_pb.Object.Location, - requestSerialize: serialize_payload_v1_Insert_ObjectRequest, - requestDeserialize: deserialize_payload_v1_Insert_ObjectRequest, - responseSerialize: serialize_payload_v1_Object_Location, - responseDeserialize: deserialize_payload_v1_Object_Location, - }, - // Represent the streaming RPC to insert object by bidirectional streaming. -streamInsertObject: { - path: '/vald.v1.Filter/StreamInsertObject', - requestStream: true, - responseStream: true, - requestType: vald_v1_payload_payload_pb.Insert.ObjectRequest, - responseType: vald_v1_payload_payload_pb.Object.StreamLocation, - requestSerialize: serialize_payload_v1_Insert_ObjectRequest, - requestDeserialize: deserialize_payload_v1_Insert_ObjectRequest, - responseSerialize: serialize_payload_v1_Object_StreamLocation, - responseDeserialize: deserialize_payload_v1_Object_StreamLocation, - }, - // A method to insert multiple objects. -multiInsertObject: { - path: '/vald.v1.Filter/MultiInsertObject', - requestStream: false, - responseStream: false, - requestType: vald_v1_payload_payload_pb.Insert.MultiObjectRequest, - responseType: vald_v1_payload_payload_pb.Object.Locations, - requestSerialize: serialize_payload_v1_Insert_MultiObjectRequest, - requestDeserialize: deserialize_payload_v1_Insert_MultiObjectRequest, - responseSerialize: serialize_payload_v1_Object_Locations, - responseDeserialize: deserialize_payload_v1_Object_Locations, - }, - // A method to update object. -updateObject: { - path: '/vald.v1.Filter/UpdateObject', - requestStream: false, - responseStream: false, - requestType: vald_v1_payload_payload_pb.Update.ObjectRequest, - responseType: vald_v1_payload_payload_pb.Object.Location, - requestSerialize: serialize_payload_v1_Update_ObjectRequest, - requestDeserialize: deserialize_payload_v1_Update_ObjectRequest, - responseSerialize: serialize_payload_v1_Object_Location, - responseDeserialize: deserialize_payload_v1_Object_Location, - }, - // A method to update object by bidirectional streaming. -streamUpdateObject: { - path: '/vald.v1.Filter/StreamUpdateObject', - requestStream: true, - responseStream: true, - requestType: vald_v1_payload_payload_pb.Update.ObjectRequest, - responseType: vald_v1_payload_payload_pb.Object.StreamLocation, - requestSerialize: serialize_payload_v1_Update_ObjectRequest, - requestDeserialize: deserialize_payload_v1_Update_ObjectRequest, - responseSerialize: serialize_payload_v1_Object_StreamLocation, - responseDeserialize: deserialize_payload_v1_Object_StreamLocation, - }, - // A method to update multiple objects. -multiUpdateObject: { - path: '/vald.v1.Filter/MultiUpdateObject', - requestStream: false, - responseStream: false, - requestType: vald_v1_payload_payload_pb.Update.MultiObjectRequest, - responseType: vald_v1_payload_payload_pb.Object.Locations, - requestSerialize: serialize_payload_v1_Update_MultiObjectRequest, - requestDeserialize: deserialize_payload_v1_Update_MultiObjectRequest, - responseSerialize: serialize_payload_v1_Object_Locations, - responseDeserialize: deserialize_payload_v1_Object_Locations, - }, - // A method to upsert object. -upsertObject: { - path: '/vald.v1.Filter/UpsertObject', - requestStream: false, - responseStream: false, - requestType: vald_v1_payload_payload_pb.Upsert.ObjectRequest, - responseType: vald_v1_payload_payload_pb.Object.Location, - requestSerialize: serialize_payload_v1_Upsert_ObjectRequest, - requestDeserialize: deserialize_payload_v1_Upsert_ObjectRequest, - responseSerialize: serialize_payload_v1_Object_Location, - responseDeserialize: deserialize_payload_v1_Object_Location, - }, - // A method to upsert object by bidirectional streaming. -streamUpsertObject: { - path: '/vald.v1.Filter/StreamUpsertObject', - requestStream: true, - responseStream: true, - requestType: vald_v1_payload_payload_pb.Upsert.ObjectRequest, - responseType: vald_v1_payload_payload_pb.Object.StreamLocation, - requestSerialize: serialize_payload_v1_Upsert_ObjectRequest, - requestDeserialize: deserialize_payload_v1_Upsert_ObjectRequest, - responseSerialize: serialize_payload_v1_Object_StreamLocation, - responseDeserialize: deserialize_payload_v1_Object_StreamLocation, - }, - // A method to upsert multiple objects. -multiUpsertObject: { - path: '/vald.v1.Filter/MultiUpsertObject', - requestStream: false, - responseStream: false, - requestType: vald_v1_payload_payload_pb.Upsert.MultiObjectRequest, - responseType: vald_v1_payload_payload_pb.Object.Locations, - requestSerialize: serialize_payload_v1_Upsert_MultiObjectRequest, - requestDeserialize: deserialize_payload_v1_Upsert_MultiObjectRequest, - responseSerialize: serialize_payload_v1_Object_Locations, - responseDeserialize: deserialize_payload_v1_Object_Locations, - }, -}; - -exports.FilterClient = grpc.makeGenericClientConstructor(FilterService); diff --git a/src/vald/v1/vald/filter_pb.d.ts b/src/vald/v1/vald/filter_pb.d.ts new file mode 100644 index 0000000..73931a1 --- /dev/null +++ b/src/vald/v1/vald/filter_pb.d.ts @@ -0,0 +1,26 @@ +/* eslint-disable */ +// @generated by protobuf-ts 2.9.3 with parameter add_pb_suffix,client_grpc1,generate_dependencies,keep_enum_prefix,ts_nocheck,use_proto_field_name,output_javascript,output_legacy_commonjs,eslint_disable +// @generated from protobuf file "vald/v1/vald/filter.proto" (package "vald.v1", syntax proto3) +// tslint:disable +// @ts-nocheck +// +// +// Copyright (C) 2019-2023 vdaas.org vald team +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// You may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +/** + * @generated ServiceType for protobuf service vald.v1.Filter + */ +export declare const Filter: any; diff --git a/src/vald/v1/vald/filter_pb.grpc-client.ts b/src/vald/v1/vald/filter_pb.grpc-client.d.ts similarity index 74% rename from src/vald/v1/vald/filter_pb.grpc-client.ts rename to src/vald/v1/vald/filter_pb.grpc-client.d.ts index 7ea35f2..3f19b26 100644 --- a/src/vald/v1/vald/filter_pb.grpc-client.ts +++ b/src/vald/v1/vald/filter_pb.grpc-client.d.ts @@ -1,4 +1,5 @@ -// @generated by protobuf-ts 2.9.3 with parameter add_pb_suffix,client_grpc1,generate_dependencies,keep_enum_prefix,ts_nocheck,use_proto_field_name +/* eslint-disable */ +// @generated by protobuf-ts 2.9.3 with parameter add_pb_suffix,client_grpc1,generate_dependencies,keep_enum_prefix,ts_nocheck,use_proto_field_name,output_javascript,output_legacy_commonjs,eslint_disable // @generated from protobuf file "vald/v1/vald/filter.proto" (package "vald.v1", syntax proto3) // tslint:disable // @ts-nocheck @@ -19,7 +20,6 @@ // limitations under the License. // // -import { Filter } from "./filter_pb"; import type { BinaryWriteOptions } from "@protobuf-ts/runtime"; import type { BinaryReadOptions } from "@protobuf-ts/runtime"; import type { Upsert_MultiObjectRequest } from "../payload/payload_pb"; @@ -149,118 +149,79 @@ export interface IFilterClient { * * @generated from protobuf service vald.v1.Filter */ -export class FilterClient extends grpc.Client implements IFilterClient { - private readonly _binaryOptions: Partial; - constructor(address: string, credentials: grpc.ChannelCredentials, options: grpc.ClientOptions = {}, binaryOptions: Partial = {}) { - super(address, credentials, options); - this._binaryOptions = binaryOptions; - } +export declare class FilterClient extends grpc.Client implements IFilterClient { + private readonly _binaryOptions; + constructor(address: string, credentials: grpc.ChannelCredentials, options?: grpc.ClientOptions, binaryOptions?: Partial); /** * A method to search object. * * @generated from protobuf rpc: SearchObject(payload.v1.Search.ObjectRequest) returns (payload.v1.Search.Response); */ - searchObject(input: Search_ObjectRequest, metadata: grpc.Metadata | grpc.CallOptions | ((err: grpc.ServiceError | null, value?: Search_Response) => void), options?: grpc.CallOptions | ((err: grpc.ServiceError | null, value?: Search_Response) => void), callback?: ((err: grpc.ServiceError | null, value?: Search_Response) => void)): grpc.ClientUnaryCall { - const method = Filter.methods[0]; - return this.makeUnaryRequest(`/${Filter.typeName}/${method.name}`, (value: Search_ObjectRequest): Buffer => Buffer.from(method.I.toBinary(value, this._binaryOptions)), (value: Buffer): Search_Response => method.O.fromBinary(value, this._binaryOptions), input, (metadata as any), (options as any), (callback as any)); - } + searchObject(input: Search_ObjectRequest, metadata: grpc.Metadata | grpc.CallOptions | ((err: grpc.ServiceError | null, value?: Search_Response) => void), options?: grpc.CallOptions | ((err: grpc.ServiceError | null, value?: Search_Response) => void), callback?: ((err: grpc.ServiceError | null, value?: Search_Response) => void)): grpc.ClientUnaryCall; /** * A method to search multiple objects. * * @generated from protobuf rpc: MultiSearchObject(payload.v1.Search.MultiObjectRequest) returns (payload.v1.Search.Responses); */ - multiSearchObject(input: Search_MultiObjectRequest, metadata: grpc.Metadata | grpc.CallOptions | ((err: grpc.ServiceError | null, value?: Search_Responses) => void), options?: grpc.CallOptions | ((err: grpc.ServiceError | null, value?: Search_Responses) => void), callback?: ((err: grpc.ServiceError | null, value?: Search_Responses) => void)): grpc.ClientUnaryCall { - const method = Filter.methods[1]; - return this.makeUnaryRequest(`/${Filter.typeName}/${method.name}`, (value: Search_MultiObjectRequest): Buffer => Buffer.from(method.I.toBinary(value, this._binaryOptions)), (value: Buffer): Search_Responses => method.O.fromBinary(value, this._binaryOptions), input, (metadata as any), (options as any), (callback as any)); - } + multiSearchObject(input: Search_MultiObjectRequest, metadata: grpc.Metadata | grpc.CallOptions | ((err: grpc.ServiceError | null, value?: Search_Responses) => void), options?: grpc.CallOptions | ((err: grpc.ServiceError | null, value?: Search_Responses) => void), callback?: ((err: grpc.ServiceError | null, value?: Search_Responses) => void)): grpc.ClientUnaryCall; /** * A method to search object by bidirectional streaming. * * @generated from protobuf rpc: StreamSearchObject(stream payload.v1.Search.ObjectRequest) returns (stream payload.v1.Search.StreamResponse); */ - streamSearchObject(metadata?: grpc.Metadata | grpc.CallOptions, options?: grpc.CallOptions): grpc.ClientDuplexStream { - const method = Filter.methods[2]; - return this.makeBidiStreamRequest(`/${Filter.typeName}/${method.name}`, (value: Search_ObjectRequest): Buffer => Buffer.from(method.I.toBinary(value, this._binaryOptions)), (value: Buffer): Search_StreamResponse => method.O.fromBinary(value, this._binaryOptions), (metadata as any), options); - } + streamSearchObject(metadata?: grpc.Metadata | grpc.CallOptions, options?: grpc.CallOptions): grpc.ClientDuplexStream; /** * A method insert object. * * @generated from protobuf rpc: InsertObject(payload.v1.Insert.ObjectRequest) returns (payload.v1.Object.Location); */ - insertObject(input: Insert_ObjectRequest, metadata: grpc.Metadata | grpc.CallOptions | ((err: grpc.ServiceError | null, value?: Object_Location) => void), options?: grpc.CallOptions | ((err: grpc.ServiceError | null, value?: Object_Location) => void), callback?: ((err: grpc.ServiceError | null, value?: Object_Location) => void)): grpc.ClientUnaryCall { - const method = Filter.methods[3]; - return this.makeUnaryRequest(`/${Filter.typeName}/${method.name}`, (value: Insert_ObjectRequest): Buffer => Buffer.from(method.I.toBinary(value, this._binaryOptions)), (value: Buffer): Object_Location => method.O.fromBinary(value, this._binaryOptions), input, (metadata as any), (options as any), (callback as any)); - } + insertObject(input: Insert_ObjectRequest, metadata: grpc.Metadata | grpc.CallOptions | ((err: grpc.ServiceError | null, value?: Object_Location) => void), options?: grpc.CallOptions | ((err: grpc.ServiceError | null, value?: Object_Location) => void), callback?: ((err: grpc.ServiceError | null, value?: Object_Location) => void)): grpc.ClientUnaryCall; /** * Represent the streaming RPC to insert object by bidirectional streaming. * * @generated from protobuf rpc: StreamInsertObject(stream payload.v1.Insert.ObjectRequest) returns (stream payload.v1.Object.StreamLocation); */ - streamInsertObject(metadata?: grpc.Metadata | grpc.CallOptions, options?: grpc.CallOptions): grpc.ClientDuplexStream { - const method = Filter.methods[4]; - return this.makeBidiStreamRequest(`/${Filter.typeName}/${method.name}`, (value: Insert_ObjectRequest): Buffer => Buffer.from(method.I.toBinary(value, this._binaryOptions)), (value: Buffer): Object_StreamLocation => method.O.fromBinary(value, this._binaryOptions), (metadata as any), options); - } + streamInsertObject(metadata?: grpc.Metadata | grpc.CallOptions, options?: grpc.CallOptions): grpc.ClientDuplexStream; /** * A method to insert multiple objects. * * @generated from protobuf rpc: MultiInsertObject(payload.v1.Insert.MultiObjectRequest) returns (payload.v1.Object.Locations); */ - multiInsertObject(input: Insert_MultiObjectRequest, metadata: grpc.Metadata | grpc.CallOptions | ((err: grpc.ServiceError | null, value?: Object_Locations) => void), options?: grpc.CallOptions | ((err: grpc.ServiceError | null, value?: Object_Locations) => void), callback?: ((err: grpc.ServiceError | null, value?: Object_Locations) => void)): grpc.ClientUnaryCall { - const method = Filter.methods[5]; - return this.makeUnaryRequest(`/${Filter.typeName}/${method.name}`, (value: Insert_MultiObjectRequest): Buffer => Buffer.from(method.I.toBinary(value, this._binaryOptions)), (value: Buffer): Object_Locations => method.O.fromBinary(value, this._binaryOptions), input, (metadata as any), (options as any), (callback as any)); - } + multiInsertObject(input: Insert_MultiObjectRequest, metadata: grpc.Metadata | grpc.CallOptions | ((err: grpc.ServiceError | null, value?: Object_Locations) => void), options?: grpc.CallOptions | ((err: grpc.ServiceError | null, value?: Object_Locations) => void), callback?: ((err: grpc.ServiceError | null, value?: Object_Locations) => void)): grpc.ClientUnaryCall; /** * A method to update object. * * @generated from protobuf rpc: UpdateObject(payload.v1.Update.ObjectRequest) returns (payload.v1.Object.Location); */ - updateObject(input: Update_ObjectRequest, metadata: grpc.Metadata | grpc.CallOptions | ((err: grpc.ServiceError | null, value?: Object_Location) => void), options?: grpc.CallOptions | ((err: grpc.ServiceError | null, value?: Object_Location) => void), callback?: ((err: grpc.ServiceError | null, value?: Object_Location) => void)): grpc.ClientUnaryCall { - const method = Filter.methods[6]; - return this.makeUnaryRequest(`/${Filter.typeName}/${method.name}`, (value: Update_ObjectRequest): Buffer => Buffer.from(method.I.toBinary(value, this._binaryOptions)), (value: Buffer): Object_Location => method.O.fromBinary(value, this._binaryOptions), input, (metadata as any), (options as any), (callback as any)); - } + updateObject(input: Update_ObjectRequest, metadata: grpc.Metadata | grpc.CallOptions | ((err: grpc.ServiceError | null, value?: Object_Location) => void), options?: grpc.CallOptions | ((err: grpc.ServiceError | null, value?: Object_Location) => void), callback?: ((err: grpc.ServiceError | null, value?: Object_Location) => void)): grpc.ClientUnaryCall; /** * A method to update object by bidirectional streaming. * * @generated from protobuf rpc: StreamUpdateObject(stream payload.v1.Update.ObjectRequest) returns (stream payload.v1.Object.StreamLocation); */ - streamUpdateObject(metadata?: grpc.Metadata | grpc.CallOptions, options?: grpc.CallOptions): grpc.ClientDuplexStream { - const method = Filter.methods[7]; - return this.makeBidiStreamRequest(`/${Filter.typeName}/${method.name}`, (value: Update_ObjectRequest): Buffer => Buffer.from(method.I.toBinary(value, this._binaryOptions)), (value: Buffer): Object_StreamLocation => method.O.fromBinary(value, this._binaryOptions), (metadata as any), options); - } + streamUpdateObject(metadata?: grpc.Metadata | grpc.CallOptions, options?: grpc.CallOptions): grpc.ClientDuplexStream; /** * A method to update multiple objects. * * @generated from protobuf rpc: MultiUpdateObject(payload.v1.Update.MultiObjectRequest) returns (payload.v1.Object.Locations); */ - multiUpdateObject(input: Update_MultiObjectRequest, metadata: grpc.Metadata | grpc.CallOptions | ((err: grpc.ServiceError | null, value?: Object_Locations) => void), options?: grpc.CallOptions | ((err: grpc.ServiceError | null, value?: Object_Locations) => void), callback?: ((err: grpc.ServiceError | null, value?: Object_Locations) => void)): grpc.ClientUnaryCall { - const method = Filter.methods[8]; - return this.makeUnaryRequest(`/${Filter.typeName}/${method.name}`, (value: Update_MultiObjectRequest): Buffer => Buffer.from(method.I.toBinary(value, this._binaryOptions)), (value: Buffer): Object_Locations => method.O.fromBinary(value, this._binaryOptions), input, (metadata as any), (options as any), (callback as any)); - } + multiUpdateObject(input: Update_MultiObjectRequest, metadata: grpc.Metadata | grpc.CallOptions | ((err: grpc.ServiceError | null, value?: Object_Locations) => void), options?: grpc.CallOptions | ((err: grpc.ServiceError | null, value?: Object_Locations) => void), callback?: ((err: grpc.ServiceError | null, value?: Object_Locations) => void)): grpc.ClientUnaryCall; /** * A method to upsert object. * * @generated from protobuf rpc: UpsertObject(payload.v1.Upsert.ObjectRequest) returns (payload.v1.Object.Location); */ - upsertObject(input: Upsert_ObjectRequest, metadata: grpc.Metadata | grpc.CallOptions | ((err: grpc.ServiceError | null, value?: Object_Location) => void), options?: grpc.CallOptions | ((err: grpc.ServiceError | null, value?: Object_Location) => void), callback?: ((err: grpc.ServiceError | null, value?: Object_Location) => void)): grpc.ClientUnaryCall { - const method = Filter.methods[9]; - return this.makeUnaryRequest(`/${Filter.typeName}/${method.name}`, (value: Upsert_ObjectRequest): Buffer => Buffer.from(method.I.toBinary(value, this._binaryOptions)), (value: Buffer): Object_Location => method.O.fromBinary(value, this._binaryOptions), input, (metadata as any), (options as any), (callback as any)); - } + upsertObject(input: Upsert_ObjectRequest, metadata: grpc.Metadata | grpc.CallOptions | ((err: grpc.ServiceError | null, value?: Object_Location) => void), options?: grpc.CallOptions | ((err: grpc.ServiceError | null, value?: Object_Location) => void), callback?: ((err: grpc.ServiceError | null, value?: Object_Location) => void)): grpc.ClientUnaryCall; /** * A method to upsert object by bidirectional streaming. * * @generated from protobuf rpc: StreamUpsertObject(stream payload.v1.Upsert.ObjectRequest) returns (stream payload.v1.Object.StreamLocation); */ - streamUpsertObject(metadata?: grpc.Metadata | grpc.CallOptions, options?: grpc.CallOptions): grpc.ClientDuplexStream { - const method = Filter.methods[10]; - return this.makeBidiStreamRequest(`/${Filter.typeName}/${method.name}`, (value: Upsert_ObjectRequest): Buffer => Buffer.from(method.I.toBinary(value, this._binaryOptions)), (value: Buffer): Object_StreamLocation => method.O.fromBinary(value, this._binaryOptions), (metadata as any), options); - } + streamUpsertObject(metadata?: grpc.Metadata | grpc.CallOptions, options?: grpc.CallOptions): grpc.ClientDuplexStream; /** * A method to upsert multiple objects. * * @generated from protobuf rpc: MultiUpsertObject(payload.v1.Upsert.MultiObjectRequest) returns (payload.v1.Object.Locations); */ - multiUpsertObject(input: Upsert_MultiObjectRequest, metadata: grpc.Metadata | grpc.CallOptions | ((err: grpc.ServiceError | null, value?: Object_Locations) => void), options?: grpc.CallOptions | ((err: grpc.ServiceError | null, value?: Object_Locations) => void), callback?: ((err: grpc.ServiceError | null, value?: Object_Locations) => void)): grpc.ClientUnaryCall { - const method = Filter.methods[11]; - return this.makeUnaryRequest(`/${Filter.typeName}/${method.name}`, (value: Upsert_MultiObjectRequest): Buffer => Buffer.from(method.I.toBinary(value, this._binaryOptions)), (value: Buffer): Object_Locations => method.O.fromBinary(value, this._binaryOptions), input, (metadata as any), (options as any), (callback as any)); - } + multiUpsertObject(input: Upsert_MultiObjectRequest, metadata: grpc.Metadata | grpc.CallOptions | ((err: grpc.ServiceError | null, value?: Object_Locations) => void), options?: grpc.CallOptions | ((err: grpc.ServiceError | null, value?: Object_Locations) => void), callback?: ((err: grpc.ServiceError | null, value?: Object_Locations) => void)): grpc.ClientUnaryCall; } diff --git a/src/vald/v1/vald/filter_pb.grpc-client.js b/src/vald/v1/vald/filter_pb.grpc-client.js new file mode 100644 index 0000000..b3c4ef4 --- /dev/null +++ b/src/vald/v1/vald/filter_pb.grpc-client.js @@ -0,0 +1,169 @@ +/* eslint-disable */ +// @generated by protobuf-ts 2.9.3 with parameter add_pb_suffix,client_grpc1,generate_dependencies,keep_enum_prefix,ts_nocheck,use_proto_field_name,output_javascript,output_legacy_commonjs,eslint_disable +// @generated from protobuf file "vald/v1/vald/filter.proto" (package "vald.v1", syntax proto3) +// tslint:disable +// @ts-nocheck +// +// +// Copyright (C) 2019-2023 vdaas.org vald team +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// You may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.FilterClient = void 0; +/* eslint-disable */ +// @generated by protobuf-ts 2.9.3 with parameter add_pb_suffix,client_grpc1,generate_dependencies,keep_enum_prefix,ts_nocheck,use_proto_field_name,output_javascript,output_legacy_commonjs,eslint_disable +// @generated from protobuf file "vald/v1/vald/filter.proto" (package "vald.v1", syntax proto3) +// tslint:disable +// @ts-nocheck +// +// +// Copyright (C) 2019-2023 vdaas.org vald team +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// You may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +const filter_pb_1 = require("./filter_pb"); +const grpc = require("@grpc/grpc-js"); +/** + * Filter service provides ways to connect to Vald through filter. + * + * @generated from protobuf service vald.v1.Filter + */ +class FilterClient extends grpc.Client { + constructor(address, credentials, options = {}, binaryOptions = {}) { + super(address, credentials, options); + this._binaryOptions = binaryOptions; + } + /** + * A method to search object. + * + * @generated from protobuf rpc: SearchObject(payload.v1.Search.ObjectRequest) returns (payload.v1.Search.Response); + */ + searchObject(input, metadata, options, callback) { + const method = filter_pb_1.Filter.methods[0]; + return this.makeUnaryRequest(`/${filter_pb_1.Filter.typeName}/${method.name}`, (value) => Buffer.from(method.I.toBinary(value, this._binaryOptions)), (value) => method.O.fromBinary(value, this._binaryOptions), input, metadata, options, callback); + } + /** + * A method to search multiple objects. + * + * @generated from protobuf rpc: MultiSearchObject(payload.v1.Search.MultiObjectRequest) returns (payload.v1.Search.Responses); + */ + multiSearchObject(input, metadata, options, callback) { + const method = filter_pb_1.Filter.methods[1]; + return this.makeUnaryRequest(`/${filter_pb_1.Filter.typeName}/${method.name}`, (value) => Buffer.from(method.I.toBinary(value, this._binaryOptions)), (value) => method.O.fromBinary(value, this._binaryOptions), input, metadata, options, callback); + } + /** + * A method to search object by bidirectional streaming. + * + * @generated from protobuf rpc: StreamSearchObject(stream payload.v1.Search.ObjectRequest) returns (stream payload.v1.Search.StreamResponse); + */ + streamSearchObject(metadata, options) { + const method = filter_pb_1.Filter.methods[2]; + return this.makeBidiStreamRequest(`/${filter_pb_1.Filter.typeName}/${method.name}`, (value) => Buffer.from(method.I.toBinary(value, this._binaryOptions)), (value) => method.O.fromBinary(value, this._binaryOptions), metadata, options); + } + /** + * A method insert object. + * + * @generated from protobuf rpc: InsertObject(payload.v1.Insert.ObjectRequest) returns (payload.v1.Object.Location); + */ + insertObject(input, metadata, options, callback) { + const method = filter_pb_1.Filter.methods[3]; + return this.makeUnaryRequest(`/${filter_pb_1.Filter.typeName}/${method.name}`, (value) => Buffer.from(method.I.toBinary(value, this._binaryOptions)), (value) => method.O.fromBinary(value, this._binaryOptions), input, metadata, options, callback); + } + /** + * Represent the streaming RPC to insert object by bidirectional streaming. + * + * @generated from protobuf rpc: StreamInsertObject(stream payload.v1.Insert.ObjectRequest) returns (stream payload.v1.Object.StreamLocation); + */ + streamInsertObject(metadata, options) { + const method = filter_pb_1.Filter.methods[4]; + return this.makeBidiStreamRequest(`/${filter_pb_1.Filter.typeName}/${method.name}`, (value) => Buffer.from(method.I.toBinary(value, this._binaryOptions)), (value) => method.O.fromBinary(value, this._binaryOptions), metadata, options); + } + /** + * A method to insert multiple objects. + * + * @generated from protobuf rpc: MultiInsertObject(payload.v1.Insert.MultiObjectRequest) returns (payload.v1.Object.Locations); + */ + multiInsertObject(input, metadata, options, callback) { + const method = filter_pb_1.Filter.methods[5]; + return this.makeUnaryRequest(`/${filter_pb_1.Filter.typeName}/${method.name}`, (value) => Buffer.from(method.I.toBinary(value, this._binaryOptions)), (value) => method.O.fromBinary(value, this._binaryOptions), input, metadata, options, callback); + } + /** + * A method to update object. + * + * @generated from protobuf rpc: UpdateObject(payload.v1.Update.ObjectRequest) returns (payload.v1.Object.Location); + */ + updateObject(input, metadata, options, callback) { + const method = filter_pb_1.Filter.methods[6]; + return this.makeUnaryRequest(`/${filter_pb_1.Filter.typeName}/${method.name}`, (value) => Buffer.from(method.I.toBinary(value, this._binaryOptions)), (value) => method.O.fromBinary(value, this._binaryOptions), input, metadata, options, callback); + } + /** + * A method to update object by bidirectional streaming. + * + * @generated from protobuf rpc: StreamUpdateObject(stream payload.v1.Update.ObjectRequest) returns (stream payload.v1.Object.StreamLocation); + */ + streamUpdateObject(metadata, options) { + const method = filter_pb_1.Filter.methods[7]; + return this.makeBidiStreamRequest(`/${filter_pb_1.Filter.typeName}/${method.name}`, (value) => Buffer.from(method.I.toBinary(value, this._binaryOptions)), (value) => method.O.fromBinary(value, this._binaryOptions), metadata, options); + } + /** + * A method to update multiple objects. + * + * @generated from protobuf rpc: MultiUpdateObject(payload.v1.Update.MultiObjectRequest) returns (payload.v1.Object.Locations); + */ + multiUpdateObject(input, metadata, options, callback) { + const method = filter_pb_1.Filter.methods[8]; + return this.makeUnaryRequest(`/${filter_pb_1.Filter.typeName}/${method.name}`, (value) => Buffer.from(method.I.toBinary(value, this._binaryOptions)), (value) => method.O.fromBinary(value, this._binaryOptions), input, metadata, options, callback); + } + /** + * A method to upsert object. + * + * @generated from protobuf rpc: UpsertObject(payload.v1.Upsert.ObjectRequest) returns (payload.v1.Object.Location); + */ + upsertObject(input, metadata, options, callback) { + const method = filter_pb_1.Filter.methods[9]; + return this.makeUnaryRequest(`/${filter_pb_1.Filter.typeName}/${method.name}`, (value) => Buffer.from(method.I.toBinary(value, this._binaryOptions)), (value) => method.O.fromBinary(value, this._binaryOptions), input, metadata, options, callback); + } + /** + * A method to upsert object by bidirectional streaming. + * + * @generated from protobuf rpc: StreamUpsertObject(stream payload.v1.Upsert.ObjectRequest) returns (stream payload.v1.Object.StreamLocation); + */ + streamUpsertObject(metadata, options) { + const method = filter_pb_1.Filter.methods[10]; + return this.makeBidiStreamRequest(`/${filter_pb_1.Filter.typeName}/${method.name}`, (value) => Buffer.from(method.I.toBinary(value, this._binaryOptions)), (value) => method.O.fromBinary(value, this._binaryOptions), metadata, options); + } + /** + * A method to upsert multiple objects. + * + * @generated from protobuf rpc: MultiUpsertObject(payload.v1.Upsert.MultiObjectRequest) returns (payload.v1.Object.Locations); + */ + multiUpsertObject(input, metadata, options, callback) { + const method = filter_pb_1.Filter.methods[11]; + return this.makeUnaryRequest(`/${filter_pb_1.Filter.typeName}/${method.name}`, (value) => Buffer.from(method.I.toBinary(value, this._binaryOptions)), (value) => method.O.fromBinary(value, this._binaryOptions), input, metadata, options, callback); + } +} +exports.FilterClient = FilterClient; diff --git a/src/vald/v1/vald/filter_pb.js b/src/vald/v1/vald/filter_pb.js index a449574..42f90ab 100644 --- a/src/vald/v1/vald/filter_pb.js +++ b/src/vald/v1/vald/filter_pb.js @@ -1,27 +1,79 @@ -// source: vald/v1/vald/filter.proto -/** - * @fileoverview - * @enhanceable - * @suppress {missingRequire} reports error on implicit type usages. - * @suppress {messageConventions} JS Compiler reports an error if a variable or - * field starts with 'MSG_' and isn't a translatable message. - * @public - */ -// GENERATED CODE -- DO NOT EDIT! /* eslint-disable */ +// @generated by protobuf-ts 2.9.3 with parameter add_pb_suffix,client_grpc1,generate_dependencies,keep_enum_prefix,ts_nocheck,use_proto_field_name,output_javascript,output_legacy_commonjs,eslint_disable +// @generated from protobuf file "vald/v1/vald/filter.proto" (package "vald.v1", syntax proto3) +// tslint:disable +// @ts-nocheck +// +// +// Copyright (C) 2019-2023 vdaas.org vald team +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// You may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.Filter = void 0; +/* eslint-disable */ +// @generated by protobuf-ts 2.9.3 with parameter add_pb_suffix,client_grpc1,generate_dependencies,keep_enum_prefix,ts_nocheck,use_proto_field_name,output_javascript,output_legacy_commonjs,eslint_disable +// @generated from protobuf file "vald/v1/vald/filter.proto" (package "vald.v1", syntax proto3) +// tslint:disable // @ts-nocheck - -var jspb = require('google-protobuf'); -var goog = jspb; -var global = - (typeof globalThis !== 'undefined' && globalThis) || - (typeof window !== 'undefined' && window) || - (typeof global !== 'undefined' && global) || - (typeof self !== 'undefined' && self) || - (function () { return this; }).call(null) || - Function('return this')(); - -var google_api_annotations_pb = require('../../../google/api/annotations_pb.js'); -goog.object.extend(proto, google_api_annotations_pb); -var vald_v1_payload_payload_pb = require('../../../vald/v1/payload/payload_pb.js'); -goog.object.extend(proto, vald_v1_payload_payload_pb); +// +// +// Copyright (C) 2019-2023 vdaas.org vald team +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// You may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +const payload_pb_1 = require("../payload/payload_pb"); +const payload_pb_2 = require("../payload/payload_pb"); +const payload_pb_3 = require("../payload/payload_pb"); +const payload_pb_4 = require("../payload/payload_pb"); +const payload_pb_5 = require("../payload/payload_pb"); +const payload_pb_6 = require("../payload/payload_pb"); +const payload_pb_7 = require("../payload/payload_pb"); +const payload_pb_8 = require("../payload/payload_pb"); +const payload_pb_9 = require("../payload/payload_pb"); +const payload_pb_10 = require("../payload/payload_pb"); +const payload_pb_11 = require("../payload/payload_pb"); +const payload_pb_12 = require("../payload/payload_pb"); +const payload_pb_13 = require("../payload/payload_pb"); +const payload_pb_14 = require("../payload/payload_pb"); +const runtime_rpc_1 = require("@protobuf-ts/runtime-rpc"); +/** + * @generated ServiceType for protobuf service vald.v1.Filter + */ +exports.Filter = new runtime_rpc_1.ServiceType("vald.v1.Filter", [ + { name: "SearchObject", options: { "google.api.http": { post: "/search/object", body: "*" } }, I: payload_pb_14.Search_ObjectRequest, O: payload_pb_13.Search_Response }, + { name: "MultiSearchObject", options: { "google.api.http": { post: "/search/object/multiple", body: "*" } }, I: payload_pb_12.Search_MultiObjectRequest, O: payload_pb_11.Search_Responses }, + { name: "StreamSearchObject", serverStreaming: true, clientStreaming: true, options: {}, I: payload_pb_14.Search_ObjectRequest, O: payload_pb_10.Search_StreamResponse }, + { name: "InsertObject", options: { "google.api.http": { post: "/insert/object", body: "*" } }, I: payload_pb_9.Insert_ObjectRequest, O: payload_pb_8.Object_Location }, + { name: "StreamInsertObject", serverStreaming: true, clientStreaming: true, options: {}, I: payload_pb_9.Insert_ObjectRequest, O: payload_pb_7.Object_StreamLocation }, + { name: "MultiInsertObject", options: { "google.api.http": { post: "/insert/object/multiple", body: "*" } }, I: payload_pb_6.Insert_MultiObjectRequest, O: payload_pb_5.Object_Locations }, + { name: "UpdateObject", options: { "google.api.http": { post: "/update/object", body: "*" } }, I: payload_pb_4.Update_ObjectRequest, O: payload_pb_8.Object_Location }, + { name: "StreamUpdateObject", serverStreaming: true, clientStreaming: true, options: {}, I: payload_pb_4.Update_ObjectRequest, O: payload_pb_7.Object_StreamLocation }, + { name: "MultiUpdateObject", options: { "google.api.http": { post: "/update/object/multiple", body: "*" } }, I: payload_pb_3.Update_MultiObjectRequest, O: payload_pb_5.Object_Locations }, + { name: "UpsertObject", options: { "google.api.http": { post: "/upsert/object", body: "*" } }, I: payload_pb_2.Upsert_ObjectRequest, O: payload_pb_8.Object_Location }, + { name: "StreamUpsertObject", serverStreaming: true, clientStreaming: true, options: {}, I: payload_pb_2.Upsert_ObjectRequest, O: payload_pb_7.Object_StreamLocation }, + { name: "MultiUpsertObject", options: { "google.api.http": { post: "/upsert/object/multiple", body: "*" } }, I: payload_pb_1.Upsert_MultiObjectRequest, O: payload_pb_5.Object_Locations } +]); diff --git a/src/vald/v1/vald/filter_pb.ts b/src/vald/v1/vald/filter_pb.ts deleted file mode 100644 index b9a58ef..0000000 --- a/src/vald/v1/vald/filter_pb.ts +++ /dev/null @@ -1,53 +0,0 @@ -// @generated by protobuf-ts 2.9.3 with parameter add_pb_suffix,client_grpc1,generate_dependencies,keep_enum_prefix,ts_nocheck,use_proto_field_name -// @generated from protobuf file "vald/v1/vald/filter.proto" (package "vald.v1", syntax proto3) -// tslint:disable -// @ts-nocheck -// -// -// Copyright (C) 2019-2023 vdaas.org vald team -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// You may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// -import { Upsert_MultiObjectRequest } from "../payload/payload_pb"; -import { Upsert_ObjectRequest } from "../payload/payload_pb"; -import { Update_MultiObjectRequest } from "../payload/payload_pb"; -import { Update_ObjectRequest } from "../payload/payload_pb"; -import { Object_Locations } from "../payload/payload_pb"; -import { Insert_MultiObjectRequest } from "../payload/payload_pb"; -import { Object_StreamLocation } from "../payload/payload_pb"; -import { Object_Location } from "../payload/payload_pb"; -import { Insert_ObjectRequest } from "../payload/payload_pb"; -import { Search_StreamResponse } from "../payload/payload_pb"; -import { Search_Responses } from "../payload/payload_pb"; -import { Search_MultiObjectRequest } from "../payload/payload_pb"; -import { Search_Response } from "../payload/payload_pb"; -import { Search_ObjectRequest } from "../payload/payload_pb"; -import { ServiceType } from "@protobuf-ts/runtime-rpc"; -/** - * @generated ServiceType for protobuf service vald.v1.Filter - */ -export const Filter = new ServiceType("vald.v1.Filter", [ - { name: "SearchObject", options: { "google.api.http": { post: "/search/object", body: "*" } }, I: Search_ObjectRequest, O: Search_Response }, - { name: "MultiSearchObject", options: { "google.api.http": { post: "/search/object/multiple", body: "*" } }, I: Search_MultiObjectRequest, O: Search_Responses }, - { name: "StreamSearchObject", serverStreaming: true, clientStreaming: true, options: {}, I: Search_ObjectRequest, O: Search_StreamResponse }, - { name: "InsertObject", options: { "google.api.http": { post: "/insert/object", body: "*" } }, I: Insert_ObjectRequest, O: Object_Location }, - { name: "StreamInsertObject", serverStreaming: true, clientStreaming: true, options: {}, I: Insert_ObjectRequest, O: Object_StreamLocation }, - { name: "MultiInsertObject", options: { "google.api.http": { post: "/insert/object/multiple", body: "*" } }, I: Insert_MultiObjectRequest, O: Object_Locations }, - { name: "UpdateObject", options: { "google.api.http": { post: "/update/object", body: "*" } }, I: Update_ObjectRequest, O: Object_Location }, - { name: "StreamUpdateObject", serverStreaming: true, clientStreaming: true, options: {}, I: Update_ObjectRequest, O: Object_StreamLocation }, - { name: "MultiUpdateObject", options: { "google.api.http": { post: "/update/object/multiple", body: "*" } }, I: Update_MultiObjectRequest, O: Object_Locations }, - { name: "UpsertObject", options: { "google.api.http": { post: "/upsert/object", body: "*" } }, I: Upsert_ObjectRequest, O: Object_Location }, - { name: "StreamUpsertObject", serverStreaming: true, clientStreaming: true, options: {}, I: Upsert_ObjectRequest, O: Object_StreamLocation }, - { name: "MultiUpsertObject", options: { "google.api.http": { post: "/upsert/object/multiple", body: "*" } }, I: Upsert_MultiObjectRequest, O: Object_Locations } -]); diff --git a/src/vald/v1/vald/index.js b/src/vald/v1/vald/index.js index 489a147..30533d5 100644 --- a/src/vald/v1/vald/index.js +++ b/src/vald/v1/vald/index.js @@ -1,14 +1,14 @@ module.exports.filter = require("./filter_pb"); -module.exports.filter_grpc = require("./filter_grpc_pb"); +module.exports.filter_grpc = require("./filter_pb.grpc-client"); module.exports.insert = require("./insert_pb"); -module.exports.insert_grpc = require("./insert_grpc_pb"); +module.exports.insert_grpc = require("./insert_pb.grpc-client"); module.exports.object = require("./object_pb"); -module.exports.object_grpc = require("./object_grpc_pb"); +module.exports.object_grpc = require("./object_pb.grpc-client"); module.exports.remove = require("./remove_pb"); -module.exports.remove_grpc = require("./remove_grpc_pb"); +module.exports.remove_grpc = require("./remove_pb.grpc-client"); module.exports.search = require("./search_pb"); -module.exports.search_grpc = require("./search_grpc_pb"); +module.exports.search_grpc = require("./search_pb.grpc-client"); module.exports.update = require("./update_pb"); -module.exports.update_grpc = require("./update_grpc_pb"); +module.exports.update_grpc = require("./update_pb.grpc-client"); module.exports.upsert = require("./upsert_pb"); -module.exports.upsert_grpc = require("./upsert_grpc_pb"); +module.exports.upsert_grpc = require("./upsert_pb.grpc-client"); diff --git a/src/vald/v1/vald/insert_grpc_pb.js b/src/vald/v1/vald/insert_grpc_pb.js deleted file mode 100644 index 8c7fcf5..0000000 --- a/src/vald/v1/vald/insert_grpc_pb.js +++ /dev/null @@ -1,121 +0,0 @@ -// GENERATED CODE -- DO NOT EDIT! - -// Original file comments: -// -// Copyright (C) 2019-2023 vdaas.org vald team -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// You may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// -'use strict'; -var grpc = require('@grpc/grpc-js'); -var google_api_annotations_pb = require('../../../google/api/annotations_pb.js'); -var vald_v1_payload_payload_pb = require('../../../vald/v1/payload/payload_pb.js'); - -function serialize_payload_v1_Insert_MultiRequest(arg) { - if (!(arg instanceof vald_v1_payload_payload_pb.Insert.MultiRequest)) { - throw new Error('Expected argument of type payload.v1.Insert.MultiRequest'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_payload_v1_Insert_MultiRequest(buffer_arg) { - return vald_v1_payload_payload_pb.Insert.MultiRequest.deserializeBinary(new Uint8Array(buffer_arg)); -} - -function serialize_payload_v1_Insert_Request(arg) { - if (!(arg instanceof vald_v1_payload_payload_pb.Insert.Request)) { - throw new Error('Expected argument of type payload.v1.Insert.Request'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_payload_v1_Insert_Request(buffer_arg) { - return vald_v1_payload_payload_pb.Insert.Request.deserializeBinary(new Uint8Array(buffer_arg)); -} - -function serialize_payload_v1_Object_Location(arg) { - if (!(arg instanceof vald_v1_payload_payload_pb.Object.Location)) { - throw new Error('Expected argument of type payload.v1.Object.Location'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_payload_v1_Object_Location(buffer_arg) { - return vald_v1_payload_payload_pb.Object.Location.deserializeBinary(new Uint8Array(buffer_arg)); -} - -function serialize_payload_v1_Object_Locations(arg) { - if (!(arg instanceof vald_v1_payload_payload_pb.Object.Locations)) { - throw new Error('Expected argument of type payload.v1.Object.Locations'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_payload_v1_Object_Locations(buffer_arg) { - return vald_v1_payload_payload_pb.Object.Locations.deserializeBinary(new Uint8Array(buffer_arg)); -} - -function serialize_payload_v1_Object_StreamLocation(arg) { - if (!(arg instanceof vald_v1_payload_payload_pb.Object.StreamLocation)) { - throw new Error('Expected argument of type payload.v1.Object.StreamLocation'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_payload_v1_Object_StreamLocation(buffer_arg) { - return vald_v1_payload_payload_pb.Object.StreamLocation.deserializeBinary(new Uint8Array(buffer_arg)); -} - - -// Insert service provides ways to add new vectors. -var InsertService = exports.InsertService = { - // A method to add a new single vector. -insert: { - path: '/vald.v1.Insert/Insert', - requestStream: false, - responseStream: false, - requestType: vald_v1_payload_payload_pb.Insert.Request, - responseType: vald_v1_payload_payload_pb.Object.Location, - requestSerialize: serialize_payload_v1_Insert_Request, - requestDeserialize: deserialize_payload_v1_Insert_Request, - responseSerialize: serialize_payload_v1_Object_Location, - responseDeserialize: deserialize_payload_v1_Object_Location, - }, - // A method to add new multiple vectors by bidirectional streaming. -streamInsert: { - path: '/vald.v1.Insert/StreamInsert', - requestStream: true, - responseStream: true, - requestType: vald_v1_payload_payload_pb.Insert.Request, - responseType: vald_v1_payload_payload_pb.Object.StreamLocation, - requestSerialize: serialize_payload_v1_Insert_Request, - requestDeserialize: deserialize_payload_v1_Insert_Request, - responseSerialize: serialize_payload_v1_Object_StreamLocation, - responseDeserialize: deserialize_payload_v1_Object_StreamLocation, - }, - // A method to add new multiple vectors in a single request. -multiInsert: { - path: '/vald.v1.Insert/MultiInsert', - requestStream: false, - responseStream: false, - requestType: vald_v1_payload_payload_pb.Insert.MultiRequest, - responseType: vald_v1_payload_payload_pb.Object.Locations, - requestSerialize: serialize_payload_v1_Insert_MultiRequest, - requestDeserialize: deserialize_payload_v1_Insert_MultiRequest, - responseSerialize: serialize_payload_v1_Object_Locations, - responseDeserialize: deserialize_payload_v1_Object_Locations, - }, -}; - -exports.InsertClient = grpc.makeGenericClientConstructor(InsertService); diff --git a/src/vald/v1/vald/insert_pb.ts b/src/vald/v1/vald/insert_pb.d.ts similarity index 53% rename from src/vald/v1/vald/insert_pb.ts rename to src/vald/v1/vald/insert_pb.d.ts index 65a8be5..4ee9843 100644 --- a/src/vald/v1/vald/insert_pb.ts +++ b/src/vald/v1/vald/insert_pb.d.ts @@ -1,4 +1,5 @@ -// @generated by protobuf-ts 2.9.3 with parameter add_pb_suffix,client_grpc1,generate_dependencies,keep_enum_prefix,ts_nocheck,use_proto_field_name +/* eslint-disable */ +// @generated by protobuf-ts 2.9.3 with parameter add_pb_suffix,client_grpc1,generate_dependencies,keep_enum_prefix,ts_nocheck,use_proto_field_name,output_javascript,output_legacy_commonjs,eslint_disable // @generated from protobuf file "vald/v1/vald/insert.proto" (package "vald.v1", syntax proto3) // tslint:disable // @ts-nocheck @@ -19,17 +20,7 @@ // limitations under the License. // // -import { Object_Locations } from "../payload/payload_pb"; -import { Insert_MultiRequest } from "../payload/payload_pb"; -import { Object_StreamLocation } from "../payload/payload_pb"; -import { Object_Location } from "../payload/payload_pb"; -import { Insert_Request } from "../payload/payload_pb"; -import { ServiceType } from "@protobuf-ts/runtime-rpc"; /** * @generated ServiceType for protobuf service vald.v1.Insert */ -export const Insert = new ServiceType("vald.v1.Insert", [ - { name: "Insert", options: { "google.api.http": { post: "/insert", body: "*" } }, I: Insert_Request, O: Object_Location }, - { name: "StreamInsert", serverStreaming: true, clientStreaming: true, options: {}, I: Insert_Request, O: Object_StreamLocation }, - { name: "MultiInsert", options: { "google.api.http": { post: "/insert/multiple", body: "*" } }, I: Insert_MultiRequest, O: Object_Locations } -]); +export declare const Insert: any; diff --git a/src/vald/v1/vald/insert_pb.grpc-client.ts b/src/vald/v1/vald/insert_pb.grpc-client.d.ts similarity index 75% rename from src/vald/v1/vald/insert_pb.grpc-client.ts rename to src/vald/v1/vald/insert_pb.grpc-client.d.ts index f0f7afb..26bbcb6 100644 --- a/src/vald/v1/vald/insert_pb.grpc-client.ts +++ b/src/vald/v1/vald/insert_pb.grpc-client.d.ts @@ -1,4 +1,5 @@ -// @generated by protobuf-ts 2.9.3 with parameter add_pb_suffix,client_grpc1,generate_dependencies,keep_enum_prefix,ts_nocheck,use_proto_field_name +/* eslint-disable */ +// @generated by protobuf-ts 2.9.3 with parameter add_pb_suffix,client_grpc1,generate_dependencies,keep_enum_prefix,ts_nocheck,use_proto_field_name,output_javascript,output_legacy_commonjs,eslint_disable // @generated from protobuf file "vald/v1/vald/insert.proto" (package "vald.v1", syntax proto3) // tslint:disable // @ts-nocheck @@ -19,7 +20,6 @@ // limitations under the License. // // -import { Insert } from "./insert_pb"; import type { BinaryWriteOptions } from "@protobuf-ts/runtime"; import type { BinaryReadOptions } from "@protobuf-ts/runtime"; import type { Object_Locations } from "../payload/payload_pb"; @@ -65,37 +65,25 @@ export interface IInsertClient { * * @generated from protobuf service vald.v1.Insert */ -export class InsertClient extends grpc.Client implements IInsertClient { - private readonly _binaryOptions: Partial; - constructor(address: string, credentials: grpc.ChannelCredentials, options: grpc.ClientOptions = {}, binaryOptions: Partial = {}) { - super(address, credentials, options); - this._binaryOptions = binaryOptions; - } +export declare class InsertClient extends grpc.Client implements IInsertClient { + private readonly _binaryOptions; + constructor(address: string, credentials: grpc.ChannelCredentials, options?: grpc.ClientOptions, binaryOptions?: Partial); /** * A method to add a new single vector. * * @generated from protobuf rpc: Insert(payload.v1.Insert.Request) returns (payload.v1.Object.Location); */ - insert(input: Insert_Request, metadata: grpc.Metadata | grpc.CallOptions | ((err: grpc.ServiceError | null, value?: Object_Location) => void), options?: grpc.CallOptions | ((err: grpc.ServiceError | null, value?: Object_Location) => void), callback?: ((err: grpc.ServiceError | null, value?: Object_Location) => void)): grpc.ClientUnaryCall { - const method = Insert.methods[0]; - return this.makeUnaryRequest(`/${Insert.typeName}/${method.name}`, (value: Insert_Request): Buffer => Buffer.from(method.I.toBinary(value, this._binaryOptions)), (value: Buffer): Object_Location => method.O.fromBinary(value, this._binaryOptions), input, (metadata as any), (options as any), (callback as any)); - } + insert(input: Insert_Request, metadata: grpc.Metadata | grpc.CallOptions | ((err: grpc.ServiceError | null, value?: Object_Location) => void), options?: grpc.CallOptions | ((err: grpc.ServiceError | null, value?: Object_Location) => void), callback?: ((err: grpc.ServiceError | null, value?: Object_Location) => void)): grpc.ClientUnaryCall; /** * A method to add new multiple vectors by bidirectional streaming. * * @generated from protobuf rpc: StreamInsert(stream payload.v1.Insert.Request) returns (stream payload.v1.Object.StreamLocation); */ - streamInsert(metadata?: grpc.Metadata | grpc.CallOptions, options?: grpc.CallOptions): grpc.ClientDuplexStream { - const method = Insert.methods[1]; - return this.makeBidiStreamRequest(`/${Insert.typeName}/${method.name}`, (value: Insert_Request): Buffer => Buffer.from(method.I.toBinary(value, this._binaryOptions)), (value: Buffer): Object_StreamLocation => method.O.fromBinary(value, this._binaryOptions), (metadata as any), options); - } + streamInsert(metadata?: grpc.Metadata | grpc.CallOptions, options?: grpc.CallOptions): grpc.ClientDuplexStream; /** * A method to add new multiple vectors in a single request. * * @generated from protobuf rpc: MultiInsert(payload.v1.Insert.MultiRequest) returns (payload.v1.Object.Locations); */ - multiInsert(input: Insert_MultiRequest, metadata: grpc.Metadata | grpc.CallOptions | ((err: grpc.ServiceError | null, value?: Object_Locations) => void), options?: grpc.CallOptions | ((err: grpc.ServiceError | null, value?: Object_Locations) => void), callback?: ((err: grpc.ServiceError | null, value?: Object_Locations) => void)): grpc.ClientUnaryCall { - const method = Insert.methods[2]; - return this.makeUnaryRequest(`/${Insert.typeName}/${method.name}`, (value: Insert_MultiRequest): Buffer => Buffer.from(method.I.toBinary(value, this._binaryOptions)), (value: Buffer): Object_Locations => method.O.fromBinary(value, this._binaryOptions), input, (metadata as any), (options as any), (callback as any)); - } + multiInsert(input: Insert_MultiRequest, metadata: grpc.Metadata | grpc.CallOptions | ((err: grpc.ServiceError | null, value?: Object_Locations) => void), options?: grpc.CallOptions | ((err: grpc.ServiceError | null, value?: Object_Locations) => void), callback?: ((err: grpc.ServiceError | null, value?: Object_Locations) => void)): grpc.ClientUnaryCall; } diff --git a/src/vald/v1/vald/insert_pb.grpc-client.js b/src/vald/v1/vald/insert_pb.grpc-client.js new file mode 100644 index 0000000..90ea75d --- /dev/null +++ b/src/vald/v1/vald/insert_pb.grpc-client.js @@ -0,0 +1,88 @@ +/* eslint-disable */ +// @generated by protobuf-ts 2.9.3 with parameter add_pb_suffix,client_grpc1,generate_dependencies,keep_enum_prefix,ts_nocheck,use_proto_field_name,output_javascript,output_legacy_commonjs,eslint_disable +// @generated from protobuf file "vald/v1/vald/insert.proto" (package "vald.v1", syntax proto3) +// tslint:disable +// @ts-nocheck +// +// +// Copyright (C) 2019-2023 vdaas.org vald team +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// You may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.InsertClient = void 0; +/* eslint-disable */ +// @generated by protobuf-ts 2.9.3 with parameter add_pb_suffix,client_grpc1,generate_dependencies,keep_enum_prefix,ts_nocheck,use_proto_field_name,output_javascript,output_legacy_commonjs,eslint_disable +// @generated from protobuf file "vald/v1/vald/insert.proto" (package "vald.v1", syntax proto3) +// tslint:disable +// @ts-nocheck +// +// +// Copyright (C) 2019-2023 vdaas.org vald team +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// You may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +const insert_pb_1 = require("./insert_pb"); +const grpc = require("@grpc/grpc-js"); +/** + * Insert service provides ways to add new vectors. + * + * @generated from protobuf service vald.v1.Insert + */ +class InsertClient extends grpc.Client { + constructor(address, credentials, options = {}, binaryOptions = {}) { + super(address, credentials, options); + this._binaryOptions = binaryOptions; + } + /** + * A method to add a new single vector. + * + * @generated from protobuf rpc: Insert(payload.v1.Insert.Request) returns (payload.v1.Object.Location); + */ + insert(input, metadata, options, callback) { + const method = insert_pb_1.Insert.methods[0]; + return this.makeUnaryRequest(`/${insert_pb_1.Insert.typeName}/${method.name}`, (value) => Buffer.from(method.I.toBinary(value, this._binaryOptions)), (value) => method.O.fromBinary(value, this._binaryOptions), input, metadata, options, callback); + } + /** + * A method to add new multiple vectors by bidirectional streaming. + * + * @generated from protobuf rpc: StreamInsert(stream payload.v1.Insert.Request) returns (stream payload.v1.Object.StreamLocation); + */ + streamInsert(metadata, options) { + const method = insert_pb_1.Insert.methods[1]; + return this.makeBidiStreamRequest(`/${insert_pb_1.Insert.typeName}/${method.name}`, (value) => Buffer.from(method.I.toBinary(value, this._binaryOptions)), (value) => method.O.fromBinary(value, this._binaryOptions), metadata, options); + } + /** + * A method to add new multiple vectors in a single request. + * + * @generated from protobuf rpc: MultiInsert(payload.v1.Insert.MultiRequest) returns (payload.v1.Object.Locations); + */ + multiInsert(input, metadata, options, callback) { + const method = insert_pb_1.Insert.methods[2]; + return this.makeUnaryRequest(`/${insert_pb_1.Insert.typeName}/${method.name}`, (value) => Buffer.from(method.I.toBinary(value, this._binaryOptions)), (value) => method.O.fromBinary(value, this._binaryOptions), input, metadata, options, callback); + } +} +exports.InsertClient = InsertClient; diff --git a/src/vald/v1/vald/insert_pb.js b/src/vald/v1/vald/insert_pb.js index 0955eab..3e670c7 100644 --- a/src/vald/v1/vald/insert_pb.js +++ b/src/vald/v1/vald/insert_pb.js @@ -1,27 +1,61 @@ -// source: vald/v1/vald/insert.proto -/** - * @fileoverview - * @enhanceable - * @suppress {missingRequire} reports error on implicit type usages. - * @suppress {messageConventions} JS Compiler reports an error if a variable or - * field starts with 'MSG_' and isn't a translatable message. - * @public - */ -// GENERATED CODE -- DO NOT EDIT! /* eslint-disable */ +// @generated by protobuf-ts 2.9.3 with parameter add_pb_suffix,client_grpc1,generate_dependencies,keep_enum_prefix,ts_nocheck,use_proto_field_name,output_javascript,output_legacy_commonjs,eslint_disable +// @generated from protobuf file "vald/v1/vald/insert.proto" (package "vald.v1", syntax proto3) +// tslint:disable +// @ts-nocheck +// +// +// Copyright (C) 2019-2023 vdaas.org vald team +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// You may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.Insert = void 0; +/* eslint-disable */ +// @generated by protobuf-ts 2.9.3 with parameter add_pb_suffix,client_grpc1,generate_dependencies,keep_enum_prefix,ts_nocheck,use_proto_field_name,output_javascript,output_legacy_commonjs,eslint_disable +// @generated from protobuf file "vald/v1/vald/insert.proto" (package "vald.v1", syntax proto3) +// tslint:disable // @ts-nocheck - -var jspb = require('google-protobuf'); -var goog = jspb; -var global = - (typeof globalThis !== 'undefined' && globalThis) || - (typeof window !== 'undefined' && window) || - (typeof global !== 'undefined' && global) || - (typeof self !== 'undefined' && self) || - (function () { return this; }).call(null) || - Function('return this')(); - -var google_api_annotations_pb = require('../../../google/api/annotations_pb.js'); -goog.object.extend(proto, google_api_annotations_pb); -var vald_v1_payload_payload_pb = require('../../../vald/v1/payload/payload_pb.js'); -goog.object.extend(proto, vald_v1_payload_payload_pb); +// +// +// Copyright (C) 2019-2023 vdaas.org vald team +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// You may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +const payload_pb_1 = require("../payload/payload_pb"); +const payload_pb_2 = require("../payload/payload_pb"); +const payload_pb_3 = require("../payload/payload_pb"); +const payload_pb_4 = require("../payload/payload_pb"); +const payload_pb_5 = require("../payload/payload_pb"); +const runtime_rpc_1 = require("@protobuf-ts/runtime-rpc"); +/** + * @generated ServiceType for protobuf service vald.v1.Insert + */ +exports.Insert = new runtime_rpc_1.ServiceType("vald.v1.Insert", [ + { name: "Insert", options: { "google.api.http": { post: "/insert", body: "*" } }, I: payload_pb_5.Insert_Request, O: payload_pb_4.Object_Location }, + { name: "StreamInsert", serverStreaming: true, clientStreaming: true, options: {}, I: payload_pb_5.Insert_Request, O: payload_pb_3.Object_StreamLocation }, + { name: "MultiInsert", options: { "google.api.http": { post: "/insert/multiple", body: "*" } }, I: payload_pb_2.Insert_MultiRequest, O: payload_pb_1.Object_Locations } +]); diff --git a/src/vald/v1/vald/object_grpc_pb.js b/src/vald/v1/vald/object_grpc_pb.js deleted file mode 100644 index 02bd348..0000000 --- a/src/vald/v1/vald/object_grpc_pb.js +++ /dev/null @@ -1,144 +0,0 @@ -// GENERATED CODE -- DO NOT EDIT! - -// Original file comments: -// -// Copyright (C) 2019-2023 vdaas.org vald team -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// You may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// -'use strict'; -var grpc = require('@grpc/grpc-js'); -var google_api_annotations_pb = require('../../../google/api/annotations_pb.js'); -var vald_v1_payload_payload_pb = require('../../../vald/v1/payload/payload_pb.js'); - -function serialize_payload_v1_Object_ID(arg) { - if (!(arg instanceof vald_v1_payload_payload_pb.Object.ID)) { - throw new Error('Expected argument of type payload.v1.Object.ID'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_payload_v1_Object_ID(buffer_arg) { - return vald_v1_payload_payload_pb.Object.ID.deserializeBinary(new Uint8Array(buffer_arg)); -} - -function serialize_payload_v1_Object_List_Request(arg) { - if (!(arg instanceof vald_v1_payload_payload_pb.Object.List.Request)) { - throw new Error('Expected argument of type payload.v1.Object.List.Request'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_payload_v1_Object_List_Request(buffer_arg) { - return vald_v1_payload_payload_pb.Object.List.Request.deserializeBinary(new Uint8Array(buffer_arg)); -} - -function serialize_payload_v1_Object_List_Response(arg) { - if (!(arg instanceof vald_v1_payload_payload_pb.Object.List.Response)) { - throw new Error('Expected argument of type payload.v1.Object.List.Response'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_payload_v1_Object_List_Response(buffer_arg) { - return vald_v1_payload_payload_pb.Object.List.Response.deserializeBinary(new Uint8Array(buffer_arg)); -} - -function serialize_payload_v1_Object_StreamVector(arg) { - if (!(arg instanceof vald_v1_payload_payload_pb.Object.StreamVector)) { - throw new Error('Expected argument of type payload.v1.Object.StreamVector'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_payload_v1_Object_StreamVector(buffer_arg) { - return vald_v1_payload_payload_pb.Object.StreamVector.deserializeBinary(new Uint8Array(buffer_arg)); -} - -function serialize_payload_v1_Object_Vector(arg) { - if (!(arg instanceof vald_v1_payload_payload_pb.Object.Vector)) { - throw new Error('Expected argument of type payload.v1.Object.Vector'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_payload_v1_Object_Vector(buffer_arg) { - return vald_v1_payload_payload_pb.Object.Vector.deserializeBinary(new Uint8Array(buffer_arg)); -} - -function serialize_payload_v1_Object_VectorRequest(arg) { - if (!(arg instanceof vald_v1_payload_payload_pb.Object.VectorRequest)) { - throw new Error('Expected argument of type payload.v1.Object.VectorRequest'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_payload_v1_Object_VectorRequest(buffer_arg) { - return vald_v1_payload_payload_pb.Object.VectorRequest.deserializeBinary(new Uint8Array(buffer_arg)); -} - - -// Object service provides ways to fetch indexed vectors. -var ObjectService = exports.ObjectService = { - // A method to check whether a specified ID is indexed or not. -exists: { - path: '/vald.v1.Object/Exists', - requestStream: false, - responseStream: false, - requestType: vald_v1_payload_payload_pb.Object.ID, - responseType: vald_v1_payload_payload_pb.Object.ID, - requestSerialize: serialize_payload_v1_Object_ID, - requestDeserialize: deserialize_payload_v1_Object_ID, - responseSerialize: serialize_payload_v1_Object_ID, - responseDeserialize: deserialize_payload_v1_Object_ID, - }, - // A method to fetch a vector. -getObject: { - path: '/vald.v1.Object/GetObject', - requestStream: false, - responseStream: false, - requestType: vald_v1_payload_payload_pb.Object.VectorRequest, - responseType: vald_v1_payload_payload_pb.Object.Vector, - requestSerialize: serialize_payload_v1_Object_VectorRequest, - requestDeserialize: deserialize_payload_v1_Object_VectorRequest, - responseSerialize: serialize_payload_v1_Object_Vector, - responseDeserialize: deserialize_payload_v1_Object_Vector, - }, - // A method to fetch vectors by bidirectional streaming. -streamGetObject: { - path: '/vald.v1.Object/StreamGetObject', - requestStream: true, - responseStream: true, - requestType: vald_v1_payload_payload_pb.Object.VectorRequest, - responseType: vald_v1_payload_payload_pb.Object.StreamVector, - requestSerialize: serialize_payload_v1_Object_VectorRequest, - requestDeserialize: deserialize_payload_v1_Object_VectorRequest, - responseSerialize: serialize_payload_v1_Object_StreamVector, - responseDeserialize: deserialize_payload_v1_Object_StreamVector, - }, - // A method to get all the vectors with server streaming -streamListObject: { - path: '/vald.v1.Object/StreamListObject', - requestStream: false, - responseStream: true, - requestType: vald_v1_payload_payload_pb.Object.List.Request, - responseType: vald_v1_payload_payload_pb.Object.List.Response, - requestSerialize: serialize_payload_v1_Object_List_Request, - requestDeserialize: deserialize_payload_v1_Object_List_Request, - responseSerialize: serialize_payload_v1_Object_List_Response, - responseDeserialize: deserialize_payload_v1_Object_List_Response, - }, -}; - -exports.ObjectClient = grpc.makeGenericClientConstructor(ObjectService); diff --git a/src/vald/v1/vald/object_pb.d.ts b/src/vald/v1/vald/object_pb.d.ts new file mode 100644 index 0000000..7f1da8c --- /dev/null +++ b/src/vald/v1/vald/object_pb.d.ts @@ -0,0 +1,26 @@ +/* eslint-disable */ +// @generated by protobuf-ts 2.9.3 with parameter add_pb_suffix,client_grpc1,generate_dependencies,keep_enum_prefix,ts_nocheck,use_proto_field_name,output_javascript,output_legacy_commonjs,eslint_disable +// @generated from protobuf file "vald/v1/vald/object.proto" (package "vald.v1", syntax proto3) +// tslint:disable +// @ts-nocheck +// +// +// Copyright (C) 2019-2023 vdaas.org vald team +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// You may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +/** + * @generated ServiceType for protobuf service vald.v1.Object + */ +export declare const Object: any; diff --git a/src/vald/v1/vald/object_pb.grpc-client.ts b/src/vald/v1/vald/object_pb.grpc-client.d.ts similarity index 74% rename from src/vald/v1/vald/object_pb.grpc-client.ts rename to src/vald/v1/vald/object_pb.grpc-client.d.ts index 38ab693..32b7f3f 100644 --- a/src/vald/v1/vald/object_pb.grpc-client.ts +++ b/src/vald/v1/vald/object_pb.grpc-client.d.ts @@ -1,4 +1,5 @@ -// @generated by protobuf-ts 2.9.3 with parameter add_pb_suffix,client_grpc1,generate_dependencies,keep_enum_prefix,ts_nocheck,use_proto_field_name +/* eslint-disable */ +// @generated by protobuf-ts 2.9.3 with parameter add_pb_suffix,client_grpc1,generate_dependencies,keep_enum_prefix,ts_nocheck,use_proto_field_name,output_javascript,output_legacy_commonjs,eslint_disable // @generated from protobuf file "vald/v1/vald/object.proto" (package "vald.v1", syntax proto3) // tslint:disable // @ts-nocheck @@ -19,7 +20,6 @@ // limitations under the License. // // -import { Object } from "./object_pb"; import type { BinaryWriteOptions } from "@protobuf-ts/runtime"; import type { BinaryReadOptions } from "@protobuf-ts/runtime"; import type { Object_List_Response } from "../payload/payload_pb"; @@ -73,46 +73,31 @@ export interface IObjectClient { * * @generated from protobuf service vald.v1.Object */ -export class ObjectClient extends grpc.Client implements IObjectClient { - private readonly _binaryOptions: Partial; - constructor(address: string, credentials: grpc.ChannelCredentials, options: grpc.ClientOptions = {}, binaryOptions: Partial = {}) { - super(address, credentials, options); - this._binaryOptions = binaryOptions; - } +export declare class ObjectClient extends grpc.Client implements IObjectClient { + private readonly _binaryOptions; + constructor(address: string, credentials: grpc.ChannelCredentials, options?: grpc.ClientOptions, binaryOptions?: Partial); /** * A method to check whether a specified ID is indexed or not. * * @generated from protobuf rpc: Exists(payload.v1.Object.ID) returns (payload.v1.Object.ID); */ - exists(input: Object_ID, metadata: grpc.Metadata | grpc.CallOptions | ((err: grpc.ServiceError | null, value?: Object_ID) => void), options?: grpc.CallOptions | ((err: grpc.ServiceError | null, value?: Object_ID) => void), callback?: ((err: grpc.ServiceError | null, value?: Object_ID) => void)): grpc.ClientUnaryCall { - const method = Object.methods[0]; - return this.makeUnaryRequest(`/${Object.typeName}/${method.name}`, (value: Object_ID): Buffer => Buffer.from(method.I.toBinary(value, this._binaryOptions)), (value: Buffer): Object_ID => method.O.fromBinary(value, this._binaryOptions), input, (metadata as any), (options as any), (callback as any)); - } + exists(input: Object_ID, metadata: grpc.Metadata | grpc.CallOptions | ((err: grpc.ServiceError | null, value?: Object_ID) => void), options?: grpc.CallOptions | ((err: grpc.ServiceError | null, value?: Object_ID) => void), callback?: ((err: grpc.ServiceError | null, value?: Object_ID) => void)): grpc.ClientUnaryCall; /** * A method to fetch a vector. * * @generated from protobuf rpc: GetObject(payload.v1.Object.VectorRequest) returns (payload.v1.Object.Vector); */ - getObject(input: Object_VectorRequest, metadata: grpc.Metadata | grpc.CallOptions | ((err: grpc.ServiceError | null, value?: Object_Vector) => void), options?: grpc.CallOptions | ((err: grpc.ServiceError | null, value?: Object_Vector) => void), callback?: ((err: grpc.ServiceError | null, value?: Object_Vector) => void)): grpc.ClientUnaryCall { - const method = Object.methods[1]; - return this.makeUnaryRequest(`/${Object.typeName}/${method.name}`, (value: Object_VectorRequest): Buffer => Buffer.from(method.I.toBinary(value, this._binaryOptions)), (value: Buffer): Object_Vector => method.O.fromBinary(value, this._binaryOptions), input, (metadata as any), (options as any), (callback as any)); - } + getObject(input: Object_VectorRequest, metadata: grpc.Metadata | grpc.CallOptions | ((err: grpc.ServiceError | null, value?: Object_Vector) => void), options?: grpc.CallOptions | ((err: grpc.ServiceError | null, value?: Object_Vector) => void), callback?: ((err: grpc.ServiceError | null, value?: Object_Vector) => void)): grpc.ClientUnaryCall; /** * A method to fetch vectors by bidirectional streaming. * * @generated from protobuf rpc: StreamGetObject(stream payload.v1.Object.VectorRequest) returns (stream payload.v1.Object.StreamVector); */ - streamGetObject(metadata?: grpc.Metadata | grpc.CallOptions, options?: grpc.CallOptions): grpc.ClientDuplexStream { - const method = Object.methods[2]; - return this.makeBidiStreamRequest(`/${Object.typeName}/${method.name}`, (value: Object_VectorRequest): Buffer => Buffer.from(method.I.toBinary(value, this._binaryOptions)), (value: Buffer): Object_StreamVector => method.O.fromBinary(value, this._binaryOptions), (metadata as any), options); - } + streamGetObject(metadata?: grpc.Metadata | grpc.CallOptions, options?: grpc.CallOptions): grpc.ClientDuplexStream; /** * A method to get all the vectors with server streaming * * @generated from protobuf rpc: StreamListObject(payload.v1.Object.List.Request) returns (stream payload.v1.Object.List.Response); */ - streamListObject(input: Object_List_Request, metadata?: grpc.Metadata | grpc.CallOptions, options?: grpc.CallOptions): grpc.ClientReadableStream { - const method = Object.methods[3]; - return this.makeServerStreamRequest(`/${Object.typeName}/${method.name}`, (value: Object_List_Request): Buffer => Buffer.from(method.I.toBinary(value, this._binaryOptions)), (value: Buffer): Object_List_Response => method.O.fromBinary(value, this._binaryOptions), input, (metadata as any), options); - } + streamListObject(input: Object_List_Request, metadata?: grpc.Metadata | grpc.CallOptions, options?: grpc.CallOptions): grpc.ClientReadableStream; } diff --git a/src/vald/v1/vald/object_pb.grpc-client.js b/src/vald/v1/vald/object_pb.grpc-client.js new file mode 100644 index 0000000..2755ece --- /dev/null +++ b/src/vald/v1/vald/object_pb.grpc-client.js @@ -0,0 +1,97 @@ +/* eslint-disable */ +// @generated by protobuf-ts 2.9.3 with parameter add_pb_suffix,client_grpc1,generate_dependencies,keep_enum_prefix,ts_nocheck,use_proto_field_name,output_javascript,output_legacy_commonjs,eslint_disable +// @generated from protobuf file "vald/v1/vald/object.proto" (package "vald.v1", syntax proto3) +// tslint:disable +// @ts-nocheck +// +// +// Copyright (C) 2019-2023 vdaas.org vald team +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// You may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.ObjectClient = void 0; +/* eslint-disable */ +// @generated by protobuf-ts 2.9.3 with parameter add_pb_suffix,client_grpc1,generate_dependencies,keep_enum_prefix,ts_nocheck,use_proto_field_name,output_javascript,output_legacy_commonjs,eslint_disable +// @generated from protobuf file "vald/v1/vald/object.proto" (package "vald.v1", syntax proto3) +// tslint:disable +// @ts-nocheck +// +// +// Copyright (C) 2019-2023 vdaas.org vald team +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// You may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +const object_pb_1 = require("./object_pb"); +const grpc = require("@grpc/grpc-js"); +/** + * Object service provides ways to fetch indexed vectors. + * + * @generated from protobuf service vald.v1.Object + */ +class ObjectClient extends grpc.Client { + constructor(address, credentials, options = {}, binaryOptions = {}) { + super(address, credentials, options); + this._binaryOptions = binaryOptions; + } + /** + * A method to check whether a specified ID is indexed or not. + * + * @generated from protobuf rpc: Exists(payload.v1.Object.ID) returns (payload.v1.Object.ID); + */ + exists(input, metadata, options, callback) { + const method = object_pb_1.Object.methods[0]; + return this.makeUnaryRequest(`/${object_pb_1.Object.typeName}/${method.name}`, (value) => Buffer.from(method.I.toBinary(value, this._binaryOptions)), (value) => method.O.fromBinary(value, this._binaryOptions), input, metadata, options, callback); + } + /** + * A method to fetch a vector. + * + * @generated from protobuf rpc: GetObject(payload.v1.Object.VectorRequest) returns (payload.v1.Object.Vector); + */ + getObject(input, metadata, options, callback) { + const method = object_pb_1.Object.methods[1]; + return this.makeUnaryRequest(`/${object_pb_1.Object.typeName}/${method.name}`, (value) => Buffer.from(method.I.toBinary(value, this._binaryOptions)), (value) => method.O.fromBinary(value, this._binaryOptions), input, metadata, options, callback); + } + /** + * A method to fetch vectors by bidirectional streaming. + * + * @generated from protobuf rpc: StreamGetObject(stream payload.v1.Object.VectorRequest) returns (stream payload.v1.Object.StreamVector); + */ + streamGetObject(metadata, options) { + const method = object_pb_1.Object.methods[2]; + return this.makeBidiStreamRequest(`/${object_pb_1.Object.typeName}/${method.name}`, (value) => Buffer.from(method.I.toBinary(value, this._binaryOptions)), (value) => method.O.fromBinary(value, this._binaryOptions), metadata, options); + } + /** + * A method to get all the vectors with server streaming + * + * @generated from protobuf rpc: StreamListObject(payload.v1.Object.List.Request) returns (stream payload.v1.Object.List.Response); + */ + streamListObject(input, metadata, options) { + const method = object_pb_1.Object.methods[3]; + return this.makeServerStreamRequest(`/${object_pb_1.Object.typeName}/${method.name}`, (value) => Buffer.from(method.I.toBinary(value, this._binaryOptions)), (value) => method.O.fromBinary(value, this._binaryOptions), input, metadata, options); + } +} +exports.ObjectClient = ObjectClient; diff --git a/src/vald/v1/vald/object_pb.js b/src/vald/v1/vald/object_pb.js index 6d6c033..d5ce523 100644 --- a/src/vald/v1/vald/object_pb.js +++ b/src/vald/v1/vald/object_pb.js @@ -1,27 +1,63 @@ -// source: vald/v1/vald/object.proto -/** - * @fileoverview - * @enhanceable - * @suppress {missingRequire} reports error on implicit type usages. - * @suppress {messageConventions} JS Compiler reports an error if a variable or - * field starts with 'MSG_' and isn't a translatable message. - * @public - */ -// GENERATED CODE -- DO NOT EDIT! /* eslint-disable */ +// @generated by protobuf-ts 2.9.3 with parameter add_pb_suffix,client_grpc1,generate_dependencies,keep_enum_prefix,ts_nocheck,use_proto_field_name,output_javascript,output_legacy_commonjs,eslint_disable +// @generated from protobuf file "vald/v1/vald/object.proto" (package "vald.v1", syntax proto3) +// tslint:disable +// @ts-nocheck +// +// +// Copyright (C) 2019-2023 vdaas.org vald team +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// You may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.Object = void 0; +/* eslint-disable */ +// @generated by protobuf-ts 2.9.3 with parameter add_pb_suffix,client_grpc1,generate_dependencies,keep_enum_prefix,ts_nocheck,use_proto_field_name,output_javascript,output_legacy_commonjs,eslint_disable +// @generated from protobuf file "vald/v1/vald/object.proto" (package "vald.v1", syntax proto3) +// tslint:disable // @ts-nocheck - -var jspb = require('google-protobuf'); -var goog = jspb; -var global = - (typeof globalThis !== 'undefined' && globalThis) || - (typeof window !== 'undefined' && window) || - (typeof global !== 'undefined' && global) || - (typeof self !== 'undefined' && self) || - (function () { return this; }).call(null) || - Function('return this')(); - -var google_api_annotations_pb = require('../../../google/api/annotations_pb.js'); -goog.object.extend(proto, google_api_annotations_pb); -var vald_v1_payload_payload_pb = require('../../../vald/v1/payload/payload_pb.js'); -goog.object.extend(proto, vald_v1_payload_payload_pb); +// +// +// Copyright (C) 2019-2023 vdaas.org vald team +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// You may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +const payload_pb_1 = require("../payload/payload_pb"); +const payload_pb_2 = require("../payload/payload_pb"); +const payload_pb_3 = require("../payload/payload_pb"); +const payload_pb_4 = require("../payload/payload_pb"); +const payload_pb_5 = require("../payload/payload_pb"); +const payload_pb_6 = require("../payload/payload_pb"); +const runtime_rpc_1 = require("@protobuf-ts/runtime-rpc"); +/** + * @generated ServiceType for protobuf service vald.v1.Object + */ +exports.Object = new runtime_rpc_1.ServiceType("vald.v1.Object", [ + { name: "Exists", options: { "google.api.http": { get: "/exists/{id}" } }, I: payload_pb_6.Object_ID, O: payload_pb_6.Object_ID }, + { name: "GetObject", options: { "google.api.http": { get: "/object/{id.id}" } }, I: payload_pb_5.Object_VectorRequest, O: payload_pb_4.Object_Vector }, + { name: "StreamGetObject", serverStreaming: true, clientStreaming: true, options: {}, I: payload_pb_5.Object_VectorRequest, O: payload_pb_3.Object_StreamVector }, + { name: "StreamListObject", serverStreaming: true, options: { "google.api.http": { get: "/object/list" } }, I: payload_pb_2.Object_List_Request, O: payload_pb_1.Object_List_Response } +]); diff --git a/src/vald/v1/vald/object_pb.ts b/src/vald/v1/vald/object_pb.ts deleted file mode 100644 index 0a8b9d7..0000000 --- a/src/vald/v1/vald/object_pb.ts +++ /dev/null @@ -1,37 +0,0 @@ -// @generated by protobuf-ts 2.9.3 with parameter add_pb_suffix,client_grpc1,generate_dependencies,keep_enum_prefix,ts_nocheck,use_proto_field_name -// @generated from protobuf file "vald/v1/vald/object.proto" (package "vald.v1", syntax proto3) -// tslint:disable -// @ts-nocheck -// -// -// Copyright (C) 2019-2023 vdaas.org vald team -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// You may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// -import { Object_List_Response } from "../payload/payload_pb"; -import { Object_List_Request } from "../payload/payload_pb"; -import { Object_StreamVector } from "../payload/payload_pb"; -import { Object_Vector } from "../payload/payload_pb"; -import { Object_VectorRequest } from "../payload/payload_pb"; -import { Object_ID } from "../payload/payload_pb"; -import { ServiceType } from "@protobuf-ts/runtime-rpc"; -/** - * @generated ServiceType for protobuf service vald.v1.Object - */ -export const Object = new ServiceType("vald.v1.Object", [ - { name: "Exists", options: { "google.api.http": { get: "/exists/{id}" } }, I: Object_ID, O: Object_ID }, - { name: "GetObject", options: { "google.api.http": { get: "/object/{id.id}" } }, I: Object_VectorRequest, O: Object_Vector }, - { name: "StreamGetObject", serverStreaming: true, clientStreaming: true, options: {}, I: Object_VectorRequest, O: Object_StreamVector }, - { name: "StreamListObject", serverStreaming: true, options: { "google.api.http": { get: "/object/list" } }, I: Object_List_Request, O: Object_List_Response } -]); diff --git a/src/vald/v1/vald/remove_grpc_pb.js b/src/vald/v1/vald/remove_grpc_pb.js deleted file mode 100644 index 77bfe50..0000000 --- a/src/vald/v1/vald/remove_grpc_pb.js +++ /dev/null @@ -1,144 +0,0 @@ -// GENERATED CODE -- DO NOT EDIT! - -// Original file comments: -// -// Copyright (C) 2019-2023 vdaas.org vald team -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// You may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// -'use strict'; -var grpc = require('@grpc/grpc-js'); -var google_api_annotations_pb = require('../../../google/api/annotations_pb.js'); -var vald_v1_payload_payload_pb = require('../../../vald/v1/payload/payload_pb.js'); - -function serialize_payload_v1_Object_Location(arg) { - if (!(arg instanceof vald_v1_payload_payload_pb.Object.Location)) { - throw new Error('Expected argument of type payload.v1.Object.Location'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_payload_v1_Object_Location(buffer_arg) { - return vald_v1_payload_payload_pb.Object.Location.deserializeBinary(new Uint8Array(buffer_arg)); -} - -function serialize_payload_v1_Object_Locations(arg) { - if (!(arg instanceof vald_v1_payload_payload_pb.Object.Locations)) { - throw new Error('Expected argument of type payload.v1.Object.Locations'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_payload_v1_Object_Locations(buffer_arg) { - return vald_v1_payload_payload_pb.Object.Locations.deserializeBinary(new Uint8Array(buffer_arg)); -} - -function serialize_payload_v1_Object_StreamLocation(arg) { - if (!(arg instanceof vald_v1_payload_payload_pb.Object.StreamLocation)) { - throw new Error('Expected argument of type payload.v1.Object.StreamLocation'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_payload_v1_Object_StreamLocation(buffer_arg) { - return vald_v1_payload_payload_pb.Object.StreamLocation.deserializeBinary(new Uint8Array(buffer_arg)); -} - -function serialize_payload_v1_Remove_MultiRequest(arg) { - if (!(arg instanceof vald_v1_payload_payload_pb.Remove.MultiRequest)) { - throw new Error('Expected argument of type payload.v1.Remove.MultiRequest'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_payload_v1_Remove_MultiRequest(buffer_arg) { - return vald_v1_payload_payload_pb.Remove.MultiRequest.deserializeBinary(new Uint8Array(buffer_arg)); -} - -function serialize_payload_v1_Remove_Request(arg) { - if (!(arg instanceof vald_v1_payload_payload_pb.Remove.Request)) { - throw new Error('Expected argument of type payload.v1.Remove.Request'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_payload_v1_Remove_Request(buffer_arg) { - return vald_v1_payload_payload_pb.Remove.Request.deserializeBinary(new Uint8Array(buffer_arg)); -} - -function serialize_payload_v1_Remove_TimestampRequest(arg) { - if (!(arg instanceof vald_v1_payload_payload_pb.Remove.TimestampRequest)) { - throw new Error('Expected argument of type payload.v1.Remove.TimestampRequest'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_payload_v1_Remove_TimestampRequest(buffer_arg) { - return vald_v1_payload_payload_pb.Remove.TimestampRequest.deserializeBinary(new Uint8Array(buffer_arg)); -} - - -// Remove service provides ways to remove indexed vectors. -var RemoveService = exports.RemoveService = { - // A method to remove an indexed vector. -remove: { - path: '/vald.v1.Remove/Remove', - requestStream: false, - responseStream: false, - requestType: vald_v1_payload_payload_pb.Remove.Request, - responseType: vald_v1_payload_payload_pb.Object.Location, - requestSerialize: serialize_payload_v1_Remove_Request, - requestDeserialize: deserialize_payload_v1_Remove_Request, - responseSerialize: serialize_payload_v1_Object_Location, - responseDeserialize: deserialize_payload_v1_Object_Location, - }, - // A method to remove an indexed vector based on timestamp. -removeByTimestamp: { - path: '/vald.v1.Remove/RemoveByTimestamp', - requestStream: false, - responseStream: false, - requestType: vald_v1_payload_payload_pb.Remove.TimestampRequest, - responseType: vald_v1_payload_payload_pb.Object.Locations, - requestSerialize: serialize_payload_v1_Remove_TimestampRequest, - requestDeserialize: deserialize_payload_v1_Remove_TimestampRequest, - responseSerialize: serialize_payload_v1_Object_Locations, - responseDeserialize: deserialize_payload_v1_Object_Locations, - }, - // A method to remove multiple indexed vectors by bidirectional streaming. -streamRemove: { - path: '/vald.v1.Remove/StreamRemove', - requestStream: true, - responseStream: true, - requestType: vald_v1_payload_payload_pb.Remove.Request, - responseType: vald_v1_payload_payload_pb.Object.StreamLocation, - requestSerialize: serialize_payload_v1_Remove_Request, - requestDeserialize: deserialize_payload_v1_Remove_Request, - responseSerialize: serialize_payload_v1_Object_StreamLocation, - responseDeserialize: deserialize_payload_v1_Object_StreamLocation, - }, - // A method to remove multiple indexed vectors in a single request. -multiRemove: { - path: '/vald.v1.Remove/MultiRemove', - requestStream: false, - responseStream: false, - requestType: vald_v1_payload_payload_pb.Remove.MultiRequest, - responseType: vald_v1_payload_payload_pb.Object.Locations, - requestSerialize: serialize_payload_v1_Remove_MultiRequest, - requestDeserialize: deserialize_payload_v1_Remove_MultiRequest, - responseSerialize: serialize_payload_v1_Object_Locations, - responseDeserialize: deserialize_payload_v1_Object_Locations, - }, -}; - -exports.RemoveClient = grpc.makeGenericClientConstructor(RemoveService); diff --git a/src/vald/v1/vald/remove_pb.d.ts b/src/vald/v1/vald/remove_pb.d.ts new file mode 100644 index 0000000..a43ef02 --- /dev/null +++ b/src/vald/v1/vald/remove_pb.d.ts @@ -0,0 +1,26 @@ +/* eslint-disable */ +// @generated by protobuf-ts 2.9.3 with parameter add_pb_suffix,client_grpc1,generate_dependencies,keep_enum_prefix,ts_nocheck,use_proto_field_name,output_javascript,output_legacy_commonjs,eslint_disable +// @generated from protobuf file "vald/v1/vald/remove.proto" (package "vald.v1", syntax proto3) +// tslint:disable +// @ts-nocheck +// +// +// Copyright (C) 2019-2023 vdaas.org vald team +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// You may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +/** + * @generated ServiceType for protobuf service vald.v1.Remove + */ +export declare const Remove: any; diff --git a/src/vald/v1/vald/remove_pb.grpc-client.ts b/src/vald/v1/vald/remove_pb.grpc-client.d.ts similarity index 75% rename from src/vald/v1/vald/remove_pb.grpc-client.ts rename to src/vald/v1/vald/remove_pb.grpc-client.d.ts index b009f99..be4911c 100644 --- a/src/vald/v1/vald/remove_pb.grpc-client.ts +++ b/src/vald/v1/vald/remove_pb.grpc-client.d.ts @@ -1,4 +1,5 @@ -// @generated by protobuf-ts 2.9.3 with parameter add_pb_suffix,client_grpc1,generate_dependencies,keep_enum_prefix,ts_nocheck,use_proto_field_name +/* eslint-disable */ +// @generated by protobuf-ts 2.9.3 with parameter add_pb_suffix,client_grpc1,generate_dependencies,keep_enum_prefix,ts_nocheck,use_proto_field_name,output_javascript,output_legacy_commonjs,eslint_disable // @generated from protobuf file "vald/v1/vald/remove.proto" (package "vald.v1", syntax proto3) // tslint:disable // @ts-nocheck @@ -19,7 +20,6 @@ // limitations under the License. // // -import { Remove } from "./remove_pb"; import type { BinaryWriteOptions } from "@protobuf-ts/runtime"; import type { BinaryReadOptions } from "@protobuf-ts/runtime"; import type { Remove_MultiRequest } from "../payload/payload_pb"; @@ -75,46 +75,31 @@ export interface IRemoveClient { * * @generated from protobuf service vald.v1.Remove */ -export class RemoveClient extends grpc.Client implements IRemoveClient { - private readonly _binaryOptions: Partial; - constructor(address: string, credentials: grpc.ChannelCredentials, options: grpc.ClientOptions = {}, binaryOptions: Partial = {}) { - super(address, credentials, options); - this._binaryOptions = binaryOptions; - } +export declare class RemoveClient extends grpc.Client implements IRemoveClient { + private readonly _binaryOptions; + constructor(address: string, credentials: grpc.ChannelCredentials, options?: grpc.ClientOptions, binaryOptions?: Partial); /** * A method to remove an indexed vector. * * @generated from protobuf rpc: Remove(payload.v1.Remove.Request) returns (payload.v1.Object.Location); */ - remove(input: Remove_Request, metadata: grpc.Metadata | grpc.CallOptions | ((err: grpc.ServiceError | null, value?: Object_Location) => void), options?: grpc.CallOptions | ((err: grpc.ServiceError | null, value?: Object_Location) => void), callback?: ((err: grpc.ServiceError | null, value?: Object_Location) => void)): grpc.ClientUnaryCall { - const method = Remove.methods[0]; - return this.makeUnaryRequest(`/${Remove.typeName}/${method.name}`, (value: Remove_Request): Buffer => Buffer.from(method.I.toBinary(value, this._binaryOptions)), (value: Buffer): Object_Location => method.O.fromBinary(value, this._binaryOptions), input, (metadata as any), (options as any), (callback as any)); - } + remove(input: Remove_Request, metadata: grpc.Metadata | grpc.CallOptions | ((err: grpc.ServiceError | null, value?: Object_Location) => void), options?: grpc.CallOptions | ((err: grpc.ServiceError | null, value?: Object_Location) => void), callback?: ((err: grpc.ServiceError | null, value?: Object_Location) => void)): grpc.ClientUnaryCall; /** * A method to remove an indexed vector based on timestamp. * * @generated from protobuf rpc: RemoveByTimestamp(payload.v1.Remove.TimestampRequest) returns (payload.v1.Object.Locations); */ - removeByTimestamp(input: Remove_TimestampRequest, metadata: grpc.Metadata | grpc.CallOptions | ((err: grpc.ServiceError | null, value?: Object_Locations) => void), options?: grpc.CallOptions | ((err: grpc.ServiceError | null, value?: Object_Locations) => void), callback?: ((err: grpc.ServiceError | null, value?: Object_Locations) => void)): grpc.ClientUnaryCall { - const method = Remove.methods[1]; - return this.makeUnaryRequest(`/${Remove.typeName}/${method.name}`, (value: Remove_TimestampRequest): Buffer => Buffer.from(method.I.toBinary(value, this._binaryOptions)), (value: Buffer): Object_Locations => method.O.fromBinary(value, this._binaryOptions), input, (metadata as any), (options as any), (callback as any)); - } + removeByTimestamp(input: Remove_TimestampRequest, metadata: grpc.Metadata | grpc.CallOptions | ((err: grpc.ServiceError | null, value?: Object_Locations) => void), options?: grpc.CallOptions | ((err: grpc.ServiceError | null, value?: Object_Locations) => void), callback?: ((err: grpc.ServiceError | null, value?: Object_Locations) => void)): grpc.ClientUnaryCall; /** * A method to remove multiple indexed vectors by bidirectional streaming. * * @generated from protobuf rpc: StreamRemove(stream payload.v1.Remove.Request) returns (stream payload.v1.Object.StreamLocation); */ - streamRemove(metadata?: grpc.Metadata | grpc.CallOptions, options?: grpc.CallOptions): grpc.ClientDuplexStream { - const method = Remove.methods[2]; - return this.makeBidiStreamRequest(`/${Remove.typeName}/${method.name}`, (value: Remove_Request): Buffer => Buffer.from(method.I.toBinary(value, this._binaryOptions)), (value: Buffer): Object_StreamLocation => method.O.fromBinary(value, this._binaryOptions), (metadata as any), options); - } + streamRemove(metadata?: grpc.Metadata | grpc.CallOptions, options?: grpc.CallOptions): grpc.ClientDuplexStream; /** * A method to remove multiple indexed vectors in a single request. * * @generated from protobuf rpc: MultiRemove(payload.v1.Remove.MultiRequest) returns (payload.v1.Object.Locations); */ - multiRemove(input: Remove_MultiRequest, metadata: grpc.Metadata | grpc.CallOptions | ((err: grpc.ServiceError | null, value?: Object_Locations) => void), options?: grpc.CallOptions | ((err: grpc.ServiceError | null, value?: Object_Locations) => void), callback?: ((err: grpc.ServiceError | null, value?: Object_Locations) => void)): grpc.ClientUnaryCall { - const method = Remove.methods[3]; - return this.makeUnaryRequest(`/${Remove.typeName}/${method.name}`, (value: Remove_MultiRequest): Buffer => Buffer.from(method.I.toBinary(value, this._binaryOptions)), (value: Buffer): Object_Locations => method.O.fromBinary(value, this._binaryOptions), input, (metadata as any), (options as any), (callback as any)); - } + multiRemove(input: Remove_MultiRequest, metadata: grpc.Metadata | grpc.CallOptions | ((err: grpc.ServiceError | null, value?: Object_Locations) => void), options?: grpc.CallOptions | ((err: grpc.ServiceError | null, value?: Object_Locations) => void), callback?: ((err: grpc.ServiceError | null, value?: Object_Locations) => void)): grpc.ClientUnaryCall; } diff --git a/src/vald/v1/vald/remove_pb.grpc-client.js b/src/vald/v1/vald/remove_pb.grpc-client.js new file mode 100644 index 0000000..ca67b2c --- /dev/null +++ b/src/vald/v1/vald/remove_pb.grpc-client.js @@ -0,0 +1,97 @@ +/* eslint-disable */ +// @generated by protobuf-ts 2.9.3 with parameter add_pb_suffix,client_grpc1,generate_dependencies,keep_enum_prefix,ts_nocheck,use_proto_field_name,output_javascript,output_legacy_commonjs,eslint_disable +// @generated from protobuf file "vald/v1/vald/remove.proto" (package "vald.v1", syntax proto3) +// tslint:disable +// @ts-nocheck +// +// +// Copyright (C) 2019-2023 vdaas.org vald team +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// You may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.RemoveClient = void 0; +/* eslint-disable */ +// @generated by protobuf-ts 2.9.3 with parameter add_pb_suffix,client_grpc1,generate_dependencies,keep_enum_prefix,ts_nocheck,use_proto_field_name,output_javascript,output_legacy_commonjs,eslint_disable +// @generated from protobuf file "vald/v1/vald/remove.proto" (package "vald.v1", syntax proto3) +// tslint:disable +// @ts-nocheck +// +// +// Copyright (C) 2019-2023 vdaas.org vald team +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// You may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +const remove_pb_1 = require("./remove_pb"); +const grpc = require("@grpc/grpc-js"); +/** + * Remove service provides ways to remove indexed vectors. + * + * @generated from protobuf service vald.v1.Remove + */ +class RemoveClient extends grpc.Client { + constructor(address, credentials, options = {}, binaryOptions = {}) { + super(address, credentials, options); + this._binaryOptions = binaryOptions; + } + /** + * A method to remove an indexed vector. + * + * @generated from protobuf rpc: Remove(payload.v1.Remove.Request) returns (payload.v1.Object.Location); + */ + remove(input, metadata, options, callback) { + const method = remove_pb_1.Remove.methods[0]; + return this.makeUnaryRequest(`/${remove_pb_1.Remove.typeName}/${method.name}`, (value) => Buffer.from(method.I.toBinary(value, this._binaryOptions)), (value) => method.O.fromBinary(value, this._binaryOptions), input, metadata, options, callback); + } + /** + * A method to remove an indexed vector based on timestamp. + * + * @generated from protobuf rpc: RemoveByTimestamp(payload.v1.Remove.TimestampRequest) returns (payload.v1.Object.Locations); + */ + removeByTimestamp(input, metadata, options, callback) { + const method = remove_pb_1.Remove.methods[1]; + return this.makeUnaryRequest(`/${remove_pb_1.Remove.typeName}/${method.name}`, (value) => Buffer.from(method.I.toBinary(value, this._binaryOptions)), (value) => method.O.fromBinary(value, this._binaryOptions), input, metadata, options, callback); + } + /** + * A method to remove multiple indexed vectors by bidirectional streaming. + * + * @generated from protobuf rpc: StreamRemove(stream payload.v1.Remove.Request) returns (stream payload.v1.Object.StreamLocation); + */ + streamRemove(metadata, options) { + const method = remove_pb_1.Remove.methods[2]; + return this.makeBidiStreamRequest(`/${remove_pb_1.Remove.typeName}/${method.name}`, (value) => Buffer.from(method.I.toBinary(value, this._binaryOptions)), (value) => method.O.fromBinary(value, this._binaryOptions), metadata, options); + } + /** + * A method to remove multiple indexed vectors in a single request. + * + * @generated from protobuf rpc: MultiRemove(payload.v1.Remove.MultiRequest) returns (payload.v1.Object.Locations); + */ + multiRemove(input, metadata, options, callback) { + const method = remove_pb_1.Remove.methods[3]; + return this.makeUnaryRequest(`/${remove_pb_1.Remove.typeName}/${method.name}`, (value) => Buffer.from(method.I.toBinary(value, this._binaryOptions)), (value) => method.O.fromBinary(value, this._binaryOptions), input, metadata, options, callback); + } +} +exports.RemoveClient = RemoveClient; diff --git a/src/vald/v1/vald/remove_pb.js b/src/vald/v1/vald/remove_pb.js index 71a8167..b7df0cb 100644 --- a/src/vald/v1/vald/remove_pb.js +++ b/src/vald/v1/vald/remove_pb.js @@ -1,27 +1,63 @@ -// source: vald/v1/vald/remove.proto -/** - * @fileoverview - * @enhanceable - * @suppress {missingRequire} reports error on implicit type usages. - * @suppress {messageConventions} JS Compiler reports an error if a variable or - * field starts with 'MSG_' and isn't a translatable message. - * @public - */ -// GENERATED CODE -- DO NOT EDIT! /* eslint-disable */ +// @generated by protobuf-ts 2.9.3 with parameter add_pb_suffix,client_grpc1,generate_dependencies,keep_enum_prefix,ts_nocheck,use_proto_field_name,output_javascript,output_legacy_commonjs,eslint_disable +// @generated from protobuf file "vald/v1/vald/remove.proto" (package "vald.v1", syntax proto3) +// tslint:disable +// @ts-nocheck +// +// +// Copyright (C) 2019-2023 vdaas.org vald team +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// You may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.Remove = void 0; +/* eslint-disable */ +// @generated by protobuf-ts 2.9.3 with parameter add_pb_suffix,client_grpc1,generate_dependencies,keep_enum_prefix,ts_nocheck,use_proto_field_name,output_javascript,output_legacy_commonjs,eslint_disable +// @generated from protobuf file "vald/v1/vald/remove.proto" (package "vald.v1", syntax proto3) +// tslint:disable // @ts-nocheck - -var jspb = require('google-protobuf'); -var goog = jspb; -var global = - (typeof globalThis !== 'undefined' && globalThis) || - (typeof window !== 'undefined' && window) || - (typeof global !== 'undefined' && global) || - (typeof self !== 'undefined' && self) || - (function () { return this; }).call(null) || - Function('return this')(); - -var google_api_annotations_pb = require('../../../google/api/annotations_pb.js'); -goog.object.extend(proto, google_api_annotations_pb); -var vald_v1_payload_payload_pb = require('../../../vald/v1/payload/payload_pb.js'); -goog.object.extend(proto, vald_v1_payload_payload_pb); +// +// +// Copyright (C) 2019-2023 vdaas.org vald team +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// You may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +const payload_pb_1 = require("../payload/payload_pb"); +const payload_pb_2 = require("../payload/payload_pb"); +const payload_pb_3 = require("../payload/payload_pb"); +const payload_pb_4 = require("../payload/payload_pb"); +const payload_pb_5 = require("../payload/payload_pb"); +const payload_pb_6 = require("../payload/payload_pb"); +const runtime_rpc_1 = require("@protobuf-ts/runtime-rpc"); +/** + * @generated ServiceType for protobuf service vald.v1.Remove + */ +exports.Remove = new runtime_rpc_1.ServiceType("vald.v1.Remove", [ + { name: "Remove", options: { "google.api.http": { post: "/remove", body: "*" } }, I: payload_pb_6.Remove_Request, O: payload_pb_5.Object_Location }, + { name: "RemoveByTimestamp", options: { "google.api.http": { post: "/remove/timestamp", body: "*" } }, I: payload_pb_4.Remove_TimestampRequest, O: payload_pb_3.Object_Locations }, + { name: "StreamRemove", serverStreaming: true, clientStreaming: true, options: {}, I: payload_pb_6.Remove_Request, O: payload_pb_2.Object_StreamLocation }, + { name: "MultiRemove", options: { "google.api.http": { post: "/remove/multiple", body: "*" } }, I: payload_pb_1.Remove_MultiRequest, O: payload_pb_3.Object_Locations } +]); diff --git a/src/vald/v1/vald/remove_pb.ts b/src/vald/v1/vald/remove_pb.ts deleted file mode 100644 index 2029d23..0000000 --- a/src/vald/v1/vald/remove_pb.ts +++ /dev/null @@ -1,37 +0,0 @@ -// @generated by protobuf-ts 2.9.3 with parameter add_pb_suffix,client_grpc1,generate_dependencies,keep_enum_prefix,ts_nocheck,use_proto_field_name -// @generated from protobuf file "vald/v1/vald/remove.proto" (package "vald.v1", syntax proto3) -// tslint:disable -// @ts-nocheck -// -// -// Copyright (C) 2019-2023 vdaas.org vald team -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// You may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// -import { Remove_MultiRequest } from "../payload/payload_pb"; -import { Object_StreamLocation } from "../payload/payload_pb"; -import { Object_Locations } from "../payload/payload_pb"; -import { Remove_TimestampRequest } from "../payload/payload_pb"; -import { Object_Location } from "../payload/payload_pb"; -import { Remove_Request } from "../payload/payload_pb"; -import { ServiceType } from "@protobuf-ts/runtime-rpc"; -/** - * @generated ServiceType for protobuf service vald.v1.Remove - */ -export const Remove = new ServiceType("vald.v1.Remove", [ - { name: "Remove", options: { "google.api.http": { post: "/remove", body: "*" } }, I: Remove_Request, O: Object_Location }, - { name: "RemoveByTimestamp", options: { "google.api.http": { post: "/remove/timestamp", body: "*" } }, I: Remove_TimestampRequest, O: Object_Locations }, - { name: "StreamRemove", serverStreaming: true, clientStreaming: true, options: {}, I: Remove_Request, O: Object_StreamLocation }, - { name: "MultiRemove", options: { "google.api.http": { post: "/remove/multiple", body: "*" } }, I: Remove_MultiRequest, O: Object_Locations } -]); diff --git a/src/vald/v1/vald/search_grpc_pb.js b/src/vald/v1/vald/search_grpc_pb.js deleted file mode 100644 index 9a49abf..0000000 --- a/src/vald/v1/vald/search_grpc_pb.js +++ /dev/null @@ -1,253 +0,0 @@ -// GENERATED CODE -- DO NOT EDIT! - -// Original file comments: -// -// Copyright (C) 2019-2023 vdaas.org vald team -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// You may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// -'use strict'; -var grpc = require('@grpc/grpc-js'); -var google_api_annotations_pb = require('../../../google/api/annotations_pb.js'); -var vald_v1_payload_payload_pb = require('../../../vald/v1/payload/payload_pb.js'); - -function serialize_payload_v1_Search_IDRequest(arg) { - if (!(arg instanceof vald_v1_payload_payload_pb.Search.IDRequest)) { - throw new Error('Expected argument of type payload.v1.Search.IDRequest'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_payload_v1_Search_IDRequest(buffer_arg) { - return vald_v1_payload_payload_pb.Search.IDRequest.deserializeBinary(new Uint8Array(buffer_arg)); -} - -function serialize_payload_v1_Search_MultiIDRequest(arg) { - if (!(arg instanceof vald_v1_payload_payload_pb.Search.MultiIDRequest)) { - throw new Error('Expected argument of type payload.v1.Search.MultiIDRequest'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_payload_v1_Search_MultiIDRequest(buffer_arg) { - return vald_v1_payload_payload_pb.Search.MultiIDRequest.deserializeBinary(new Uint8Array(buffer_arg)); -} - -function serialize_payload_v1_Search_MultiRequest(arg) { - if (!(arg instanceof vald_v1_payload_payload_pb.Search.MultiRequest)) { - throw new Error('Expected argument of type payload.v1.Search.MultiRequest'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_payload_v1_Search_MultiRequest(buffer_arg) { - return vald_v1_payload_payload_pb.Search.MultiRequest.deserializeBinary(new Uint8Array(buffer_arg)); -} - -function serialize_payload_v1_Search_Request(arg) { - if (!(arg instanceof vald_v1_payload_payload_pb.Search.Request)) { - throw new Error('Expected argument of type payload.v1.Search.Request'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_payload_v1_Search_Request(buffer_arg) { - return vald_v1_payload_payload_pb.Search.Request.deserializeBinary(new Uint8Array(buffer_arg)); -} - -function serialize_payload_v1_Search_Response(arg) { - if (!(arg instanceof vald_v1_payload_payload_pb.Search.Response)) { - throw new Error('Expected argument of type payload.v1.Search.Response'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_payload_v1_Search_Response(buffer_arg) { - return vald_v1_payload_payload_pb.Search.Response.deserializeBinary(new Uint8Array(buffer_arg)); -} - -function serialize_payload_v1_Search_Responses(arg) { - if (!(arg instanceof vald_v1_payload_payload_pb.Search.Responses)) { - throw new Error('Expected argument of type payload.v1.Search.Responses'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_payload_v1_Search_Responses(buffer_arg) { - return vald_v1_payload_payload_pb.Search.Responses.deserializeBinary(new Uint8Array(buffer_arg)); -} - -function serialize_payload_v1_Search_StreamResponse(arg) { - if (!(arg instanceof vald_v1_payload_payload_pb.Search.StreamResponse)) { - throw new Error('Expected argument of type payload.v1.Search.StreamResponse'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_payload_v1_Search_StreamResponse(buffer_arg) { - return vald_v1_payload_payload_pb.Search.StreamResponse.deserializeBinary(new Uint8Array(buffer_arg)); -} - - -// Search service provides ways to search indexed vectors. -var SearchService = exports.SearchService = { - // A method to search indexed vectors by a raw vector. -search: { - path: '/vald.v1.Search/Search', - requestStream: false, - responseStream: false, - requestType: vald_v1_payload_payload_pb.Search.Request, - responseType: vald_v1_payload_payload_pb.Search.Response, - requestSerialize: serialize_payload_v1_Search_Request, - requestDeserialize: deserialize_payload_v1_Search_Request, - responseSerialize: serialize_payload_v1_Search_Response, - responseDeserialize: deserialize_payload_v1_Search_Response, - }, - // A method to search indexed vectors by ID. -searchByID: { - path: '/vald.v1.Search/SearchByID', - requestStream: false, - responseStream: false, - requestType: vald_v1_payload_payload_pb.Search.IDRequest, - responseType: vald_v1_payload_payload_pb.Search.Response, - requestSerialize: serialize_payload_v1_Search_IDRequest, - requestDeserialize: deserialize_payload_v1_Search_IDRequest, - responseSerialize: serialize_payload_v1_Search_Response, - responseDeserialize: deserialize_payload_v1_Search_Response, - }, - // A method to search indexed vectors by multiple vectors. -streamSearch: { - path: '/vald.v1.Search/StreamSearch', - requestStream: true, - responseStream: true, - requestType: vald_v1_payload_payload_pb.Search.Request, - responseType: vald_v1_payload_payload_pb.Search.StreamResponse, - requestSerialize: serialize_payload_v1_Search_Request, - requestDeserialize: deserialize_payload_v1_Search_Request, - responseSerialize: serialize_payload_v1_Search_StreamResponse, - responseDeserialize: deserialize_payload_v1_Search_StreamResponse, - }, - // A method to search indexed vectors by multiple IDs. -streamSearchByID: { - path: '/vald.v1.Search/StreamSearchByID', - requestStream: true, - responseStream: true, - requestType: vald_v1_payload_payload_pb.Search.IDRequest, - responseType: vald_v1_payload_payload_pb.Search.StreamResponse, - requestSerialize: serialize_payload_v1_Search_IDRequest, - requestDeserialize: deserialize_payload_v1_Search_IDRequest, - responseSerialize: serialize_payload_v1_Search_StreamResponse, - responseDeserialize: deserialize_payload_v1_Search_StreamResponse, - }, - // A method to search indexed vectors by multiple vectors in a single request. -multiSearch: { - path: '/vald.v1.Search/MultiSearch', - requestStream: false, - responseStream: false, - requestType: vald_v1_payload_payload_pb.Search.MultiRequest, - responseType: vald_v1_payload_payload_pb.Search.Responses, - requestSerialize: serialize_payload_v1_Search_MultiRequest, - requestDeserialize: deserialize_payload_v1_Search_MultiRequest, - responseSerialize: serialize_payload_v1_Search_Responses, - responseDeserialize: deserialize_payload_v1_Search_Responses, - }, - // A method to search indexed vectors by multiple IDs in a single request. -multiSearchByID: { - path: '/vald.v1.Search/MultiSearchByID', - requestStream: false, - responseStream: false, - requestType: vald_v1_payload_payload_pb.Search.MultiIDRequest, - responseType: vald_v1_payload_payload_pb.Search.Responses, - requestSerialize: serialize_payload_v1_Search_MultiIDRequest, - requestDeserialize: deserialize_payload_v1_Search_MultiIDRequest, - responseSerialize: serialize_payload_v1_Search_Responses, - responseDeserialize: deserialize_payload_v1_Search_Responses, - }, - // A method to linear search indexed vectors by a raw vector. -linearSearch: { - path: '/vald.v1.Search/LinearSearch', - requestStream: false, - responseStream: false, - requestType: vald_v1_payload_payload_pb.Search.Request, - responseType: vald_v1_payload_payload_pb.Search.Response, - requestSerialize: serialize_payload_v1_Search_Request, - requestDeserialize: deserialize_payload_v1_Search_Request, - responseSerialize: serialize_payload_v1_Search_Response, - responseDeserialize: deserialize_payload_v1_Search_Response, - }, - // A method to linear search indexed vectors by ID. -linearSearchByID: { - path: '/vald.v1.Search/LinearSearchByID', - requestStream: false, - responseStream: false, - requestType: vald_v1_payload_payload_pb.Search.IDRequest, - responseType: vald_v1_payload_payload_pb.Search.Response, - requestSerialize: serialize_payload_v1_Search_IDRequest, - requestDeserialize: deserialize_payload_v1_Search_IDRequest, - responseSerialize: serialize_payload_v1_Search_Response, - responseDeserialize: deserialize_payload_v1_Search_Response, - }, - // A method to linear search indexed vectors by multiple vectors. -streamLinearSearch: { - path: '/vald.v1.Search/StreamLinearSearch', - requestStream: true, - responseStream: true, - requestType: vald_v1_payload_payload_pb.Search.Request, - responseType: vald_v1_payload_payload_pb.Search.StreamResponse, - requestSerialize: serialize_payload_v1_Search_Request, - requestDeserialize: deserialize_payload_v1_Search_Request, - responseSerialize: serialize_payload_v1_Search_StreamResponse, - responseDeserialize: deserialize_payload_v1_Search_StreamResponse, - }, - // A method to linear search indexed vectors by multiple IDs. -streamLinearSearchByID: { - path: '/vald.v1.Search/StreamLinearSearchByID', - requestStream: true, - responseStream: true, - requestType: vald_v1_payload_payload_pb.Search.IDRequest, - responseType: vald_v1_payload_payload_pb.Search.StreamResponse, - requestSerialize: serialize_payload_v1_Search_IDRequest, - requestDeserialize: deserialize_payload_v1_Search_IDRequest, - responseSerialize: serialize_payload_v1_Search_StreamResponse, - responseDeserialize: deserialize_payload_v1_Search_StreamResponse, - }, - // A method to linear search indexed vectors by multiple vectors in a single -// request. -multiLinearSearch: { - path: '/vald.v1.Search/MultiLinearSearch', - requestStream: false, - responseStream: false, - requestType: vald_v1_payload_payload_pb.Search.MultiRequest, - responseType: vald_v1_payload_payload_pb.Search.Responses, - requestSerialize: serialize_payload_v1_Search_MultiRequest, - requestDeserialize: deserialize_payload_v1_Search_MultiRequest, - responseSerialize: serialize_payload_v1_Search_Responses, - responseDeserialize: deserialize_payload_v1_Search_Responses, - }, - // A method to linear search indexed vectors by multiple IDs in a single -// request. -multiLinearSearchByID: { - path: '/vald.v1.Search/MultiLinearSearchByID', - requestStream: false, - responseStream: false, - requestType: vald_v1_payload_payload_pb.Search.MultiIDRequest, - responseType: vald_v1_payload_payload_pb.Search.Responses, - requestSerialize: serialize_payload_v1_Search_MultiIDRequest, - requestDeserialize: deserialize_payload_v1_Search_MultiIDRequest, - responseSerialize: serialize_payload_v1_Search_Responses, - responseDeserialize: deserialize_payload_v1_Search_Responses, - }, -}; - -exports.SearchClient = grpc.makeGenericClientConstructor(SearchService); diff --git a/src/vald/v1/vald/search_pb.d.ts b/src/vald/v1/vald/search_pb.d.ts new file mode 100644 index 0000000..54deea5 --- /dev/null +++ b/src/vald/v1/vald/search_pb.d.ts @@ -0,0 +1,26 @@ +/* eslint-disable */ +// @generated by protobuf-ts 2.9.3 with parameter add_pb_suffix,client_grpc1,generate_dependencies,keep_enum_prefix,ts_nocheck,use_proto_field_name,output_javascript,output_legacy_commonjs,eslint_disable +// @generated from protobuf file "vald/v1/vald/search.proto" (package "vald.v1", syntax proto3) +// tslint:disable +// @ts-nocheck +// +// +// Copyright (C) 2019-2023 vdaas.org vald team +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// You may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +/** + * @generated ServiceType for protobuf service vald.v1.Search + */ +export declare const Search: any; diff --git a/src/vald/v1/vald/search_pb.grpc-client.ts b/src/vald/v1/vald/search_pb.grpc-client.d.ts similarity index 74% rename from src/vald/v1/vald/search_pb.grpc-client.ts rename to src/vald/v1/vald/search_pb.grpc-client.d.ts index 16964bb..bbf16d9 100644 --- a/src/vald/v1/vald/search_pb.grpc-client.ts +++ b/src/vald/v1/vald/search_pb.grpc-client.d.ts @@ -1,4 +1,5 @@ -// @generated by protobuf-ts 2.9.3 with parameter add_pb_suffix,client_grpc1,generate_dependencies,keep_enum_prefix,ts_nocheck,use_proto_field_name +/* eslint-disable */ +// @generated by protobuf-ts 2.9.3 with parameter add_pb_suffix,client_grpc1,generate_dependencies,keep_enum_prefix,ts_nocheck,use_proto_field_name,output_javascript,output_legacy_commonjs,eslint_disable // @generated from protobuf file "vald/v1/vald/search.proto" (package "vald.v1", syntax proto3) // tslint:disable // @ts-nocheck @@ -19,7 +20,6 @@ // limitations under the License. // // -import { Search } from "./search_pb"; import type { BinaryWriteOptions } from "@protobuf-ts/runtime"; import type { BinaryReadOptions } from "@protobuf-ts/runtime"; import type { Search_MultiIDRequest } from "../payload/payload_pb"; @@ -144,120 +144,81 @@ export interface ISearchClient { * * @generated from protobuf service vald.v1.Search */ -export class SearchClient extends grpc.Client implements ISearchClient { - private readonly _binaryOptions: Partial; - constructor(address: string, credentials: grpc.ChannelCredentials, options: grpc.ClientOptions = {}, binaryOptions: Partial = {}) { - super(address, credentials, options); - this._binaryOptions = binaryOptions; - } +export declare class SearchClient extends grpc.Client implements ISearchClient { + private readonly _binaryOptions; + constructor(address: string, credentials: grpc.ChannelCredentials, options?: grpc.ClientOptions, binaryOptions?: Partial); /** * A method to search indexed vectors by a raw vector. * * @generated from protobuf rpc: Search(payload.v1.Search.Request) returns (payload.v1.Search.Response); */ - search(input: Search_Request, metadata: grpc.Metadata | grpc.CallOptions | ((err: grpc.ServiceError | null, value?: Search_Response) => void), options?: grpc.CallOptions | ((err: grpc.ServiceError | null, value?: Search_Response) => void), callback?: ((err: grpc.ServiceError | null, value?: Search_Response) => void)): grpc.ClientUnaryCall { - const method = Search.methods[0]; - return this.makeUnaryRequest(`/${Search.typeName}/${method.name}`, (value: Search_Request): Buffer => Buffer.from(method.I.toBinary(value, this._binaryOptions)), (value: Buffer): Search_Response => method.O.fromBinary(value, this._binaryOptions), input, (metadata as any), (options as any), (callback as any)); - } + search(input: Search_Request, metadata: grpc.Metadata | grpc.CallOptions | ((err: grpc.ServiceError | null, value?: Search_Response) => void), options?: grpc.CallOptions | ((err: grpc.ServiceError | null, value?: Search_Response) => void), callback?: ((err: grpc.ServiceError | null, value?: Search_Response) => void)): grpc.ClientUnaryCall; /** * A method to search indexed vectors by ID. * * @generated from protobuf rpc: SearchByID(payload.v1.Search.IDRequest) returns (payload.v1.Search.Response); */ - searchByID(input: Search_IDRequest, metadata: grpc.Metadata | grpc.CallOptions | ((err: grpc.ServiceError | null, value?: Search_Response) => void), options?: grpc.CallOptions | ((err: grpc.ServiceError | null, value?: Search_Response) => void), callback?: ((err: grpc.ServiceError | null, value?: Search_Response) => void)): grpc.ClientUnaryCall { - const method = Search.methods[1]; - return this.makeUnaryRequest(`/${Search.typeName}/${method.name}`, (value: Search_IDRequest): Buffer => Buffer.from(method.I.toBinary(value, this._binaryOptions)), (value: Buffer): Search_Response => method.O.fromBinary(value, this._binaryOptions), input, (metadata as any), (options as any), (callback as any)); - } + searchByID(input: Search_IDRequest, metadata: grpc.Metadata | grpc.CallOptions | ((err: grpc.ServiceError | null, value?: Search_Response) => void), options?: grpc.CallOptions | ((err: grpc.ServiceError | null, value?: Search_Response) => void), callback?: ((err: grpc.ServiceError | null, value?: Search_Response) => void)): grpc.ClientUnaryCall; /** * A method to search indexed vectors by multiple vectors. * * @generated from protobuf rpc: StreamSearch(stream payload.v1.Search.Request) returns (stream payload.v1.Search.StreamResponse); */ - streamSearch(metadata?: grpc.Metadata | grpc.CallOptions, options?: grpc.CallOptions): grpc.ClientDuplexStream { - const method = Search.methods[2]; - return this.makeBidiStreamRequest(`/${Search.typeName}/${method.name}`, (value: Search_Request): Buffer => Buffer.from(method.I.toBinary(value, this._binaryOptions)), (value: Buffer): Search_StreamResponse => method.O.fromBinary(value, this._binaryOptions), (metadata as any), options); - } + streamSearch(metadata?: grpc.Metadata | grpc.CallOptions, options?: grpc.CallOptions): grpc.ClientDuplexStream; /** * A method to search indexed vectors by multiple IDs. * * @generated from protobuf rpc: StreamSearchByID(stream payload.v1.Search.IDRequest) returns (stream payload.v1.Search.StreamResponse); */ - streamSearchByID(metadata?: grpc.Metadata | grpc.CallOptions, options?: grpc.CallOptions): grpc.ClientDuplexStream { - const method = Search.methods[3]; - return this.makeBidiStreamRequest(`/${Search.typeName}/${method.name}`, (value: Search_IDRequest): Buffer => Buffer.from(method.I.toBinary(value, this._binaryOptions)), (value: Buffer): Search_StreamResponse => method.O.fromBinary(value, this._binaryOptions), (metadata as any), options); - } + streamSearchByID(metadata?: grpc.Metadata | grpc.CallOptions, options?: grpc.CallOptions): grpc.ClientDuplexStream; /** * A method to search indexed vectors by multiple vectors in a single request. * * @generated from protobuf rpc: MultiSearch(payload.v1.Search.MultiRequest) returns (payload.v1.Search.Responses); */ - multiSearch(input: Search_MultiRequest, metadata: grpc.Metadata | grpc.CallOptions | ((err: grpc.ServiceError | null, value?: Search_Responses) => void), options?: grpc.CallOptions | ((err: grpc.ServiceError | null, value?: Search_Responses) => void), callback?: ((err: grpc.ServiceError | null, value?: Search_Responses) => void)): grpc.ClientUnaryCall { - const method = Search.methods[4]; - return this.makeUnaryRequest(`/${Search.typeName}/${method.name}`, (value: Search_MultiRequest): Buffer => Buffer.from(method.I.toBinary(value, this._binaryOptions)), (value: Buffer): Search_Responses => method.O.fromBinary(value, this._binaryOptions), input, (metadata as any), (options as any), (callback as any)); - } + multiSearch(input: Search_MultiRequest, metadata: grpc.Metadata | grpc.CallOptions | ((err: grpc.ServiceError | null, value?: Search_Responses) => void), options?: grpc.CallOptions | ((err: grpc.ServiceError | null, value?: Search_Responses) => void), callback?: ((err: grpc.ServiceError | null, value?: Search_Responses) => void)): grpc.ClientUnaryCall; /** * A method to search indexed vectors by multiple IDs in a single request. * * @generated from protobuf rpc: MultiSearchByID(payload.v1.Search.MultiIDRequest) returns (payload.v1.Search.Responses); */ - multiSearchByID(input: Search_MultiIDRequest, metadata: grpc.Metadata | grpc.CallOptions | ((err: grpc.ServiceError | null, value?: Search_Responses) => void), options?: grpc.CallOptions | ((err: grpc.ServiceError | null, value?: Search_Responses) => void), callback?: ((err: grpc.ServiceError | null, value?: Search_Responses) => void)): grpc.ClientUnaryCall { - const method = Search.methods[5]; - return this.makeUnaryRequest(`/${Search.typeName}/${method.name}`, (value: Search_MultiIDRequest): Buffer => Buffer.from(method.I.toBinary(value, this._binaryOptions)), (value: Buffer): Search_Responses => method.O.fromBinary(value, this._binaryOptions), input, (metadata as any), (options as any), (callback as any)); - } + multiSearchByID(input: Search_MultiIDRequest, metadata: grpc.Metadata | grpc.CallOptions | ((err: grpc.ServiceError | null, value?: Search_Responses) => void), options?: grpc.CallOptions | ((err: grpc.ServiceError | null, value?: Search_Responses) => void), callback?: ((err: grpc.ServiceError | null, value?: Search_Responses) => void)): grpc.ClientUnaryCall; /** * A method to linear search indexed vectors by a raw vector. * * @generated from protobuf rpc: LinearSearch(payload.v1.Search.Request) returns (payload.v1.Search.Response); */ - linearSearch(input: Search_Request, metadata: grpc.Metadata | grpc.CallOptions | ((err: grpc.ServiceError | null, value?: Search_Response) => void), options?: grpc.CallOptions | ((err: grpc.ServiceError | null, value?: Search_Response) => void), callback?: ((err: grpc.ServiceError | null, value?: Search_Response) => void)): grpc.ClientUnaryCall { - const method = Search.methods[6]; - return this.makeUnaryRequest(`/${Search.typeName}/${method.name}`, (value: Search_Request): Buffer => Buffer.from(method.I.toBinary(value, this._binaryOptions)), (value: Buffer): Search_Response => method.O.fromBinary(value, this._binaryOptions), input, (metadata as any), (options as any), (callback as any)); - } + linearSearch(input: Search_Request, metadata: grpc.Metadata | grpc.CallOptions | ((err: grpc.ServiceError | null, value?: Search_Response) => void), options?: grpc.CallOptions | ((err: grpc.ServiceError | null, value?: Search_Response) => void), callback?: ((err: grpc.ServiceError | null, value?: Search_Response) => void)): grpc.ClientUnaryCall; /** * A method to linear search indexed vectors by ID. * * @generated from protobuf rpc: LinearSearchByID(payload.v1.Search.IDRequest) returns (payload.v1.Search.Response); */ - linearSearchByID(input: Search_IDRequest, metadata: grpc.Metadata | grpc.CallOptions | ((err: grpc.ServiceError | null, value?: Search_Response) => void), options?: grpc.CallOptions | ((err: grpc.ServiceError | null, value?: Search_Response) => void), callback?: ((err: grpc.ServiceError | null, value?: Search_Response) => void)): grpc.ClientUnaryCall { - const method = Search.methods[7]; - return this.makeUnaryRequest(`/${Search.typeName}/${method.name}`, (value: Search_IDRequest): Buffer => Buffer.from(method.I.toBinary(value, this._binaryOptions)), (value: Buffer): Search_Response => method.O.fromBinary(value, this._binaryOptions), input, (metadata as any), (options as any), (callback as any)); - } + linearSearchByID(input: Search_IDRequest, metadata: grpc.Metadata | grpc.CallOptions | ((err: grpc.ServiceError | null, value?: Search_Response) => void), options?: grpc.CallOptions | ((err: grpc.ServiceError | null, value?: Search_Response) => void), callback?: ((err: grpc.ServiceError | null, value?: Search_Response) => void)): grpc.ClientUnaryCall; /** * A method to linear search indexed vectors by multiple vectors. * * @generated from protobuf rpc: StreamLinearSearch(stream payload.v1.Search.Request) returns (stream payload.v1.Search.StreamResponse); */ - streamLinearSearch(metadata?: grpc.Metadata | grpc.CallOptions, options?: grpc.CallOptions): grpc.ClientDuplexStream { - const method = Search.methods[8]; - return this.makeBidiStreamRequest(`/${Search.typeName}/${method.name}`, (value: Search_Request): Buffer => Buffer.from(method.I.toBinary(value, this._binaryOptions)), (value: Buffer): Search_StreamResponse => method.O.fromBinary(value, this._binaryOptions), (metadata as any), options); - } + streamLinearSearch(metadata?: grpc.Metadata | grpc.CallOptions, options?: grpc.CallOptions): grpc.ClientDuplexStream; /** * A method to linear search indexed vectors by multiple IDs. * * @generated from protobuf rpc: StreamLinearSearchByID(stream payload.v1.Search.IDRequest) returns (stream payload.v1.Search.StreamResponse); */ - streamLinearSearchByID(metadata?: grpc.Metadata | grpc.CallOptions, options?: grpc.CallOptions): grpc.ClientDuplexStream { - const method = Search.methods[9]; - return this.makeBidiStreamRequest(`/${Search.typeName}/${method.name}`, (value: Search_IDRequest): Buffer => Buffer.from(method.I.toBinary(value, this._binaryOptions)), (value: Buffer): Search_StreamResponse => method.O.fromBinary(value, this._binaryOptions), (metadata as any), options); - } + streamLinearSearchByID(metadata?: grpc.Metadata | grpc.CallOptions, options?: grpc.CallOptions): grpc.ClientDuplexStream; /** * A method to linear search indexed vectors by multiple vectors in a single * request. * * @generated from protobuf rpc: MultiLinearSearch(payload.v1.Search.MultiRequest) returns (payload.v1.Search.Responses); */ - multiLinearSearch(input: Search_MultiRequest, metadata: grpc.Metadata | grpc.CallOptions | ((err: grpc.ServiceError | null, value?: Search_Responses) => void), options?: grpc.CallOptions | ((err: grpc.ServiceError | null, value?: Search_Responses) => void), callback?: ((err: grpc.ServiceError | null, value?: Search_Responses) => void)): grpc.ClientUnaryCall { - const method = Search.methods[10]; - return this.makeUnaryRequest(`/${Search.typeName}/${method.name}`, (value: Search_MultiRequest): Buffer => Buffer.from(method.I.toBinary(value, this._binaryOptions)), (value: Buffer): Search_Responses => method.O.fromBinary(value, this._binaryOptions), input, (metadata as any), (options as any), (callback as any)); - } + multiLinearSearch(input: Search_MultiRequest, metadata: grpc.Metadata | grpc.CallOptions | ((err: grpc.ServiceError | null, value?: Search_Responses) => void), options?: grpc.CallOptions | ((err: grpc.ServiceError | null, value?: Search_Responses) => void), callback?: ((err: grpc.ServiceError | null, value?: Search_Responses) => void)): grpc.ClientUnaryCall; /** * A method to linear search indexed vectors by multiple IDs in a single * request. * * @generated from protobuf rpc: MultiLinearSearchByID(payload.v1.Search.MultiIDRequest) returns (payload.v1.Search.Responses); */ - multiLinearSearchByID(input: Search_MultiIDRequest, metadata: grpc.Metadata | grpc.CallOptions | ((err: grpc.ServiceError | null, value?: Search_Responses) => void), options?: grpc.CallOptions | ((err: grpc.ServiceError | null, value?: Search_Responses) => void), callback?: ((err: grpc.ServiceError | null, value?: Search_Responses) => void)): grpc.ClientUnaryCall { - const method = Search.methods[11]; - return this.makeUnaryRequest(`/${Search.typeName}/${method.name}`, (value: Search_MultiIDRequest): Buffer => Buffer.from(method.I.toBinary(value, this._binaryOptions)), (value: Buffer): Search_Responses => method.O.fromBinary(value, this._binaryOptions), input, (metadata as any), (options as any), (callback as any)); - } + multiLinearSearchByID(input: Search_MultiIDRequest, metadata: grpc.Metadata | grpc.CallOptions | ((err: grpc.ServiceError | null, value?: Search_Responses) => void), options?: grpc.CallOptions | ((err: grpc.ServiceError | null, value?: Search_Responses) => void), callback?: ((err: grpc.ServiceError | null, value?: Search_Responses) => void)): grpc.ClientUnaryCall; } diff --git a/src/vald/v1/vald/search_pb.grpc-client.js b/src/vald/v1/vald/search_pb.grpc-client.js new file mode 100644 index 0000000..144851e --- /dev/null +++ b/src/vald/v1/vald/search_pb.grpc-client.js @@ -0,0 +1,171 @@ +/* eslint-disable */ +// @generated by protobuf-ts 2.9.3 with parameter add_pb_suffix,client_grpc1,generate_dependencies,keep_enum_prefix,ts_nocheck,use_proto_field_name,output_javascript,output_legacy_commonjs,eslint_disable +// @generated from protobuf file "vald/v1/vald/search.proto" (package "vald.v1", syntax proto3) +// tslint:disable +// @ts-nocheck +// +// +// Copyright (C) 2019-2023 vdaas.org vald team +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// You may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.SearchClient = void 0; +/* eslint-disable */ +// @generated by protobuf-ts 2.9.3 with parameter add_pb_suffix,client_grpc1,generate_dependencies,keep_enum_prefix,ts_nocheck,use_proto_field_name,output_javascript,output_legacy_commonjs,eslint_disable +// @generated from protobuf file "vald/v1/vald/search.proto" (package "vald.v1", syntax proto3) +// tslint:disable +// @ts-nocheck +// +// +// Copyright (C) 2019-2023 vdaas.org vald team +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// You may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +const search_pb_1 = require("./search_pb"); +const grpc = require("@grpc/grpc-js"); +/** + * Search service provides ways to search indexed vectors. + * + * @generated from protobuf service vald.v1.Search + */ +class SearchClient extends grpc.Client { + constructor(address, credentials, options = {}, binaryOptions = {}) { + super(address, credentials, options); + this._binaryOptions = binaryOptions; + } + /** + * A method to search indexed vectors by a raw vector. + * + * @generated from protobuf rpc: Search(payload.v1.Search.Request) returns (payload.v1.Search.Response); + */ + search(input, metadata, options, callback) { + const method = search_pb_1.Search.methods[0]; + return this.makeUnaryRequest(`/${search_pb_1.Search.typeName}/${method.name}`, (value) => Buffer.from(method.I.toBinary(value, this._binaryOptions)), (value) => method.O.fromBinary(value, this._binaryOptions), input, metadata, options, callback); + } + /** + * A method to search indexed vectors by ID. + * + * @generated from protobuf rpc: SearchByID(payload.v1.Search.IDRequest) returns (payload.v1.Search.Response); + */ + searchByID(input, metadata, options, callback) { + const method = search_pb_1.Search.methods[1]; + return this.makeUnaryRequest(`/${search_pb_1.Search.typeName}/${method.name}`, (value) => Buffer.from(method.I.toBinary(value, this._binaryOptions)), (value) => method.O.fromBinary(value, this._binaryOptions), input, metadata, options, callback); + } + /** + * A method to search indexed vectors by multiple vectors. + * + * @generated from protobuf rpc: StreamSearch(stream payload.v1.Search.Request) returns (stream payload.v1.Search.StreamResponse); + */ + streamSearch(metadata, options) { + const method = search_pb_1.Search.methods[2]; + return this.makeBidiStreamRequest(`/${search_pb_1.Search.typeName}/${method.name}`, (value) => Buffer.from(method.I.toBinary(value, this._binaryOptions)), (value) => method.O.fromBinary(value, this._binaryOptions), metadata, options); + } + /** + * A method to search indexed vectors by multiple IDs. + * + * @generated from protobuf rpc: StreamSearchByID(stream payload.v1.Search.IDRequest) returns (stream payload.v1.Search.StreamResponse); + */ + streamSearchByID(metadata, options) { + const method = search_pb_1.Search.methods[3]; + return this.makeBidiStreamRequest(`/${search_pb_1.Search.typeName}/${method.name}`, (value) => Buffer.from(method.I.toBinary(value, this._binaryOptions)), (value) => method.O.fromBinary(value, this._binaryOptions), metadata, options); + } + /** + * A method to search indexed vectors by multiple vectors in a single request. + * + * @generated from protobuf rpc: MultiSearch(payload.v1.Search.MultiRequest) returns (payload.v1.Search.Responses); + */ + multiSearch(input, metadata, options, callback) { + const method = search_pb_1.Search.methods[4]; + return this.makeUnaryRequest(`/${search_pb_1.Search.typeName}/${method.name}`, (value) => Buffer.from(method.I.toBinary(value, this._binaryOptions)), (value) => method.O.fromBinary(value, this._binaryOptions), input, metadata, options, callback); + } + /** + * A method to search indexed vectors by multiple IDs in a single request. + * + * @generated from protobuf rpc: MultiSearchByID(payload.v1.Search.MultiIDRequest) returns (payload.v1.Search.Responses); + */ + multiSearchByID(input, metadata, options, callback) { + const method = search_pb_1.Search.methods[5]; + return this.makeUnaryRequest(`/${search_pb_1.Search.typeName}/${method.name}`, (value) => Buffer.from(method.I.toBinary(value, this._binaryOptions)), (value) => method.O.fromBinary(value, this._binaryOptions), input, metadata, options, callback); + } + /** + * A method to linear search indexed vectors by a raw vector. + * + * @generated from protobuf rpc: LinearSearch(payload.v1.Search.Request) returns (payload.v1.Search.Response); + */ + linearSearch(input, metadata, options, callback) { + const method = search_pb_1.Search.methods[6]; + return this.makeUnaryRequest(`/${search_pb_1.Search.typeName}/${method.name}`, (value) => Buffer.from(method.I.toBinary(value, this._binaryOptions)), (value) => method.O.fromBinary(value, this._binaryOptions), input, metadata, options, callback); + } + /** + * A method to linear search indexed vectors by ID. + * + * @generated from protobuf rpc: LinearSearchByID(payload.v1.Search.IDRequest) returns (payload.v1.Search.Response); + */ + linearSearchByID(input, metadata, options, callback) { + const method = search_pb_1.Search.methods[7]; + return this.makeUnaryRequest(`/${search_pb_1.Search.typeName}/${method.name}`, (value) => Buffer.from(method.I.toBinary(value, this._binaryOptions)), (value) => method.O.fromBinary(value, this._binaryOptions), input, metadata, options, callback); + } + /** + * A method to linear search indexed vectors by multiple vectors. + * + * @generated from protobuf rpc: StreamLinearSearch(stream payload.v1.Search.Request) returns (stream payload.v1.Search.StreamResponse); + */ + streamLinearSearch(metadata, options) { + const method = search_pb_1.Search.methods[8]; + return this.makeBidiStreamRequest(`/${search_pb_1.Search.typeName}/${method.name}`, (value) => Buffer.from(method.I.toBinary(value, this._binaryOptions)), (value) => method.O.fromBinary(value, this._binaryOptions), metadata, options); + } + /** + * A method to linear search indexed vectors by multiple IDs. + * + * @generated from protobuf rpc: StreamLinearSearchByID(stream payload.v1.Search.IDRequest) returns (stream payload.v1.Search.StreamResponse); + */ + streamLinearSearchByID(metadata, options) { + const method = search_pb_1.Search.methods[9]; + return this.makeBidiStreamRequest(`/${search_pb_1.Search.typeName}/${method.name}`, (value) => Buffer.from(method.I.toBinary(value, this._binaryOptions)), (value) => method.O.fromBinary(value, this._binaryOptions), metadata, options); + } + /** + * A method to linear search indexed vectors by multiple vectors in a single + * request. + * + * @generated from protobuf rpc: MultiLinearSearch(payload.v1.Search.MultiRequest) returns (payload.v1.Search.Responses); + */ + multiLinearSearch(input, metadata, options, callback) { + const method = search_pb_1.Search.methods[10]; + return this.makeUnaryRequest(`/${search_pb_1.Search.typeName}/${method.name}`, (value) => Buffer.from(method.I.toBinary(value, this._binaryOptions)), (value) => method.O.fromBinary(value, this._binaryOptions), input, metadata, options, callback); + } + /** + * A method to linear search indexed vectors by multiple IDs in a single + * request. + * + * @generated from protobuf rpc: MultiLinearSearchByID(payload.v1.Search.MultiIDRequest) returns (payload.v1.Search.Responses); + */ + multiLinearSearchByID(input, metadata, options, callback) { + const method = search_pb_1.Search.methods[11]; + return this.makeUnaryRequest(`/${search_pb_1.Search.typeName}/${method.name}`, (value) => Buffer.from(method.I.toBinary(value, this._binaryOptions)), (value) => method.O.fromBinary(value, this._binaryOptions), input, metadata, options, callback); + } +} +exports.SearchClient = SearchClient; diff --git a/src/vald/v1/vald/search_pb.js b/src/vald/v1/vald/search_pb.js index c663396..8764fa7 100644 --- a/src/vald/v1/vald/search_pb.js +++ b/src/vald/v1/vald/search_pb.js @@ -1,27 +1,72 @@ -// source: vald/v1/vald/search.proto -/** - * @fileoverview - * @enhanceable - * @suppress {missingRequire} reports error on implicit type usages. - * @suppress {messageConventions} JS Compiler reports an error if a variable or - * field starts with 'MSG_' and isn't a translatable message. - * @public - */ -// GENERATED CODE -- DO NOT EDIT! /* eslint-disable */ +// @generated by protobuf-ts 2.9.3 with parameter add_pb_suffix,client_grpc1,generate_dependencies,keep_enum_prefix,ts_nocheck,use_proto_field_name,output_javascript,output_legacy_commonjs,eslint_disable +// @generated from protobuf file "vald/v1/vald/search.proto" (package "vald.v1", syntax proto3) +// tslint:disable +// @ts-nocheck +// +// +// Copyright (C) 2019-2023 vdaas.org vald team +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// You may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.Search = void 0; +/* eslint-disable */ +// @generated by protobuf-ts 2.9.3 with parameter add_pb_suffix,client_grpc1,generate_dependencies,keep_enum_prefix,ts_nocheck,use_proto_field_name,output_javascript,output_legacy_commonjs,eslint_disable +// @generated from protobuf file "vald/v1/vald/search.proto" (package "vald.v1", syntax proto3) +// tslint:disable // @ts-nocheck - -var jspb = require('google-protobuf'); -var goog = jspb; -var global = - (typeof globalThis !== 'undefined' && globalThis) || - (typeof window !== 'undefined' && window) || - (typeof global !== 'undefined' && global) || - (typeof self !== 'undefined' && self) || - (function () { return this; }).call(null) || - Function('return this')(); - -var google_api_annotations_pb = require('../../../google/api/annotations_pb.js'); -goog.object.extend(proto, google_api_annotations_pb); -var vald_v1_payload_payload_pb = require('../../../vald/v1/payload/payload_pb.js'); -goog.object.extend(proto, vald_v1_payload_payload_pb); +// +// +// Copyright (C) 2019-2023 vdaas.org vald team +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// You may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +const payload_pb_1 = require("../payload/payload_pb"); +const payload_pb_2 = require("../payload/payload_pb"); +const payload_pb_3 = require("../payload/payload_pb"); +const payload_pb_4 = require("../payload/payload_pb"); +const payload_pb_5 = require("../payload/payload_pb"); +const payload_pb_6 = require("../payload/payload_pb"); +const payload_pb_7 = require("../payload/payload_pb"); +const runtime_rpc_1 = require("@protobuf-ts/runtime-rpc"); +/** + * @generated ServiceType for protobuf service vald.v1.Search + */ +exports.Search = new runtime_rpc_1.ServiceType("vald.v1.Search", [ + { name: "Search", options: { "google.api.http": { post: "/search", body: "*" } }, I: payload_pb_7.Search_Request, O: payload_pb_6.Search_Response }, + { name: "SearchByID", options: { "google.api.http": { post: "/search/id", body: "*" } }, I: payload_pb_5.Search_IDRequest, O: payload_pb_6.Search_Response }, + { name: "StreamSearch", serverStreaming: true, clientStreaming: true, options: {}, I: payload_pb_7.Search_Request, O: payload_pb_4.Search_StreamResponse }, + { name: "StreamSearchByID", serverStreaming: true, clientStreaming: true, options: {}, I: payload_pb_5.Search_IDRequest, O: payload_pb_4.Search_StreamResponse }, + { name: "MultiSearch", options: { "google.api.http": { post: "/search/multiple", body: "*" } }, I: payload_pb_3.Search_MultiRequest, O: payload_pb_2.Search_Responses }, + { name: "MultiSearchByID", options: { "google.api.http": { post: "/search/id/multiple", body: "*" } }, I: payload_pb_1.Search_MultiIDRequest, O: payload_pb_2.Search_Responses }, + { name: "LinearSearch", options: { "google.api.http": { post: "/linearsearch", body: "*" } }, I: payload_pb_7.Search_Request, O: payload_pb_6.Search_Response }, + { name: "LinearSearchByID", options: { "google.api.http": { post: "/linearsearch/id", body: "*" } }, I: payload_pb_5.Search_IDRequest, O: payload_pb_6.Search_Response }, + { name: "StreamLinearSearch", serverStreaming: true, clientStreaming: true, options: {}, I: payload_pb_7.Search_Request, O: payload_pb_4.Search_StreamResponse }, + { name: "StreamLinearSearchByID", serverStreaming: true, clientStreaming: true, options: {}, I: payload_pb_5.Search_IDRequest, O: payload_pb_4.Search_StreamResponse }, + { name: "MultiLinearSearch", options: { "google.api.http": { post: "/linearsearch/multiple", body: "*" } }, I: payload_pb_3.Search_MultiRequest, O: payload_pb_2.Search_Responses }, + { name: "MultiLinearSearchByID", options: { "google.api.http": { post: "/linearsearch/id/multiple", body: "*" } }, I: payload_pb_1.Search_MultiIDRequest, O: payload_pb_2.Search_Responses } +]); diff --git a/src/vald/v1/vald/search_pb.ts b/src/vald/v1/vald/search_pb.ts deleted file mode 100644 index a9d1906..0000000 --- a/src/vald/v1/vald/search_pb.ts +++ /dev/null @@ -1,46 +0,0 @@ -// @generated by protobuf-ts 2.9.3 with parameter add_pb_suffix,client_grpc1,generate_dependencies,keep_enum_prefix,ts_nocheck,use_proto_field_name -// @generated from protobuf file "vald/v1/vald/search.proto" (package "vald.v1", syntax proto3) -// tslint:disable -// @ts-nocheck -// -// -// Copyright (C) 2019-2023 vdaas.org vald team -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// You may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// -import { Search_MultiIDRequest } from "../payload/payload_pb"; -import { Search_Responses } from "../payload/payload_pb"; -import { Search_MultiRequest } from "../payload/payload_pb"; -import { Search_StreamResponse } from "../payload/payload_pb"; -import { Search_IDRequest } from "../payload/payload_pb"; -import { Search_Response } from "../payload/payload_pb"; -import { Search_Request } from "../payload/payload_pb"; -import { ServiceType } from "@protobuf-ts/runtime-rpc"; -/** - * @generated ServiceType for protobuf service vald.v1.Search - */ -export const Search = new ServiceType("vald.v1.Search", [ - { name: "Search", options: { "google.api.http": { post: "/search", body: "*" } }, I: Search_Request, O: Search_Response }, - { name: "SearchByID", options: { "google.api.http": { post: "/search/id", body: "*" } }, I: Search_IDRequest, O: Search_Response }, - { name: "StreamSearch", serverStreaming: true, clientStreaming: true, options: {}, I: Search_Request, O: Search_StreamResponse }, - { name: "StreamSearchByID", serverStreaming: true, clientStreaming: true, options: {}, I: Search_IDRequest, O: Search_StreamResponse }, - { name: "MultiSearch", options: { "google.api.http": { post: "/search/multiple", body: "*" } }, I: Search_MultiRequest, O: Search_Responses }, - { name: "MultiSearchByID", options: { "google.api.http": { post: "/search/id/multiple", body: "*" } }, I: Search_MultiIDRequest, O: Search_Responses }, - { name: "LinearSearch", options: { "google.api.http": { post: "/linearsearch", body: "*" } }, I: Search_Request, O: Search_Response }, - { name: "LinearSearchByID", options: { "google.api.http": { post: "/linearsearch/id", body: "*" } }, I: Search_IDRequest, O: Search_Response }, - { name: "StreamLinearSearch", serverStreaming: true, clientStreaming: true, options: {}, I: Search_Request, O: Search_StreamResponse }, - { name: "StreamLinearSearchByID", serverStreaming: true, clientStreaming: true, options: {}, I: Search_IDRequest, O: Search_StreamResponse }, - { name: "MultiLinearSearch", options: { "google.api.http": { post: "/linearsearch/multiple", body: "*" } }, I: Search_MultiRequest, O: Search_Responses }, - { name: "MultiLinearSearchByID", options: { "google.api.http": { post: "/linearsearch/id/multiple", body: "*" } }, I: Search_MultiIDRequest, O: Search_Responses } -]); diff --git a/src/vald/v1/vald/update_grpc_pb.js b/src/vald/v1/vald/update_grpc_pb.js deleted file mode 100644 index a8c4b67..0000000 --- a/src/vald/v1/vald/update_grpc_pb.js +++ /dev/null @@ -1,121 +0,0 @@ -// GENERATED CODE -- DO NOT EDIT! - -// Original file comments: -// -// Copyright (C) 2019-2023 vdaas.org vald team -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// You may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// -'use strict'; -var grpc = require('@grpc/grpc-js'); -var google_api_annotations_pb = require('../../../google/api/annotations_pb.js'); -var vald_v1_payload_payload_pb = require('../../../vald/v1/payload/payload_pb.js'); - -function serialize_payload_v1_Object_Location(arg) { - if (!(arg instanceof vald_v1_payload_payload_pb.Object.Location)) { - throw new Error('Expected argument of type payload.v1.Object.Location'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_payload_v1_Object_Location(buffer_arg) { - return vald_v1_payload_payload_pb.Object.Location.deserializeBinary(new Uint8Array(buffer_arg)); -} - -function serialize_payload_v1_Object_Locations(arg) { - if (!(arg instanceof vald_v1_payload_payload_pb.Object.Locations)) { - throw new Error('Expected argument of type payload.v1.Object.Locations'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_payload_v1_Object_Locations(buffer_arg) { - return vald_v1_payload_payload_pb.Object.Locations.deserializeBinary(new Uint8Array(buffer_arg)); -} - -function serialize_payload_v1_Object_StreamLocation(arg) { - if (!(arg instanceof vald_v1_payload_payload_pb.Object.StreamLocation)) { - throw new Error('Expected argument of type payload.v1.Object.StreamLocation'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_payload_v1_Object_StreamLocation(buffer_arg) { - return vald_v1_payload_payload_pb.Object.StreamLocation.deserializeBinary(new Uint8Array(buffer_arg)); -} - -function serialize_payload_v1_Update_MultiRequest(arg) { - if (!(arg instanceof vald_v1_payload_payload_pb.Update.MultiRequest)) { - throw new Error('Expected argument of type payload.v1.Update.MultiRequest'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_payload_v1_Update_MultiRequest(buffer_arg) { - return vald_v1_payload_payload_pb.Update.MultiRequest.deserializeBinary(new Uint8Array(buffer_arg)); -} - -function serialize_payload_v1_Update_Request(arg) { - if (!(arg instanceof vald_v1_payload_payload_pb.Update.Request)) { - throw new Error('Expected argument of type payload.v1.Update.Request'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_payload_v1_Update_Request(buffer_arg) { - return vald_v1_payload_payload_pb.Update.Request.deserializeBinary(new Uint8Array(buffer_arg)); -} - - -// Update service provides ways to update indexed vectors. -var UpdateService = exports.UpdateService = { - // A method to update an indexed vector. -update: { - path: '/vald.v1.Update/Update', - requestStream: false, - responseStream: false, - requestType: vald_v1_payload_payload_pb.Update.Request, - responseType: vald_v1_payload_payload_pb.Object.Location, - requestSerialize: serialize_payload_v1_Update_Request, - requestDeserialize: deserialize_payload_v1_Update_Request, - responseSerialize: serialize_payload_v1_Object_Location, - responseDeserialize: deserialize_payload_v1_Object_Location, - }, - // A method to update multiple indexed vectors by bidirectional streaming. -streamUpdate: { - path: '/vald.v1.Update/StreamUpdate', - requestStream: true, - responseStream: true, - requestType: vald_v1_payload_payload_pb.Update.Request, - responseType: vald_v1_payload_payload_pb.Object.StreamLocation, - requestSerialize: serialize_payload_v1_Update_Request, - requestDeserialize: deserialize_payload_v1_Update_Request, - responseSerialize: serialize_payload_v1_Object_StreamLocation, - responseDeserialize: deserialize_payload_v1_Object_StreamLocation, - }, - // A method to update multiple indexed vectors in a single request. -multiUpdate: { - path: '/vald.v1.Update/MultiUpdate', - requestStream: false, - responseStream: false, - requestType: vald_v1_payload_payload_pb.Update.MultiRequest, - responseType: vald_v1_payload_payload_pb.Object.Locations, - requestSerialize: serialize_payload_v1_Update_MultiRequest, - requestDeserialize: deserialize_payload_v1_Update_MultiRequest, - responseSerialize: serialize_payload_v1_Object_Locations, - responseDeserialize: deserialize_payload_v1_Object_Locations, - }, -}; - -exports.UpdateClient = grpc.makeGenericClientConstructor(UpdateService); diff --git a/src/vald/v1/vald/update_pb.ts b/src/vald/v1/vald/update_pb.d.ts similarity index 53% rename from src/vald/v1/vald/update_pb.ts rename to src/vald/v1/vald/update_pb.d.ts index ef1440a..593e5ea 100644 --- a/src/vald/v1/vald/update_pb.ts +++ b/src/vald/v1/vald/update_pb.d.ts @@ -1,4 +1,5 @@ -// @generated by protobuf-ts 2.9.3 with parameter add_pb_suffix,client_grpc1,generate_dependencies,keep_enum_prefix,ts_nocheck,use_proto_field_name +/* eslint-disable */ +// @generated by protobuf-ts 2.9.3 with parameter add_pb_suffix,client_grpc1,generate_dependencies,keep_enum_prefix,ts_nocheck,use_proto_field_name,output_javascript,output_legacy_commonjs,eslint_disable // @generated from protobuf file "vald/v1/vald/update.proto" (package "vald.v1", syntax proto3) // tslint:disable // @ts-nocheck @@ -19,17 +20,7 @@ // limitations under the License. // // -import { Object_Locations } from "../payload/payload_pb"; -import { Update_MultiRequest } from "../payload/payload_pb"; -import { Object_StreamLocation } from "../payload/payload_pb"; -import { Object_Location } from "../payload/payload_pb"; -import { Update_Request } from "../payload/payload_pb"; -import { ServiceType } from "@protobuf-ts/runtime-rpc"; /** * @generated ServiceType for protobuf service vald.v1.Update */ -export const Update = new ServiceType("vald.v1.Update", [ - { name: "Update", options: { "google.api.http": { post: "/update", body: "*" } }, I: Update_Request, O: Object_Location }, - { name: "StreamUpdate", serverStreaming: true, clientStreaming: true, options: {}, I: Update_Request, O: Object_StreamLocation }, - { name: "MultiUpdate", options: { "google.api.http": { post: "/update/multiple", body: "*" } }, I: Update_MultiRequest, O: Object_Locations } -]); +export declare const Update: any; diff --git a/src/vald/v1/vald/update_pb.grpc-client.ts b/src/vald/v1/vald/update_pb.grpc-client.d.ts similarity index 75% rename from src/vald/v1/vald/update_pb.grpc-client.ts rename to src/vald/v1/vald/update_pb.grpc-client.d.ts index a81c7cf..a7b9fca 100644 --- a/src/vald/v1/vald/update_pb.grpc-client.ts +++ b/src/vald/v1/vald/update_pb.grpc-client.d.ts @@ -1,4 +1,5 @@ -// @generated by protobuf-ts 2.9.3 with parameter add_pb_suffix,client_grpc1,generate_dependencies,keep_enum_prefix,ts_nocheck,use_proto_field_name +/* eslint-disable */ +// @generated by protobuf-ts 2.9.3 with parameter add_pb_suffix,client_grpc1,generate_dependencies,keep_enum_prefix,ts_nocheck,use_proto_field_name,output_javascript,output_legacy_commonjs,eslint_disable // @generated from protobuf file "vald/v1/vald/update.proto" (package "vald.v1", syntax proto3) // tslint:disable // @ts-nocheck @@ -19,7 +20,6 @@ // limitations under the License. // // -import { Update } from "./update_pb"; import type { BinaryWriteOptions } from "@protobuf-ts/runtime"; import type { BinaryReadOptions } from "@protobuf-ts/runtime"; import type { Object_Locations } from "../payload/payload_pb"; @@ -65,37 +65,25 @@ export interface IUpdateClient { * * @generated from protobuf service vald.v1.Update */ -export class UpdateClient extends grpc.Client implements IUpdateClient { - private readonly _binaryOptions: Partial; - constructor(address: string, credentials: grpc.ChannelCredentials, options: grpc.ClientOptions = {}, binaryOptions: Partial = {}) { - super(address, credentials, options); - this._binaryOptions = binaryOptions; - } +export declare class UpdateClient extends grpc.Client implements IUpdateClient { + private readonly _binaryOptions; + constructor(address: string, credentials: grpc.ChannelCredentials, options?: grpc.ClientOptions, binaryOptions?: Partial); /** * A method to update an indexed vector. * * @generated from protobuf rpc: Update(payload.v1.Update.Request) returns (payload.v1.Object.Location); */ - update(input: Update_Request, metadata: grpc.Metadata | grpc.CallOptions | ((err: grpc.ServiceError | null, value?: Object_Location) => void), options?: grpc.CallOptions | ((err: grpc.ServiceError | null, value?: Object_Location) => void), callback?: ((err: grpc.ServiceError | null, value?: Object_Location) => void)): grpc.ClientUnaryCall { - const method = Update.methods[0]; - return this.makeUnaryRequest(`/${Update.typeName}/${method.name}`, (value: Update_Request): Buffer => Buffer.from(method.I.toBinary(value, this._binaryOptions)), (value: Buffer): Object_Location => method.O.fromBinary(value, this._binaryOptions), input, (metadata as any), (options as any), (callback as any)); - } + update(input: Update_Request, metadata: grpc.Metadata | grpc.CallOptions | ((err: grpc.ServiceError | null, value?: Object_Location) => void), options?: grpc.CallOptions | ((err: grpc.ServiceError | null, value?: Object_Location) => void), callback?: ((err: grpc.ServiceError | null, value?: Object_Location) => void)): grpc.ClientUnaryCall; /** * A method to update multiple indexed vectors by bidirectional streaming. * * @generated from protobuf rpc: StreamUpdate(stream payload.v1.Update.Request) returns (stream payload.v1.Object.StreamLocation); */ - streamUpdate(metadata?: grpc.Metadata | grpc.CallOptions, options?: grpc.CallOptions): grpc.ClientDuplexStream { - const method = Update.methods[1]; - return this.makeBidiStreamRequest(`/${Update.typeName}/${method.name}`, (value: Update_Request): Buffer => Buffer.from(method.I.toBinary(value, this._binaryOptions)), (value: Buffer): Object_StreamLocation => method.O.fromBinary(value, this._binaryOptions), (metadata as any), options); - } + streamUpdate(metadata?: grpc.Metadata | grpc.CallOptions, options?: grpc.CallOptions): grpc.ClientDuplexStream; /** * A method to update multiple indexed vectors in a single request. * * @generated from protobuf rpc: MultiUpdate(payload.v1.Update.MultiRequest) returns (payload.v1.Object.Locations); */ - multiUpdate(input: Update_MultiRequest, metadata: grpc.Metadata | grpc.CallOptions | ((err: grpc.ServiceError | null, value?: Object_Locations) => void), options?: grpc.CallOptions | ((err: grpc.ServiceError | null, value?: Object_Locations) => void), callback?: ((err: grpc.ServiceError | null, value?: Object_Locations) => void)): grpc.ClientUnaryCall { - const method = Update.methods[2]; - return this.makeUnaryRequest(`/${Update.typeName}/${method.name}`, (value: Update_MultiRequest): Buffer => Buffer.from(method.I.toBinary(value, this._binaryOptions)), (value: Buffer): Object_Locations => method.O.fromBinary(value, this._binaryOptions), input, (metadata as any), (options as any), (callback as any)); - } + multiUpdate(input: Update_MultiRequest, metadata: grpc.Metadata | grpc.CallOptions | ((err: grpc.ServiceError | null, value?: Object_Locations) => void), options?: grpc.CallOptions | ((err: grpc.ServiceError | null, value?: Object_Locations) => void), callback?: ((err: grpc.ServiceError | null, value?: Object_Locations) => void)): grpc.ClientUnaryCall; } diff --git a/src/vald/v1/vald/update_pb.grpc-client.js b/src/vald/v1/vald/update_pb.grpc-client.js new file mode 100644 index 0000000..142cdc9 --- /dev/null +++ b/src/vald/v1/vald/update_pb.grpc-client.js @@ -0,0 +1,88 @@ +/* eslint-disable */ +// @generated by protobuf-ts 2.9.3 with parameter add_pb_suffix,client_grpc1,generate_dependencies,keep_enum_prefix,ts_nocheck,use_proto_field_name,output_javascript,output_legacy_commonjs,eslint_disable +// @generated from protobuf file "vald/v1/vald/update.proto" (package "vald.v1", syntax proto3) +// tslint:disable +// @ts-nocheck +// +// +// Copyright (C) 2019-2023 vdaas.org vald team +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// You may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.UpdateClient = void 0; +/* eslint-disable */ +// @generated by protobuf-ts 2.9.3 with parameter add_pb_suffix,client_grpc1,generate_dependencies,keep_enum_prefix,ts_nocheck,use_proto_field_name,output_javascript,output_legacy_commonjs,eslint_disable +// @generated from protobuf file "vald/v1/vald/update.proto" (package "vald.v1", syntax proto3) +// tslint:disable +// @ts-nocheck +// +// +// Copyright (C) 2019-2023 vdaas.org vald team +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// You may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +const update_pb_1 = require("./update_pb"); +const grpc = require("@grpc/grpc-js"); +/** + * Update service provides ways to update indexed vectors. + * + * @generated from protobuf service vald.v1.Update + */ +class UpdateClient extends grpc.Client { + constructor(address, credentials, options = {}, binaryOptions = {}) { + super(address, credentials, options); + this._binaryOptions = binaryOptions; + } + /** + * A method to update an indexed vector. + * + * @generated from protobuf rpc: Update(payload.v1.Update.Request) returns (payload.v1.Object.Location); + */ + update(input, metadata, options, callback) { + const method = update_pb_1.Update.methods[0]; + return this.makeUnaryRequest(`/${update_pb_1.Update.typeName}/${method.name}`, (value) => Buffer.from(method.I.toBinary(value, this._binaryOptions)), (value) => method.O.fromBinary(value, this._binaryOptions), input, metadata, options, callback); + } + /** + * A method to update multiple indexed vectors by bidirectional streaming. + * + * @generated from protobuf rpc: StreamUpdate(stream payload.v1.Update.Request) returns (stream payload.v1.Object.StreamLocation); + */ + streamUpdate(metadata, options) { + const method = update_pb_1.Update.methods[1]; + return this.makeBidiStreamRequest(`/${update_pb_1.Update.typeName}/${method.name}`, (value) => Buffer.from(method.I.toBinary(value, this._binaryOptions)), (value) => method.O.fromBinary(value, this._binaryOptions), metadata, options); + } + /** + * A method to update multiple indexed vectors in a single request. + * + * @generated from protobuf rpc: MultiUpdate(payload.v1.Update.MultiRequest) returns (payload.v1.Object.Locations); + */ + multiUpdate(input, metadata, options, callback) { + const method = update_pb_1.Update.methods[2]; + return this.makeUnaryRequest(`/${update_pb_1.Update.typeName}/${method.name}`, (value) => Buffer.from(method.I.toBinary(value, this._binaryOptions)), (value) => method.O.fromBinary(value, this._binaryOptions), input, metadata, options, callback); + } +} +exports.UpdateClient = UpdateClient; diff --git a/src/vald/v1/vald/update_pb.js b/src/vald/v1/vald/update_pb.js index 306dd6f..d3e9210 100644 --- a/src/vald/v1/vald/update_pb.js +++ b/src/vald/v1/vald/update_pb.js @@ -1,27 +1,61 @@ -// source: vald/v1/vald/update.proto -/** - * @fileoverview - * @enhanceable - * @suppress {missingRequire} reports error on implicit type usages. - * @suppress {messageConventions} JS Compiler reports an error if a variable or - * field starts with 'MSG_' and isn't a translatable message. - * @public - */ -// GENERATED CODE -- DO NOT EDIT! /* eslint-disable */ +// @generated by protobuf-ts 2.9.3 with parameter add_pb_suffix,client_grpc1,generate_dependencies,keep_enum_prefix,ts_nocheck,use_proto_field_name,output_javascript,output_legacy_commonjs,eslint_disable +// @generated from protobuf file "vald/v1/vald/update.proto" (package "vald.v1", syntax proto3) +// tslint:disable +// @ts-nocheck +// +// +// Copyright (C) 2019-2023 vdaas.org vald team +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// You may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.Update = void 0; +/* eslint-disable */ +// @generated by protobuf-ts 2.9.3 with parameter add_pb_suffix,client_grpc1,generate_dependencies,keep_enum_prefix,ts_nocheck,use_proto_field_name,output_javascript,output_legacy_commonjs,eslint_disable +// @generated from protobuf file "vald/v1/vald/update.proto" (package "vald.v1", syntax proto3) +// tslint:disable // @ts-nocheck - -var jspb = require('google-protobuf'); -var goog = jspb; -var global = - (typeof globalThis !== 'undefined' && globalThis) || - (typeof window !== 'undefined' && window) || - (typeof global !== 'undefined' && global) || - (typeof self !== 'undefined' && self) || - (function () { return this; }).call(null) || - Function('return this')(); - -var google_api_annotations_pb = require('../../../google/api/annotations_pb.js'); -goog.object.extend(proto, google_api_annotations_pb); -var vald_v1_payload_payload_pb = require('../../../vald/v1/payload/payload_pb.js'); -goog.object.extend(proto, vald_v1_payload_payload_pb); +// +// +// Copyright (C) 2019-2023 vdaas.org vald team +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// You may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +const payload_pb_1 = require("../payload/payload_pb"); +const payload_pb_2 = require("../payload/payload_pb"); +const payload_pb_3 = require("../payload/payload_pb"); +const payload_pb_4 = require("../payload/payload_pb"); +const payload_pb_5 = require("../payload/payload_pb"); +const runtime_rpc_1 = require("@protobuf-ts/runtime-rpc"); +/** + * @generated ServiceType for protobuf service vald.v1.Update + */ +exports.Update = new runtime_rpc_1.ServiceType("vald.v1.Update", [ + { name: "Update", options: { "google.api.http": { post: "/update", body: "*" } }, I: payload_pb_5.Update_Request, O: payload_pb_4.Object_Location }, + { name: "StreamUpdate", serverStreaming: true, clientStreaming: true, options: {}, I: payload_pb_5.Update_Request, O: payload_pb_3.Object_StreamLocation }, + { name: "MultiUpdate", options: { "google.api.http": { post: "/update/multiple", body: "*" } }, I: payload_pb_2.Update_MultiRequest, O: payload_pb_1.Object_Locations } +]); diff --git a/src/vald/v1/vald/upsert_grpc_pb.js b/src/vald/v1/vald/upsert_grpc_pb.js deleted file mode 100644 index ec00412..0000000 --- a/src/vald/v1/vald/upsert_grpc_pb.js +++ /dev/null @@ -1,121 +0,0 @@ -// GENERATED CODE -- DO NOT EDIT! - -// Original file comments: -// -// Copyright (C) 2019-2023 vdaas.org vald team -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// You may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// -'use strict'; -var grpc = require('@grpc/grpc-js'); -var google_api_annotations_pb = require('../../../google/api/annotations_pb.js'); -var vald_v1_payload_payload_pb = require('../../../vald/v1/payload/payload_pb.js'); - -function serialize_payload_v1_Object_Location(arg) { - if (!(arg instanceof vald_v1_payload_payload_pb.Object.Location)) { - throw new Error('Expected argument of type payload.v1.Object.Location'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_payload_v1_Object_Location(buffer_arg) { - return vald_v1_payload_payload_pb.Object.Location.deserializeBinary(new Uint8Array(buffer_arg)); -} - -function serialize_payload_v1_Object_Locations(arg) { - if (!(arg instanceof vald_v1_payload_payload_pb.Object.Locations)) { - throw new Error('Expected argument of type payload.v1.Object.Locations'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_payload_v1_Object_Locations(buffer_arg) { - return vald_v1_payload_payload_pb.Object.Locations.deserializeBinary(new Uint8Array(buffer_arg)); -} - -function serialize_payload_v1_Object_StreamLocation(arg) { - if (!(arg instanceof vald_v1_payload_payload_pb.Object.StreamLocation)) { - throw new Error('Expected argument of type payload.v1.Object.StreamLocation'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_payload_v1_Object_StreamLocation(buffer_arg) { - return vald_v1_payload_payload_pb.Object.StreamLocation.deserializeBinary(new Uint8Array(buffer_arg)); -} - -function serialize_payload_v1_Upsert_MultiRequest(arg) { - if (!(arg instanceof vald_v1_payload_payload_pb.Upsert.MultiRequest)) { - throw new Error('Expected argument of type payload.v1.Upsert.MultiRequest'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_payload_v1_Upsert_MultiRequest(buffer_arg) { - return vald_v1_payload_payload_pb.Upsert.MultiRequest.deserializeBinary(new Uint8Array(buffer_arg)); -} - -function serialize_payload_v1_Upsert_Request(arg) { - if (!(arg instanceof vald_v1_payload_payload_pb.Upsert.Request)) { - throw new Error('Expected argument of type payload.v1.Upsert.Request'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_payload_v1_Upsert_Request(buffer_arg) { - return vald_v1_payload_payload_pb.Upsert.Request.deserializeBinary(new Uint8Array(buffer_arg)); -} - - -// Upsert service provides ways to insert/update vectors. -var UpsertService = exports.UpsertService = { - // A method to insert/update a vector. -upsert: { - path: '/vald.v1.Upsert/Upsert', - requestStream: false, - responseStream: false, - requestType: vald_v1_payload_payload_pb.Upsert.Request, - responseType: vald_v1_payload_payload_pb.Object.Location, - requestSerialize: serialize_payload_v1_Upsert_Request, - requestDeserialize: deserialize_payload_v1_Upsert_Request, - responseSerialize: serialize_payload_v1_Object_Location, - responseDeserialize: deserialize_payload_v1_Object_Location, - }, - // A method to insert/update multiple vectors by bidirectional streaming. -streamUpsert: { - path: '/vald.v1.Upsert/StreamUpsert', - requestStream: true, - responseStream: true, - requestType: vald_v1_payload_payload_pb.Upsert.Request, - responseType: vald_v1_payload_payload_pb.Object.StreamLocation, - requestSerialize: serialize_payload_v1_Upsert_Request, - requestDeserialize: deserialize_payload_v1_Upsert_Request, - responseSerialize: serialize_payload_v1_Object_StreamLocation, - responseDeserialize: deserialize_payload_v1_Object_StreamLocation, - }, - // A method to insert/update multiple vectors in a single request. -multiUpsert: { - path: '/vald.v1.Upsert/MultiUpsert', - requestStream: false, - responseStream: false, - requestType: vald_v1_payload_payload_pb.Upsert.MultiRequest, - responseType: vald_v1_payload_payload_pb.Object.Locations, - requestSerialize: serialize_payload_v1_Upsert_MultiRequest, - requestDeserialize: deserialize_payload_v1_Upsert_MultiRequest, - responseSerialize: serialize_payload_v1_Object_Locations, - responseDeserialize: deserialize_payload_v1_Object_Locations, - }, -}; - -exports.UpsertClient = grpc.makeGenericClientConstructor(UpsertService); diff --git a/src/vald/v1/vald/upsert_pb.ts b/src/vald/v1/vald/upsert_pb.d.ts similarity index 53% rename from src/vald/v1/vald/upsert_pb.ts rename to src/vald/v1/vald/upsert_pb.d.ts index 5d691d9..41d1b3c 100644 --- a/src/vald/v1/vald/upsert_pb.ts +++ b/src/vald/v1/vald/upsert_pb.d.ts @@ -1,4 +1,5 @@ -// @generated by protobuf-ts 2.9.3 with parameter add_pb_suffix,client_grpc1,generate_dependencies,keep_enum_prefix,ts_nocheck,use_proto_field_name +/* eslint-disable */ +// @generated by protobuf-ts 2.9.3 with parameter add_pb_suffix,client_grpc1,generate_dependencies,keep_enum_prefix,ts_nocheck,use_proto_field_name,output_javascript,output_legacy_commonjs,eslint_disable // @generated from protobuf file "vald/v1/vald/upsert.proto" (package "vald.v1", syntax proto3) // tslint:disable // @ts-nocheck @@ -19,17 +20,7 @@ // limitations under the License. // // -import { Object_Locations } from "../payload/payload_pb"; -import { Upsert_MultiRequest } from "../payload/payload_pb"; -import { Object_StreamLocation } from "../payload/payload_pb"; -import { Object_Location } from "../payload/payload_pb"; -import { Upsert_Request } from "../payload/payload_pb"; -import { ServiceType } from "@protobuf-ts/runtime-rpc"; /** * @generated ServiceType for protobuf service vald.v1.Upsert */ -export const Upsert = new ServiceType("vald.v1.Upsert", [ - { name: "Upsert", options: { "google.api.http": { post: "/upsert", body: "*" } }, I: Upsert_Request, O: Object_Location }, - { name: "StreamUpsert", serverStreaming: true, clientStreaming: true, options: {}, I: Upsert_Request, O: Object_StreamLocation }, - { name: "MultiUpsert", options: { "google.api.http": { post: "/upsert/multiple", body: "*" } }, I: Upsert_MultiRequest, O: Object_Locations } -]); +export declare const Upsert: any; diff --git a/src/vald/v1/vald/upsert_pb.grpc-client.ts b/src/vald/v1/vald/upsert_pb.grpc-client.d.ts similarity index 75% rename from src/vald/v1/vald/upsert_pb.grpc-client.ts rename to src/vald/v1/vald/upsert_pb.grpc-client.d.ts index 028b9a1..3c71522 100644 --- a/src/vald/v1/vald/upsert_pb.grpc-client.ts +++ b/src/vald/v1/vald/upsert_pb.grpc-client.d.ts @@ -1,4 +1,5 @@ -// @generated by protobuf-ts 2.9.3 with parameter add_pb_suffix,client_grpc1,generate_dependencies,keep_enum_prefix,ts_nocheck,use_proto_field_name +/* eslint-disable */ +// @generated by protobuf-ts 2.9.3 with parameter add_pb_suffix,client_grpc1,generate_dependencies,keep_enum_prefix,ts_nocheck,use_proto_field_name,output_javascript,output_legacy_commonjs,eslint_disable // @generated from protobuf file "vald/v1/vald/upsert.proto" (package "vald.v1", syntax proto3) // tslint:disable // @ts-nocheck @@ -19,7 +20,6 @@ // limitations under the License. // // -import { Upsert } from "./upsert_pb"; import type { BinaryWriteOptions } from "@protobuf-ts/runtime"; import type { BinaryReadOptions } from "@protobuf-ts/runtime"; import type { Object_Locations } from "../payload/payload_pb"; @@ -65,37 +65,25 @@ export interface IUpsertClient { * * @generated from protobuf service vald.v1.Upsert */ -export class UpsertClient extends grpc.Client implements IUpsertClient { - private readonly _binaryOptions: Partial; - constructor(address: string, credentials: grpc.ChannelCredentials, options: grpc.ClientOptions = {}, binaryOptions: Partial = {}) { - super(address, credentials, options); - this._binaryOptions = binaryOptions; - } +export declare class UpsertClient extends grpc.Client implements IUpsertClient { + private readonly _binaryOptions; + constructor(address: string, credentials: grpc.ChannelCredentials, options?: grpc.ClientOptions, binaryOptions?: Partial); /** * A method to insert/update a vector. * * @generated from protobuf rpc: Upsert(payload.v1.Upsert.Request) returns (payload.v1.Object.Location); */ - upsert(input: Upsert_Request, metadata: grpc.Metadata | grpc.CallOptions | ((err: grpc.ServiceError | null, value?: Object_Location) => void), options?: grpc.CallOptions | ((err: grpc.ServiceError | null, value?: Object_Location) => void), callback?: ((err: grpc.ServiceError | null, value?: Object_Location) => void)): grpc.ClientUnaryCall { - const method = Upsert.methods[0]; - return this.makeUnaryRequest(`/${Upsert.typeName}/${method.name}`, (value: Upsert_Request): Buffer => Buffer.from(method.I.toBinary(value, this._binaryOptions)), (value: Buffer): Object_Location => method.O.fromBinary(value, this._binaryOptions), input, (metadata as any), (options as any), (callback as any)); - } + upsert(input: Upsert_Request, metadata: grpc.Metadata | grpc.CallOptions | ((err: grpc.ServiceError | null, value?: Object_Location) => void), options?: grpc.CallOptions | ((err: grpc.ServiceError | null, value?: Object_Location) => void), callback?: ((err: grpc.ServiceError | null, value?: Object_Location) => void)): grpc.ClientUnaryCall; /** * A method to insert/update multiple vectors by bidirectional streaming. * * @generated from protobuf rpc: StreamUpsert(stream payload.v1.Upsert.Request) returns (stream payload.v1.Object.StreamLocation); */ - streamUpsert(metadata?: grpc.Metadata | grpc.CallOptions, options?: grpc.CallOptions): grpc.ClientDuplexStream { - const method = Upsert.methods[1]; - return this.makeBidiStreamRequest(`/${Upsert.typeName}/${method.name}`, (value: Upsert_Request): Buffer => Buffer.from(method.I.toBinary(value, this._binaryOptions)), (value: Buffer): Object_StreamLocation => method.O.fromBinary(value, this._binaryOptions), (metadata as any), options); - } + streamUpsert(metadata?: grpc.Metadata | grpc.CallOptions, options?: grpc.CallOptions): grpc.ClientDuplexStream; /** * A method to insert/update multiple vectors in a single request. * * @generated from protobuf rpc: MultiUpsert(payload.v1.Upsert.MultiRequest) returns (payload.v1.Object.Locations); */ - multiUpsert(input: Upsert_MultiRequest, metadata: grpc.Metadata | grpc.CallOptions | ((err: grpc.ServiceError | null, value?: Object_Locations) => void), options?: grpc.CallOptions | ((err: grpc.ServiceError | null, value?: Object_Locations) => void), callback?: ((err: grpc.ServiceError | null, value?: Object_Locations) => void)): grpc.ClientUnaryCall { - const method = Upsert.methods[2]; - return this.makeUnaryRequest(`/${Upsert.typeName}/${method.name}`, (value: Upsert_MultiRequest): Buffer => Buffer.from(method.I.toBinary(value, this._binaryOptions)), (value: Buffer): Object_Locations => method.O.fromBinary(value, this._binaryOptions), input, (metadata as any), (options as any), (callback as any)); - } + multiUpsert(input: Upsert_MultiRequest, metadata: grpc.Metadata | grpc.CallOptions | ((err: grpc.ServiceError | null, value?: Object_Locations) => void), options?: grpc.CallOptions | ((err: grpc.ServiceError | null, value?: Object_Locations) => void), callback?: ((err: grpc.ServiceError | null, value?: Object_Locations) => void)): grpc.ClientUnaryCall; } diff --git a/src/vald/v1/vald/upsert_pb.grpc-client.js b/src/vald/v1/vald/upsert_pb.grpc-client.js new file mode 100644 index 0000000..1c2765e --- /dev/null +++ b/src/vald/v1/vald/upsert_pb.grpc-client.js @@ -0,0 +1,88 @@ +/* eslint-disable */ +// @generated by protobuf-ts 2.9.3 with parameter add_pb_suffix,client_grpc1,generate_dependencies,keep_enum_prefix,ts_nocheck,use_proto_field_name,output_javascript,output_legacy_commonjs,eslint_disable +// @generated from protobuf file "vald/v1/vald/upsert.proto" (package "vald.v1", syntax proto3) +// tslint:disable +// @ts-nocheck +// +// +// Copyright (C) 2019-2023 vdaas.org vald team +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// You may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.UpsertClient = void 0; +/* eslint-disable */ +// @generated by protobuf-ts 2.9.3 with parameter add_pb_suffix,client_grpc1,generate_dependencies,keep_enum_prefix,ts_nocheck,use_proto_field_name,output_javascript,output_legacy_commonjs,eslint_disable +// @generated from protobuf file "vald/v1/vald/upsert.proto" (package "vald.v1", syntax proto3) +// tslint:disable +// @ts-nocheck +// +// +// Copyright (C) 2019-2023 vdaas.org vald team +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// You may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +const upsert_pb_1 = require("./upsert_pb"); +const grpc = require("@grpc/grpc-js"); +/** + * Upsert service provides ways to insert/update vectors. + * + * @generated from protobuf service vald.v1.Upsert + */ +class UpsertClient extends grpc.Client { + constructor(address, credentials, options = {}, binaryOptions = {}) { + super(address, credentials, options); + this._binaryOptions = binaryOptions; + } + /** + * A method to insert/update a vector. + * + * @generated from protobuf rpc: Upsert(payload.v1.Upsert.Request) returns (payload.v1.Object.Location); + */ + upsert(input, metadata, options, callback) { + const method = upsert_pb_1.Upsert.methods[0]; + return this.makeUnaryRequest(`/${upsert_pb_1.Upsert.typeName}/${method.name}`, (value) => Buffer.from(method.I.toBinary(value, this._binaryOptions)), (value) => method.O.fromBinary(value, this._binaryOptions), input, metadata, options, callback); + } + /** + * A method to insert/update multiple vectors by bidirectional streaming. + * + * @generated from protobuf rpc: StreamUpsert(stream payload.v1.Upsert.Request) returns (stream payload.v1.Object.StreamLocation); + */ + streamUpsert(metadata, options) { + const method = upsert_pb_1.Upsert.methods[1]; + return this.makeBidiStreamRequest(`/${upsert_pb_1.Upsert.typeName}/${method.name}`, (value) => Buffer.from(method.I.toBinary(value, this._binaryOptions)), (value) => method.O.fromBinary(value, this._binaryOptions), metadata, options); + } + /** + * A method to insert/update multiple vectors in a single request. + * + * @generated from protobuf rpc: MultiUpsert(payload.v1.Upsert.MultiRequest) returns (payload.v1.Object.Locations); + */ + multiUpsert(input, metadata, options, callback) { + const method = upsert_pb_1.Upsert.methods[2]; + return this.makeUnaryRequest(`/${upsert_pb_1.Upsert.typeName}/${method.name}`, (value) => Buffer.from(method.I.toBinary(value, this._binaryOptions)), (value) => method.O.fromBinary(value, this._binaryOptions), input, metadata, options, callback); + } +} +exports.UpsertClient = UpsertClient; diff --git a/src/vald/v1/vald/upsert_pb.js b/src/vald/v1/vald/upsert_pb.js index a5d648d..a7d72bc 100644 --- a/src/vald/v1/vald/upsert_pb.js +++ b/src/vald/v1/vald/upsert_pb.js @@ -1,27 +1,61 @@ -// source: vald/v1/vald/upsert.proto -/** - * @fileoverview - * @enhanceable - * @suppress {missingRequire} reports error on implicit type usages. - * @suppress {messageConventions} JS Compiler reports an error if a variable or - * field starts with 'MSG_' and isn't a translatable message. - * @public - */ -// GENERATED CODE -- DO NOT EDIT! /* eslint-disable */ +// @generated by protobuf-ts 2.9.3 with parameter add_pb_suffix,client_grpc1,generate_dependencies,keep_enum_prefix,ts_nocheck,use_proto_field_name,output_javascript,output_legacy_commonjs,eslint_disable +// @generated from protobuf file "vald/v1/vald/upsert.proto" (package "vald.v1", syntax proto3) +// tslint:disable +// @ts-nocheck +// +// +// Copyright (C) 2019-2023 vdaas.org vald team +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// You may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.Upsert = void 0; +/* eslint-disable */ +// @generated by protobuf-ts 2.9.3 with parameter add_pb_suffix,client_grpc1,generate_dependencies,keep_enum_prefix,ts_nocheck,use_proto_field_name,output_javascript,output_legacy_commonjs,eslint_disable +// @generated from protobuf file "vald/v1/vald/upsert.proto" (package "vald.v1", syntax proto3) +// tslint:disable // @ts-nocheck - -var jspb = require('google-protobuf'); -var goog = jspb; -var global = - (typeof globalThis !== 'undefined' && globalThis) || - (typeof window !== 'undefined' && window) || - (typeof global !== 'undefined' && global) || - (typeof self !== 'undefined' && self) || - (function () { return this; }).call(null) || - Function('return this')(); - -var google_api_annotations_pb = require('../../../google/api/annotations_pb.js'); -goog.object.extend(proto, google_api_annotations_pb); -var vald_v1_payload_payload_pb = require('../../../vald/v1/payload/payload_pb.js'); -goog.object.extend(proto, vald_v1_payload_payload_pb); +// +// +// Copyright (C) 2019-2023 vdaas.org vald team +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// You may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +const payload_pb_1 = require("../payload/payload_pb"); +const payload_pb_2 = require("../payload/payload_pb"); +const payload_pb_3 = require("../payload/payload_pb"); +const payload_pb_4 = require("../payload/payload_pb"); +const payload_pb_5 = require("../payload/payload_pb"); +const runtime_rpc_1 = require("@protobuf-ts/runtime-rpc"); +/** + * @generated ServiceType for protobuf service vald.v1.Upsert + */ +exports.Upsert = new runtime_rpc_1.ServiceType("vald.v1.Upsert", [ + { name: "Upsert", options: { "google.api.http": { post: "/upsert", body: "*" } }, I: payload_pb_5.Upsert_Request, O: payload_pb_4.Object_Location }, + { name: "StreamUpsert", serverStreaming: true, clientStreaming: true, options: {}, I: payload_pb_5.Upsert_Request, O: payload_pb_3.Object_StreamLocation }, + { name: "MultiUpsert", options: { "google.api.http": { post: "/upsert/multiple", body: "*" } }, I: payload_pb_2.Upsert_MultiRequest, O: payload_pb_1.Object_Locations } +]); diff --git a/tests/e2e.test.ts b/tests/e2e.test.ts index da73137..2bfdb22 100644 --- a/tests/e2e.test.ts +++ b/tests/e2e.test.ts @@ -1,859 +1,901 @@ -import grpc = require('@grpc/grpc-js'); +import grpc = require("@grpc/grpc-js"); import { - insert_grpc, - search_grpc, - update_grpc, - upsert_grpc, - remove_grpc, - object_grpc, -} from '../src/vald/v1/vald'; -import { agent_grpc } from '../src/vald/v1/agent/core'; -import { payload } from '../src/vald/v1/payload'; -import { InsertClient } from '../src/vald/v1/vald/insert_grpc_pb'; -import { RemoveClient } from '../src/vald/v1/vald/remove_grpc_pb'; -import { SearchClient } from '../src/vald/v1/vald/search_grpc_pb'; -import { UpdateClient } from '../src/vald/v1/vald/update_grpc_pb'; -import { UpsertClient } from '../src/vald/v1/vald/upsert_grpc_pb'; -import { ObjectClient } from '../src/vald/v1/vald/object_grpc_pb'; -import { AgentClient } from '../src/vald/v1/agent/core/agent_grpc_pb'; -import data = require('./wordvecs1000.json'); - -const address = 'localhost:8081'; + insert_grpc, + search_grpc, + update_grpc, + upsert_grpc, + remove_grpc, + object_grpc, +} from "../src/vald/v1/vald"; +import { agent_grpc } from "../src/vald/v1/agent/core"; +import { payload } from "../src/vald/v1/payload"; +import { InsertClient } from "../src/vald/v1/vald/insert_pb.grpc-client"; +import { RemoveClient } from "../src/vald/v1/vald/remove_pb.grpc-client"; +import { SearchClient } from "../src/vald/v1/vald/search_pb.grpc-client"; +import { UpdateClient } from "../src/vald/v1/vald/update_pb.grpc-client"; +import { UpsertClient } from "../src/vald/v1/vald/upsert_pb.grpc-client"; +import { ObjectClient } from "../src/vald/v1/vald/object_pb.grpc-client"; +import { AgentClient } from "../src/vald/v1/agent/core/agent_pb.grpc-client"; +import data = require("./wordvecs1000.json"); + +const address = "localhost:8081"; const connectDeadlineMs = 10000; jest.setTimeout(120000); -describe('Tests for node client', () => { - describe('Tests for insert operations', () => { - let client: InsertClient; - - beforeAll(done => { - client = new insert_grpc.InsertClient( - address, - grpc.credentials.createInsecure(), - ); - client.waitForReady(Date.now() + connectDeadlineMs, (e) => { - if (e) { - done(e); - } else { - done(); - } - }); - }); +describe("Tests for node client", () => { + describe("Tests for insert operations", () => { + let client: InsertClient; + + beforeAll((done) => { + client = new insert_grpc.InsertClient( + address, + grpc.credentials?.createInsecure(), + ); + client.waitForReady(Date.now() + connectDeadlineMs, (e) => { + if (e) { + done(e); + } else { + done(); + } + }); + }); - afterAll(() => { - client.close(); - }); + afterAll(() => { + client.close(); + }); - test('Insert', done => { - const vec = new payload.Object.Vector(); - vec.setId(data[0].id); - vec.setVectorList(data[0].vector); - - const cfg = new payload.Insert.Config(); - cfg.setSkipStrictExistCheck(true); - - const req = new payload.Insert.Request(); - req.setVector(vec); - req.setConfig(cfg); - - client.insert(req, (err, resp) => { - try { - expect(err).toBeFalsy(); - expect(resp).toBeInstanceOf(payload.Object.Location); - done(); - } catch (e) { - done(e); - } - }); - }); + console.log(data); + + test("Insert", (done) => { + const vec = payload.Object_Vector.create({ + id: data[0].id, + vector: data[0].vector, + }); + + const cfg = payload.Insert_Config?.create({ + skip_strict_exist_check: true, + }); + + const req = payload.Insert_Request?.create({ + vector: vec, + config: cfg, + }); + + client.insert(req, (err, resp) => { + try { + expect(err).toBeFalsy(); + expect(payload.Object_Location.is(resp)).toBe(true); + + done(); + } catch (e) { + done(e); + } + }); + }); + + test("MultiInsert", (done) => { + const requests: Array = []; + const cfg = payload.Insert_Config?.create({ + skip_strict_exist_check: true, + }); - test('MultiInsert', done => { - const requests = []; - const cfg = new payload.Insert.Config(); - cfg.setSkipStrictExistCheck(true); - - for (let i = 1; i < 11; i++) { - const vec = new payload.Object.Vector(); - vec.setId(data[i].id); - vec.setVectorList(data[i].vector); - - const r = new payload.Insert.Request(); - r.setVector(vec); - r.setConfig(cfg); - - requests.push(r); - } - - const req = new payload.Insert.MultiRequest(); - req.setRequestsList(requests); - - client.multiInsert(req, (err, resp) => { - try { - expect(err).toBeFalsy(); - expect(resp).toBeInstanceOf(payload.Object.Locations); - done(); - } catch (e) { - done(e); - } - }); + for (let i = 1; i < 11; i++) { + const vec = payload.Object_Vector?.create({ + id: data[i].id, + vector: data[i].vector, }); - test('StreamInsert', done => { - const cfg = new payload.Insert.Config(); - cfg.setSkipStrictExistCheck(true); - - const channel = client.streamInsert(); - channel.on('data', (message) => { - try { - expect(message).toBeInstanceOf(payload.Object.StreamLocation); - if (message.hasStatus()) { - const status = message.getStatus(); - if (status) { - expect(status.getCode()).toEqual(0); - } - } - } catch (e) { - done(e); - } - }); - channel.on('end', () => { - done(); - }); - channel.on('error', (e) => { - done(e); - }) - - for (let i = 11; i < 101; i++) { - const vec = new payload.Object.Vector(); - vec.setId(data[i].id); - vec.setVectorList(data[i].vector); - - const r = new payload.Insert.Request(); - r.setVector(vec); - r.setConfig(cfg); - - channel.write(r); - } - - channel.end(); + const r = payload.Insert_Request?.create({ + vector: vec, + config: cfg, }); + + requests.push(r); + } + + const req = payload.Insert_MultiRequest?.create({ + requests: requests, + }); + + client.multiInsert(req, (err, resp) => { + try { + expect(err).toBeFalsy(); + expect(payload.Object_Locations.is(resp)).toBe(true); + done(); + } catch (e) { + done(e); + } + }); }); - describe('Tests for creating indices operations', () => { - let client: AgentClient; - - beforeAll(done => { - client = new agent_grpc.AgentClient( - address, - grpc.credentials.createInsecure(), - ); - client.waitForReady(Date.now() + connectDeadlineMs, (e) => { - if (e) { - done(e); - } else { - done(); - } - }); - }); + test("StreamInsert", (done) => { + const cfg = payload.Insert_Config?.create({ + skip_strict_exist_check: true, + }); + + const channel = client.streamInsert(); + channel.on("data", (message) => { + try { + expect(payload.Object_StreamLocation.is(message)).toBe(true); + const cloneRes = payload.Object_StreamLocation.clone(message); + if (cloneRes.payload.oneofKind === "status") { + expect(cloneRes.payload.status.code).toEqual(0); + } + } catch (e) { + done(e); + } + }); + channel.on("end", () => { + done(); + }); + channel.on("error", (e) => { + done(e); + }); + + for (let i = 11; i < 101; i++) { + const vec = payload.Object_Vector?.create({ + id: data[i].id, + vector: data[i].vector, + }); + + const r = payload.Insert_Request?.create({ + vector: vec, + config: cfg, + }); + channel.write(r); + } + + channel.end(); + }); + }); + + describe("Tests for creating indices operations", () => { + let client: AgentClient; + + beforeAll((done) => { + client = new agent_grpc.AgentClient( + address, + grpc.credentials?.createInsecure(), + ); + client.waitForReady(Date.now() + connectDeadlineMs, (e) => { + if (e) { + done(e); + } else { + done(); + } + }); + }); - afterAll(() => { - client.close(); - }); + afterAll(() => { + client.close(); + }); - test('CreateIndex', done => { - const req = new payload.Control.CreateIndexRequest(); - req.setPoolSize(10000); - - client.createIndex(req, (err, resp) => { - try { - expect(err).toBeFalsy(); - expect(resp).toBeInstanceOf(payload.Empty); - done(); - } catch (e) { - done(e); - } - }); - }); + test("CreateIndex", (done) => { + const req = payload.Control_CreateIndexRequest?.create({ + pool_size: 10000, + }); + + client?.createIndex(req, (err, resp) => { + try { + expect(err).toBeFalsy(); + expect(payload.Empty.is(resp)).toBe(true) + done(); + } catch (e) { + done(e); + } + }); + }); - test('SaveIndex', done => { - const req = new payload.Empty(); - - client.saveIndex(req, (err, resp) => { - try { - expect(err).toBeFalsy(); - expect(resp).toBeInstanceOf(payload.Empty); - done(); - } catch (e) { - done(e); - } - }); - }); + test("SaveIndex", (done) => { + const req = payload.Empty?.create(); + + client.saveIndex(req, (err, resp) => { + try { + expect(err).toBeFalsy(); + expect(payload.Empty.is(resp)).toBe(true); + done(); + } catch (e) { + done(e); + } + }); + }); - test('IndexInfo', done => { - const req = new payload.Empty(); - - client.indexInfo(req, (err, resp) => { - try { - expect(err).toBeFalsy(); - expect(resp).toBeInstanceOf(payload.Info.Index.Count); - expect(resp.getStored()).toEqual(101); - expect(resp.getUncommitted()).toEqual(0); - done(); - } catch (e) { - done(e); - } - }); - }); + test("IndexInfo", (done) => { + const req = payload.Empty?.create(); + + client.indexInfo(req, (err, resp) => { + try { + expect(err).toBeFalsy(); + expect(payload.Info_Index_Count.is(resp)).toBe(true); + expect(resp?.stored).toEqual(101); + expect(resp?.uncommitted).toEqual(0); + done(); + } catch (e) { + done(e); + } + }); + }); + }); + + describe("Test for object operations", () => { + let client: ObjectClient; + + beforeAll((done) => { + client = new object_grpc.ObjectClient( + address, + grpc.credentials?.createInsecure(), + ); + client.waitForReady(Date.now() + connectDeadlineMs, (e) => { + if (e) { + done(e); + } else { + done(); + } + }); }); - describe('Test for object operations', () => { - let client: ObjectClient; - - beforeAll(done => { - client = new object_grpc.ObjectClient( - address, - grpc.credentials.createInsecure(), - ); - client.waitForReady(Date.now() + connectDeadlineMs, (e) => { - if (e) { - done(e); - } else { - done(); - } - }); - }); + afterAll(() => { + client.close(); + }); - afterAll(() => { - client.close(); - }); + test("Exists", (done) => { + const req = payload.Object_ID?.create({ + id: data[0].id, + }); + + client.exists(req, (err, resp) => { + try { + expect(err).toBeFalsy(); + expect(payload.Object_ID.is(resp)).toBe(true); + done(); + } catch (e) { + done(e); + } + }); + }); - test('Exists', done => { - const req = new payload.Object.ID(); - req.setId(data[0].id); - - client.exists(req, (err, resp) => { - try { - expect(err).toBeFalsy(); - expect(resp).toBeInstanceOf(payload.Object.ID); - done(); - } catch (e) { - done(e); - } - }) - }); + test("GetObject", (done) => { + const id = payload.Object_ID?.create({ + id: data[0].id, + }); + + const req = payload.Object_VectorRequest?.create({ + id: id, + }); + + client.getObject(req, (err, resp) => { + try { + expect(err).toBeFalsy(); + expect(payload.Object_Vector.is(resp)).toBe(true); + done(); + } catch (e) { + done(e); + } + }); + }); - test('GetObject', done => { - const id = new payload.Object.ID(); - id.setId(data[0].id); - - const req = new payload.Object.VectorRequest(); - req.setId(id); - - client.getObject(req, (err, resp) => { - try { - expect(err).toBeFalsy(); - expect(resp).toBeInstanceOf(payload.Object.Vector); - done(); - } catch (e) { - done(e); - } - }); - }); + test("StreamGetObject", (done) => { + const channel = client.streamGetObject(); + channel.on("data", (message) => { + try { + expect(payload.Object_StreamVector.is(message)).toBe(true); + const cloneRes = payload.Object_StreamVector.clone(message); + if (cloneRes.payload.oneofKind === "status") { + expect(cloneRes.payload.status.code).toEqual(0); + } + } catch (e) { + done(e); + } + }); + channel.on("end", () => { + done(); + }); + channel.on("error", (e) => { + done(e); + }); + + for (let i = 0; i < 11; i++) { + const id = payload.Object_ID?.create({ + id: data[i].id, + }); + + const req = payload.Object_VectorRequest?.create({ + id: id, + }); + + channel.write(req); + } + + channel.end(); + }); + }); + + describe("Tests for search operations", () => { + let client: SearchClient; + + beforeAll((done) => { + client = new search_grpc.SearchClient( + address, + grpc.credentials?.createInsecure(), + ); + client.waitForReady(Date.now() + connectDeadlineMs, (e) => { + if (e) { + done(e); + } else { + done(); + } + }); + }); - test('StreamGetObject', done => { - const channel = client.streamGetObject(); - channel.on('data', (message) => { - try { - expect(message).toBeInstanceOf(payload.Object.StreamVector); - if (message.hasStatus()) { - const status = message.getStatus(); - if (status) { - expect(status.getCode()).toEqual(0); - } - } - } catch (e) { - done(e); - } - }); - channel.on('end', () => { - done(); - }); - channel.on('error', (e) => { - done(e); - }); - - for (let i = 0; i < 11; i++) { - const id = new payload.Object.ID(); - id.setId(data[i].id); - - const req = new payload.Object.VectorRequest(); - req.setId(id); - - channel.write(req); - } - - channel.end(); - }); - }) - - describe('Tests for search operations', () => { - let client: SearchClient; - - beforeAll(done => { - client = new search_grpc.SearchClient( - address, - grpc.credentials.createInsecure(), - ); - client.waitForReady(Date.now() + connectDeadlineMs, (e) => { - if (e) { - done(e); - } else { - done(); - } - }); - }); + afterAll(() => { + client.close(); + }); - afterAll(() => { - client.close(); - }); + test("Search", (done) => { + const cfg = payload.Search_Config?.create({ + num: 3, + radius: -1.0, + epsilon: 0.1, + timeout: BigInt(3000000000), + }); + + const req = payload.Search_Request?.create({ + vector: data[0].vector, + config: cfg, + }); + + client.search(req, (err, resp) => { + try { + expect(err).toBeFalsy(); + expect(payload.Search_Response.is(resp)).toBe(true); + expect(resp?.results.length).toEqual(3); + done(); + } catch (e) { + done(e); + } + }); + }); - test('Search', done => { - const cfg = new payload.Search.Config(); - cfg.setNum(3); - cfg.setRadius(-1.0); - cfg.setEpsilon(0.1); - cfg.setTimeout(3000000000); - - const req = new payload.Search.Request(); - req.setVectorList(data[0].vector); - req.setConfig(cfg); - - client.search(req, (err, resp) => { - try { - expect(err).toBeFalsy(); - expect(resp).toBeInstanceOf(payload.Search.Response); - expect(resp.getResultsList().length).toEqual(3); - done(); - } catch (e) { - done(e); - } - }); - }); + test("MultiSearch", (done) => { + const requests: Array = []; + const cfg = payload.Search_Config?.create({ + num: 3, + radius: -1.0, + epsilon: 0.1, + timeout: BigInt(3000000000), + }); + + for (let i = 1; i < 11; i++) { + const r = payload.Search_Request?.create({ + vector: data[i].vector, + config: cfg, + }); + requests.push(r); + } + + const req = payload.Search_MultiRequest?.create({ + requests: requests, + }); + + client.multiSearch(req, (err, resp) => { + try { + expect(err).toBeFalsy(); + expect(payload.Search_Responses.is(resp)).toBe(true); + for (const response of resp?.responses ?? []) { + expect(payload.Search_Response.is(response)).toBe(true); + expect(response.results.length).toEqual(3); + } + done(); + } catch (e) { + done(e); + } + }); + }); - test('MultiSearch', done => { - const requests = []; - const cfg = new payload.Search.Config(); - cfg.setNum(3); - cfg.setRadius(-1.0); - cfg.setEpsilon(0.1); - cfg.setTimeout(3000000000); - - for (let i = 1; i < 11; i++) { - const r = new payload.Search.Request(); - r.setVectorList(data[i].vector); - r.setConfig(cfg); - - requests.push(r); - } - - const req = new payload.Search.MultiRequest(); - req.setRequestsList(requests); - - client.multiSearch(req, (err, resp) => { - try { - expect(err).toBeFalsy(); - expect(resp).toBeInstanceOf(payload.Search.Responses); - for (var response of resp.getResponsesList()) { - expect(response).toBeInstanceOf(payload.Search.Response); - expect(response.getResultsList().length).toEqual(3); - } - done(); - } catch (e) { - done(e); - } - }); - }); + test("StreamSearch", (done) => { + const cfg = payload.Search_Config?.create({ + num: 3, + radius: -1.0, + epsilon: 0.1, + timeout: BigInt(3000000000), + }); + + const channel = client.streamSearch(); + channel.on("data", (message) => { + try { + expect(payload.Search_StreamResponse.is(message)).toBe(true); + const cloneRes = payload.Search_StreamResponse.clone(message); + if (cloneRes.payload.oneofKind === "status") { + expect(cloneRes.payload.status.code).toEqual(0); + } + } catch (e) { + done(e); + } + }); + channel.on("end", () => { + done(); + }); + channel.on("error", (e) => { + done(e); + }); + + for (let i = 11; i < 21; i++) { + const r = payload.Search_Request?.create({ + vector: data[i].vector, + config: cfg, + }); + + channel.write(r); + } + + channel.end(); + }); - test('StreamSearch', done => { - const cfg = new payload.Search.Config(); - cfg.setNum(3); - cfg.setRadius(-1.0); - cfg.setEpsilon(0.1); - cfg.setTimeout(3000000000); - - const channel = client.streamSearch(); - channel.on('data', (message) => { - try { - expect(message).toBeInstanceOf(payload.Search.StreamResponse); - if (message.hasStatus()) { - const status = message.getStatus(); - if (status) { - expect(status.getCode()).toEqual(0); - } - } - } catch (e) { - done(e); - } - }); - channel.on('end', () => { - done(); - }); - channel.on('error', (e) => { - done(e); - }); - - for (let i = 11; i < 21; i++) { - const r = new payload.Search.Request(); - r.setVectorList(data[i].vector); - r.setConfig(cfg); - - channel.write(r); - } - - channel.end(); - }); + test("SearchByID", (done) => { + const cfg = payload.Search_Config?.create({ + num: 3, + radius: -1.0, + epsilon: 0.1, + timeout: BigInt(3000000000), + }); + + const req = payload.Search_IDRequest?.create({ + id: data[0].id, + config: cfg, + }); + + client.searchByID(req, (err, resp) => { + try { + expect(err).toBeFalsy(); + expect(payload.Search_Response.is(resp)).toBe(true); + expect(resp?.results.length).toEqual(3); + done(); + } catch (e) { + done(e); + } + }); + }); - test('SearchByID', done => { - const cfg = new payload.Search.Config(); - cfg.setNum(3); - cfg.setRadius(-1.0); - cfg.setEpsilon(0.1); - cfg.setTimeout(3000000000); - - const req = new payload.Search.IDRequest(); - req.setId(data[0].id); - req.setConfig(cfg); - - client.searchByID(req, (err, resp) => { - try { - expect(err).toBeFalsy(); - expect(resp).toBeInstanceOf(payload.Search.Response); - expect(resp.getResultsList().length).toEqual(3); - done(); - } catch (e) { - done(e); - } - }); - }); + test("MultiSearchByID", (done) => { + const requests: Array = []; + const cfg = payload.Search_Config?.create({ + num: 3, + radius: -1.0, + epsilon: 0.1, + timeout: BigInt(3000000000), + }); + + for (let i = 1; i < 11; i++) { + const r = payload.Search_IDRequest?.create({ + id: data[i].id, + config: cfg, + }); + + requests.push(r); + } + + const req = payload.Search_MultiIDRequest?.create({ + requests: requests, + }); + + client.multiSearchByID(req, (err, resp) => { + try { + expect(err).toBeFalsy(); + expect(payload.Search_Responses.is(resp)).toBe(true); + for (const response of resp?.responses ?? []) { + expect(payload.Search_Response.is(response)).toBe(true); + expect(response.results.length).toEqual(3); + } + done(); + } catch (e) { + done(e); + } + }); + }); - test('MultiSearchByID', done => { - const requests = []; - const cfg = new payload.Search.Config(); - cfg.setNum(3); - cfg.setRadius(-1.0); - cfg.setEpsilon(0.1); - cfg.setTimeout(3000000000); - - for (let i = 1; i < 11; i++) { - const r = new payload.Search.IDRequest(); - r.setId(data[i].id); - r.setConfig(cfg); - - requests.push(r); - } - - const req = new payload.Search.MultiIDRequest(); - req.setRequestsList(requests); - - client.multiSearchByID(req, (err, resp) => { - try { - expect(err).toBeFalsy(); - expect(resp).toBeInstanceOf(payload.Search.Responses); - for (var response of resp.getResponsesList()) { - expect(response).toBeInstanceOf(payload.Search.Response); - expect(response.getResultsList().length).toEqual(3); - } - done(); - } catch (e) { - done(e); - } - }); - }); + test("StreamSearchByID", (done) => { + const cfg = payload.Search_Config?.create({ + num: 3, + radius: -1.0, + epsilon: 0.1, + timeout: BigInt(3000000000), + }); + + const channel = client.streamSearchByID(); + channel.on("data", (message) => { + try { + expect(payload.Search_StreamResponse.is(message)).toBe(true); + const cloneRes = payload.Search_StreamResponse.clone(message); + if (cloneRes.payload.oneofKind === "status") { + expect(cloneRes.payload.status.code).toEqual(0); + } + } catch (e) { + done(e); + } + }); + channel.on("end", () => { + done(); + }); + channel.on("error", (e) => { + done(e); + }); + + for (let i = 11; i < 21; i++) { + const r = payload.Search_IDRequest?.create({ + id: data[i].id, + config: cfg, + }); + channel.write(r); + } + + channel.end(); + }); + }); + + describe("Tests for update operations", () => { + let client: UpdateClient; + + beforeAll((done) => { + client = new update_grpc.UpdateClient( + address, + grpc.credentials?.createInsecure(), + ); + client.waitForReady(Date.now() + connectDeadlineMs, (e) => { + if (e) { + done(e); + } else { + done(); + } + }); + }); - test('StreamSearchByID', done => { - const cfg = new payload.Search.Config(); - cfg.setNum(3); - cfg.setRadius(-1.0); - cfg.setEpsilon(0.1); - cfg.setTimeout(3000000000); - - const channel = client.streamSearchByID(); - channel.on('data', (message) => { - try { - expect(message).toBeInstanceOf(payload.Search.StreamResponse); - if (message.hasStatus()) { - const status = message.getStatus(); - if (status) { - expect(status.getCode()).toEqual(0); - } - } - } catch (e) { - done(e); - } - }); - channel.on('end', () => { - done(); - }); - channel.on('error', (e) => { - done(e); - }); - - for (let i = 11; i < 21; i++) { - const r = new payload.Search.IDRequest(); - r.setId(data[i].id); - r.setConfig(cfg); - - channel.write(r); - } - - channel.end(); + afterAll(() => { + client.close(); + }); - }); + test("Update", (done) => { + const vec = payload.Object_Vector?.create({ + id: data[0].id, + vector: data[1].vector, + }); + const cfg = payload.Update_Config?.create({ + skip_strict_exist_check: true, + }); + + const req = payload.Update_Request?.create({ + vector: vec, + config: cfg, + }); + + client.update(req, (err, resp) => { + try { + expect(err).toBeFalsy(); + expect(payload.Object_Location.is(resp)).toBe(true); + done(); + } catch (e) { + done(e); + } + }); }); - describe('Tests for update operations', () => { - let client: UpdateClient; - - beforeAll(done => { - client = new update_grpc.UpdateClient( - address, - grpc.credentials.createInsecure(), - ); - client.waitForReady(Date.now() + connectDeadlineMs, (e) => { - if (e) { - done(e); - } else { - done(); - } - }); - }); + test("MultiUpdate", (done) => { + const requests: Array = []; + const cfg = payload.Update_Config?.create({ + skip_strict_exist_check: true, + }); - afterAll(() => { - client.close(); + for (let i = 1; i < 11; i++) { + const vec = payload.Object_Vector?.create({ + id: data[i].id, + vector: data[i + 1].vector, }); - test('Update', done => { - const vec = new payload.Object.Vector(); - vec.setId(data[0].id); - vec.setVectorList(data[1].vector); - - const cfg = new payload.Update.Config(); - cfg.setSkipStrictExistCheck(true); - - const req = new payload.Update.Request(); - req.setVector(vec); - req.setConfig(cfg); - - client.update(req, (err, resp) => { - try { - expect(err).toBeFalsy(); - expect(resp).toBeInstanceOf(payload.Object.Location); - done(); - } catch (e) { - done(e); - } - }); + const r = payload.Update_Request?.create({ + vector: vec, + config: cfg, }); - test('MultiUpdate', done => { - const requests = []; - const cfg = new payload.Update.Config(); - cfg.setSkipStrictExistCheck(true); - - for (let i = 1; i < 11; i++) { - const vec = new payload.Object.Vector(); - vec.setId(data[i].id); - vec.setVectorList(data[i+1].vector); - - const r = new payload.Update.Request(); - r.setVector(vec); - r.setConfig(cfg); - - requests.push(r); - } - - const req = new payload.Update.MultiRequest(); - req.setRequestsList(requests); - - client.multiUpdate(req, (err, resp) => { - try { - expect(err).toBeFalsy(); - expect(resp).toBeInstanceOf(payload.Object.Locations); - done(); - } catch (e) { - done(e); - } - }); - }); + requests.push(r); + } - test('StreamUpdate', done => { - const cfg = new payload.Update.Config(); - cfg.setSkipStrictExistCheck(true); - - const channel = client.streamUpdate(); - channel.on('data', (message) => { - try { - expect(message).toBeInstanceOf(payload.Object.StreamLocation); - if (message.hasStatus()) { - const status = message.getStatus(); - if (status) { - expect(status.getCode()).toEqual(0); - } - } - } catch (e) { - done(e); - } - }); - channel.on('end', () => { - done(); - }); - channel.on('error', (e) => { - done(e); - }) - - for (let i = 11; i < 21; i++) { - const vec = new payload.Object.Vector(); - vec.setId(data[i].id); - vec.setVectorList(data[i+1].vector); - - const r = new payload.Update.Request(); - r.setVector(vec); - r.setConfig(cfg); - - channel.write(r); - } - - channel.end(); - }); + const req = payload.Update_MultiRequest?.create({ + requests: requests, + }); + + client.multiUpdate(req, (err, resp) => { + try { + expect(err).toBeFalsy(); + expect(payload.Object_Locations.is(resp)).toBe(true); + done(); + } catch (e) { + done(e); + } + }); }); - describe('Tests for upsert operations', () => { - let client: UpsertClient; - - beforeAll(done => { - client = new upsert_grpc.UpsertClient( - address, - grpc.credentials.createInsecure(), - ); - client.waitForReady(Date.now() + connectDeadlineMs, (e) => { - if (e) { - done(e); - } else { - done(); - } - }); - }); + test("StreamUpdate", (done) => { + const cfg = payload.Update_Config?.create({ + skip_strict_exist_check: true, + }); + + const channel = client.streamUpdate(); + channel.on("data", (message) => { + try { + expect(payload.Object_StreamLocation.is(message)).toBe(true); + const cloneRes = payload.Object_StreamLocation.clone(message); + if (cloneRes.payload.oneofKind === "status") { + expect(cloneRes.payload.status.code).toEqual(0); + } + } catch (e) { + done(e); + } + }); + channel.on("end", () => { + done(); + }); + channel.on("error", (e) => { + done(e); + }); + + for (let i = 11; i < 21; i++) { + const vec = payload.Object_Vector?.create({ + id: data[i].id, + vector: data[i + 1].vector, + }); + + const r = payload.Update_Request?.create({ + vector: vec, + config: cfg, + }); + channel.write(r); + } + + channel.end(); + }); + }); + + describe("Tests for upsert operations", () => { + let client: UpsertClient; + + beforeAll((done) => { + client = new upsert_grpc.UpsertClient( + address, + grpc.credentials?.createInsecure(), + ); + client.waitForReady(Date.now() + connectDeadlineMs, (e) => { + if (e) { + done(e); + } else { + done(); + } + }); + }); - afterAll(() => { - client.close(); - }); + afterAll(() => { + client.close(); + }); - test('Upsert', done => { - const vec = new payload.Object.Vector(); - vec.setId(data[0].id); - vec.setVectorList(data[0].vector); - - const cfg = new payload.Upsert.Config(); - cfg.setSkipStrictExistCheck(true); - - const req = new payload.Upsert.Request(); - req.setVector(vec); - req.setConfig(cfg); - - client.upsert(req, (err, resp) => { - try { - expect(err).toBeFalsy(); - expect(resp).toBeInstanceOf(payload.Object.Location); - done(); - } catch (e) { - done(e); - } - }); - }); + test("Upsert", (done) => { + const vec = payload.Object_Vector?.create({ + id: data[0].id, + vector: data[0].vector, + }); + + const cfg = payload.Upsert_Config?.create({ + skip_strict_exist_check: true, + }); + + const req = payload.Upsert_Request?.create({ + vector: vec, + config: cfg + }); + + client.upsert(req, (err, resp) => { + try { + expect(err).toBeFalsy(); + expect(payload.Object_Location.is(resp)).toBe(true); + done(); + } catch (e) { + done(e); + } + }); + }); + + test("MultiUpsert", (done) => { + const requests: Array = []; + const cfg = payload.Upsert_Config?.create({ + skip_strict_exist_check: true, + }); - test('MultiUpsert', done => { - const requests = []; - const cfg = new payload.Upsert.Config(); - cfg.setSkipStrictExistCheck(true); - - for (let i = 1; i < 11; i++) { - const vec = new payload.Object.Vector(); - vec.setId(data[i].id); - vec.setVectorList(data[i].vector); - - const r = new payload.Upsert.Request(); - r.setVector(vec); - r.setConfig(cfg); - - requests.push(r); - } - - const req = new payload.Upsert.MultiRequest(); - req.setRequestsList(requests); - - client.multiUpsert(req, (err, resp) => { - try { - expect(err).toBeFalsy(); - expect(resp).toBeInstanceOf(payload.Object.Locations); - done(); - } catch (e) { - done(e); - } - }); + for (let i = 1; i < 11; i++) { + const vec = payload.Object_Vector?.create({ + id: data[i].id, + vector: data[i].vector, }); - test('StreamUpsert', done => { - const cfg = new payload.Upsert.Config(); - cfg.setSkipStrictExistCheck(true); - - const channel = client.streamUpsert(); - channel.on('data', (message) => { - try { - expect(message).toBeInstanceOf(payload.Object.StreamLocation); - if (message.hasStatus()) { - const status = message.getStatus(); - if (status) { - expect(status.getCode()).toEqual(0); - } - } - } catch (e) { - done(e); - } - }); - channel.on('end', () => { - done(); - }); - channel.on('error', (e) => { - done(e); - }) - - for (let i = 11; i < 21; i++) { - const vec = new payload.Object.Vector(); - vec.setId(data[i].id); - vec.setVectorList(data[i].vector); - - const r = new payload.Upsert.Request(); - r.setVector(vec); - r.setConfig(cfg); - - channel.write(r); - } - - channel.end(); + const r = payload.Upsert_Request?.create({ + vector: vec, + config: cfg, }); + + requests.push(r); + } + + const req = payload.Upsert_MultiRequest?.create({ + requests: requests, + }); + + client.multiUpsert(req, (err, resp) => { + try { + expect(err).toBeFalsy(); + expect(payload.Object_Locations.is(resp)).toBe(true); + done(); + } catch (e) { + done(e); + } + }); }); - describe('Tests for remove operations', () => { - let client: RemoveClient; - - beforeAll(done => { - client = new remove_grpc.RemoveClient( - address, - grpc.credentials.createInsecure(), - ); - client.waitForReady(Date.now() + connectDeadlineMs, (e) => { - if (e) { - done(e); - } else { - done(); - } - }); - }); + test("StreamUpsert", (done) => { + const cfg = payload.Upsert_Config?.create({ + skip_strict_exist_check: true, + }); + + const channel = client.streamUpsert(); + channel.on("data", (message) => { + try { + expect(payload.Object_StreamLocation.is(message)).toBe(true); + const cloneRes = payload.Object_StreamLocation.clone(message); + if (cloneRes.payload.oneofKind === "status") { + expect(cloneRes.payload.status.code).toEqual(0); + } + } catch (e) { + done(e); + } + }); + channel.on("end", () => { + done(); + }); + channel.on("error", (e) => { + done(e); + }); + + for (let i = 11; i < 21; i++) { + const vec = payload.Object_Vector?.create({ + id: data[i].id, + vector: data[i].vector, + }); + const r = payload.Upsert_Request?.create({ + vector: vec, + config: cfg, + }); + + channel.write(r); + } + + channel.end(); + }); + }); + + describe("Tests for remove operations", () => { + let client: RemoveClient; + + beforeAll((done) => { + client = new remove_grpc.RemoveClient( + address, + grpc.credentials?.createInsecure(), + ); + client.waitForReady(Date.now() + connectDeadlineMs, (e) => { + if (e) { + done(e); + } else { + done(); + } + }); + }); - afterAll(() => { - client.close(); - }); + afterAll(() => { + client.close(); + }); - test('Remove', done => { - const id = new payload.Object.ID(); - id.setId(data[0].id); - - const cfg = new payload.Remove.Config(); - cfg.setSkipStrictExistCheck(true); - - const req = new payload.Remove.Request(); - req.setId(id); - req.setConfig(cfg); - - client.remove(req, (err, resp) => { - try { - expect(err).toBeFalsy(); - expect(resp).toBeInstanceOf(payload.Object.Location); - done(); - } catch (e) { - done(e); - } - }); - }); + test("Remove", (done) => { + const id = payload.Object_ID?.create({ + id: data[0].id, + }); + + const cfg = payload.Remove_Config?.create({ + skip_strict_exist_check: true, + }); + + const req = payload.Remove_Request?.create({ + id: id, + config: cfg, + }); + + client.remove(req, (err, resp) => { + try { + expect(err).toBeFalsy(); + expect(payload.Object_Location.is(resp)).toBe(true); + done(); + } catch (e) { + done(e); + } + }); + }); - test('MultiRemove', done => { - const requests = []; - const cfg = new payload.Insert.Config(); - cfg.setSkipStrictExistCheck(true); - - for (let i = 1; i < 11; i++) { - const id = new payload.Object.ID(); - id.setId(data[i].id); - - const r = new payload.Remove.Request(); - r.setId(id); - r.setConfig(cfg); - - requests.push(r); - } - - const req = new payload.Remove.MultiRequest(); - req.setRequestsList(requests); - - client.multiRemove(req, (err, resp) => { - try { - expect(err).toBeFalsy(); - expect(resp).toBeInstanceOf(payload.Object.Locations); - done(); - } catch (e) { - done(e); - } - }); + test("MultiRemove", (done) => { + const requests: Array = []; + const cfg = payload.Insert_Config?.create({ + skip_strict_exist_check: true, + }); + + for (let i = 1; i < 11; i++) { + const id = payload.Object_ID?.create({ + id: data[i].id, }); - test('StreamRemove', done => { - const cfg = new payload.Remove.Config(); - cfg.setSkipStrictExistCheck(true); - - const channel = client.streamRemove(); - channel.on('data', (message) => { - try { - expect(message).toBeInstanceOf(payload.Object.StreamLocation); - if (message.hasStatus()) { - const status = message.getStatus(); - if (status) { - expect(status.getCode()).toEqual(0); - } - } - } catch (e) { - done(e); - } - }); - channel.on('end', () => { - done(); - }); - channel.on('error', (e) => { - done(e); - }) - - for (let i = 11; i < 21; i++) { - const id = new payload.Object.ID(); - id.setId(data[i].id); - - const r = new payload.Remove.Request(); - r.setId(id); - r.setConfig(cfg); - - channel.write(r); - } - - channel.end(); + const r = payload.Remove_Request?.create({ + id: id, + config: cfg, }); + + requests.push(r); + } + + const req = payload.Remove_MultiRequest?.create({ + requests: requests, + }); + + client.multiRemove(req, (err, resp) => { + try { + expect(err).toBeFalsy(); + expect(payload.Object_Locations.is(resp)).toBe(true); + done(); + } catch (e) { + done(e); + } + }); + }); + + test("StreamRemove", (done) => { + const cfg = payload.Remove_Config?.create({ + skip_strict_exist_check: true, + }); + + const channel = client.streamRemove(); + channel.on("data", (message) => { + try { + expect(payload.Object_StreamLocation.is(message)).toBe(true); + const cloneRes = payload.Object_StreamLocation.clone(message); + if (cloneRes.payload.oneofKind === "status") { + expect(cloneRes.payload.status.code).toEqual(0); + } + } catch (e) { + done(e); + } + }); + channel.on("end", () => { + done(); + }); + channel.on("error", (e) => { + done(e); + }); + + for (let i = 11; i < 21; i++) { + const id = payload.Object_ID?.create({ + id: data[i].id, + }); + + const r = payload.Remove_Request?.create({ + id: id, + config: cfg, + }); + + channel.write(r); + } + + channel.end(); }); + }); }); diff --git a/tsconfig.json b/tsconfig.json new file mode 100644 index 0000000..574e785 --- /dev/null +++ b/tsconfig.json @@ -0,0 +1,11 @@ +{ + "compilerOptions": { + "target": "es2020", + "module": "commonjs", + "esModuleInterop": true, + "forceConsistentCasingInFileNames": true, + "strict": true, + "skipLibCheck": true, + "resolveJsonModule": true + } +}