diff --git a/package-lock.json b/package-lock.json index 9e1fd12..e391bd6 100644 --- a/package-lock.json +++ b/package-lock.json @@ -8,34 +8,34 @@ "name": "migrator_propres7-node", "version": "1.0.0", "dependencies": { - "@googleapis/drive": "^8.3.1", - "dotenv": "^16.3.1", - "dotenv-cli": "^7.3.0", - "fs-extra": "^11.1.1", + "@googleapis/drive": "^8.7.0", + "dotenv": "^16.4.5", + "dotenv-cli": "^7.4.1", + "fs-extra": "^11.2.0", "google-protobuf": "^3.21.2", "lodash": "^4.17.21", "p-map": "^4.0.0", - "protobufjs": "^7.2.5", + "protobufjs": "^7.2.6", "recursive-readdir": "^2.2.3", "uuid": "^9.0.1" }, "devDependencies": { "@tsconfig/node-lts": "^18.12.5", - "@types/fs-extra": "^11.0.2", - "@types/jest": "^29.5.5", - "@types/lodash": "^4.14.199", - "@types/node": "^20.7.1", - "@types/recursive-readdir": "^2.2.2", + "@types/fs-extra": "^11.0.4", + "@types/jest": "^29.5.12", + "@types/lodash": "^4.17.0", + "@types/node": "^20.12.6", + "@types/recursive-readdir": "^2.2.4", "@typescript-eslint/eslint-plugin": "^5.62.0", "@typescript-eslint/parser": "^5.62.0", - "eslint": "^8.50.0", + "eslint": "^8.57.0", "is-ci-cli": "^2.2.0", "jest": "^29.7.0", "jest-watch-typeahead": "^2.2.2", "prettier": "^2.8.8", - "ts-jest": "^29.1.1", - "ts-node": "^10.9.1", - "ts-proto": "^1.165.2", + "ts-jest": "^29.1.2", + "ts-node": "^10.9.2", + "ts-proto": "^1.171.0", "tslib": "^2.6.2", "typescript": "5.1.6" } @@ -691,9 +691,9 @@ } }, "node_modules/@eslint/eslintrc": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.1.2.tgz", - "integrity": "sha512-+wvgpDsrB1YqAMdEUCcnTlpfVBH7Vqn6A/NT3D8WVXFIaKMlErPIZT3oCIAVCOtarRpMtelZLqJeU3t7WY6X6g==", + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.1.4.tgz", + "integrity": "sha512-269Z39MS6wVJtsoUl10L60WdkhJVdPG24Q4eZTH3nnF6lpvSShEK3wQjDX9JRWAUPvPh7COouPpU9IrqaZFvtQ==", "dev": true, "dependencies": { "ajv": "^6.12.4", @@ -720,9 +720,9 @@ "dev": true }, "node_modules/@eslint/eslintrc/node_modules/globals": { - "version": "13.22.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-13.22.0.tgz", - "integrity": "sha512-H1Ddc/PbZHTDVJSnj8kWptIRSD6AM3pK+mKytuIVF4uoBV7rshFlhhvA58ceJ5wp3Er58w6zj7bykMpYXt3ETw==", + "version": "13.24.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.24.0.tgz", + "integrity": "sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==", "dev": true, "dependencies": { "type-fest": "^0.20.2" @@ -759,18 +759,18 @@ } }, "node_modules/@eslint/js": { - "version": "8.50.0", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.50.0.tgz", - "integrity": "sha512-NCC3zz2+nvYd+Ckfh87rA47zfu2QsQpvc6k1yzTk+b9KzRj0wkGa8LSoGOXN6Zv4lRf/EIoZ80biDh9HOI+RNQ==", + "version": "8.57.0", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.57.0.tgz", + "integrity": "sha512-Ys+3g2TaW7gADOJzPt83SJtCDhMjndcDMFVQ/Tj9iA1BfJzFKD9mAUXT3OenpuPHbI6P/myECxRJrofUsDx/5g==", "dev": true, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" } }, "node_modules/@googleapis/drive": { - "version": "8.3.1", - "resolved": "https://registry.npmjs.org/@googleapis/drive/-/drive-8.3.1.tgz", - "integrity": "sha512-6uh7cC6nzulB5Q76a4OmWF54pfFmDSy6IdF95DKF8yVJVaO6/CfyRtJJsAKmXOZkXIEs9sZZeSzBd4eXwJMlag==", + "version": "8.7.0", + "resolved": "https://registry.npmjs.org/@googleapis/drive/-/drive-8.7.0.tgz", + "integrity": "sha512-XAi6kfySIU4H3ivX2DpzTDce5UhNke5NxEWCL6tySEdcVqx+cmXJmkMqwfOAHJalEB5s9PPfdLBU29Xd5XlLSQ==", "dependencies": { "googleapis-common": "^7.0.0" }, @@ -779,13 +779,13 @@ } }, "node_modules/@humanwhocodes/config-array": { - "version": "0.11.11", - "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.11.tgz", - "integrity": "sha512-N2brEuAadi0CcdeMXUkhbZB84eskAc8MEX1By6qEchoVywSgXPIjou4rYsl0V3Hj0ZnuGycGCjdNgockbzeWNA==", + "version": "0.11.14", + "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.14.tgz", + "integrity": "sha512-3T8LkOmg45BV5FICb15QQMsyUSWrQ8AygVfC7ZG32zOalnqrilm018ZVCw0eapXux8FtA33q8PSRSstjee3jSg==", "dev": true, "dependencies": { - "@humanwhocodes/object-schema": "^1.2.1", - "debug": "^4.1.1", + "@humanwhocodes/object-schema": "^2.0.2", + "debug": "^4.3.1", "minimatch": "^3.0.5" }, "engines": { @@ -806,9 +806,9 @@ } }, "node_modules/@humanwhocodes/object-schema": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-1.2.1.tgz", - "integrity": "sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA==", + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-2.0.3.tgz", + "integrity": "sha512-93zYdMES/c1D69yZiKDBj0V24vqNzB/koF26KPaagAfd3P/4gUlh3Dys5ogAK+Exi9QyzlD8x/08Zt7wIKcDcA==", "dev": true }, "node_modules/@istanbuljs/load-nyc-config": { @@ -1392,9 +1392,9 @@ } }, "node_modules/@types/fs-extra": { - "version": "11.0.2", - "resolved": "https://registry.npmjs.org/@types/fs-extra/-/fs-extra-11.0.2.tgz", - "integrity": "sha512-c0hrgAOVYr21EX8J0jBMXGLMgJqVf/v6yxi0dLaJboW9aQPh16Id+z6w2Tx1hm+piJOLv8xPfVKZCLfjPw/IMQ==", + "version": "11.0.4", + "resolved": "https://registry.npmjs.org/@types/fs-extra/-/fs-extra-11.0.4.tgz", + "integrity": "sha512-yTbItCNreRooED33qjunPthRcSjERP1r4MqCZc7wv0u2sUkzTFp45tgUfS5+r7FrZPdmCCNflLhVSP/o+SemsQ==", "dev": true, "dependencies": { "@types/jsonfile": "*", @@ -1435,9 +1435,9 @@ } }, "node_modules/@types/jest": { - "version": "29.5.5", - "resolved": "https://registry.npmjs.org/@types/jest/-/jest-29.5.5.tgz", - "integrity": "sha512-ebylz2hnsWR9mYvmBFbXJXr+33UPc4+ZdxyDXh5w0FlPBTfCVN3wPL+kuOiQt3xvrK419v7XWeAs+AeOksafXg==", + "version": "29.5.12", + "resolved": "https://registry.npmjs.org/@types/jest/-/jest-29.5.12.tgz", + "integrity": "sha512-eDC8bTvT/QhYdxJAulQikueigY5AsdBRH2yDKW3yveW7svY3+DzN84/2NUgkw10RTiJbWqZrTtoGVdYlvFJdLw==", "dev": true, "dependencies": { "expect": "^29.0.0", @@ -1460,20 +1460,23 @@ } }, "node_modules/@types/lodash": { - "version": "4.14.199", - "resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.14.199.tgz", - "integrity": "sha512-Vrjz5N5Ia4SEzWWgIVwnHNEnb1UE1XMkvY5DGXrAeOGE9imk0hgTHh5GyDjLDJi9OTCn9oo9dXH1uToK1VRfrg==", + "version": "4.17.0", + "resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.17.0.tgz", + "integrity": "sha512-t7dhREVv6dbNj0q17X12j7yDG4bD/DHYX7o5/DbDxobP0HnGPgpRz2Ej77aL7TZT3DSw13fqUTj8J4mMnqa7WA==", "dev": true }, "node_modules/@types/node": { - "version": "20.7.1", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.7.1.tgz", - "integrity": "sha512-LT+OIXpp2kj4E2S/p91BMe+VgGX2+lfO+XTpfXhh+bCk2LkQtHZSub8ewFBMGP5ClysPjTDFa4sMI8Q3n4T0wg==" + "version": "20.12.6", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.12.6.tgz", + "integrity": "sha512-3KurE8taB8GCvZBPngVbp0lk5CKi8M9f9k1rsADh0Evdz5SzJ+Q+Hx9uHoFGsLnLnd1xmkDQr2hVhlA0Mn0lKQ==", + "dependencies": { + "undici-types": "~5.26.4" + } }, "node_modules/@types/recursive-readdir": { - "version": "2.2.2", - "resolved": "https://registry.npmjs.org/@types/recursive-readdir/-/recursive-readdir-2.2.2.tgz", - "integrity": "sha512-pYLuc3EaFA3SwYfZRC6cSV9TfL+0tLi9Otu2djGavsNhmrEna1yG1EkFOZW7SKJr/nIuDNk4mM6kMMpNLntIhw==", + "version": "2.2.4", + "resolved": "https://registry.npmjs.org/@types/recursive-readdir/-/recursive-readdir-2.2.4.tgz", + "integrity": "sha512-84REEGT3lcgopvpkmGApzmU5UEG0valme5rQS/KGiguTkJ70/Au8UYZTyrzoZnY9svuX9351+1uvrRPzWDD/uw==", "dev": true, "dependencies": { "@types/node": "*" @@ -1694,6 +1697,12 @@ "url": "https://opencollective.com/typescript-eslint" } }, + "node_modules/@ungap/structured-clone": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@ungap/structured-clone/-/structured-clone-1.2.0.tgz", + "integrity": "sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==", + "dev": true + }, "node_modules/acorn": { "version": "8.10.0", "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.10.0.tgz", @@ -2367,20 +2376,20 @@ } }, "node_modules/dotenv": { - "version": "16.3.1", - "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.3.1.tgz", - "integrity": "sha512-IPzF4w4/Rd94bA9imS68tZBaYyBWSCE47V1RGuMrB94iyTOIEwRmVL2x/4An+6mETpLrKJ5hQkB8W4kFAadeIQ==", + "version": "16.4.5", + "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.4.5.tgz", + "integrity": "sha512-ZmdL2rui+eB2YwhsWzjInR8LldtZHGDoQ1ugH85ppHKwpUHL7j7rN0Ti9NCnGiQbhaZ11FpR+7ao1dNsmduNUg==", "engines": { "node": ">=12" }, "funding": { - "url": "https://github.com/motdotla/dotenv?sponsor=1" + "url": "https://dotenvx.com" } }, "node_modules/dotenv-cli": { - "version": "7.3.0", - "resolved": "https://registry.npmjs.org/dotenv-cli/-/dotenv-cli-7.3.0.tgz", - "integrity": "sha512-314CA4TyK34YEJ6ntBf80eUY+t1XaFLyem1k9P0sX1gn30qThZ5qZr/ZwE318gEnzyYP9yj9HJk6SqwE0upkfw==", + "version": "7.4.1", + "resolved": "https://registry.npmjs.org/dotenv-cli/-/dotenv-cli-7.4.1.tgz", + "integrity": "sha512-fE1aywjRrWGxV3miaiUr3d2zC/VAiuzEGghi+QzgIA9fEf/M5hLMaRSXb4IxbUAwGmaLi0IozdZddnVU96acag==", "dependencies": { "cross-spawn": "^7.0.3", "dotenv": "^16.3.0", @@ -2468,18 +2477,19 @@ } }, "node_modules/eslint": { - "version": "8.50.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.50.0.tgz", - "integrity": "sha512-FOnOGSuFuFLv/Sa+FDVRZl4GGVAAFFi8LecRsI5a1tMO5HIE8nCm4ivAlzt4dT3ol/PaaGC0rJEEXQmHJBGoOg==", + "version": "8.57.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.57.0.tgz", + "integrity": "sha512-dZ6+mexnaTIbSBZWgou51U6OmzIhYM2VcNdtiTtI7qPNZm35Akpr0f6vtw3w1Kmn5PYo+tZVfh13WrhpS6oLqQ==", "dev": true, "dependencies": { "@eslint-community/eslint-utils": "^4.2.0", "@eslint-community/regexpp": "^4.6.1", - "@eslint/eslintrc": "^2.1.2", - "@eslint/js": "8.50.0", - "@humanwhocodes/config-array": "^0.11.11", + "@eslint/eslintrc": "^2.1.4", + "@eslint/js": "8.57.0", + "@humanwhocodes/config-array": "^0.11.14", "@humanwhocodes/module-importer": "^1.0.1", "@nodelib/fs.walk": "^1.2.8", + "@ungap/structured-clone": "^1.2.0", "ajv": "^6.12.4", "chalk": "^4.0.0", "cross-spawn": "^7.0.2", @@ -2938,9 +2948,9 @@ "dev": true }, "node_modules/fs-extra": { - "version": "11.1.1", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-11.1.1.tgz", - "integrity": "sha512-MGIE4HOvQCeUCzmlHs0vXpih4ysz4wg9qiSAu6cd42lVwPbTM1TjV7RusoyQqMmk/95gdQZX72u+YW+c3eEpFQ==", + "version": "11.2.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-11.2.0.tgz", + "integrity": "sha512-PmDi3uwK5nFuXh7XDTlVnS17xJS7vW36is2+w3xcv8SVxiB4NyATf4ctkVY5bkSjX0Y4nbvZCq1/EjtEyr9ktw==", "dependencies": { "graceful-fs": "^4.2.0", "jsonfile": "^6.0.1", @@ -4849,9 +4859,9 @@ } }, "node_modules/protobufjs": { - "version": "7.2.5", - "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-7.2.5.tgz", - "integrity": "sha512-gGXRSXvxQ7UiPgfw8gevrfRWcTlSbOFg+p/N+JVJEK5VhueL2miT6qTymqAmjr1Q5WbOCyJbyrk6JfWKwlFn6A==", + "version": "7.2.6", + "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-7.2.6.tgz", + "integrity": "sha512-dgJaEDDL6x8ASUZ1YqWciTRrdOuYNzoOf27oHNfdyvKqHr5i0FV7FSLU+aIeFjyFgVxrpTOtQUi0BLLBymZaBw==", "hasInstallScript": true, "dependencies": { "@protobufjs/aspromise": "^1.1.2", @@ -4872,9 +4882,9 @@ } }, "node_modules/punycode": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.0.tgz", - "integrity": "sha512-rRV+zQD8tVFys26lAGR9WUuS4iUAngJScM+ZRSKtvl5tKeZ2t5bvdNFdNHBW9FWR4guGHlgmsZ1G7BSm2wTbuA==", + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", + "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==", "dev": true, "engines": { "node": ">=6" @@ -5348,9 +5358,9 @@ "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==" }, "node_modules/ts-jest": { - "version": "29.1.1", - "resolved": "https://registry.npmjs.org/ts-jest/-/ts-jest-29.1.1.tgz", - "integrity": "sha512-D6xjnnbP17cC85nliwGiL+tpoKN0StpgE0TeOjXQTU6MVCfsB4v7aW05CgQ/1OywGb0x/oy9hHFnN+sczTiRaA==", + "version": "29.1.2", + "resolved": "https://registry.npmjs.org/ts-jest/-/ts-jest-29.1.2.tgz", + "integrity": "sha512-br6GJoH/WUX4pu7FbZXuWGKGNDuU7b8Uj77g/Sp7puZV6EXzuByl6JrECvm0MzVzSTkSHWTihsXt+5XYER5b+g==", "dev": true, "dependencies": { "bs-logger": "0.x", @@ -5366,7 +5376,7 @@ "ts-jest": "cli.js" }, "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "node": "^16.10.0 || ^18.0.0 || >=20.0.0" }, "peerDependencies": { "@babel/core": ">=7.0.0-beta.0 <8", @@ -5391,9 +5401,9 @@ } }, "node_modules/ts-node": { - "version": "10.9.1", - "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.9.1.tgz", - "integrity": "sha512-NtVysVPkxxrwFGUUxGYhfux8k78pQB3JqYBXlLRZgdGUqTO5wU/UyHop5p70iEbGhB7q5KmiZiU0Y3KlJrScEw==", + "version": "10.9.2", + "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.9.2.tgz", + "integrity": "sha512-f0FFpIdcHgn8zcPSbf1dRevwt047YMnaiJM3u2w2RewrB+fob/zePZcrOyQoLMMO7aBIddLcQIEK5dYjkLnGrQ==", "dev": true, "dependencies": { "@cspotcode/source-map-support": "^0.8.0", @@ -5434,23 +5444,23 @@ } }, "node_modules/ts-poet": { - "version": "6.6.0", - "resolved": "https://registry.npmjs.org/ts-poet/-/ts-poet-6.6.0.tgz", - "integrity": "sha512-4vEH/wkhcjRPFOdBwIh9ItO6jOoumVLRF4aABDX5JSNEubSqwOulihxQPqai+OkuygJm3WYMInxXQX4QwVNMuw==", + "version": "6.7.0", + "resolved": "https://registry.npmjs.org/ts-poet/-/ts-poet-6.7.0.tgz", + "integrity": "sha512-A0wvFtpkTCWPw7ftTIwbEH+L+7ul4CU0x3jXKQ+kCnmEQIAOwhpUaBmcAYKxZCxHae9/MUl4LbyTqw25BpzW5Q==", "dev": true, "dependencies": { - "dprint-node": "^1.0.7" + "dprint-node": "^1.0.8" } }, "node_modules/ts-proto": { - "version": "1.165.2", - "resolved": "https://registry.npmjs.org/ts-proto/-/ts-proto-1.165.2.tgz", - "integrity": "sha512-Jhg3ZKelxhQ3zoBlKiVDfius2H7XLmdC0B+w5iCKUSyZqMIGQXC5iervR6CUIxaoLkSl7Pcw0XwCluR5TLf5NQ==", + "version": "1.171.0", + "resolved": "https://registry.npmjs.org/ts-proto/-/ts-proto-1.171.0.tgz", + "integrity": "sha512-NMwiqCixlk6MZ3TAIpVQUuWwUktCXhoP+07V7D7Eo2IlEwulZucOGrU82toHhPL/QTd+oMBM2RDeQk9qs8+ZEQ==", "dev": true, "dependencies": { "case-anything": "^2.1.13", "protobufjs": "^7.2.4", - "ts-poet": "^6.5.0", + "ts-poet": "^6.7.0", "ts-proto-descriptors": "1.15.0" }, "bin": { @@ -5540,6 +5550,11 @@ "node": ">=14.17" } }, + "node_modules/undici-types": { + "version": "5.26.5", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz", + "integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==" + }, "node_modules/universalify": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.0.tgz", @@ -6267,9 +6282,9 @@ "dev": true }, "@eslint/eslintrc": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.1.2.tgz", - "integrity": "sha512-+wvgpDsrB1YqAMdEUCcnTlpfVBH7Vqn6A/NT3D8WVXFIaKMlErPIZT3oCIAVCOtarRpMtelZLqJeU3t7WY6X6g==", + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.1.4.tgz", + "integrity": "sha512-269Z39MS6wVJtsoUl10L60WdkhJVdPG24Q4eZTH3nnF6lpvSShEK3wQjDX9JRWAUPvPh7COouPpU9IrqaZFvtQ==", "dev": true, "requires": { "ajv": "^6.12.4", @@ -6290,9 +6305,9 @@ "dev": true }, "globals": { - "version": "13.22.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-13.22.0.tgz", - "integrity": "sha512-H1Ddc/PbZHTDVJSnj8kWptIRSD6AM3pK+mKytuIVF4uoBV7rshFlhhvA58ceJ5wp3Er58w6zj7bykMpYXt3ETw==", + "version": "13.24.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.24.0.tgz", + "integrity": "sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==", "dev": true, "requires": { "type-fest": "^0.20.2" @@ -6316,27 +6331,27 @@ } }, "@eslint/js": { - "version": "8.50.0", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.50.0.tgz", - "integrity": "sha512-NCC3zz2+nvYd+Ckfh87rA47zfu2QsQpvc6k1yzTk+b9KzRj0wkGa8LSoGOXN6Zv4lRf/EIoZ80biDh9HOI+RNQ==", + "version": "8.57.0", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.57.0.tgz", + "integrity": "sha512-Ys+3g2TaW7gADOJzPt83SJtCDhMjndcDMFVQ/Tj9iA1BfJzFKD9mAUXT3OenpuPHbI6P/myECxRJrofUsDx/5g==", "dev": true }, "@googleapis/drive": { - "version": "8.3.1", - "resolved": "https://registry.npmjs.org/@googleapis/drive/-/drive-8.3.1.tgz", - "integrity": "sha512-6uh7cC6nzulB5Q76a4OmWF54pfFmDSy6IdF95DKF8yVJVaO6/CfyRtJJsAKmXOZkXIEs9sZZeSzBd4eXwJMlag==", + "version": "8.7.0", + "resolved": "https://registry.npmjs.org/@googleapis/drive/-/drive-8.7.0.tgz", + "integrity": "sha512-XAi6kfySIU4H3ivX2DpzTDce5UhNke5NxEWCL6tySEdcVqx+cmXJmkMqwfOAHJalEB5s9PPfdLBU29Xd5XlLSQ==", "requires": { "googleapis-common": "^7.0.0" } }, "@humanwhocodes/config-array": { - "version": "0.11.11", - "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.11.tgz", - "integrity": "sha512-N2brEuAadi0CcdeMXUkhbZB84eskAc8MEX1By6qEchoVywSgXPIjou4rYsl0V3Hj0ZnuGycGCjdNgockbzeWNA==", + "version": "0.11.14", + "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.14.tgz", + "integrity": "sha512-3T8LkOmg45BV5FICb15QQMsyUSWrQ8AygVfC7ZG32zOalnqrilm018ZVCw0eapXux8FtA33q8PSRSstjee3jSg==", "dev": true, "requires": { - "@humanwhocodes/object-schema": "^1.2.1", - "debug": "^4.1.1", + "@humanwhocodes/object-schema": "^2.0.2", + "debug": "^4.3.1", "minimatch": "^3.0.5" } }, @@ -6347,9 +6362,9 @@ "dev": true }, "@humanwhocodes/object-schema": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-1.2.1.tgz", - "integrity": "sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA==", + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-2.0.3.tgz", + "integrity": "sha512-93zYdMES/c1D69yZiKDBj0V24vqNzB/koF26KPaagAfd3P/4gUlh3Dys5ogAK+Exi9QyzlD8x/08Zt7wIKcDcA==", "dev": true }, "@istanbuljs/load-nyc-config": { @@ -6854,9 +6869,9 @@ } }, "@types/fs-extra": { - "version": "11.0.2", - "resolved": "https://registry.npmjs.org/@types/fs-extra/-/fs-extra-11.0.2.tgz", - "integrity": "sha512-c0hrgAOVYr21EX8J0jBMXGLMgJqVf/v6yxi0dLaJboW9aQPh16Id+z6w2Tx1hm+piJOLv8xPfVKZCLfjPw/IMQ==", + "version": "11.0.4", + "resolved": "https://registry.npmjs.org/@types/fs-extra/-/fs-extra-11.0.4.tgz", + "integrity": "sha512-yTbItCNreRooED33qjunPthRcSjERP1r4MqCZc7wv0u2sUkzTFp45tgUfS5+r7FrZPdmCCNflLhVSP/o+SemsQ==", "dev": true, "requires": { "@types/jsonfile": "*", @@ -6897,9 +6912,9 @@ } }, "@types/jest": { - "version": "29.5.5", - "resolved": "https://registry.npmjs.org/@types/jest/-/jest-29.5.5.tgz", - "integrity": "sha512-ebylz2hnsWR9mYvmBFbXJXr+33UPc4+ZdxyDXh5w0FlPBTfCVN3wPL+kuOiQt3xvrK419v7XWeAs+AeOksafXg==", + "version": "29.5.12", + "resolved": "https://registry.npmjs.org/@types/jest/-/jest-29.5.12.tgz", + "integrity": "sha512-eDC8bTvT/QhYdxJAulQikueigY5AsdBRH2yDKW3yveW7svY3+DzN84/2NUgkw10RTiJbWqZrTtoGVdYlvFJdLw==", "dev": true, "requires": { "expect": "^29.0.0", @@ -6922,20 +6937,23 @@ } }, "@types/lodash": { - "version": "4.14.199", - "resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.14.199.tgz", - "integrity": "sha512-Vrjz5N5Ia4SEzWWgIVwnHNEnb1UE1XMkvY5DGXrAeOGE9imk0hgTHh5GyDjLDJi9OTCn9oo9dXH1uToK1VRfrg==", + "version": "4.17.0", + "resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.17.0.tgz", + "integrity": "sha512-t7dhREVv6dbNj0q17X12j7yDG4bD/DHYX7o5/DbDxobP0HnGPgpRz2Ej77aL7TZT3DSw13fqUTj8J4mMnqa7WA==", "dev": true }, "@types/node": { - "version": "20.7.1", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.7.1.tgz", - "integrity": "sha512-LT+OIXpp2kj4E2S/p91BMe+VgGX2+lfO+XTpfXhh+bCk2LkQtHZSub8ewFBMGP5ClysPjTDFa4sMI8Q3n4T0wg==" + "version": "20.12.6", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.12.6.tgz", + "integrity": "sha512-3KurE8taB8GCvZBPngVbp0lk5CKi8M9f9k1rsADh0Evdz5SzJ+Q+Hx9uHoFGsLnLnd1xmkDQr2hVhlA0Mn0lKQ==", + "requires": { + "undici-types": "~5.26.4" + } }, "@types/recursive-readdir": { - "version": "2.2.2", - "resolved": "https://registry.npmjs.org/@types/recursive-readdir/-/recursive-readdir-2.2.2.tgz", - "integrity": "sha512-pYLuc3EaFA3SwYfZRC6cSV9TfL+0tLi9Otu2djGavsNhmrEna1yG1EkFOZW7SKJr/nIuDNk4mM6kMMpNLntIhw==", + "version": "2.2.4", + "resolved": "https://registry.npmjs.org/@types/recursive-readdir/-/recursive-readdir-2.2.4.tgz", + "integrity": "sha512-84REEGT3lcgopvpkmGApzmU5UEG0valme5rQS/KGiguTkJ70/Au8UYZTyrzoZnY9svuX9351+1uvrRPzWDD/uw==", "dev": true, "requires": { "@types/node": "*" @@ -7067,6 +7085,12 @@ "eslint-visitor-keys": "^3.3.0" } }, + "@ungap/structured-clone": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@ungap/structured-clone/-/structured-clone-1.2.0.tgz", + "integrity": "sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==", + "dev": true + }, "acorn": { "version": "8.10.0", "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.10.0.tgz", @@ -7530,14 +7554,14 @@ } }, "dotenv": { - "version": "16.3.1", - "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.3.1.tgz", - "integrity": "sha512-IPzF4w4/Rd94bA9imS68tZBaYyBWSCE47V1RGuMrB94iyTOIEwRmVL2x/4An+6mETpLrKJ5hQkB8W4kFAadeIQ==" + "version": "16.4.5", + "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.4.5.tgz", + "integrity": "sha512-ZmdL2rui+eB2YwhsWzjInR8LldtZHGDoQ1ugH85ppHKwpUHL7j7rN0Ti9NCnGiQbhaZ11FpR+7ao1dNsmduNUg==" }, "dotenv-cli": { - "version": "7.3.0", - "resolved": "https://registry.npmjs.org/dotenv-cli/-/dotenv-cli-7.3.0.tgz", - "integrity": "sha512-314CA4TyK34YEJ6ntBf80eUY+t1XaFLyem1k9P0sX1gn30qThZ5qZr/ZwE318gEnzyYP9yj9HJk6SqwE0upkfw==", + "version": "7.4.1", + "resolved": "https://registry.npmjs.org/dotenv-cli/-/dotenv-cli-7.4.1.tgz", + "integrity": "sha512-fE1aywjRrWGxV3miaiUr3d2zC/VAiuzEGghi+QzgIA9fEf/M5hLMaRSXb4IxbUAwGmaLi0IozdZddnVU96acag==", "requires": { "cross-spawn": "^7.0.3", "dotenv": "^16.3.0", @@ -7607,18 +7631,19 @@ "dev": true }, "eslint": { - "version": "8.50.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.50.0.tgz", - "integrity": "sha512-FOnOGSuFuFLv/Sa+FDVRZl4GGVAAFFi8LecRsI5a1tMO5HIE8nCm4ivAlzt4dT3ol/PaaGC0rJEEXQmHJBGoOg==", + "version": "8.57.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.57.0.tgz", + "integrity": "sha512-dZ6+mexnaTIbSBZWgou51U6OmzIhYM2VcNdtiTtI7qPNZm35Akpr0f6vtw3w1Kmn5PYo+tZVfh13WrhpS6oLqQ==", "dev": true, "requires": { "@eslint-community/eslint-utils": "^4.2.0", "@eslint-community/regexpp": "^4.6.1", - "@eslint/eslintrc": "^2.1.2", - "@eslint/js": "8.50.0", - "@humanwhocodes/config-array": "^0.11.11", + "@eslint/eslintrc": "^2.1.4", + "@eslint/js": "8.57.0", + "@humanwhocodes/config-array": "^0.11.14", "@humanwhocodes/module-importer": "^1.0.1", "@nodelib/fs.walk": "^1.2.8", + "@ungap/structured-clone": "^1.2.0", "ajv": "^6.12.4", "chalk": "^4.0.0", "cross-spawn": "^7.0.2", @@ -7958,9 +7983,9 @@ "dev": true }, "fs-extra": { - "version": "11.1.1", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-11.1.1.tgz", - "integrity": "sha512-MGIE4HOvQCeUCzmlHs0vXpih4ysz4wg9qiSAu6cd42lVwPbTM1TjV7RusoyQqMmk/95gdQZX72u+YW+c3eEpFQ==", + "version": "11.2.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-11.2.0.tgz", + "integrity": "sha512-PmDi3uwK5nFuXh7XDTlVnS17xJS7vW36is2+w3xcv8SVxiB4NyATf4ctkVY5bkSjX0Y4nbvZCq1/EjtEyr9ktw==", "requires": { "graceful-fs": "^4.2.0", "jsonfile": "^6.0.1", @@ -9373,9 +9398,9 @@ } }, "protobufjs": { - "version": "7.2.5", - "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-7.2.5.tgz", - "integrity": "sha512-gGXRSXvxQ7UiPgfw8gevrfRWcTlSbOFg+p/N+JVJEK5VhueL2miT6qTymqAmjr1Q5WbOCyJbyrk6JfWKwlFn6A==", + "version": "7.2.6", + "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-7.2.6.tgz", + "integrity": "sha512-dgJaEDDL6x8ASUZ1YqWciTRrdOuYNzoOf27oHNfdyvKqHr5i0FV7FSLU+aIeFjyFgVxrpTOtQUi0BLLBymZaBw==", "requires": { "@protobufjs/aspromise": "^1.1.2", "@protobufjs/base64": "^1.1.2", @@ -9392,9 +9417,9 @@ } }, "punycode": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.0.tgz", - "integrity": "sha512-rRV+zQD8tVFys26lAGR9WUuS4iUAngJScM+ZRSKtvl5tKeZ2t5bvdNFdNHBW9FWR4guGHlgmsZ1G7BSm2wTbuA==", + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", + "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==", "dev": true }, "pure-rand": { @@ -9711,9 +9736,9 @@ "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==" }, "ts-jest": { - "version": "29.1.1", - "resolved": "https://registry.npmjs.org/ts-jest/-/ts-jest-29.1.1.tgz", - "integrity": "sha512-D6xjnnbP17cC85nliwGiL+tpoKN0StpgE0TeOjXQTU6MVCfsB4v7aW05CgQ/1OywGb0x/oy9hHFnN+sczTiRaA==", + "version": "29.1.2", + "resolved": "https://registry.npmjs.org/ts-jest/-/ts-jest-29.1.2.tgz", + "integrity": "sha512-br6GJoH/WUX4pu7FbZXuWGKGNDuU7b8Uj77g/Sp7puZV6EXzuByl6JrECvm0MzVzSTkSHWTihsXt+5XYER5b+g==", "dev": true, "requires": { "bs-logger": "0.x", @@ -9727,9 +9752,9 @@ } }, "ts-node": { - "version": "10.9.1", - "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.9.1.tgz", - "integrity": "sha512-NtVysVPkxxrwFGUUxGYhfux8k78pQB3JqYBXlLRZgdGUqTO5wU/UyHop5p70iEbGhB7q5KmiZiU0Y3KlJrScEw==", + "version": "10.9.2", + "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.9.2.tgz", + "integrity": "sha512-f0FFpIdcHgn8zcPSbf1dRevwt047YMnaiJM3u2w2RewrB+fob/zePZcrOyQoLMMO7aBIddLcQIEK5dYjkLnGrQ==", "dev": true, "requires": { "@cspotcode/source-map-support": "^0.8.0", @@ -9748,23 +9773,23 @@ } }, "ts-poet": { - "version": "6.6.0", - "resolved": "https://registry.npmjs.org/ts-poet/-/ts-poet-6.6.0.tgz", - "integrity": "sha512-4vEH/wkhcjRPFOdBwIh9ItO6jOoumVLRF4aABDX5JSNEubSqwOulihxQPqai+OkuygJm3WYMInxXQX4QwVNMuw==", + "version": "6.7.0", + "resolved": "https://registry.npmjs.org/ts-poet/-/ts-poet-6.7.0.tgz", + "integrity": "sha512-A0wvFtpkTCWPw7ftTIwbEH+L+7ul4CU0x3jXKQ+kCnmEQIAOwhpUaBmcAYKxZCxHae9/MUl4LbyTqw25BpzW5Q==", "dev": true, "requires": { - "dprint-node": "^1.0.7" + "dprint-node": "^1.0.8" } }, "ts-proto": { - "version": "1.165.2", - "resolved": "https://registry.npmjs.org/ts-proto/-/ts-proto-1.165.2.tgz", - "integrity": "sha512-Jhg3ZKelxhQ3zoBlKiVDfius2H7XLmdC0B+w5iCKUSyZqMIGQXC5iervR6CUIxaoLkSl7Pcw0XwCluR5TLf5NQ==", + "version": "1.171.0", + "resolved": "https://registry.npmjs.org/ts-proto/-/ts-proto-1.171.0.tgz", + "integrity": "sha512-NMwiqCixlk6MZ3TAIpVQUuWwUktCXhoP+07V7D7Eo2IlEwulZucOGrU82toHhPL/QTd+oMBM2RDeQk9qs8+ZEQ==", "dev": true, "requires": { "case-anything": "^2.1.13", "protobufjs": "^7.2.4", - "ts-poet": "^6.5.0", + "ts-poet": "^6.7.0", "ts-proto-descriptors": "1.15.0" } }, @@ -9828,6 +9853,11 @@ "integrity": "sha512-zaWCozRZ6DLEWAWFrVDz1H6FVXzUSfTy5FUMWsQlU8Ym5JP9eO4xkTIROFCQvhQf61z6O/G6ugw3SgAnvvm+HA==", "dev": true }, + "undici-types": { + "version": "5.26.5", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz", + "integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==" + }, "universalify": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.0.tgz", diff --git a/package.json b/package.json index 5101dc3..da48485 100644 --- a/package.json +++ b/package.json @@ -12,34 +12,34 @@ }, "author": "Ioan Lucut", "dependencies": { - "@googleapis/drive": "^8.3.1", - "dotenv": "^16.3.1", - "dotenv-cli": "^7.3.0", - "fs-extra": "^11.1.1", + "@googleapis/drive": "^8.7.0", + "dotenv": "^16.4.5", + "dotenv-cli": "^7.4.1", + "fs-extra": "^11.2.0", "google-protobuf": "^3.21.2", "lodash": "^4.17.21", "p-map": "^4.0.0", - "protobufjs": "^7.2.5", + "protobufjs": "^7.2.6", "recursive-readdir": "^2.2.3", "uuid": "^9.0.1" }, "devDependencies": { "@tsconfig/node-lts": "^18.12.5", - "@types/fs-extra": "^11.0.2", - "@types/jest": "^29.5.5", - "@types/lodash": "^4.14.199", - "@types/node": "^20.7.1", - "@types/recursive-readdir": "^2.2.2", + "@types/fs-extra": "^11.0.4", + "@types/jest": "^29.5.12", + "@types/lodash": "^4.17.0", + "@types/node": "^20.12.6", + "@types/recursive-readdir": "^2.2.4", "@typescript-eslint/eslint-plugin": "^5.62.0", "@typescript-eslint/parser": "^5.62.0", - "eslint": "^8.50.0", + "eslint": "^8.57.0", "is-ci-cli": "^2.2.0", "jest": "^29.7.0", "jest-watch-typeahead": "^2.2.2", "prettier": "^2.8.8", - "ts-jest": "^29.1.1", - "ts-node": "^10.9.1", - "ts-proto": "^1.165.2", + "ts-jest": "^29.1.2", + "ts-node": "^10.9.2", + "ts-proto": "^1.171.0", "tslib": "^2.6.2", "typescript": "5.1.6" } diff --git a/proto/action.ts b/proto/action.ts index 58c7dbf..7b56949 100644 --- a/proto/action.ts +++ b/proto/action.ts @@ -1153,7 +1153,7 @@ export const Action = { if (message.oldType !== undefined) { Action_OldType.encode(message.oldType, writer.uint32(42).fork()).ldelim(); } - if (message.isEnabled === true) { + if (message.isEnabled !== false) { writer.uint32(48).bool(message.isEnabled); } if (message.layerIdentification !== undefined) { @@ -1753,7 +1753,7 @@ export const Action = { if (message.oldType !== undefined) { obj.oldType = Action_OldType.toJSON(message.oldType); } - if (message.isEnabled === true) { + if (message.isEnabled !== false) { obj.isEnabled = message.isEnabled; } if (message.layerIdentification !== undefined) { @@ -2287,10 +2287,10 @@ export const Action_PlaylistItemType = { if (message.itemName !== '') { writer.uint32(34).string(message.itemName); } - if (message.selectPlaylist === true) { + if (message.selectPlaylist !== false) { writer.uint32(40).bool(message.selectPlaylist); } - if (message.alwaysRetrigger === true) { + if (message.alwaysRetrigger !== false) { writer.uint32(48).bool(message.alwaysRetrigger); } return writer; @@ -2395,10 +2395,10 @@ export const Action_PlaylistItemType = { if (message.itemName !== '') { obj.itemName = message.itemName; } - if (message.selectPlaylist === true) { + if (message.selectPlaylist !== false) { obj.selectPlaylist = message.selectPlaylist; } - if (message.alwaysRetrigger === true) { + if (message.alwaysRetrigger !== false) { obj.alwaysRetrigger = message.alwaysRetrigger; } return obj; @@ -2790,7 +2790,7 @@ export const Action_MediaType = { if (message.layerType !== 0) { writer.uint32(80).int32(message.layerType); } - if (message.alwaysRetrigger === true) { + if (message.alwaysRetrigger !== false) { writer.uint32(88).bool(message.alwaysRetrigger); } for (const v of message.markers) { @@ -3009,7 +3009,7 @@ export const Action_MediaType = { if (message.layerType !== 0) { obj.layerType = action_LayerTypeToJSON(message.layerType); } - if (message.alwaysRetrigger === true) { + if (message.alwaysRetrigger !== false) { obj.alwaysRetrigger = message.alwaysRetrigger; } if (message.markers?.length) { @@ -3164,7 +3164,7 @@ export const Action_MediaType_Video = { if (message.timesToLoop !== 0) { writer.uint32(32).uint32(message.timesToLoop); } - if (message.softLoop === true) { + if (message.softLoop !== false) { writer.uint32(40).bool(message.softLoop); } if (message.softLoopDuration !== 0) { @@ -3272,7 +3272,7 @@ export const Action_MediaType_Video = { if (message.timesToLoop !== 0) { obj.timesToLoop = Math.round(message.timesToLoop); } - if (message.softLoop === true) { + if (message.softLoop !== false) { obj.softLoop = message.softLoop; } if (message.softLoopDuration !== 0) { @@ -6036,7 +6036,7 @@ export const Action_AudioInputType = { if (message.index !== 0) { writer.uint32(8).int32(message.index); } - if (message.overrideMode === true) { + if (message.overrideMode !== false) { writer.uint32(16).bool(message.overrideMode); } if (message.behaviorMode !== undefined) { @@ -6045,7 +6045,7 @@ export const Action_AudioInputType = { writer.uint32(26).fork(), ).ldelim(); } - if (message.overrideVolume === true) { + if (message.overrideVolume !== false) { writer.uint32(32).bool(message.overrideVolume); } if (message.volume !== 0) { @@ -6133,13 +6133,13 @@ export const Action_AudioInputType = { if (message.index !== 0) { obj.index = Math.round(message.index); } - if (message.overrideMode === true) { + if (message.overrideMode !== false) { obj.overrideMode = message.overrideMode; } if (message.behaviorMode !== undefined) { obj.behaviorMode = AudioInput_BehaviorMode.toJSON(message.behaviorMode); } - if (message.overrideVolume === true) { + if (message.overrideVolume !== false) { obj.overrideVolume = message.overrideVolume; } if (message.volume !== 0) { @@ -6444,7 +6444,7 @@ export const Action_CaptureType_CaptureStop = { message: Action_CaptureType_CaptureStop, writer: _m0.Writer = _m0.Writer.create(), ): _m0.Writer { - if (message.showsAlertBeforeStopping === true) { + if (message.showsAlertBeforeStopping !== false) { writer.uint32(8).bool(message.showsAlertBeforeStopping); } return writer; @@ -6487,7 +6487,7 @@ export const Action_CaptureType_CaptureStop = { toJSON(message: Action_CaptureType_CaptureStop): unknown { const obj: any = {}; - if (message.showsAlertBeforeStopping === true) { + if (message.showsAlertBeforeStopping !== false) { obj.showsAlertBeforeStopping = message.showsAlertBeforeStopping; } return obj; diff --git a/proto/analytics.ts b/proto/analytics.ts index a2916ea..0f16528 100644 --- a/proto/analytics.ts +++ b/proto/analytics.ts @@ -5905,13 +5905,13 @@ export const Analytics_Timecode_Startup = { message: Analytics_Timecode_Startup, writer: _m0.Writer = _m0.Writer.create(), ): _m0.Writer { - if (message.isInputConfigured === true) { + if (message.isInputConfigured !== false) { writer.uint32(8).bool(message.isInputConfigured); } - if (message.isEnabled === true) { + if (message.isEnabled !== false) { writer.uint32(16).bool(message.isEnabled); } - if (message.isPlaylistSelected === true) { + if (message.isPlaylistSelected !== false) { writer.uint32(24).bool(message.isPlaylistSelected); } return writer; @@ -5974,13 +5974,13 @@ export const Analytics_Timecode_Startup = { toJSON(message: Analytics_Timecode_Startup): unknown { const obj: any = {}; - if (message.isInputConfigured === true) { + if (message.isInputConfigured !== false) { obj.isInputConfigured = message.isInputConfigured; } - if (message.isEnabled === true) { + if (message.isEnabled !== false) { obj.isEnabled = message.isEnabled; } - if (message.isPlaylistSelected === true) { + if (message.isPlaylistSelected !== false) { obj.isPlaylistSelected = message.isPlaylistSelected; } return obj; @@ -6017,7 +6017,7 @@ export const Analytics_Timecode_Activate = { if (message.cueCount !== 0) { writer.uint32(16).int32(message.cueCount); } - if (message.isStartup === true) { + if (message.isStartup !== false) { writer.uint32(24).bool(message.isStartup); } return writer; @@ -6084,7 +6084,7 @@ export const Analytics_Timecode_Activate = { if (message.cueCount !== 0) { obj.cueCount = Math.round(message.cueCount); } - if (message.isStartup === true) { + if (message.isStartup !== false) { obj.isStartup = message.isStartup; } return obj; @@ -6201,22 +6201,22 @@ export const Analytics_Sync_Local = { if (message.syncType !== 0) { writer.uint32(8).int32(message.syncType); } - if (message.includeLibrary === true) { + if (message.includeLibrary !== false) { writer.uint32(16).bool(message.includeLibrary); } - if (message.includeMedia === true) { + if (message.includeMedia !== false) { writer.uint32(24).bool(message.includeMedia); } - if (message.includePlaylists === true) { + if (message.includePlaylists !== false) { writer.uint32(32).bool(message.includePlaylists); } - if (message.includeThemes === true) { + if (message.includeThemes !== false) { writer.uint32(40).bool(message.includeThemes); } - if (message.includeSupportFiles === true) { + if (message.includeSupportFiles !== false) { writer.uint32(48).bool(message.includeSupportFiles); } - if (message.replaceFiles === true) { + if (message.replaceFiles !== false) { writer.uint32(56).bool(message.replaceFiles); } return writer; @@ -6322,22 +6322,22 @@ export const Analytics_Sync_Local = { if (message.syncType !== 0) { obj.syncType = analytics_Sync_Local_SyncTypeToJSON(message.syncType); } - if (message.includeLibrary === true) { + if (message.includeLibrary !== false) { obj.includeLibrary = message.includeLibrary; } - if (message.includeMedia === true) { + if (message.includeMedia !== false) { obj.includeMedia = message.includeMedia; } - if (message.includePlaylists === true) { + if (message.includePlaylists !== false) { obj.includePlaylists = message.includePlaylists; } - if (message.includeThemes === true) { + if (message.includeThemes !== false) { obj.includeThemes = message.includeThemes; } - if (message.includeSupportFiles === true) { + if (message.includeSupportFiles !== false) { obj.includeSupportFiles = message.includeSupportFiles; } - if (message.replaceFiles === true) { + if (message.replaceFiles !== false) { obj.replaceFiles = message.replaceFiles; } return obj; @@ -6606,7 +6606,7 @@ export const Analytics_MultiTracks_Import = { writer.uint32(10).fork(), ).ldelim(); } - if (message.chartsAutomation === true) { + if (message.chartsAutomation !== false) { writer.uint32(16).bool(message.chartsAutomation); } if (message.lines !== 0) { @@ -6676,7 +6676,7 @@ export const Analytics_MultiTracks_Import = { if (message.account !== undefined) { obj.account = Analytics_MultiTracks_Account.toJSON(message.account); } - if (message.chartsAutomation === true) { + if (message.chartsAutomation !== false) { obj.chartsAutomation = message.chartsAutomation; } if (message.lines !== 0) { @@ -6926,19 +6926,19 @@ export const Analytics_TriggerMediaInformation_Video = { if (message.scaleMode !== 0) { writer.uint32(32).int32(message.scaleMode); } - if (message.hasInPoint === true) { + if (message.hasInPoint !== false) { writer.uint32(40).bool(message.hasInPoint); } - if (message.hasOutPoint === true) { + if (message.hasOutPoint !== false) { writer.uint32(48).bool(message.hasOutPoint); } - if (message.hasEffects === true) { + if (message.hasEffects !== false) { writer.uint32(56).bool(message.hasEffects); } - if (message.hasTransition === true) { + if (message.hasTransition !== false) { writer.uint32(64).bool(message.hasTransition); } - if (message.hasAudio === true) { + if (message.hasAudio !== false) { writer.uint32(72).bool(message.hasAudio); } return writer; @@ -7087,19 +7087,19 @@ export const Analytics_TriggerMediaInformation_Video = { message.scaleMode, ); } - if (message.hasInPoint === true) { + if (message.hasInPoint !== false) { obj.hasInPoint = message.hasInPoint; } - if (message.hasOutPoint === true) { + if (message.hasOutPoint !== false) { obj.hasOutPoint = message.hasOutPoint; } - if (message.hasEffects === true) { + if (message.hasEffects !== false) { obj.hasEffects = message.hasEffects; } - if (message.hasTransition === true) { + if (message.hasTransition !== false) { obj.hasTransition = message.hasTransition; } - if (message.hasAudio === true) { + if (message.hasAudio !== false) { obj.hasAudio = message.hasAudio; } return obj; @@ -10296,16 +10296,16 @@ export const Analytics_UI_MainView_Bible_GenerateSlides = { if (message.referenceLocation !== 0) { writer.uint32(32).int32(message.referenceLocation); } - if (message.showVerseNumbers === true) { + if (message.showVerseNumbers !== false) { writer.uint32(40).bool(message.showVerseNumbers); } - if (message.breakNewVerse === true) { + if (message.breakNewVerse !== false) { writer.uint32(48).bool(message.breakNewVerse); } - if (message.displayTranslation === true) { + if (message.displayTranslation !== false) { writer.uint32(56).bool(message.displayTranslation); } - if (message.preserveFontColor === true) { + if (message.preserveFontColor !== false) { writer.uint32(64).bool(message.preserveFontColor); } if (message.referenceStyle !== 0) { @@ -10455,16 +10455,16 @@ export const Analytics_UI_MainView_Bible_GenerateSlides = { message.referenceLocation, ); } - if (message.showVerseNumbers === true) { + if (message.showVerseNumbers !== false) { obj.showVerseNumbers = message.showVerseNumbers; } - if (message.breakNewVerse === true) { + if (message.breakNewVerse !== false) { obj.breakNewVerse = message.breakNewVerse; } - if (message.displayTranslation === true) { + if (message.displayTranslation !== false) { obj.displayTranslation = message.displayTranslation; } - if (message.preserveFontColor === true) { + if (message.preserveFontColor !== false) { obj.preserveFontColor = message.preserveFontColor; } if (message.referenceStyle !== 0) { @@ -15220,7 +15220,7 @@ export const Analytics_UI_TextInspector_UnderlineColor = { message: Analytics_UI_TextInspector_UnderlineColor, writer: _m0.Writer = _m0.Writer.create(), ): _m0.Writer { - if (message.isEnabled === true) { + if (message.isEnabled !== false) { writer.uint32(8).bool(message.isEnabled); } if (message.selectionMode !== 0) { @@ -15276,7 +15276,7 @@ export const Analytics_UI_TextInspector_UnderlineColor = { toJSON(message: Analytics_UI_TextInspector_UnderlineColor): unknown { const obj: any = {}; - if (message.isEnabled === true) { + if (message.isEnabled !== false) { obj.isEnabled = message.isEnabled; } if (message.selectionMode !== 0) { @@ -15501,7 +15501,7 @@ export const Analytics_UI_TextInspector_ScrollingText_Enable = { message: Analytics_UI_TextInspector_ScrollingText_Enable, writer: _m0.Writer = _m0.Writer.create(), ): _m0.Writer { - if (message.enabled === true) { + if (message.enabled !== false) { writer.uint32(8).bool(message.enabled); } return writer; @@ -15544,7 +15544,7 @@ export const Analytics_UI_TextInspector_ScrollingText_Enable = { toJSON(message: Analytics_UI_TextInspector_ScrollingText_Enable): unknown { const obj: any = {}; - if (message.enabled === true) { + if (message.enabled !== false) { obj.enabled = message.enabled; } return obj; @@ -17377,7 +17377,7 @@ export const Analytics_UI_ClearGroups_Group_ChangeIcon = { if (message.iconType !== 0) { writer.uint32(8).int32(message.iconType); } - if (message.isTinted === true) { + if (message.isTinted !== false) { writer.uint32(16).bool(message.isTinted); } return writer; @@ -17437,7 +17437,7 @@ export const Analytics_UI_ClearGroups_Group_ChangeIcon = { message.iconType, ); } - if (message.isTinted === true) { + if (message.isTinted !== false) { obj.isTinted = message.isTinted; } return obj; @@ -18598,7 +18598,7 @@ export const Analytics_UI_NetworkGroup_Invite = { message: Analytics_UI_NetworkGroup_Invite, writer: _m0.Writer = _m0.Writer.create(), ): _m0.Writer { - if (message.didAccept === true) { + if (message.didAccept !== false) { writer.uint32(8).bool(message.didAccept); } return writer; @@ -18641,7 +18641,7 @@ export const Analytics_UI_NetworkGroup_Invite = { toJSON(message: Analytics_UI_NetworkGroup_Invite): unknown { const obj: any = {}; - if (message.didAccept === true) { + if (message.didAccept !== false) { obj.didAccept = message.didAccept; } return obj; @@ -20131,10 +20131,10 @@ export const Analytics_Startup_ScreenConfiguration_Output = { if (message.outputType !== 0) { writer.uint32(16).int32(message.outputType); } - if (message.colorCorrectionEnabled === true) { + if (message.colorCorrectionEnabled !== false) { writer.uint32(24).bool(message.colorCorrectionEnabled); } - if (message.cornerPinEnabled === true) { + if (message.cornerPinEnabled !== false) { writer.uint32(32).bool(message.cornerPinEnabled); } if (message.alphaKeyEnabled !== 0) { @@ -20275,10 +20275,10 @@ export const Analytics_Startup_ScreenConfiguration_Output = { message.outputType, ); } - if (message.colorCorrectionEnabled === true) { + if (message.colorCorrectionEnabled !== false) { obj.colorCorrectionEnabled = message.colorCorrectionEnabled; } - if (message.cornerPinEnabled === true) { + if (message.cornerPinEnabled !== false) { obj.cornerPinEnabled = message.cornerPinEnabled; } if (message.alphaKeyEnabled !== 0) { @@ -20343,7 +20343,7 @@ export const Analytics_Startup_ScreenConfiguration_Single = { if (message.screenType !== 0) { writer.uint32(8).int32(message.screenType); } - if (message.screenColorEnabled === true) { + if (message.screenColorEnabled !== false) { writer.uint32(16).bool(message.screenColorEnabled); } return writer; @@ -20403,7 +20403,7 @@ export const Analytics_Startup_ScreenConfiguration_Single = { message.screenType, ); } - if (message.screenColorEnabled === true) { + if (message.screenColorEnabled !== false) { obj.screenColorEnabled = message.screenColorEnabled; } return obj; @@ -20444,7 +20444,7 @@ export const Analytics_Startup_ScreenConfiguration_Mirrored = { if (message.screenType !== 0) { writer.uint32(8).int32(message.screenType); } - if (message.screenColorEnabled === true) { + if (message.screenColorEnabled !== false) { writer.uint32(16).bool(message.screenColorEnabled); } if (message.count !== 0) { @@ -20515,7 +20515,7 @@ export const Analytics_Startup_ScreenConfiguration_Mirrored = { message.screenType, ); } - if (message.screenColorEnabled === true) { + if (message.screenColorEnabled !== false) { obj.screenColorEnabled = message.screenColorEnabled; } if (message.count !== 0) { @@ -20560,7 +20560,7 @@ export const Analytics_Startup_ScreenConfiguration_EdgeBlend = { if (message.screenType !== 0) { writer.uint32(8).int32(message.screenType); } - if (message.screenColorEnabled === true) { + if (message.screenColorEnabled !== false) { writer.uint32(16).bool(message.screenColorEnabled); } if (message.count !== 0) { @@ -20631,7 +20631,7 @@ export const Analytics_Startup_ScreenConfiguration_EdgeBlend = { message.screenType, ); } - if (message.screenColorEnabled === true) { + if (message.screenColorEnabled !== false) { obj.screenColorEnabled = message.screenColorEnabled; } if (message.count !== 0) { @@ -20676,7 +20676,7 @@ export const Analytics_Startup_ScreenConfiguration_Grouped = { if (message.screenType !== 0) { writer.uint32(8).int32(message.screenType); } - if (message.screenColorEnabled === true) { + if (message.screenColorEnabled !== false) { writer.uint32(16).bool(message.screenColorEnabled); } if (message.columns !== 0) { @@ -20758,7 +20758,7 @@ export const Analytics_Startup_ScreenConfiguration_Grouped = { message.screenType, ); } - if (message.screenColorEnabled === true) { + if (message.screenColorEnabled !== false) { obj.screenColorEnabled = message.screenColorEnabled; } if (message.columns !== 0) { @@ -20815,31 +20815,31 @@ export const Analytics_Startup_Preferences = { message: Analytics_Startup_Preferences, writer: _m0.Writer = _m0.Writer.create(), ): _m0.Writer { - if (message.houseOfWorship === true) { + if (message.houseOfWorship !== false) { writer.uint32(8).bool(message.houseOfWorship); } - if (message.hasCustomLogo === true) { + if (message.hasCustomLogo !== false) { writer.uint32(16).bool(message.hasCustomLogo); } - if (message.copyrightEnabled === true) { + if (message.copyrightEnabled !== false) { writer.uint32(24).bool(message.copyrightEnabled); } if (message.copyrightStyle !== 0) { writer.uint32(32).int32(message.copyrightStyle); } - if (message.copyrightHasLicense === true) { + if (message.copyrightHasLicense !== false) { writer.uint32(40).bool(message.copyrightHasLicense); } if (message.renderMode !== 0) { writer.uint32(48).int32(message.renderMode); } - if (message.suppressAutoStart === true) { + if (message.suppressAutoStart !== false) { writer.uint32(56).bool(message.suppressAutoStart); } - if (message.manageMediaAutomatically === true) { + if (message.manageMediaAutomatically !== false) { writer.uint32(64).bool(message.manageMediaAutomatically); } - if (message.searchPathsRelink === true) { + if (message.searchPathsRelink !== false) { writer.uint32(72).bool(message.searchPathsRelink); } if (message.updateChannel !== 0) { @@ -20979,13 +20979,13 @@ export const Analytics_Startup_Preferences = { toJSON(message: Analytics_Startup_Preferences): unknown { const obj: any = {}; - if (message.houseOfWorship === true) { + if (message.houseOfWorship !== false) { obj.houseOfWorship = message.houseOfWorship; } - if (message.hasCustomLogo === true) { + if (message.hasCustomLogo !== false) { obj.hasCustomLogo = message.hasCustomLogo; } - if (message.copyrightEnabled === true) { + if (message.copyrightEnabled !== false) { obj.copyrightEnabled = message.copyrightEnabled; } if (message.copyrightStyle !== 0) { @@ -20993,7 +20993,7 @@ export const Analytics_Startup_Preferences = { message.copyrightStyle, ); } - if (message.copyrightHasLicense === true) { + if (message.copyrightHasLicense !== false) { obj.copyrightHasLicense = message.copyrightHasLicense; } if (message.renderMode !== 0) { @@ -21001,13 +21001,13 @@ export const Analytics_Startup_Preferences = { message.renderMode, ); } - if (message.suppressAutoStart === true) { + if (message.suppressAutoStart !== false) { obj.suppressAutoStart = message.suppressAutoStart; } - if (message.manageMediaAutomatically === true) { + if (message.manageMediaAutomatically !== false) { obj.manageMediaAutomatically = message.manageMediaAutomatically; } - if (message.searchPathsRelink === true) { + if (message.searchPathsRelink !== false) { obj.searchPathsRelink = message.searchPathsRelink; } if (message.updateChannel !== 0) { @@ -21055,16 +21055,16 @@ export const Analytics_Startup_Screens = { message: Analytics_Startup_Screens, writer: _m0.Writer = _m0.Writer.create(), ): _m0.Writer { - if (message.showScreensLaunch === true) { + if (message.showScreensLaunch !== false) { writer.uint32(8).bool(message.showScreensLaunch); } - if (message.showPerformanceOnScreen === true) { + if (message.showPerformanceOnScreen !== false) { writer.uint32(16).bool(message.showPerformanceOnScreen); } - if (message.ignoreBackgroundColors === true) { + if (message.ignoreBackgroundColors !== false) { writer.uint32(24).bool(message.ignoreBackgroundColors); } - if (message.showKeynotePptScreens === true) { + if (message.showKeynotePptScreens !== false) { writer.uint32(32).bool(message.showKeynotePptScreens); } return writer; @@ -21137,16 +21137,16 @@ export const Analytics_Startup_Screens = { toJSON(message: Analytics_Startup_Screens): unknown { const obj: any = {}; - if (message.showScreensLaunch === true) { + if (message.showScreensLaunch !== false) { obj.showScreensLaunch = message.showScreensLaunch; } - if (message.showPerformanceOnScreen === true) { + if (message.showPerformanceOnScreen !== false) { obj.showPerformanceOnScreen = message.showPerformanceOnScreen; } - if (message.ignoreBackgroundColors === true) { + if (message.ignoreBackgroundColors !== false) { obj.ignoreBackgroundColors = message.ignoreBackgroundColors; } - if (message.showKeynotePptScreens === true) { + if (message.showKeynotePptScreens !== false) { obj.showKeynotePptScreens = message.showKeynotePptScreens; } return obj; @@ -21186,25 +21186,25 @@ export const Analytics_Startup_PlanningCenter = { message: Analytics_Startup_PlanningCenter, writer: _m0.Writer = _m0.Writer.create(), ): _m0.Writer { - if (message.loggedIn === true) { + if (message.loggedIn !== false) { writer.uint32(8).bool(message.loggedIn); } - if (message.autoUpdate === true) { + if (message.autoUpdate !== false) { writer.uint32(16).bool(message.autoUpdate); } - if (message.matchSongs === true) { + if (message.matchSongs !== false) { writer.uint32(24).bool(message.matchSongs); } - if (message.showHistory === true) { + if (message.showHistory !== false) { writer.uint32(32).bool(message.showHistory); } - if (message.makeArrangements === true) { + if (message.makeArrangements !== false) { writer.uint32(40).bool(message.makeArrangements); } - if (message.autoUpload === true) { + if (message.autoUpload !== false) { writer.uint32(48).bool(message.autoUpload); } - if (message.autoDownload === true) { + if (message.autoDownload !== false) { writer.uint32(56).bool(message.autoDownload); } return writer; @@ -21307,25 +21307,25 @@ export const Analytics_Startup_PlanningCenter = { toJSON(message: Analytics_Startup_PlanningCenter): unknown { const obj: any = {}; - if (message.loggedIn === true) { + if (message.loggedIn !== false) { obj.loggedIn = message.loggedIn; } - if (message.autoUpdate === true) { + if (message.autoUpdate !== false) { obj.autoUpdate = message.autoUpdate; } - if (message.matchSongs === true) { + if (message.matchSongs !== false) { obj.matchSongs = message.matchSongs; } - if (message.showHistory === true) { + if (message.showHistory !== false) { obj.showHistory = message.showHistory; } - if (message.makeArrangements === true) { + if (message.makeArrangements !== false) { obj.makeArrangements = message.makeArrangements; } - if (message.autoUpload === true) { + if (message.autoUpload !== false) { obj.autoUpload = message.autoUpload; } - if (message.autoDownload === true) { + if (message.autoDownload !== false) { obj.autoDownload = message.autoDownload; } return obj; @@ -21360,7 +21360,7 @@ export const Analytics_Startup_SongSelect = { message: Analytics_Startup_SongSelect, writer: _m0.Writer = _m0.Writer.create(), ): _m0.Writer { - if (message.loggedIn === true) { + if (message.loggedIn !== false) { writer.uint32(8).bool(message.loggedIn); } return writer; @@ -21403,7 +21403,7 @@ export const Analytics_Startup_SongSelect = { toJSON(message: Analytics_Startup_SongSelect): unknown { const obj: any = {}; - if (message.loggedIn === true) { + if (message.loggedIn !== false) { obj.loggedIn = message.loggedIn; } return obj; @@ -21460,7 +21460,7 @@ export const Analytics_Startup_Audio = { if (message.mainDelay !== 0) { writer.uint32(48).int32(message.mainDelay); } - if (message.sdiNdi === true) { + if (message.sdiNdi !== false) { writer.uint32(56).bool(message.sdiNdi); } if (message.sdiNdiRouting !== 0) { @@ -21613,7 +21613,7 @@ export const Analytics_Startup_Audio = { if (message.mainDelay !== 0) { obj.mainDelay = Math.round(message.mainDelay); } - if (message.sdiNdi === true) { + if (message.sdiNdi !== false) { obj.sdiNdi = message.sdiNdi; } if (message.sdiNdiRouting !== 0) { @@ -21730,7 +21730,7 @@ export const Analytics_Startup_Resi = { message: Analytics_Startup_Resi, writer: _m0.Writer = _m0.Writer.create(), ): _m0.Writer { - if (message.loggedIn === true) { + if (message.loggedIn !== false) { writer.uint32(8).bool(message.loggedIn); } return writer; @@ -21773,7 +21773,7 @@ export const Analytics_Startup_Resi = { toJSON(message: Analytics_Startup_Resi): unknown { const obj: any = {}; - if (message.loggedIn === true) { + if (message.loggedIn !== false) { obj.loggedIn = message.loggedIn; } return obj; @@ -21826,7 +21826,7 @@ export const Analytics_Startup_Interface = { if (message.audioOutline !== 0) { writer.uint32(24).int32(message.audioOutline); } - if (message.continuousPlaylist === true) { + if (message.continuousPlaylist !== false) { writer.uint32(32).bool(message.continuousPlaylist); } if (message.mediaBin !== 0) { @@ -21856,7 +21856,7 @@ export const Analytics_Startup_Interface = { if (message.mediaTransition !== '') { writer.uint32(106).string(message.mediaTransition); } - if (message.audioShuffle === true) { + if (message.audioShuffle !== false) { writer.uint32(112).bool(message.audioShuffle); } return writer; @@ -22054,7 +22054,7 @@ export const Analytics_Startup_Interface = { message.audioOutline, ); } - if (message.continuousPlaylist === true) { + if (message.continuousPlaylist !== false) { obj.continuousPlaylist = message.continuousPlaylist; } if (message.mediaBin !== 0) { @@ -22098,7 +22098,7 @@ export const Analytics_Startup_Interface = { if (message.mediaTransition !== '') { obj.mediaTransition = message.mediaTransition; } - if (message.audioShuffle === true) { + if (message.audioShuffle !== false) { obj.audioShuffle = message.audioShuffle; } return obj; @@ -23043,7 +23043,7 @@ export const Analytics_Startup_NetworkLink = { message: Analytics_Startup_NetworkLink, writer: _m0.Writer = _m0.Writer.create(), ): _m0.Writer { - if (message.enabled === true) { + if (message.enabled !== false) { writer.uint32(8).bool(message.enabled); } if (message.memberCount !== 0) { @@ -23099,7 +23099,7 @@ export const Analytics_Startup_NetworkLink = { toJSON(message: Analytics_Startup_NetworkLink): unknown { const obj: any = {}; - if (message.enabled === true) { + if (message.enabled !== false) { obj.enabled = message.enabled; } if (message.memberCount !== 0) { @@ -23580,7 +23580,7 @@ export const Analytics_Trigger_Cue_Slide_Trigger = { if (message.actionCount !== 0) { writer.uint32(32).int32(message.actionCount); } - if (message.hasTextFx === true) { + if (message.hasTextFx !== false) { writer.uint32(40).bool(message.hasTextFx); } if (message.mediaTextFillObjectCount !== 0) { @@ -23731,7 +23731,7 @@ export const Analytics_Trigger_Cue_Slide_Trigger = { if (message.actionCount !== 0) { obj.actionCount = Math.round(message.actionCount); } - if (message.hasTextFx === true) { + if (message.hasTextFx !== false) { obj.hasTextFx = message.hasTextFx; } if (message.mediaTextFillObjectCount !== 0) { @@ -23802,7 +23802,7 @@ export const Analytics_Trigger_Cue_Slide_ScrollingTextElement = { if (message.startPosition !== 0) { writer.uint32(16).int32(message.startPosition); } - if (message.isRepeatEnabled === true) { + if (message.isRepeatEnabled !== false) { writer.uint32(24).bool(message.isRepeatEnabled); } if (message.speed !== 0) { @@ -23912,7 +23912,7 @@ export const Analytics_Trigger_Cue_Slide_ScrollingTextElement = { message.startPosition, ); } - if (message.isRepeatEnabled === true) { + if (message.isRepeatEnabled !== false) { obj.isRepeatEnabled = message.isRepeatEnabled; } if (message.speed !== 0) { @@ -23967,7 +23967,7 @@ export const Analytics_Trigger_Cue_Slide_RSSFeedElement = { if (message.content !== 0) { writer.uint32(8).int32(message.content); } - if (message.isDelimiterEnabled === true) { + if (message.isDelimiterEnabled !== false) { writer.uint32(16).bool(message.isDelimiterEnabled); } if (message.destinationLayer !== 0) { @@ -24042,7 +24042,7 @@ export const Analytics_Trigger_Cue_Slide_RSSFeedElement = { message.content, ); } - if (message.isDelimiterEnabled === true) { + if (message.isDelimiterEnabled !== false) { obj.isDelimiterEnabled = message.isDelimiterEnabled; } if (message.destinationLayer !== 0) { @@ -25449,25 +25449,25 @@ export const Analytics_Trigger_Action_ClearGroup = { message: Analytics_Trigger_Action_ClearGroup, writer: _m0.Writer = _m0.Writer.create(), ): _m0.Writer { - if (message.layerAudio === true) { + if (message.layerAudio !== false) { writer.uint32(8).bool(message.layerAudio); } - if (message.layerMessages === true) { + if (message.layerMessages !== false) { writer.uint32(16).bool(message.layerMessages); } - if (message.layerProps === true) { + if (message.layerProps !== false) { writer.uint32(24).bool(message.layerProps); } - if (message.layerAnnouncement === true) { + if (message.layerAnnouncement !== false) { writer.uint32(32).bool(message.layerAnnouncement); } - if (message.layerSlide === true) { + if (message.layerSlide !== false) { writer.uint32(40).bool(message.layerSlide); } - if (message.layerMedia === true) { + if (message.layerMedia !== false) { writer.uint32(48).bool(message.layerMedia); } - if (message.layerVideoInput === true) { + if (message.layerVideoInput !== false) { writer.uint32(56).bool(message.layerVideoInput); } return writer; @@ -25570,25 +25570,25 @@ export const Analytics_Trigger_Action_ClearGroup = { toJSON(message: Analytics_Trigger_Action_ClearGroup): unknown { const obj: any = {}; - if (message.layerAudio === true) { + if (message.layerAudio !== false) { obj.layerAudio = message.layerAudio; } - if (message.layerMessages === true) { + if (message.layerMessages !== false) { obj.layerMessages = message.layerMessages; } - if (message.layerProps === true) { + if (message.layerProps !== false) { obj.layerProps = message.layerProps; } - if (message.layerAnnouncement === true) { + if (message.layerAnnouncement !== false) { obj.layerAnnouncement = message.layerAnnouncement; } - if (message.layerSlide === true) { + if (message.layerSlide !== false) { obj.layerSlide = message.layerSlide; } - if (message.layerMedia === true) { + if (message.layerMedia !== false) { obj.layerMedia = message.layerMedia; } - if (message.layerVideoInput === true) { + if (message.layerVideoInput !== false) { obj.layerVideoInput = message.layerVideoInput; } return obj; @@ -26390,7 +26390,7 @@ export const Analytics_Import_SongSelect = { if (message.templateSlideTextElementCount !== 0) { writer.uint32(8).int32(message.templateSlideTextElementCount); } - if (message.importIntoPlaylist === true) { + if (message.importIntoPlaylist !== false) { writer.uint32(16).bool(message.importIntoPlaylist); } if (message.lineDelimiter !== 0) { @@ -26399,7 +26399,7 @@ export const Analytics_Import_SongSelect = { if (message.lineDelimiterCount !== 0) { writer.uint32(32).int32(message.lineDelimiterCount); } - if (message.didOpenEditView === true) { + if (message.didOpenEditView !== false) { writer.uint32(40).bool(message.didOpenEditView); } return writer; @@ -26489,7 +26489,7 @@ export const Analytics_Import_SongSelect = { message.templateSlideTextElementCount, ); } - if (message.importIntoPlaylist === true) { + if (message.importIntoPlaylist !== false) { obj.importIntoPlaylist = message.importIntoPlaylist; } if (message.lineDelimiter !== 0) { @@ -26500,7 +26500,7 @@ export const Analytics_Import_SongSelect = { if (message.lineDelimiterCount !== 0) { obj.lineDelimiterCount = Math.round(message.lineDelimiterCount); } - if (message.didOpenEditView === true) { + if (message.didOpenEditView !== false) { obj.didOpenEditView = message.didOpenEditView; } return obj; diff --git a/proto/analyticsCapture.ts b/proto/analyticsCapture.ts index 9e1826c..6304a86 100644 --- a/proto/analyticsCapture.ts +++ b/proto/analyticsCapture.ts @@ -537,7 +537,7 @@ export const Capture_Start_RTMP = { writer.uint32(34).fork(), ).ldelim(); } - if (message.streamStarted === true) { + if (message.streamStarted !== false) { writer.uint32(40).bool(message.streamStarted); } if (message.videoBitrate !== 0) { @@ -641,7 +641,7 @@ export const Capture_Start_RTMP = { if (message.resolution !== undefined) { obj.resolution = Capture_Resolution.toJSON(message.resolution); } - if (message.streamStarted === true) { + if (message.streamStarted !== false) { obj.streamStarted = message.streamStarted; } if (message.videoBitrate !== 0) { @@ -699,7 +699,7 @@ export const Capture_Start_Disk = { writer.uint32(26).fork(), ).ldelim(); } - if (message.streamStarted === true) { + if (message.streamStarted !== false) { writer.uint32(32).bool(message.streamStarted); } if (message.videoBitrate !== 0) { @@ -792,7 +792,7 @@ export const Capture_Start_Disk = { if (message.resolution !== undefined) { obj.resolution = Capture_Resolution.toJSON(message.resolution); } - if (message.streamStarted === true) { + if (message.streamStarted !== false) { obj.streamStarted = message.streamStarted; } if (message.videoBitrate !== 0) { @@ -849,7 +849,7 @@ export const Capture_Start_Resi = { writer.uint32(26).fork(), ).ldelim(); } - if (message.streamStarted === true) { + if (message.streamStarted !== false) { writer.uint32(32).bool(message.streamStarted); } if (message.videoBitrate !== 0) { @@ -942,7 +942,7 @@ export const Capture_Start_Resi = { if (message.resolution !== undefined) { obj.resolution = Capture_Resolution.toJSON(message.resolution); } - if (message.streamStarted === true) { + if (message.streamStarted !== false) { obj.streamStarted = message.streamStarted; } if (message.videoBitrate !== 0) { diff --git a/proto/analyticsImport.ts b/proto/analyticsImport.ts index 30a1571..7267a03 100644 --- a/proto/analyticsImport.ts +++ b/proto/analyticsImport.ts @@ -178,7 +178,7 @@ export const Import_SongSelect = { if (message.templateSlideTextElementCount !== 0) { writer.uint32(8).int32(message.templateSlideTextElementCount); } - if (message.importIntoPlaylist === true) { + if (message.importIntoPlaylist !== false) { writer.uint32(16).bool(message.importIntoPlaylist); } if (message.lineDelimiter !== 0) { @@ -187,7 +187,7 @@ export const Import_SongSelect = { if (message.lineDelimiterCount !== 0) { writer.uint32(32).int32(message.lineDelimiterCount); } - if (message.didOpenEditView === true) { + if (message.didOpenEditView !== false) { writer.uint32(40).bool(message.didOpenEditView); } return writer; @@ -272,7 +272,7 @@ export const Import_SongSelect = { message.templateSlideTextElementCount, ); } - if (message.importIntoPlaylist === true) { + if (message.importIntoPlaylist !== false) { obj.importIntoPlaylist = message.importIntoPlaylist; } if (message.lineDelimiter !== 0) { @@ -283,7 +283,7 @@ export const Import_SongSelect = { if (message.lineDelimiterCount !== 0) { obj.lineDelimiterCount = Math.round(message.lineDelimiterCount); } - if (message.didOpenEditView === true) { + if (message.didOpenEditView !== false) { obj.didOpenEditView = message.didOpenEditView; } return obj; diff --git a/proto/analyticsMultiTracks.ts b/proto/analyticsMultiTracks.ts index c046f4f..c5e2246 100644 --- a/proto/analyticsMultiTracks.ts +++ b/proto/analyticsMultiTracks.ts @@ -285,7 +285,7 @@ export const MultiTracks_Import = { writer.uint32(10).fork(), ).ldelim(); } - if (message.chartsAutomation === true) { + if (message.chartsAutomation !== false) { writer.uint32(16).bool(message.chartsAutomation); } if (message.lines !== 0) { @@ -349,7 +349,7 @@ export const MultiTracks_Import = { if (message.account !== undefined) { obj.account = MultiTracks_Account.toJSON(message.account); } - if (message.chartsAutomation === true) { + if (message.chartsAutomation !== false) { obj.chartsAutomation = message.chartsAutomation; } if (message.lines !== 0) { diff --git a/proto/analyticsProContent.ts b/proto/analyticsProContent.ts index 49c5e0c..e432ac9 100644 --- a/proto/analyticsProContent.ts +++ b/proto/analyticsProContent.ts @@ -179,7 +179,7 @@ export const ProContent_Download = { message: ProContent_Download, writer: _m0.Writer = _m0.Writer.create(), ): _m0.Writer { - if (message.isRetry === true) { + if (message.isRetry !== false) { writer.uint32(8).bool(message.isRetry); } return writer; @@ -219,7 +219,7 @@ export const ProContent_Download = { toJSON(message: ProContent_Download): unknown { const obj: any = {}; - if (message.isRetry === true) { + if (message.isRetry !== false) { obj.isRetry = message.isRetry; } return obj; diff --git a/proto/analyticsStartup.proto b/proto/analyticsStartup.proto index 66b6f28..dbeb1e7 100755 --- a/proto/analyticsStartup.proto +++ b/proto/analyticsStartup.proto @@ -265,6 +265,9 @@ message Startup { int32 props_count = 16; int32 stage_layout_count = 17; int32 macros_count = 18; + int32 macros_collections_count = 19; + int32 macros_custom_icons = 20; + bool ubiquitous_show_directory = 21; } message Themes { diff --git a/proto/analyticsStartup.ts b/proto/analyticsStartup.ts index 4ad6ff8..12ba3d0 100644 --- a/proto/analyticsStartup.ts +++ b/proto/analyticsStartup.ts @@ -909,6 +909,9 @@ export interface Startup_Content { propsCount: number; stageLayoutCount: number; macrosCount: number; + macrosCollectionsCount: number; + macrosCustomIcons: number; + ubiquitousShowDirectory: boolean; } export interface Startup_Themes { @@ -1870,10 +1873,10 @@ export const Startup_ScreenConfiguration_Output = { if (message.outputType !== 0) { writer.uint32(16).int32(message.outputType); } - if (message.colorCorrectionEnabled === true) { + if (message.colorCorrectionEnabled !== false) { writer.uint32(24).bool(message.colorCorrectionEnabled); } - if (message.cornerPinEnabled === true) { + if (message.cornerPinEnabled !== false) { writer.uint32(32).bool(message.cornerPinEnabled); } if (message.alignment !== 0) { @@ -2015,10 +2018,10 @@ export const Startup_ScreenConfiguration_Output = { message.outputType, ); } - if (message.colorCorrectionEnabled === true) { + if (message.colorCorrectionEnabled !== false) { obj.colorCorrectionEnabled = message.colorCorrectionEnabled; } - if (message.cornerPinEnabled === true) { + if (message.cornerPinEnabled !== false) { obj.cornerPinEnabled = message.cornerPinEnabled; } if (message.alignment !== 0) { @@ -2074,7 +2077,7 @@ export const Startup_ScreenConfiguration_Single = { if (message.screenType !== 0) { writer.uint32(8).int32(message.screenType); } - if (message.screenColorEnabled === true) { + if (message.screenColorEnabled !== false) { writer.uint32(16).bool(message.screenColorEnabled); } return writer; @@ -2132,7 +2135,7 @@ export const Startup_ScreenConfiguration_Single = { message.screenType, ); } - if (message.screenColorEnabled === true) { + if (message.screenColorEnabled !== false) { obj.screenColorEnabled = message.screenColorEnabled; } return obj; @@ -2165,7 +2168,7 @@ export const Startup_ScreenConfiguration_Mirrored = { if (message.screenType !== 0) { writer.uint32(8).int32(message.screenType); } - if (message.screenColorEnabled === true) { + if (message.screenColorEnabled !== false) { writer.uint32(16).bool(message.screenColorEnabled); } if (message.count !== 0) { @@ -2234,7 +2237,7 @@ export const Startup_ScreenConfiguration_Mirrored = { message.screenType, ); } - if (message.screenColorEnabled === true) { + if (message.screenColorEnabled !== false) { obj.screenColorEnabled = message.screenColorEnabled; } if (message.count !== 0) { @@ -2273,7 +2276,7 @@ export const Startup_ScreenConfiguration_EdgeBlend = { if (message.screenType !== 0) { writer.uint32(8).int32(message.screenType); } - if (message.screenColorEnabled === true) { + if (message.screenColorEnabled !== false) { writer.uint32(16).bool(message.screenColorEnabled); } if (message.count !== 0) { @@ -2342,7 +2345,7 @@ export const Startup_ScreenConfiguration_EdgeBlend = { message.screenType, ); } - if (message.screenColorEnabled === true) { + if (message.screenColorEnabled !== false) { obj.screenColorEnabled = message.screenColorEnabled; } if (message.count !== 0) { @@ -2381,7 +2384,7 @@ export const Startup_ScreenConfiguration_Grouped = { if (message.screenType !== 0) { writer.uint32(8).int32(message.screenType); } - if (message.screenColorEnabled === true) { + if (message.screenColorEnabled !== false) { writer.uint32(16).bool(message.screenColorEnabled); } if (message.columns !== 0) { @@ -2461,7 +2464,7 @@ export const Startup_ScreenConfiguration_Grouped = { message.screenType, ); } - if (message.screenColorEnabled === true) { + if (message.screenColorEnabled !== false) { obj.screenColorEnabled = message.screenColorEnabled; } if (message.columns !== 0) { @@ -2607,31 +2610,31 @@ export const Startup_Preferences = { message: Startup_Preferences, writer: _m0.Writer = _m0.Writer.create(), ): _m0.Writer { - if (message.houseOfWorship === true) { + if (message.houseOfWorship !== false) { writer.uint32(8).bool(message.houseOfWorship); } - if (message.hasCustomLogo === true) { + if (message.hasCustomLogo !== false) { writer.uint32(16).bool(message.hasCustomLogo); } - if (message.copyrightEnabled === true) { + if (message.copyrightEnabled !== false) { writer.uint32(24).bool(message.copyrightEnabled); } if (message.copyrightStyle !== 0) { writer.uint32(32).int32(message.copyrightStyle); } - if (message.copyrightHasLicense === true) { + if (message.copyrightHasLicense !== false) { writer.uint32(40).bool(message.copyrightHasLicense); } if (message.renderMode !== 0) { writer.uint32(48).int32(message.renderMode); } - if (message.suppressAutoStart === true) { + if (message.suppressAutoStart !== false) { writer.uint32(56).bool(message.suppressAutoStart); } - if (message.manageMediaAutomatically === true) { + if (message.manageMediaAutomatically !== false) { writer.uint32(64).bool(message.manageMediaAutomatically); } - if (message.searchPathsRelink === true) { + if (message.searchPathsRelink !== false) { writer.uint32(72).bool(message.searchPathsRelink); } if (message.updateChannel !== 0) { @@ -2764,13 +2767,13 @@ export const Startup_Preferences = { toJSON(message: Startup_Preferences): unknown { const obj: any = {}; - if (message.houseOfWorship === true) { + if (message.houseOfWorship !== false) { obj.houseOfWorship = message.houseOfWorship; } - if (message.hasCustomLogo === true) { + if (message.hasCustomLogo !== false) { obj.hasCustomLogo = message.hasCustomLogo; } - if (message.copyrightEnabled === true) { + if (message.copyrightEnabled !== false) { obj.copyrightEnabled = message.copyrightEnabled; } if (message.copyrightStyle !== 0) { @@ -2778,19 +2781,19 @@ export const Startup_Preferences = { message.copyrightStyle, ); } - if (message.copyrightHasLicense === true) { + if (message.copyrightHasLicense !== false) { obj.copyrightHasLicense = message.copyrightHasLicense; } if (message.renderMode !== 0) { obj.renderMode = startup_Preferences_RenderModeToJSON(message.renderMode); } - if (message.suppressAutoStart === true) { + if (message.suppressAutoStart !== false) { obj.suppressAutoStart = message.suppressAutoStart; } - if (message.manageMediaAutomatically === true) { + if (message.manageMediaAutomatically !== false) { obj.manageMediaAutomatically = message.manageMediaAutomatically; } - if (message.searchPathsRelink === true) { + if (message.searchPathsRelink !== false) { obj.searchPathsRelink = message.searchPathsRelink; } if (message.updateChannel !== 0) { @@ -2838,16 +2841,16 @@ export const Startup_Screens = { message: Startup_Screens, writer: _m0.Writer = _m0.Writer.create(), ): _m0.Writer { - if (message.showScreensLaunch === true) { + if (message.showScreensLaunch !== false) { writer.uint32(8).bool(message.showScreensLaunch); } - if (message.showPerformanceOnScreen === true) { + if (message.showPerformanceOnScreen !== false) { writer.uint32(16).bool(message.showPerformanceOnScreen); } - if (message.ignoreBackgroundColors === true) { + if (message.ignoreBackgroundColors !== false) { writer.uint32(24).bool(message.ignoreBackgroundColors); } - if (message.showKeynotePptScreens === true) { + if (message.showKeynotePptScreens !== false) { writer.uint32(32).bool(message.showKeynotePptScreens); } return writer; @@ -2917,16 +2920,16 @@ export const Startup_Screens = { toJSON(message: Startup_Screens): unknown { const obj: any = {}; - if (message.showScreensLaunch === true) { + if (message.showScreensLaunch !== false) { obj.showScreensLaunch = message.showScreensLaunch; } - if (message.showPerformanceOnScreen === true) { + if (message.showPerformanceOnScreen !== false) { obj.showPerformanceOnScreen = message.showPerformanceOnScreen; } - if (message.ignoreBackgroundColors === true) { + if (message.ignoreBackgroundColors !== false) { obj.ignoreBackgroundColors = message.ignoreBackgroundColors; } - if (message.showKeynotePptScreens === true) { + if (message.showKeynotePptScreens !== false) { obj.showKeynotePptScreens = message.showKeynotePptScreens; } return obj; @@ -2966,25 +2969,25 @@ export const Startup_PlanningCenter = { message: Startup_PlanningCenter, writer: _m0.Writer = _m0.Writer.create(), ): _m0.Writer { - if (message.loggedIn === true) { + if (message.loggedIn !== false) { writer.uint32(8).bool(message.loggedIn); } - if (message.autoUpdate === true) { + if (message.autoUpdate !== false) { writer.uint32(16).bool(message.autoUpdate); } - if (message.matchSongs === true) { + if (message.matchSongs !== false) { writer.uint32(24).bool(message.matchSongs); } - if (message.showHistory === true) { + if (message.showHistory !== false) { writer.uint32(32).bool(message.showHistory); } - if (message.makeArrangements === true) { + if (message.makeArrangements !== false) { writer.uint32(40).bool(message.makeArrangements); } - if (message.autoUpload === true) { + if (message.autoUpload !== false) { writer.uint32(48).bool(message.autoUpload); } - if (message.autoDownload === true) { + if (message.autoDownload !== false) { writer.uint32(56).bool(message.autoDownload); } return writer; @@ -3087,25 +3090,25 @@ export const Startup_PlanningCenter = { toJSON(message: Startup_PlanningCenter): unknown { const obj: any = {}; - if (message.loggedIn === true) { + if (message.loggedIn !== false) { obj.loggedIn = message.loggedIn; } - if (message.autoUpdate === true) { + if (message.autoUpdate !== false) { obj.autoUpdate = message.autoUpdate; } - if (message.matchSongs === true) { + if (message.matchSongs !== false) { obj.matchSongs = message.matchSongs; } - if (message.showHistory === true) { + if (message.showHistory !== false) { obj.showHistory = message.showHistory; } - if (message.makeArrangements === true) { + if (message.makeArrangements !== false) { obj.makeArrangements = message.makeArrangements; } - if (message.autoUpload === true) { + if (message.autoUpload !== false) { obj.autoUpload = message.autoUpload; } - if (message.autoDownload === true) { + if (message.autoDownload !== false) { obj.autoDownload = message.autoDownload; } return obj; @@ -3140,7 +3143,7 @@ export const Startup_SongSelect = { message: Startup_SongSelect, writer: _m0.Writer = _m0.Writer.create(), ): _m0.Writer { - if (message.loggedIn === true) { + if (message.loggedIn !== false) { writer.uint32(8).bool(message.loggedIn); } return writer; @@ -3180,7 +3183,7 @@ export const Startup_SongSelect = { toJSON(message: Startup_SongSelect): unknown { const obj: any = {}; - if (message.loggedIn === true) { + if (message.loggedIn !== false) { obj.loggedIn = message.loggedIn; } return obj; @@ -3237,7 +3240,7 @@ export const Startup_Audio = { if (message.mainDelay !== 0) { writer.uint32(48).int32(message.mainDelay); } - if (message.sdiNdi === true) { + if (message.sdiNdi !== false) { writer.uint32(56).bool(message.sdiNdi); } if (message.sdiNdiRouting !== 0) { @@ -3381,7 +3384,7 @@ export const Startup_Audio = { if (message.mainDelay !== 0) { obj.mainDelay = Math.round(message.mainDelay); } - if (message.sdiNdi === true) { + if (message.sdiNdi !== false) { obj.sdiNdi = message.sdiNdi; } if (message.sdiNdiRouting !== 0) { @@ -3498,7 +3501,7 @@ export const Startup_Resi = { message: Startup_Resi, writer: _m0.Writer = _m0.Writer.create(), ): _m0.Writer { - if (message.loggedIn === true) { + if (message.loggedIn !== false) { writer.uint32(8).bool(message.loggedIn); } return writer; @@ -3538,7 +3541,7 @@ export const Startup_Resi = { toJSON(message: Startup_Resi): unknown { const obj: any = {}; - if (message.loggedIn === true) { + if (message.loggedIn !== false) { obj.loggedIn = message.loggedIn; } return obj; @@ -3591,7 +3594,7 @@ export const Startup_Interface = { if (message.audioOutline !== 0) { writer.uint32(24).int32(message.audioOutline); } - if (message.continuousPlaylist === true) { + if (message.continuousPlaylist !== false) { writer.uint32(32).bool(message.continuousPlaylist); } if (message.mediaBin !== 0) { @@ -3621,7 +3624,7 @@ export const Startup_Interface = { if (message.mediaTransition !== '') { writer.uint32(106).string(message.mediaTransition); } - if (message.audioShuffle === true) { + if (message.audioShuffle !== false) { writer.uint32(112).bool(message.audioShuffle); } return writer; @@ -3808,7 +3811,7 @@ export const Startup_Interface = { message.audioOutline, ); } - if (message.continuousPlaylist === true) { + if (message.continuousPlaylist !== false) { obj.continuousPlaylist = message.continuousPlaylist; } if (message.mediaBin !== 0) { @@ -3848,7 +3851,7 @@ export const Startup_Interface = { if (message.mediaTransition !== '') { obj.mediaTransition = message.mediaTransition; } - if (message.audioShuffle === true) { + if (message.audioShuffle !== false) { obj.audioShuffle = message.audioShuffle; } return obj; @@ -3903,6 +3906,9 @@ function createBaseStartup_Content(): Startup_Content { propsCount: 0, stageLayoutCount: 0, macrosCount: 0, + macrosCollectionsCount: 0, + macrosCustomIcons: 0, + ubiquitousShowDirectory: false, }; } @@ -3965,6 +3971,15 @@ export const Startup_Content = { if (message.macrosCount !== 0) { writer.uint32(144).int32(message.macrosCount); } + if (message.macrosCollectionsCount !== 0) { + writer.uint32(152).int32(message.macrosCollectionsCount); + } + if (message.macrosCustomIcons !== 0) { + writer.uint32(160).int32(message.macrosCustomIcons); + } + if (message.ubiquitousShowDirectory !== false) { + writer.uint32(168).bool(message.ubiquitousShowDirectory); + } return writer; }, @@ -4102,6 +4117,27 @@ export const Startup_Content = { message.macrosCount = reader.int32(); continue; + case 19: + if (tag !== 152) { + break; + } + + message.macrosCollectionsCount = reader.int32(); + continue; + case 20: + if (tag !== 160) { + break; + } + + message.macrosCustomIcons = reader.int32(); + continue; + case 21: + if (tag !== 168) { + break; + } + + message.ubiquitousShowDirectory = reader.bool(); + continue; } if ((tag & 7) === 4 || tag === 0) { break; @@ -4167,6 +4203,15 @@ export const Startup_Content = { macrosCount: isSet(object.macrosCount) ? globalThis.Number(object.macrosCount) : 0, + macrosCollectionsCount: isSet(object.macrosCollectionsCount) + ? globalThis.Number(object.macrosCollectionsCount) + : 0, + macrosCustomIcons: isSet(object.macrosCustomIcons) + ? globalThis.Number(object.macrosCustomIcons) + : 0, + ubiquitousShowDirectory: isSet(object.ubiquitousShowDirectory) + ? globalThis.Boolean(object.ubiquitousShowDirectory) + : false, }; }, @@ -4242,6 +4287,15 @@ export const Startup_Content = { if (message.macrosCount !== 0) { obj.macrosCount = Math.round(message.macrosCount); } + if (message.macrosCollectionsCount !== 0) { + obj.macrosCollectionsCount = Math.round(message.macrosCollectionsCount); + } + if (message.macrosCustomIcons !== 0) { + obj.macrosCustomIcons = Math.round(message.macrosCustomIcons); + } + if (message.ubiquitousShowDirectory !== false) { + obj.ubiquitousShowDirectory = message.ubiquitousShowDirectory; + } return obj; }, @@ -4275,6 +4329,9 @@ export const Startup_Content = { message.propsCount = object.propsCount ?? 0; message.stageLayoutCount = object.stageLayoutCount ?? 0; message.macrosCount = object.macrosCount ?? 0; + message.macrosCollectionsCount = object.macrosCollectionsCount ?? 0; + message.macrosCustomIcons = object.macrosCustomIcons ?? 0; + message.ubiquitousShowDirectory = object.ubiquitousShowDirectory ?? false; return message; }, }; @@ -4778,7 +4835,7 @@ export const Startup_NetworkLink = { message: Startup_NetworkLink, writer: _m0.Writer = _m0.Writer.create(), ): _m0.Writer { - if (message.enabled === true) { + if (message.enabled !== false) { writer.uint32(8).bool(message.enabled); } if (message.memberCount !== 0) { @@ -4831,7 +4888,7 @@ export const Startup_NetworkLink = { toJSON(message: Startup_NetworkLink): unknown { const obj: any = {}; - if (message.enabled === true) { + if (message.enabled !== false) { obj.enabled = message.enabled; } if (message.memberCount !== 0) { diff --git a/proto/analyticsSync.ts b/proto/analyticsSync.ts index c893f56..2c2e726 100644 --- a/proto/analyticsSync.ts +++ b/proto/analyticsSync.ts @@ -135,22 +135,22 @@ export const Sync_Local = { if (message.syncType !== 0) { writer.uint32(8).int32(message.syncType); } - if (message.includeLibrary === true) { + if (message.includeLibrary !== false) { writer.uint32(16).bool(message.includeLibrary); } - if (message.includeMedia === true) { + if (message.includeMedia !== false) { writer.uint32(24).bool(message.includeMedia); } - if (message.includePlaylists === true) { + if (message.includePlaylists !== false) { writer.uint32(32).bool(message.includePlaylists); } - if (message.includeThemes === true) { + if (message.includeThemes !== false) { writer.uint32(40).bool(message.includeThemes); } - if (message.includeSupportFiles === true) { + if (message.includeSupportFiles !== false) { writer.uint32(48).bool(message.includeSupportFiles); } - if (message.replaceFiles === true) { + if (message.replaceFiles !== false) { writer.uint32(56).bool(message.replaceFiles); } return writer; @@ -253,22 +253,22 @@ export const Sync_Local = { if (message.syncType !== 0) { obj.syncType = sync_Local_SyncTypeToJSON(message.syncType); } - if (message.includeLibrary === true) { + if (message.includeLibrary !== false) { obj.includeLibrary = message.includeLibrary; } - if (message.includeMedia === true) { + if (message.includeMedia !== false) { obj.includeMedia = message.includeMedia; } - if (message.includePlaylists === true) { + if (message.includePlaylists !== false) { obj.includePlaylists = message.includePlaylists; } - if (message.includeThemes === true) { + if (message.includeThemes !== false) { obj.includeThemes = message.includeThemes; } - if (message.includeSupportFiles === true) { + if (message.includeSupportFiles !== false) { obj.includeSupportFiles = message.includeSupportFiles; } - if (message.replaceFiles === true) { + if (message.replaceFiles !== false) { obj.replaceFiles = message.replaceFiles; } return obj; diff --git a/proto/analyticsTimecode.ts b/proto/analyticsTimecode.ts index 4a7ef24..139bfdc 100644 --- a/proto/analyticsTimecode.ts +++ b/proto/analyticsTimecode.ts @@ -127,13 +127,13 @@ export const Timecode_Startup = { message: Timecode_Startup, writer: _m0.Writer = _m0.Writer.create(), ): _m0.Writer { - if (message.isInputConfigured === true) { + if (message.isInputConfigured !== false) { writer.uint32(8).bool(message.isInputConfigured); } - if (message.isEnabled === true) { + if (message.isEnabled !== false) { writer.uint32(16).bool(message.isEnabled); } - if (message.isPlaylistSelected === true) { + if (message.isPlaylistSelected !== false) { writer.uint32(24).bool(message.isPlaylistSelected); } return writer; @@ -193,13 +193,13 @@ export const Timecode_Startup = { toJSON(message: Timecode_Startup): unknown { const obj: any = {}; - if (message.isInputConfigured === true) { + if (message.isInputConfigured !== false) { obj.isInputConfigured = message.isInputConfigured; } - if (message.isEnabled === true) { + if (message.isEnabled !== false) { obj.isEnabled = message.isEnabled; } - if (message.isPlaylistSelected === true) { + if (message.isPlaylistSelected !== false) { obj.isPlaylistSelected = message.isPlaylistSelected; } return obj; @@ -236,7 +236,7 @@ export const Timecode_Activate = { if (message.cueCount !== 0) { writer.uint32(16).int32(message.cueCount); } - if (message.isStartup === true) { + if (message.isStartup !== false) { writer.uint32(24).bool(message.isStartup); } return writer; @@ -300,7 +300,7 @@ export const Timecode_Activate = { if (message.cueCount !== 0) { obj.cueCount = Math.round(message.cueCount); } - if (message.isStartup === true) { + if (message.isStartup !== false) { obj.isStartup = message.isStartup; } return obj; diff --git a/proto/analyticsTrigger.proto b/proto/analyticsTrigger.proto index e3e4df5..ced3239 100755 --- a/proto/analyticsTrigger.proto +++ b/proto/analyticsTrigger.proto @@ -95,6 +95,20 @@ message Trigger { message Action { message ClearLayer { + enum ClearLayerType { + CLEAR_LAYER_TYPE_UNKNOWN = 0; + CLEAR_LAYER_TYPE_AUDIO = 1; + CLEAR_LAYER_TYPE_MESSAGES = 2; + CLEAR_LAYER_TYPE_PROPS = 3; + CLEAR_LAYER_TYPE_ANNOUNCEMENTS = 4; + CLEAR_LAYER_TYPE_SLIDE = 5; + CLEAR_LAYER_TYPE_MEDIA = 6; + CLEAR_LAYER_TYPE_VIDEO_INPUT = 7; + CLEAR_LAYER_TYPE_CLEAR_TO_LOGO = 8; + CLEAR_LAYER_TYPE_CLEAR_GROUP = 9; + } + + .rv.analytics.Trigger.Action.ClearLayer.ClearLayerType type = 1; } message MediaBinPlaylist { @@ -221,11 +235,36 @@ message Trigger { message AudioBin { } + message TestPattern { + enum TestPatternType { + TEST_PATTERN_TYPE_AUDIO_VIDEO_SYNC = 0; + TEST_PATTERN_TYPE_BLEND_GRID = 1; + TEST_PATTERN_TYPE_COLOR_BARS = 2; + TEST_PATTERN_TYPE_CUSTOM_COLORS = 3; + TEST_PATTERN_TYPE_FOCUS = 4; + TEST_PATTERN_TYPE_GRAY_SCALE = 5; + TEST_PATTERN_TYPE_LINES = 6; + TEST_PATTERN_TYPE_LOGO_BOUNCE = 7; + TEST_PATTERN_TYPE_RADAR = 8; + TEST_PATTERN_TYPE_TEXT = 9; + } + + enum LogoType { + LOGO_TYPE_NONE = 0; + LOGO_TYPE_PROPRESENTER = 1; + LOGO_TYPE_CUSTOM = 2; + } + + .rv.analytics.Trigger.TestPattern.TestPatternType test_pattern_type = 1; + .rv.analytics.Trigger.TestPattern.LogoType logo = 2; + } + oneof Component { .rv.analytics.Trigger.Cue cue = 1; .rv.analytics.Trigger.Action action = 2; .rv.analytics.Trigger.MediaBin media_bin = 3; .rv.analytics.Trigger.AudioBin audio_bin = 4; + .rv.analytics.Trigger.TestPattern test_pattern = 5; } } diff --git a/proto/analyticsTrigger.ts b/proto/analyticsTrigger.ts index 3405cbf..3bde02c 100644 --- a/proto/analyticsTrigger.ts +++ b/proto/analyticsTrigger.ts @@ -9,6 +9,7 @@ export interface Trigger { action?: Trigger_Action | undefined; mediaBin?: Trigger_MediaBin | undefined; audioBin?: Trigger_AudioBin | undefined; + testPattern?: Trigger_TestPattern | undefined; } export interface Trigger_Cue { @@ -339,7 +340,94 @@ export interface Trigger_Action { captureStop?: Trigger_Action_CaptureStop | undefined; } -export interface Trigger_Action_ClearLayer {} +export interface Trigger_Action_ClearLayer { + type: Trigger_Action_ClearLayer_ClearLayerType; +} + +export enum Trigger_Action_ClearLayer_ClearLayerType { + CLEAR_LAYER_TYPE_UNKNOWN = 0, + CLEAR_LAYER_TYPE_AUDIO = 1, + CLEAR_LAYER_TYPE_MESSAGES = 2, + CLEAR_LAYER_TYPE_PROPS = 3, + CLEAR_LAYER_TYPE_ANNOUNCEMENTS = 4, + CLEAR_LAYER_TYPE_SLIDE = 5, + CLEAR_LAYER_TYPE_MEDIA = 6, + CLEAR_LAYER_TYPE_VIDEO_INPUT = 7, + CLEAR_LAYER_TYPE_CLEAR_TO_LOGO = 8, + CLEAR_LAYER_TYPE_CLEAR_GROUP = 9, + UNRECOGNIZED = -1, +} + +export function trigger_Action_ClearLayer_ClearLayerTypeFromJSON( + object: any, +): Trigger_Action_ClearLayer_ClearLayerType { + switch (object) { + case 0: + case 'CLEAR_LAYER_TYPE_UNKNOWN': + return Trigger_Action_ClearLayer_ClearLayerType.CLEAR_LAYER_TYPE_UNKNOWN; + case 1: + case 'CLEAR_LAYER_TYPE_AUDIO': + return Trigger_Action_ClearLayer_ClearLayerType.CLEAR_LAYER_TYPE_AUDIO; + case 2: + case 'CLEAR_LAYER_TYPE_MESSAGES': + return Trigger_Action_ClearLayer_ClearLayerType.CLEAR_LAYER_TYPE_MESSAGES; + case 3: + case 'CLEAR_LAYER_TYPE_PROPS': + return Trigger_Action_ClearLayer_ClearLayerType.CLEAR_LAYER_TYPE_PROPS; + case 4: + case 'CLEAR_LAYER_TYPE_ANNOUNCEMENTS': + return Trigger_Action_ClearLayer_ClearLayerType.CLEAR_LAYER_TYPE_ANNOUNCEMENTS; + case 5: + case 'CLEAR_LAYER_TYPE_SLIDE': + return Trigger_Action_ClearLayer_ClearLayerType.CLEAR_LAYER_TYPE_SLIDE; + case 6: + case 'CLEAR_LAYER_TYPE_MEDIA': + return Trigger_Action_ClearLayer_ClearLayerType.CLEAR_LAYER_TYPE_MEDIA; + case 7: + case 'CLEAR_LAYER_TYPE_VIDEO_INPUT': + return Trigger_Action_ClearLayer_ClearLayerType.CLEAR_LAYER_TYPE_VIDEO_INPUT; + case 8: + case 'CLEAR_LAYER_TYPE_CLEAR_TO_LOGO': + return Trigger_Action_ClearLayer_ClearLayerType.CLEAR_LAYER_TYPE_CLEAR_TO_LOGO; + case 9: + case 'CLEAR_LAYER_TYPE_CLEAR_GROUP': + return Trigger_Action_ClearLayer_ClearLayerType.CLEAR_LAYER_TYPE_CLEAR_GROUP; + case -1: + case 'UNRECOGNIZED': + default: + return Trigger_Action_ClearLayer_ClearLayerType.UNRECOGNIZED; + } +} + +export function trigger_Action_ClearLayer_ClearLayerTypeToJSON( + object: Trigger_Action_ClearLayer_ClearLayerType, +): string { + switch (object) { + case Trigger_Action_ClearLayer_ClearLayerType.CLEAR_LAYER_TYPE_UNKNOWN: + return 'CLEAR_LAYER_TYPE_UNKNOWN'; + case Trigger_Action_ClearLayer_ClearLayerType.CLEAR_LAYER_TYPE_AUDIO: + return 'CLEAR_LAYER_TYPE_AUDIO'; + case Trigger_Action_ClearLayer_ClearLayerType.CLEAR_LAYER_TYPE_MESSAGES: + return 'CLEAR_LAYER_TYPE_MESSAGES'; + case Trigger_Action_ClearLayer_ClearLayerType.CLEAR_LAYER_TYPE_PROPS: + return 'CLEAR_LAYER_TYPE_PROPS'; + case Trigger_Action_ClearLayer_ClearLayerType.CLEAR_LAYER_TYPE_ANNOUNCEMENTS: + return 'CLEAR_LAYER_TYPE_ANNOUNCEMENTS'; + case Trigger_Action_ClearLayer_ClearLayerType.CLEAR_LAYER_TYPE_SLIDE: + return 'CLEAR_LAYER_TYPE_SLIDE'; + case Trigger_Action_ClearLayer_ClearLayerType.CLEAR_LAYER_TYPE_MEDIA: + return 'CLEAR_LAYER_TYPE_MEDIA'; + case Trigger_Action_ClearLayer_ClearLayerType.CLEAR_LAYER_TYPE_VIDEO_INPUT: + return 'CLEAR_LAYER_TYPE_VIDEO_INPUT'; + case Trigger_Action_ClearLayer_ClearLayerType.CLEAR_LAYER_TYPE_CLEAR_TO_LOGO: + return 'CLEAR_LAYER_TYPE_CLEAR_TO_LOGO'; + case Trigger_Action_ClearLayer_ClearLayerType.CLEAR_LAYER_TYPE_CLEAR_GROUP: + return 'CLEAR_LAYER_TYPE_CLEAR_GROUP'; + case Trigger_Action_ClearLayer_ClearLayerType.UNRECOGNIZED: + default: + return 'UNRECOGNIZED'; + } +} export interface Trigger_Action_MediaBinPlaylist {} @@ -614,12 +702,146 @@ export interface Trigger_MediaBin {} export interface Trigger_AudioBin {} +export interface Trigger_TestPattern { + testPatternType: Trigger_TestPattern_TestPatternType; + logo: Trigger_TestPattern_LogoType; +} + +export enum Trigger_TestPattern_TestPatternType { + TEST_PATTERN_TYPE_AUDIO_VIDEO_SYNC = 0, + TEST_PATTERN_TYPE_BLEND_GRID = 1, + TEST_PATTERN_TYPE_COLOR_BARS = 2, + TEST_PATTERN_TYPE_CUSTOM_COLORS = 3, + TEST_PATTERN_TYPE_FOCUS = 4, + TEST_PATTERN_TYPE_GRAY_SCALE = 5, + TEST_PATTERN_TYPE_LINES = 6, + TEST_PATTERN_TYPE_LOGO_BOUNCE = 7, + TEST_PATTERN_TYPE_RADAR = 8, + TEST_PATTERN_TYPE_TEXT = 9, + UNRECOGNIZED = -1, +} + +export function trigger_TestPattern_TestPatternTypeFromJSON( + object: any, +): Trigger_TestPattern_TestPatternType { + switch (object) { + case 0: + case 'TEST_PATTERN_TYPE_AUDIO_VIDEO_SYNC': + return Trigger_TestPattern_TestPatternType.TEST_PATTERN_TYPE_AUDIO_VIDEO_SYNC; + case 1: + case 'TEST_PATTERN_TYPE_BLEND_GRID': + return Trigger_TestPattern_TestPatternType.TEST_PATTERN_TYPE_BLEND_GRID; + case 2: + case 'TEST_PATTERN_TYPE_COLOR_BARS': + return Trigger_TestPattern_TestPatternType.TEST_PATTERN_TYPE_COLOR_BARS; + case 3: + case 'TEST_PATTERN_TYPE_CUSTOM_COLORS': + return Trigger_TestPattern_TestPatternType.TEST_PATTERN_TYPE_CUSTOM_COLORS; + case 4: + case 'TEST_PATTERN_TYPE_FOCUS': + return Trigger_TestPattern_TestPatternType.TEST_PATTERN_TYPE_FOCUS; + case 5: + case 'TEST_PATTERN_TYPE_GRAY_SCALE': + return Trigger_TestPattern_TestPatternType.TEST_PATTERN_TYPE_GRAY_SCALE; + case 6: + case 'TEST_PATTERN_TYPE_LINES': + return Trigger_TestPattern_TestPatternType.TEST_PATTERN_TYPE_LINES; + case 7: + case 'TEST_PATTERN_TYPE_LOGO_BOUNCE': + return Trigger_TestPattern_TestPatternType.TEST_PATTERN_TYPE_LOGO_BOUNCE; + case 8: + case 'TEST_PATTERN_TYPE_RADAR': + return Trigger_TestPattern_TestPatternType.TEST_PATTERN_TYPE_RADAR; + case 9: + case 'TEST_PATTERN_TYPE_TEXT': + return Trigger_TestPattern_TestPatternType.TEST_PATTERN_TYPE_TEXT; + case -1: + case 'UNRECOGNIZED': + default: + return Trigger_TestPattern_TestPatternType.UNRECOGNIZED; + } +} + +export function trigger_TestPattern_TestPatternTypeToJSON( + object: Trigger_TestPattern_TestPatternType, +): string { + switch (object) { + case Trigger_TestPattern_TestPatternType.TEST_PATTERN_TYPE_AUDIO_VIDEO_SYNC: + return 'TEST_PATTERN_TYPE_AUDIO_VIDEO_SYNC'; + case Trigger_TestPattern_TestPatternType.TEST_PATTERN_TYPE_BLEND_GRID: + return 'TEST_PATTERN_TYPE_BLEND_GRID'; + case Trigger_TestPattern_TestPatternType.TEST_PATTERN_TYPE_COLOR_BARS: + return 'TEST_PATTERN_TYPE_COLOR_BARS'; + case Trigger_TestPattern_TestPatternType.TEST_PATTERN_TYPE_CUSTOM_COLORS: + return 'TEST_PATTERN_TYPE_CUSTOM_COLORS'; + case Trigger_TestPattern_TestPatternType.TEST_PATTERN_TYPE_FOCUS: + return 'TEST_PATTERN_TYPE_FOCUS'; + case Trigger_TestPattern_TestPatternType.TEST_PATTERN_TYPE_GRAY_SCALE: + return 'TEST_PATTERN_TYPE_GRAY_SCALE'; + case Trigger_TestPattern_TestPatternType.TEST_PATTERN_TYPE_LINES: + return 'TEST_PATTERN_TYPE_LINES'; + case Trigger_TestPattern_TestPatternType.TEST_PATTERN_TYPE_LOGO_BOUNCE: + return 'TEST_PATTERN_TYPE_LOGO_BOUNCE'; + case Trigger_TestPattern_TestPatternType.TEST_PATTERN_TYPE_RADAR: + return 'TEST_PATTERN_TYPE_RADAR'; + case Trigger_TestPattern_TestPatternType.TEST_PATTERN_TYPE_TEXT: + return 'TEST_PATTERN_TYPE_TEXT'; + case Trigger_TestPattern_TestPatternType.UNRECOGNIZED: + default: + return 'UNRECOGNIZED'; + } +} + +export enum Trigger_TestPattern_LogoType { + LOGO_TYPE_NONE = 0, + LOGO_TYPE_PROPRESENTER = 1, + LOGO_TYPE_CUSTOM = 2, + UNRECOGNIZED = -1, +} + +export function trigger_TestPattern_LogoTypeFromJSON( + object: any, +): Trigger_TestPattern_LogoType { + switch (object) { + case 0: + case 'LOGO_TYPE_NONE': + return Trigger_TestPattern_LogoType.LOGO_TYPE_NONE; + case 1: + case 'LOGO_TYPE_PROPRESENTER': + return Trigger_TestPattern_LogoType.LOGO_TYPE_PROPRESENTER; + case 2: + case 'LOGO_TYPE_CUSTOM': + return Trigger_TestPattern_LogoType.LOGO_TYPE_CUSTOM; + case -1: + case 'UNRECOGNIZED': + default: + return Trigger_TestPattern_LogoType.UNRECOGNIZED; + } +} + +export function trigger_TestPattern_LogoTypeToJSON( + object: Trigger_TestPattern_LogoType, +): string { + switch (object) { + case Trigger_TestPattern_LogoType.LOGO_TYPE_NONE: + return 'LOGO_TYPE_NONE'; + case Trigger_TestPattern_LogoType.LOGO_TYPE_PROPRESENTER: + return 'LOGO_TYPE_PROPRESENTER'; + case Trigger_TestPattern_LogoType.LOGO_TYPE_CUSTOM: + return 'LOGO_TYPE_CUSTOM'; + case Trigger_TestPattern_LogoType.UNRECOGNIZED: + default: + return 'UNRECOGNIZED'; + } +} + function createBaseTrigger(): Trigger { return { cue: undefined, action: undefined, mediaBin: undefined, audioBin: undefined, + testPattern: undefined, }; } @@ -646,6 +868,12 @@ export const Trigger = { writer.uint32(34).fork(), ).ldelim(); } + if (message.testPattern !== undefined) { + Trigger_TestPattern.encode( + message.testPattern, + writer.uint32(42).fork(), + ).ldelim(); + } return writer; }, @@ -685,6 +913,16 @@ export const Trigger = { message.audioBin = Trigger_AudioBin.decode(reader, reader.uint32()); continue; + case 5: + if (tag !== 42) { + break; + } + + message.testPattern = Trigger_TestPattern.decode( + reader, + reader.uint32(), + ); + continue; } if ((tag & 7) === 4 || tag === 0) { break; @@ -706,6 +944,9 @@ export const Trigger = { audioBin: isSet(object.audioBin) ? Trigger_AudioBin.fromJSON(object.audioBin) : undefined, + testPattern: isSet(object.testPattern) + ? Trigger_TestPattern.fromJSON(object.testPattern) + : undefined, }; }, @@ -723,6 +964,9 @@ export const Trigger = { if (message.audioBin !== undefined) { obj.audioBin = Trigger_AudioBin.toJSON(message.audioBin); } + if (message.testPattern !== undefined) { + obj.testPattern = Trigger_TestPattern.toJSON(message.testPattern); + } return obj; }, @@ -747,6 +991,10 @@ export const Trigger = { object.audioBin !== undefined && object.audioBin !== null ? Trigger_AudioBin.fromPartial(object.audioBin) : undefined; + message.testPattern = + object.testPattern !== undefined && object.testPattern !== null + ? Trigger_TestPattern.fromPartial(object.testPattern) + : undefined; return message; }, }; @@ -1028,7 +1276,7 @@ export const Trigger_Cue_Slide_Trigger = { if (message.actionCount !== 0) { writer.uint32(32).int32(message.actionCount); } - if (message.hasTextFx === true) { + if (message.hasTextFx !== false) { writer.uint32(40).bool(message.hasTextFx); } if (message.mediaTextFillObjectCount !== 0) { @@ -1179,7 +1427,7 @@ export const Trigger_Cue_Slide_Trigger = { if (message.actionCount !== 0) { obj.actionCount = Math.round(message.actionCount); } - if (message.hasTextFx === true) { + if (message.hasTextFx !== false) { obj.hasTextFx = message.hasTextFx; } if (message.mediaTextFillObjectCount !== 0) { @@ -1250,7 +1498,7 @@ export const Trigger_Cue_Slide_ScrollingTextElement = { if (message.startPosition !== 0) { writer.uint32(16).int32(message.startPosition); } - if (message.isRepeatEnabled === true) { + if (message.isRepeatEnabled !== false) { writer.uint32(24).bool(message.isRepeatEnabled); } if (message.speed !== 0) { @@ -1354,7 +1602,7 @@ export const Trigger_Cue_Slide_ScrollingTextElement = { message.startPosition, ); } - if (message.isRepeatEnabled === true) { + if (message.isRepeatEnabled !== false) { obj.isRepeatEnabled = message.isRepeatEnabled; } if (message.speed !== 0) { @@ -1402,7 +1650,7 @@ export const Trigger_Cue_Slide_RSSFeedElement = { if (message.content !== 0) { writer.uint32(8).int32(message.content); } - if (message.isDelimiterEnabled === true) { + if (message.isDelimiterEnabled !== false) { writer.uint32(16).bool(message.isDelimiterEnabled); } if (message.destinationLayer !== 0) { @@ -1473,7 +1721,7 @@ export const Trigger_Cue_Slide_RSSFeedElement = { message.content, ); } - if (message.isDelimiterEnabled === true) { + if (message.isDelimiterEnabled !== false) { obj.isDelimiterEnabled = message.isDelimiterEnabled; } if (message.destinationLayer !== 0) { @@ -2028,14 +2276,17 @@ export const Trigger_Action = { }; function createBaseTrigger_Action_ClearLayer(): Trigger_Action_ClearLayer { - return {}; + return { type: 0 }; } export const Trigger_Action_ClearLayer = { encode( - _: Trigger_Action_ClearLayer, + message: Trigger_Action_ClearLayer, writer: _m0.Writer = _m0.Writer.create(), ): _m0.Writer { + if (message.type !== 0) { + writer.uint32(8).int32(message.type); + } return writer; }, @@ -2050,6 +2301,13 @@ export const Trigger_Action_ClearLayer = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { + case 1: + if (tag !== 8) { + break; + } + + message.type = reader.int32() as any; + continue; } if ((tag & 7) === 4 || tag === 0) { break; @@ -2059,12 +2317,19 @@ export const Trigger_Action_ClearLayer = { return message; }, - fromJSON(_: any): Trigger_Action_ClearLayer { - return {}; + fromJSON(object: any): Trigger_Action_ClearLayer { + return { + type: isSet(object.type) + ? trigger_Action_ClearLayer_ClearLayerTypeFromJSON(object.type) + : 0, + }; }, - toJSON(_: Trigger_Action_ClearLayer): unknown { + toJSON(message: Trigger_Action_ClearLayer): unknown { const obj: any = {}; + if (message.type !== 0) { + obj.type = trigger_Action_ClearLayer_ClearLayerTypeToJSON(message.type); + } return obj; }, @@ -2074,9 +2339,10 @@ export const Trigger_Action_ClearLayer = { return Trigger_Action_ClearLayer.fromPartial(base ?? ({} as any)); }, fromPartial, I>>( - _: I, + object: I, ): Trigger_Action_ClearLayer { const message = createBaseTrigger_Action_ClearLayer(); + message.type = object.type ?? 0; return message; }, }; @@ -3038,25 +3304,25 @@ export const Trigger_Action_ClearGroup = { message: Trigger_Action_ClearGroup, writer: _m0.Writer = _m0.Writer.create(), ): _m0.Writer { - if (message.layerAudio === true) { + if (message.layerAudio !== false) { writer.uint32(8).bool(message.layerAudio); } - if (message.layerMessages === true) { + if (message.layerMessages !== false) { writer.uint32(16).bool(message.layerMessages); } - if (message.layerProps === true) { + if (message.layerProps !== false) { writer.uint32(24).bool(message.layerProps); } - if (message.layerAnnouncement === true) { + if (message.layerAnnouncement !== false) { writer.uint32(32).bool(message.layerAnnouncement); } - if (message.layerSlide === true) { + if (message.layerSlide !== false) { writer.uint32(40).bool(message.layerSlide); } - if (message.layerMedia === true) { + if (message.layerMedia !== false) { writer.uint32(48).bool(message.layerMedia); } - if (message.layerVideoInput === true) { + if (message.layerVideoInput !== false) { writer.uint32(56).bool(message.layerVideoInput); } return writer; @@ -3159,25 +3425,25 @@ export const Trigger_Action_ClearGroup = { toJSON(message: Trigger_Action_ClearGroup): unknown { const obj: any = {}; - if (message.layerAudio === true) { + if (message.layerAudio !== false) { obj.layerAudio = message.layerAudio; } - if (message.layerMessages === true) { + if (message.layerMessages !== false) { obj.layerMessages = message.layerMessages; } - if (message.layerProps === true) { + if (message.layerProps !== false) { obj.layerProps = message.layerProps; } - if (message.layerAnnouncement === true) { + if (message.layerAnnouncement !== false) { obj.layerAnnouncement = message.layerAnnouncement; } - if (message.layerSlide === true) { + if (message.layerSlide !== false) { obj.layerSlide = message.layerSlide; } - if (message.layerMedia === true) { + if (message.layerMedia !== false) { obj.layerMedia = message.layerMedia; } - if (message.layerVideoInput === true) { + if (message.layerVideoInput !== false) { obj.layerVideoInput = message.layerVideoInput; } return obj; @@ -3286,7 +3552,7 @@ export const Trigger_Action_CaptureStop = { message: Trigger_Action_CaptureStop, writer: _m0.Writer = _m0.Writer.create(), ): _m0.Writer { - if (message.confirmBeforeStopping === true) { + if (message.confirmBeforeStopping !== false) { writer.uint32(8).bool(message.confirmBeforeStopping); } return writer; @@ -3329,7 +3595,7 @@ export const Trigger_Action_CaptureStop = { toJSON(message: Trigger_Action_CaptureStop): unknown { const obj: any = {}; - if (message.confirmBeforeStopping === true) { + if (message.confirmBeforeStopping !== false) { obj.confirmBeforeStopping = message.confirmBeforeStopping; } return obj; @@ -3451,6 +3717,94 @@ export const Trigger_AudioBin = { }, }; +function createBaseTrigger_TestPattern(): Trigger_TestPattern { + return { testPatternType: 0, logo: 0 }; +} + +export const Trigger_TestPattern = { + encode( + message: Trigger_TestPattern, + writer: _m0.Writer = _m0.Writer.create(), + ): _m0.Writer { + if (message.testPatternType !== 0) { + writer.uint32(8).int32(message.testPatternType); + } + if (message.logo !== 0) { + writer.uint32(16).int32(message.logo); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): Trigger_TestPattern { + const reader = + input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseTrigger_TestPattern(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 8) { + break; + } + + message.testPatternType = reader.int32() as any; + continue; + case 2: + if (tag !== 16) { + break; + } + + message.logo = reader.int32() as any; + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(object: any): Trigger_TestPattern { + return { + testPatternType: isSet(object.testPatternType) + ? trigger_TestPattern_TestPatternTypeFromJSON(object.testPatternType) + : 0, + logo: isSet(object.logo) + ? trigger_TestPattern_LogoTypeFromJSON(object.logo) + : 0, + }; + }, + + toJSON(message: Trigger_TestPattern): unknown { + const obj: any = {}; + if (message.testPatternType !== 0) { + obj.testPatternType = trigger_TestPattern_TestPatternTypeToJSON( + message.testPatternType, + ); + } + if (message.logo !== 0) { + obj.logo = trigger_TestPattern_LogoTypeToJSON(message.logo); + } + return obj; + }, + + create, I>>( + base?: I, + ): Trigger_TestPattern { + return Trigger_TestPattern.fromPartial(base ?? ({} as any)); + }, + fromPartial, I>>( + object: I, + ): Trigger_TestPattern { + const message = createBaseTrigger_TestPattern(); + message.testPatternType = object.testPatternType ?? 0; + message.logo = object.logo ?? 0; + return message; + }, +}; + type Builtin = | Date | Function diff --git a/proto/analyticsTriggerMedia.proto b/proto/analyticsTriggerMedia.proto index 1089713..c4c6e8a 100755 --- a/proto/analyticsTriggerMedia.proto +++ b/proto/analyticsTriggerMedia.proto @@ -7,7 +7,55 @@ option csharp_namespace = "Pro.SerializationInterop.RVProtoData.Analytics"; option swift_prefix = "Analytics_"; message TriggerMediaInformation { - message Video { + message Transition { + bool is_default = 1; + string name = 2; + } + + message VisualMedia { + message Size { + uint32 width = 1; + uint32 height = 2; + } + + enum Behavior { + BEHAVIOR_BACKGROUND = 0; + BEHAVIOR_FOREGROUND = 1; + BEHAVIOR_VIDEO_INPUT = 2; + } + + enum ScaleMode { + SCALE_MODE_FIT = 0; + SCALE_MODE_FILL = 1; + SCALE_MODE_STRETCH = 2; + SCALE_MODE_BLUR = 3; + } + + enum FlipMode { + FLIP_MODE_NONE = 0; + FLIP_MODE_HORIZONTAL = 1; + FLIP_MODE_VERTICAL = 2; + FLIP_MODE_BOTH = 3; + } + + enum NativeRotation { + NATIVE_ROTATION_STANDARD = 0; + NATIVE_ROTATION_90 = 90; + NATIVE_ROTATION_180 = 180; + NATIVE_ROTATION_270 = 270; + } + + .rv.analytics.TriggerMediaInformation.VisualMedia.Behavior behavior = 1; + .rv.analytics.TriggerMediaInformation.VisualMedia.ScaleMode scale_mode = 2; + .rv.analytics.TriggerMediaInformation.VisualMedia.FlipMode flip_mode = 3; + .rv.analytics.TriggerMediaInformation.VisualMedia.NativeRotation native_rotation = 4; + .rv.analytics.TriggerMediaInformation.VisualMedia.Size resolution = 5; + uint32 enabled_effects_count = 6; + bool has_effect_preset = 7; + .rv.analytics.TriggerMediaInformation.Transition transition = 8; + } + + message Transport { enum DurationRange { DURATION_UNDER_10S = 0; DURATION_10S_TO_30S = 1; @@ -20,38 +68,70 @@ message TriggerMediaInformation { DURATION_OVER_2H = 8; } + .rv.analytics.TriggerMediaInformation.Transport.DurationRange source_duration_range = 1; + bool has_audio_ramp_in = 2; + bool has_audio_ramp_out = 3; + bool has_in_point = 4; + bool has_out_point = 5; + double play_rate = 6; + uint32 playback_marker_count = 7; + } + + message Video { enum PlaybackBehavior { PLAYBACK_BEHAVIOR_STOP = 0; PLAYBACK_BEHAVIOR_LOOP = 1; PLAYBACK_BEHAVIOR_LOOP_FOR_PLAY_COUNT = 2; PLAYBACK_BEHAVIOR_LOOP_FOR_TIME = 3; - PLAYBACK_BEHAVIOR_SOFT_LOOP = 4; - } - - enum ScaleMode { - SCALE_MODE_FIT = 0; - SCALE_MODE_FILL = 1; - SCALE_MODE_STRETCH = 2; } - .rv.analytics.TriggerMediaInformation.Video.DurationRange source_duration_range = 1; - int32 playback_marker_count = 2; - .rv.analytics.TriggerMediaInformation.Video.PlaybackBehavior playback_behavior = 3; - .rv.analytics.TriggerMediaInformation.Video.ScaleMode scale_mode = 4; - bool has_in_point = 5; - bool has_out_point = 6; - bool has_effects = 7; - bool has_transition = 8; - bool has_audio = 9; + .rv.analytics.TriggerMediaInformation.VisualMedia visual_media = 7; + .rv.analytics.TriggerMediaInformation.Video.PlaybackBehavior playback_behavior = 8; + .rv.analytics.TriggerMediaInformation.CompletionTarget completion_target = 9; + bool soft_loop_enabled = 10; + double soft_loop_duration = 11; + double frame_rate = 12; + uint32 audio_channel_count = 13; + .rv.analytics.TriggerMediaInformation.Transport transport = 14; } message Audio { + enum Behavior { + BEHAVIOR_TUNE = 0; + BEHAVIOR_SOUND = 1; + } + + enum PlaybackBehavior { + PLAYBACK_BEHAVIOR_STOP = 0; + PLAYBACK_BEHAVIOR_LOOP = 1; + PLAYBACK_BEHAVIOR_NEXT = 2; + } + + .rv.analytics.TriggerMediaInformation.Audio.Behavior behavior = 1; + .rv.analytics.TriggerMediaInformation.Audio.PlaybackBehavior playback_behavior = 2; + .rv.analytics.TriggerMediaInformation.Transition transition = 3; + uint32 audio_channel_count = 4; + .rv.analytics.TriggerMediaInformation.Transport transport = 5; } message Image { + .rv.analytics.TriggerMediaInformation.VisualMedia visual_media = 1; + .rv.analytics.TriggerMediaInformation.Transition transition = 2; + .rv.analytics.TriggerMediaInformation.CompletionTarget completion_target = 3; } message LiveVideo { + .rv.analytics.TriggerMediaInformation.VisualMedia visual_media = 1; + double frame_rate = 2; + uint32 audio_channel_count = 3; + } + + enum CompletionTarget { + COMPLETION_TARGET_NONE = 0; + COMPLETION_TARGET_NEXT = 1; + COMPLETION_TARGET_RANDOM = 2; + COMPLETION_TARGET_CUE = 3; + COMPLETION_TARGET_FIRST = 4; } enum SourceType { diff --git a/proto/analyticsTriggerMedia.ts b/proto/analyticsTriggerMedia.ts index 91b405a..6fa98f5 100644 --- a/proto/analyticsTriggerMedia.ts +++ b/proto/analyticsTriggerMedia.ts @@ -11,6 +11,61 @@ export interface TriggerMediaInformation { liveVideo?: TriggerMediaInformation_LiveVideo | undefined; } +export enum TriggerMediaInformation_CompletionTarget { + COMPLETION_TARGET_NONE = 0, + COMPLETION_TARGET_NEXT = 1, + COMPLETION_TARGET_RANDOM = 2, + COMPLETION_TARGET_CUE = 3, + COMPLETION_TARGET_FIRST = 4, + UNRECOGNIZED = -1, +} + +export function triggerMediaInformation_CompletionTargetFromJSON( + object: any, +): TriggerMediaInformation_CompletionTarget { + switch (object) { + case 0: + case 'COMPLETION_TARGET_NONE': + return TriggerMediaInformation_CompletionTarget.COMPLETION_TARGET_NONE; + case 1: + case 'COMPLETION_TARGET_NEXT': + return TriggerMediaInformation_CompletionTarget.COMPLETION_TARGET_NEXT; + case 2: + case 'COMPLETION_TARGET_RANDOM': + return TriggerMediaInformation_CompletionTarget.COMPLETION_TARGET_RANDOM; + case 3: + case 'COMPLETION_TARGET_CUE': + return TriggerMediaInformation_CompletionTarget.COMPLETION_TARGET_CUE; + case 4: + case 'COMPLETION_TARGET_FIRST': + return TriggerMediaInformation_CompletionTarget.COMPLETION_TARGET_FIRST; + case -1: + case 'UNRECOGNIZED': + default: + return TriggerMediaInformation_CompletionTarget.UNRECOGNIZED; + } +} + +export function triggerMediaInformation_CompletionTargetToJSON( + object: TriggerMediaInformation_CompletionTarget, +): string { + switch (object) { + case TriggerMediaInformation_CompletionTarget.COMPLETION_TARGET_NONE: + return 'COMPLETION_TARGET_NONE'; + case TriggerMediaInformation_CompletionTarget.COMPLETION_TARGET_NEXT: + return 'COMPLETION_TARGET_NEXT'; + case TriggerMediaInformation_CompletionTarget.COMPLETION_TARGET_RANDOM: + return 'COMPLETION_TARGET_RANDOM'; + case TriggerMediaInformation_CompletionTarget.COMPLETION_TARGET_CUE: + return 'COMPLETION_TARGET_CUE'; + case TriggerMediaInformation_CompletionTarget.COMPLETION_TARGET_FIRST: + return 'COMPLETION_TARGET_FIRST'; + case TriggerMediaInformation_CompletionTarget.UNRECOGNIZED: + default: + return 'UNRECOGNIZED'; + } +} + export enum TriggerMediaInformation_SourceType { SOURCE_TYPE_LOCAL = 0, SOURCE_TYPE_PROCONTENT = 1, @@ -48,19 +103,228 @@ export function triggerMediaInformation_SourceTypeToJSON( } } -export interface TriggerMediaInformation_Video { - sourceDurationRange: TriggerMediaInformation_Video_DurationRange; - playbackMarkerCount: number; - playbackBehavior: TriggerMediaInformation_Video_PlaybackBehavior; - scaleMode: TriggerMediaInformation_Video_ScaleMode; +export interface TriggerMediaInformation_Transition { + isDefault: boolean; + name: string; +} + +export interface TriggerMediaInformation_VisualMedia { + behavior: TriggerMediaInformation_VisualMedia_Behavior; + scaleMode: TriggerMediaInformation_VisualMedia_ScaleMode; + flipMode: TriggerMediaInformation_VisualMedia_FlipMode; + nativeRotation: TriggerMediaInformation_VisualMedia_NativeRotation; + resolution: TriggerMediaInformation_VisualMedia_Size | undefined; + enabledEffectsCount: number; + hasEffectPreset: boolean; + transition: TriggerMediaInformation_Transition | undefined; +} + +export enum TriggerMediaInformation_VisualMedia_Behavior { + BEHAVIOR_BACKGROUND = 0, + BEHAVIOR_FOREGROUND = 1, + BEHAVIOR_VIDEO_INPUT = 2, + UNRECOGNIZED = -1, +} + +export function triggerMediaInformation_VisualMedia_BehaviorFromJSON( + object: any, +): TriggerMediaInformation_VisualMedia_Behavior { + switch (object) { + case 0: + case 'BEHAVIOR_BACKGROUND': + return TriggerMediaInformation_VisualMedia_Behavior.BEHAVIOR_BACKGROUND; + case 1: + case 'BEHAVIOR_FOREGROUND': + return TriggerMediaInformation_VisualMedia_Behavior.BEHAVIOR_FOREGROUND; + case 2: + case 'BEHAVIOR_VIDEO_INPUT': + return TriggerMediaInformation_VisualMedia_Behavior.BEHAVIOR_VIDEO_INPUT; + case -1: + case 'UNRECOGNIZED': + default: + return TriggerMediaInformation_VisualMedia_Behavior.UNRECOGNIZED; + } +} + +export function triggerMediaInformation_VisualMedia_BehaviorToJSON( + object: TriggerMediaInformation_VisualMedia_Behavior, +): string { + switch (object) { + case TriggerMediaInformation_VisualMedia_Behavior.BEHAVIOR_BACKGROUND: + return 'BEHAVIOR_BACKGROUND'; + case TriggerMediaInformation_VisualMedia_Behavior.BEHAVIOR_FOREGROUND: + return 'BEHAVIOR_FOREGROUND'; + case TriggerMediaInformation_VisualMedia_Behavior.BEHAVIOR_VIDEO_INPUT: + return 'BEHAVIOR_VIDEO_INPUT'; + case TriggerMediaInformation_VisualMedia_Behavior.UNRECOGNIZED: + default: + return 'UNRECOGNIZED'; + } +} + +export enum TriggerMediaInformation_VisualMedia_ScaleMode { + SCALE_MODE_FIT = 0, + SCALE_MODE_FILL = 1, + SCALE_MODE_STRETCH = 2, + SCALE_MODE_BLUR = 3, + UNRECOGNIZED = -1, +} + +export function triggerMediaInformation_VisualMedia_ScaleModeFromJSON( + object: any, +): TriggerMediaInformation_VisualMedia_ScaleMode { + switch (object) { + case 0: + case 'SCALE_MODE_FIT': + return TriggerMediaInformation_VisualMedia_ScaleMode.SCALE_MODE_FIT; + case 1: + case 'SCALE_MODE_FILL': + return TriggerMediaInformation_VisualMedia_ScaleMode.SCALE_MODE_FILL; + case 2: + case 'SCALE_MODE_STRETCH': + return TriggerMediaInformation_VisualMedia_ScaleMode.SCALE_MODE_STRETCH; + case 3: + case 'SCALE_MODE_BLUR': + return TriggerMediaInformation_VisualMedia_ScaleMode.SCALE_MODE_BLUR; + case -1: + case 'UNRECOGNIZED': + default: + return TriggerMediaInformation_VisualMedia_ScaleMode.UNRECOGNIZED; + } +} + +export function triggerMediaInformation_VisualMedia_ScaleModeToJSON( + object: TriggerMediaInformation_VisualMedia_ScaleMode, +): string { + switch (object) { + case TriggerMediaInformation_VisualMedia_ScaleMode.SCALE_MODE_FIT: + return 'SCALE_MODE_FIT'; + case TriggerMediaInformation_VisualMedia_ScaleMode.SCALE_MODE_FILL: + return 'SCALE_MODE_FILL'; + case TriggerMediaInformation_VisualMedia_ScaleMode.SCALE_MODE_STRETCH: + return 'SCALE_MODE_STRETCH'; + case TriggerMediaInformation_VisualMedia_ScaleMode.SCALE_MODE_BLUR: + return 'SCALE_MODE_BLUR'; + case TriggerMediaInformation_VisualMedia_ScaleMode.UNRECOGNIZED: + default: + return 'UNRECOGNIZED'; + } +} + +export enum TriggerMediaInformation_VisualMedia_FlipMode { + FLIP_MODE_NONE = 0, + FLIP_MODE_HORIZONTAL = 1, + FLIP_MODE_VERTICAL = 2, + FLIP_MODE_BOTH = 3, + UNRECOGNIZED = -1, +} + +export function triggerMediaInformation_VisualMedia_FlipModeFromJSON( + object: any, +): TriggerMediaInformation_VisualMedia_FlipMode { + switch (object) { + case 0: + case 'FLIP_MODE_NONE': + return TriggerMediaInformation_VisualMedia_FlipMode.FLIP_MODE_NONE; + case 1: + case 'FLIP_MODE_HORIZONTAL': + return TriggerMediaInformation_VisualMedia_FlipMode.FLIP_MODE_HORIZONTAL; + case 2: + case 'FLIP_MODE_VERTICAL': + return TriggerMediaInformation_VisualMedia_FlipMode.FLIP_MODE_VERTICAL; + case 3: + case 'FLIP_MODE_BOTH': + return TriggerMediaInformation_VisualMedia_FlipMode.FLIP_MODE_BOTH; + case -1: + case 'UNRECOGNIZED': + default: + return TriggerMediaInformation_VisualMedia_FlipMode.UNRECOGNIZED; + } +} + +export function triggerMediaInformation_VisualMedia_FlipModeToJSON( + object: TriggerMediaInformation_VisualMedia_FlipMode, +): string { + switch (object) { + case TriggerMediaInformation_VisualMedia_FlipMode.FLIP_MODE_NONE: + return 'FLIP_MODE_NONE'; + case TriggerMediaInformation_VisualMedia_FlipMode.FLIP_MODE_HORIZONTAL: + return 'FLIP_MODE_HORIZONTAL'; + case TriggerMediaInformation_VisualMedia_FlipMode.FLIP_MODE_VERTICAL: + return 'FLIP_MODE_VERTICAL'; + case TriggerMediaInformation_VisualMedia_FlipMode.FLIP_MODE_BOTH: + return 'FLIP_MODE_BOTH'; + case TriggerMediaInformation_VisualMedia_FlipMode.UNRECOGNIZED: + default: + return 'UNRECOGNIZED'; + } +} + +export enum TriggerMediaInformation_VisualMedia_NativeRotation { + NATIVE_ROTATION_STANDARD = 0, + NATIVE_ROTATION_90 = 90, + NATIVE_ROTATION_180 = 180, + NATIVE_ROTATION_270 = 270, + UNRECOGNIZED = -1, +} + +export function triggerMediaInformation_VisualMedia_NativeRotationFromJSON( + object: any, +): TriggerMediaInformation_VisualMedia_NativeRotation { + switch (object) { + case 0: + case 'NATIVE_ROTATION_STANDARD': + return TriggerMediaInformation_VisualMedia_NativeRotation.NATIVE_ROTATION_STANDARD; + case 90: + case 'NATIVE_ROTATION_90': + return TriggerMediaInformation_VisualMedia_NativeRotation.NATIVE_ROTATION_90; + case 180: + case 'NATIVE_ROTATION_180': + return TriggerMediaInformation_VisualMedia_NativeRotation.NATIVE_ROTATION_180; + case 270: + case 'NATIVE_ROTATION_270': + return TriggerMediaInformation_VisualMedia_NativeRotation.NATIVE_ROTATION_270; + case -1: + case 'UNRECOGNIZED': + default: + return TriggerMediaInformation_VisualMedia_NativeRotation.UNRECOGNIZED; + } +} + +export function triggerMediaInformation_VisualMedia_NativeRotationToJSON( + object: TriggerMediaInformation_VisualMedia_NativeRotation, +): string { + switch (object) { + case TriggerMediaInformation_VisualMedia_NativeRotation.NATIVE_ROTATION_STANDARD: + return 'NATIVE_ROTATION_STANDARD'; + case TriggerMediaInformation_VisualMedia_NativeRotation.NATIVE_ROTATION_90: + return 'NATIVE_ROTATION_90'; + case TriggerMediaInformation_VisualMedia_NativeRotation.NATIVE_ROTATION_180: + return 'NATIVE_ROTATION_180'; + case TriggerMediaInformation_VisualMedia_NativeRotation.NATIVE_ROTATION_270: + return 'NATIVE_ROTATION_270'; + case TriggerMediaInformation_VisualMedia_NativeRotation.UNRECOGNIZED: + default: + return 'UNRECOGNIZED'; + } +} + +export interface TriggerMediaInformation_VisualMedia_Size { + width: number; + height: number; +} + +export interface TriggerMediaInformation_Transport { + sourceDurationRange: TriggerMediaInformation_Transport_DurationRange; + hasAudioRampIn: boolean; + hasAudioRampOut: boolean; hasInPoint: boolean; hasOutPoint: boolean; - hasEffects: boolean; - hasTransition: boolean; - hasAudio: boolean; + playRate: number; + playbackMarkerCount: number; } -export enum TriggerMediaInformation_Video_DurationRange { +export enum TriggerMediaInformation_Transport_DurationRange { DURATION_UNDER_10S = 0, DURATION_10S_TO_30S = 1, DURATION_30S_TO_60S = 2, @@ -73,78 +337,88 @@ export enum TriggerMediaInformation_Video_DurationRange { UNRECOGNIZED = -1, } -export function triggerMediaInformation_Video_DurationRangeFromJSON( +export function triggerMediaInformation_Transport_DurationRangeFromJSON( object: any, -): TriggerMediaInformation_Video_DurationRange { +): TriggerMediaInformation_Transport_DurationRange { switch (object) { case 0: case 'DURATION_UNDER_10S': - return TriggerMediaInformation_Video_DurationRange.DURATION_UNDER_10S; + return TriggerMediaInformation_Transport_DurationRange.DURATION_UNDER_10S; case 1: case 'DURATION_10S_TO_30S': - return TriggerMediaInformation_Video_DurationRange.DURATION_10S_TO_30S; + return TriggerMediaInformation_Transport_DurationRange.DURATION_10S_TO_30S; case 2: case 'DURATION_30S_TO_60S': - return TriggerMediaInformation_Video_DurationRange.DURATION_30S_TO_60S; + return TriggerMediaInformation_Transport_DurationRange.DURATION_30S_TO_60S; case 3: case 'DURATION_1M_TO_5M': - return TriggerMediaInformation_Video_DurationRange.DURATION_1M_TO_5M; + return TriggerMediaInformation_Transport_DurationRange.DURATION_1M_TO_5M; case 4: case 'DURATION_5M_TO_10M': - return TriggerMediaInformation_Video_DurationRange.DURATION_5M_TO_10M; + return TriggerMediaInformation_Transport_DurationRange.DURATION_5M_TO_10M; case 5: case 'DURATION_10M_TO_30M': - return TriggerMediaInformation_Video_DurationRange.DURATION_10M_TO_30M; + return TriggerMediaInformation_Transport_DurationRange.DURATION_10M_TO_30M; case 6: case 'DURATION_30M_TO_60M': - return TriggerMediaInformation_Video_DurationRange.DURATION_30M_TO_60M; + return TriggerMediaInformation_Transport_DurationRange.DURATION_30M_TO_60M; case 7: case 'DURATION_1H_TO_2H': - return TriggerMediaInformation_Video_DurationRange.DURATION_1H_TO_2H; + return TriggerMediaInformation_Transport_DurationRange.DURATION_1H_TO_2H; case 8: case 'DURATION_OVER_2H': - return TriggerMediaInformation_Video_DurationRange.DURATION_OVER_2H; + return TriggerMediaInformation_Transport_DurationRange.DURATION_OVER_2H; case -1: case 'UNRECOGNIZED': default: - return TriggerMediaInformation_Video_DurationRange.UNRECOGNIZED; + return TriggerMediaInformation_Transport_DurationRange.UNRECOGNIZED; } } -export function triggerMediaInformation_Video_DurationRangeToJSON( - object: TriggerMediaInformation_Video_DurationRange, +export function triggerMediaInformation_Transport_DurationRangeToJSON( + object: TriggerMediaInformation_Transport_DurationRange, ): string { switch (object) { - case TriggerMediaInformation_Video_DurationRange.DURATION_UNDER_10S: + case TriggerMediaInformation_Transport_DurationRange.DURATION_UNDER_10S: return 'DURATION_UNDER_10S'; - case TriggerMediaInformation_Video_DurationRange.DURATION_10S_TO_30S: + case TriggerMediaInformation_Transport_DurationRange.DURATION_10S_TO_30S: return 'DURATION_10S_TO_30S'; - case TriggerMediaInformation_Video_DurationRange.DURATION_30S_TO_60S: + case TriggerMediaInformation_Transport_DurationRange.DURATION_30S_TO_60S: return 'DURATION_30S_TO_60S'; - case TriggerMediaInformation_Video_DurationRange.DURATION_1M_TO_5M: + case TriggerMediaInformation_Transport_DurationRange.DURATION_1M_TO_5M: return 'DURATION_1M_TO_5M'; - case TriggerMediaInformation_Video_DurationRange.DURATION_5M_TO_10M: + case TriggerMediaInformation_Transport_DurationRange.DURATION_5M_TO_10M: return 'DURATION_5M_TO_10M'; - case TriggerMediaInformation_Video_DurationRange.DURATION_10M_TO_30M: + case TriggerMediaInformation_Transport_DurationRange.DURATION_10M_TO_30M: return 'DURATION_10M_TO_30M'; - case TriggerMediaInformation_Video_DurationRange.DURATION_30M_TO_60M: + case TriggerMediaInformation_Transport_DurationRange.DURATION_30M_TO_60M: return 'DURATION_30M_TO_60M'; - case TriggerMediaInformation_Video_DurationRange.DURATION_1H_TO_2H: + case TriggerMediaInformation_Transport_DurationRange.DURATION_1H_TO_2H: return 'DURATION_1H_TO_2H'; - case TriggerMediaInformation_Video_DurationRange.DURATION_OVER_2H: + case TriggerMediaInformation_Transport_DurationRange.DURATION_OVER_2H: return 'DURATION_OVER_2H'; - case TriggerMediaInformation_Video_DurationRange.UNRECOGNIZED: + case TriggerMediaInformation_Transport_DurationRange.UNRECOGNIZED: default: return 'UNRECOGNIZED'; } } +export interface TriggerMediaInformation_Video { + visualMedia: TriggerMediaInformation_VisualMedia | undefined; + playbackBehavior: TriggerMediaInformation_Video_PlaybackBehavior; + completionTarget: TriggerMediaInformation_CompletionTarget; + softLoopEnabled: boolean; + softLoopDuration: number; + frameRate: number; + audioChannelCount: number; + transport: TriggerMediaInformation_Transport | undefined; +} + export enum TriggerMediaInformation_Video_PlaybackBehavior { PLAYBACK_BEHAVIOR_STOP = 0, PLAYBACK_BEHAVIOR_LOOP = 1, PLAYBACK_BEHAVIOR_LOOP_FOR_PLAY_COUNT = 2, PLAYBACK_BEHAVIOR_LOOP_FOR_TIME = 3, - PLAYBACK_BEHAVIOR_SOFT_LOOP = 4, UNRECOGNIZED = -1, } @@ -164,9 +438,6 @@ export function triggerMediaInformation_Video_PlaybackBehaviorFromJSON( case 3: case 'PLAYBACK_BEHAVIOR_LOOP_FOR_TIME': return TriggerMediaInformation_Video_PlaybackBehavior.PLAYBACK_BEHAVIOR_LOOP_FOR_TIME; - case 4: - case 'PLAYBACK_BEHAVIOR_SOFT_LOOP': - return TriggerMediaInformation_Video_PlaybackBehavior.PLAYBACK_BEHAVIOR_SOFT_LOOP; case -1: case 'UNRECOGNIZED': default: @@ -186,62 +457,111 @@ export function triggerMediaInformation_Video_PlaybackBehaviorToJSON( return 'PLAYBACK_BEHAVIOR_LOOP_FOR_PLAY_COUNT'; case TriggerMediaInformation_Video_PlaybackBehavior.PLAYBACK_BEHAVIOR_LOOP_FOR_TIME: return 'PLAYBACK_BEHAVIOR_LOOP_FOR_TIME'; - case TriggerMediaInformation_Video_PlaybackBehavior.PLAYBACK_BEHAVIOR_SOFT_LOOP: - return 'PLAYBACK_BEHAVIOR_SOFT_LOOP'; case TriggerMediaInformation_Video_PlaybackBehavior.UNRECOGNIZED: default: return 'UNRECOGNIZED'; } } -export enum TriggerMediaInformation_Video_ScaleMode { - SCALE_MODE_FIT = 0, - SCALE_MODE_FILL = 1, - SCALE_MODE_STRETCH = 2, +export interface TriggerMediaInformation_Audio { + behavior: TriggerMediaInformation_Audio_Behavior; + playbackBehavior: TriggerMediaInformation_Audio_PlaybackBehavior; + transition: TriggerMediaInformation_Transition | undefined; + audioChannelCount: number; + transport: TriggerMediaInformation_Transport | undefined; +} + +export enum TriggerMediaInformation_Audio_Behavior { + BEHAVIOR_TUNE = 0, + BEHAVIOR_SOUND = 1, UNRECOGNIZED = -1, } -export function triggerMediaInformation_Video_ScaleModeFromJSON( +export function triggerMediaInformation_Audio_BehaviorFromJSON( object: any, -): TriggerMediaInformation_Video_ScaleMode { +): TriggerMediaInformation_Audio_Behavior { switch (object) { case 0: - case 'SCALE_MODE_FIT': - return TriggerMediaInformation_Video_ScaleMode.SCALE_MODE_FIT; + case 'BEHAVIOR_TUNE': + return TriggerMediaInformation_Audio_Behavior.BEHAVIOR_TUNE; case 1: - case 'SCALE_MODE_FILL': - return TriggerMediaInformation_Video_ScaleMode.SCALE_MODE_FILL; - case 2: - case 'SCALE_MODE_STRETCH': - return TriggerMediaInformation_Video_ScaleMode.SCALE_MODE_STRETCH; + case 'BEHAVIOR_SOUND': + return TriggerMediaInformation_Audio_Behavior.BEHAVIOR_SOUND; case -1: case 'UNRECOGNIZED': default: - return TriggerMediaInformation_Video_ScaleMode.UNRECOGNIZED; + return TriggerMediaInformation_Audio_Behavior.UNRECOGNIZED; } } -export function triggerMediaInformation_Video_ScaleModeToJSON( - object: TriggerMediaInformation_Video_ScaleMode, +export function triggerMediaInformation_Audio_BehaviorToJSON( + object: TriggerMediaInformation_Audio_Behavior, ): string { switch (object) { - case TriggerMediaInformation_Video_ScaleMode.SCALE_MODE_FIT: - return 'SCALE_MODE_FIT'; - case TriggerMediaInformation_Video_ScaleMode.SCALE_MODE_FILL: - return 'SCALE_MODE_FILL'; - case TriggerMediaInformation_Video_ScaleMode.SCALE_MODE_STRETCH: - return 'SCALE_MODE_STRETCH'; - case TriggerMediaInformation_Video_ScaleMode.UNRECOGNIZED: + case TriggerMediaInformation_Audio_Behavior.BEHAVIOR_TUNE: + return 'BEHAVIOR_TUNE'; + case TriggerMediaInformation_Audio_Behavior.BEHAVIOR_SOUND: + return 'BEHAVIOR_SOUND'; + case TriggerMediaInformation_Audio_Behavior.UNRECOGNIZED: default: return 'UNRECOGNIZED'; } } -export interface TriggerMediaInformation_Audio {} +export enum TriggerMediaInformation_Audio_PlaybackBehavior { + PLAYBACK_BEHAVIOR_STOP = 0, + PLAYBACK_BEHAVIOR_LOOP = 1, + PLAYBACK_BEHAVIOR_NEXT = 2, + UNRECOGNIZED = -1, +} + +export function triggerMediaInformation_Audio_PlaybackBehaviorFromJSON( + object: any, +): TriggerMediaInformation_Audio_PlaybackBehavior { + switch (object) { + case 0: + case 'PLAYBACK_BEHAVIOR_STOP': + return TriggerMediaInformation_Audio_PlaybackBehavior.PLAYBACK_BEHAVIOR_STOP; + case 1: + case 'PLAYBACK_BEHAVIOR_LOOP': + return TriggerMediaInformation_Audio_PlaybackBehavior.PLAYBACK_BEHAVIOR_LOOP; + case 2: + case 'PLAYBACK_BEHAVIOR_NEXT': + return TriggerMediaInformation_Audio_PlaybackBehavior.PLAYBACK_BEHAVIOR_NEXT; + case -1: + case 'UNRECOGNIZED': + default: + return TriggerMediaInformation_Audio_PlaybackBehavior.UNRECOGNIZED; + } +} + +export function triggerMediaInformation_Audio_PlaybackBehaviorToJSON( + object: TriggerMediaInformation_Audio_PlaybackBehavior, +): string { + switch (object) { + case TriggerMediaInformation_Audio_PlaybackBehavior.PLAYBACK_BEHAVIOR_STOP: + return 'PLAYBACK_BEHAVIOR_STOP'; + case TriggerMediaInformation_Audio_PlaybackBehavior.PLAYBACK_BEHAVIOR_LOOP: + return 'PLAYBACK_BEHAVIOR_LOOP'; + case TriggerMediaInformation_Audio_PlaybackBehavior.PLAYBACK_BEHAVIOR_NEXT: + return 'PLAYBACK_BEHAVIOR_NEXT'; + case TriggerMediaInformation_Audio_PlaybackBehavior.UNRECOGNIZED: + default: + return 'UNRECOGNIZED'; + } +} -export interface TriggerMediaInformation_Image {} +export interface TriggerMediaInformation_Image { + visualMedia: TriggerMediaInformation_VisualMedia | undefined; + transition: TriggerMediaInformation_Transition | undefined; + completionTarget: TriggerMediaInformation_CompletionTarget; +} -export interface TriggerMediaInformation_LiveVideo {} +export interface TriggerMediaInformation_LiveVideo { + visualMedia: TriggerMediaInformation_VisualMedia | undefined; + frameRate: number; + audioChannelCount: number; +} function createBaseTriggerMediaInformation(): TriggerMediaInformation { return { @@ -429,51 +749,140 @@ export const TriggerMediaInformation = { }, }; -function createBaseTriggerMediaInformation_Video(): TriggerMediaInformation_Video { +function createBaseTriggerMediaInformation_Transition(): TriggerMediaInformation_Transition { + return { isDefault: false, name: '' }; +} + +export const TriggerMediaInformation_Transition = { + encode( + message: TriggerMediaInformation_Transition, + writer: _m0.Writer = _m0.Writer.create(), + ): _m0.Writer { + if (message.isDefault !== false) { + writer.uint32(8).bool(message.isDefault); + } + if (message.name !== '') { + writer.uint32(18).string(message.name); + } + return writer; + }, + + decode( + input: _m0.Reader | Uint8Array, + length?: number, + ): TriggerMediaInformation_Transition { + const reader = + input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseTriggerMediaInformation_Transition(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 8) { + break; + } + + message.isDefault = reader.bool(); + continue; + case 2: + if (tag !== 18) { + break; + } + + message.name = reader.string(); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(object: any): TriggerMediaInformation_Transition { + return { + isDefault: isSet(object.isDefault) + ? globalThis.Boolean(object.isDefault) + : false, + name: isSet(object.name) ? globalThis.String(object.name) : '', + }; + }, + + toJSON(message: TriggerMediaInformation_Transition): unknown { + const obj: any = {}; + if (message.isDefault !== false) { + obj.isDefault = message.isDefault; + } + if (message.name !== '') { + obj.name = message.name; + } + return obj; + }, + + create, I>>( + base?: I, + ): TriggerMediaInformation_Transition { + return TriggerMediaInformation_Transition.fromPartial(base ?? ({} as any)); + }, + fromPartial< + I extends Exact, I>, + >(object: I): TriggerMediaInformation_Transition { + const message = createBaseTriggerMediaInformation_Transition(); + message.isDefault = object.isDefault ?? false; + message.name = object.name ?? ''; + return message; + }, +}; + +function createBaseTriggerMediaInformation_VisualMedia(): TriggerMediaInformation_VisualMedia { return { - sourceDurationRange: 0, - playbackMarkerCount: 0, - playbackBehavior: 0, + behavior: 0, scaleMode: 0, - hasInPoint: false, - hasOutPoint: false, - hasEffects: false, - hasTransition: false, - hasAudio: false, + flipMode: 0, + nativeRotation: 0, + resolution: undefined, + enabledEffectsCount: 0, + hasEffectPreset: false, + transition: undefined, }; } -export const TriggerMediaInformation_Video = { +export const TriggerMediaInformation_VisualMedia = { encode( - message: TriggerMediaInformation_Video, + message: TriggerMediaInformation_VisualMedia, writer: _m0.Writer = _m0.Writer.create(), ): _m0.Writer { - if (message.sourceDurationRange !== 0) { - writer.uint32(8).int32(message.sourceDurationRange); - } - if (message.playbackMarkerCount !== 0) { - writer.uint32(16).int32(message.playbackMarkerCount); - } - if (message.playbackBehavior !== 0) { - writer.uint32(24).int32(message.playbackBehavior); + if (message.behavior !== 0) { + writer.uint32(8).int32(message.behavior); } if (message.scaleMode !== 0) { - writer.uint32(32).int32(message.scaleMode); + writer.uint32(16).int32(message.scaleMode); + } + if (message.flipMode !== 0) { + writer.uint32(24).int32(message.flipMode); } - if (message.hasInPoint === true) { - writer.uint32(40).bool(message.hasInPoint); + if (message.nativeRotation !== 0) { + writer.uint32(32).int32(message.nativeRotation); } - if (message.hasOutPoint === true) { - writer.uint32(48).bool(message.hasOutPoint); + if (message.resolution !== undefined) { + TriggerMediaInformation_VisualMedia_Size.encode( + message.resolution, + writer.uint32(42).fork(), + ).ldelim(); } - if (message.hasEffects === true) { - writer.uint32(56).bool(message.hasEffects); + if (message.enabledEffectsCount !== 0) { + writer.uint32(48).uint32(message.enabledEffectsCount); } - if (message.hasTransition === true) { - writer.uint32(64).bool(message.hasTransition); + if (message.hasEffectPreset !== false) { + writer.uint32(56).bool(message.hasEffectPreset); } - if (message.hasAudio === true) { - writer.uint32(72).bool(message.hasAudio); + if (message.transition !== undefined) { + TriggerMediaInformation_Transition.encode( + message.transition, + writer.uint32(66).fork(), + ).ldelim(); } return writer; }, @@ -481,11 +890,11 @@ export const TriggerMediaInformation_Video = { decode( input: _m0.Reader | Uint8Array, length?: number, - ): TriggerMediaInformation_Video { + ): TriggerMediaInformation_VisualMedia { const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseTriggerMediaInformation_Video(); + const message = createBaseTriggerMediaInformation_VisualMedia(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { @@ -494,63 +903,218 @@ export const TriggerMediaInformation_Video = { break; } - message.sourceDurationRange = reader.int32() as any; + message.behavior = reader.int32() as any; continue; case 2: if (tag !== 16) { break; } - message.playbackMarkerCount = reader.int32(); + message.scaleMode = reader.int32() as any; continue; case 3: if (tag !== 24) { break; } - message.playbackBehavior = reader.int32() as any; + message.flipMode = reader.int32() as any; continue; case 4: if (tag !== 32) { break; } - message.scaleMode = reader.int32() as any; + message.nativeRotation = reader.int32() as any; continue; case 5: - if (tag !== 40) { + if (tag !== 42) { break; } - message.hasInPoint = reader.bool(); + message.resolution = TriggerMediaInformation_VisualMedia_Size.decode( + reader, + reader.uint32(), + ); continue; case 6: if (tag !== 48) { break; } - message.hasOutPoint = reader.bool(); + message.enabledEffectsCount = reader.uint32(); continue; case 7: if (tag !== 56) { break; } - message.hasEffects = reader.bool(); + message.hasEffectPreset = reader.bool(); continue; case 8: - if (tag !== 64) { + if (tag !== 66) { break; } - message.hasTransition = reader.bool(); + message.transition = TriggerMediaInformation_Transition.decode( + reader, + reader.uint32(), + ); continue; - case 9: - if (tag !== 72) { + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(object: any): TriggerMediaInformation_VisualMedia { + return { + behavior: isSet(object.behavior) + ? triggerMediaInformation_VisualMedia_BehaviorFromJSON(object.behavior) + : 0, + scaleMode: isSet(object.scaleMode) + ? triggerMediaInformation_VisualMedia_ScaleModeFromJSON( + object.scaleMode, + ) + : 0, + flipMode: isSet(object.flipMode) + ? triggerMediaInformation_VisualMedia_FlipModeFromJSON(object.flipMode) + : 0, + nativeRotation: isSet(object.nativeRotation) + ? triggerMediaInformation_VisualMedia_NativeRotationFromJSON( + object.nativeRotation, + ) + : 0, + resolution: isSet(object.resolution) + ? TriggerMediaInformation_VisualMedia_Size.fromJSON(object.resolution) + : undefined, + enabledEffectsCount: isSet(object.enabledEffectsCount) + ? globalThis.Number(object.enabledEffectsCount) + : 0, + hasEffectPreset: isSet(object.hasEffectPreset) + ? globalThis.Boolean(object.hasEffectPreset) + : false, + transition: isSet(object.transition) + ? TriggerMediaInformation_Transition.fromJSON(object.transition) + : undefined, + }; + }, + + toJSON(message: TriggerMediaInformation_VisualMedia): unknown { + const obj: any = {}; + if (message.behavior !== 0) { + obj.behavior = triggerMediaInformation_VisualMedia_BehaviorToJSON( + message.behavior, + ); + } + if (message.scaleMode !== 0) { + obj.scaleMode = triggerMediaInformation_VisualMedia_ScaleModeToJSON( + message.scaleMode, + ); + } + if (message.flipMode !== 0) { + obj.flipMode = triggerMediaInformation_VisualMedia_FlipModeToJSON( + message.flipMode, + ); + } + if (message.nativeRotation !== 0) { + obj.nativeRotation = + triggerMediaInformation_VisualMedia_NativeRotationToJSON( + message.nativeRotation, + ); + } + if (message.resolution !== undefined) { + obj.resolution = TriggerMediaInformation_VisualMedia_Size.toJSON( + message.resolution, + ); + } + if (message.enabledEffectsCount !== 0) { + obj.enabledEffectsCount = Math.round(message.enabledEffectsCount); + } + if (message.hasEffectPreset !== false) { + obj.hasEffectPreset = message.hasEffectPreset; + } + if (message.transition !== undefined) { + obj.transition = TriggerMediaInformation_Transition.toJSON( + message.transition, + ); + } + return obj; + }, + + create, I>>( + base?: I, + ): TriggerMediaInformation_VisualMedia { + return TriggerMediaInformation_VisualMedia.fromPartial(base ?? ({} as any)); + }, + fromPartial< + I extends Exact, I>, + >(object: I): TriggerMediaInformation_VisualMedia { + const message = createBaseTriggerMediaInformation_VisualMedia(); + message.behavior = object.behavior ?? 0; + message.scaleMode = object.scaleMode ?? 0; + message.flipMode = object.flipMode ?? 0; + message.nativeRotation = object.nativeRotation ?? 0; + message.resolution = + object.resolution !== undefined && object.resolution !== null + ? TriggerMediaInformation_VisualMedia_Size.fromPartial( + object.resolution, + ) + : undefined; + message.enabledEffectsCount = object.enabledEffectsCount ?? 0; + message.hasEffectPreset = object.hasEffectPreset ?? false; + message.transition = + object.transition !== undefined && object.transition !== null + ? TriggerMediaInformation_Transition.fromPartial(object.transition) + : undefined; + return message; + }, +}; + +function createBaseTriggerMediaInformation_VisualMedia_Size(): TriggerMediaInformation_VisualMedia_Size { + return { width: 0, height: 0 }; +} + +export const TriggerMediaInformation_VisualMedia_Size = { + encode( + message: TriggerMediaInformation_VisualMedia_Size, + writer: _m0.Writer = _m0.Writer.create(), + ): _m0.Writer { + if (message.width !== 0) { + writer.uint32(8).uint32(message.width); + } + if (message.height !== 0) { + writer.uint32(16).uint32(message.height); + } + return writer; + }, + + decode( + input: _m0.Reader | Uint8Array, + length?: number, + ): TriggerMediaInformation_VisualMedia_Size { + const reader = + input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseTriggerMediaInformation_VisualMedia_Size(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 8) { + break; + } + + message.width = reader.uint32(); + continue; + case 2: + if (tag !== 16) { break; } - message.hasAudio = reader.bool(); + message.height = reader.uint32(); continue; } if ((tag & 7) === 4 || tag === 0) { @@ -561,78 +1125,426 @@ export const TriggerMediaInformation_Video = { return message; }, - fromJSON(object: any): TriggerMediaInformation_Video { + fromJSON(object: any): TriggerMediaInformation_VisualMedia_Size { + return { + width: isSet(object.width) ? globalThis.Number(object.width) : 0, + height: isSet(object.height) ? globalThis.Number(object.height) : 0, + }; + }, + + toJSON(message: TriggerMediaInformation_VisualMedia_Size): unknown { + const obj: any = {}; + if (message.width !== 0) { + obj.width = Math.round(message.width); + } + if (message.height !== 0) { + obj.height = Math.round(message.height); + } + return obj; + }, + + create< + I extends Exact, I>, + >(base?: I): TriggerMediaInformation_VisualMedia_Size { + return TriggerMediaInformation_VisualMedia_Size.fromPartial( + base ?? ({} as any), + ); + }, + fromPartial< + I extends Exact, I>, + >(object: I): TriggerMediaInformation_VisualMedia_Size { + const message = createBaseTriggerMediaInformation_VisualMedia_Size(); + message.width = object.width ?? 0; + message.height = object.height ?? 0; + return message; + }, +}; + +function createBaseTriggerMediaInformation_Transport(): TriggerMediaInformation_Transport { + return { + sourceDurationRange: 0, + hasAudioRampIn: false, + hasAudioRampOut: false, + hasInPoint: false, + hasOutPoint: false, + playRate: 0, + playbackMarkerCount: 0, + }; +} + +export const TriggerMediaInformation_Transport = { + encode( + message: TriggerMediaInformation_Transport, + writer: _m0.Writer = _m0.Writer.create(), + ): _m0.Writer { + if (message.sourceDurationRange !== 0) { + writer.uint32(8).int32(message.sourceDurationRange); + } + if (message.hasAudioRampIn !== false) { + writer.uint32(16).bool(message.hasAudioRampIn); + } + if (message.hasAudioRampOut !== false) { + writer.uint32(24).bool(message.hasAudioRampOut); + } + if (message.hasInPoint !== false) { + writer.uint32(32).bool(message.hasInPoint); + } + if (message.hasOutPoint !== false) { + writer.uint32(40).bool(message.hasOutPoint); + } + if (message.playRate !== 0) { + writer.uint32(49).double(message.playRate); + } + if (message.playbackMarkerCount !== 0) { + writer.uint32(56).uint32(message.playbackMarkerCount); + } + return writer; + }, + + decode( + input: _m0.Reader | Uint8Array, + length?: number, + ): TriggerMediaInformation_Transport { + const reader = + input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseTriggerMediaInformation_Transport(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 8) { + break; + } + + message.sourceDurationRange = reader.int32() as any; + continue; + case 2: + if (tag !== 16) { + break; + } + + message.hasAudioRampIn = reader.bool(); + continue; + case 3: + if (tag !== 24) { + break; + } + + message.hasAudioRampOut = reader.bool(); + continue; + case 4: + if (tag !== 32) { + break; + } + + message.hasInPoint = reader.bool(); + continue; + case 5: + if (tag !== 40) { + break; + } + + message.hasOutPoint = reader.bool(); + continue; + case 6: + if (tag !== 49) { + break; + } + + message.playRate = reader.double(); + continue; + case 7: + if (tag !== 56) { + break; + } + + message.playbackMarkerCount = reader.uint32(); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(object: any): TriggerMediaInformation_Transport { return { sourceDurationRange: isSet(object.sourceDurationRange) - ? triggerMediaInformation_Video_DurationRangeFromJSON( + ? triggerMediaInformation_Transport_DurationRangeFromJSON( object.sourceDurationRange, ) : 0, - playbackMarkerCount: isSet(object.playbackMarkerCount) - ? globalThis.Number(object.playbackMarkerCount) - : 0, - playbackBehavior: isSet(object.playbackBehavior) - ? triggerMediaInformation_Video_PlaybackBehaviorFromJSON( - object.playbackBehavior, - ) - : 0, - scaleMode: isSet(object.scaleMode) - ? triggerMediaInformation_Video_ScaleModeFromJSON(object.scaleMode) - : 0, + hasAudioRampIn: isSet(object.hasAudioRampIn) + ? globalThis.Boolean(object.hasAudioRampIn) + : false, + hasAudioRampOut: isSet(object.hasAudioRampOut) + ? globalThis.Boolean(object.hasAudioRampOut) + : false, hasInPoint: isSet(object.hasInPoint) ? globalThis.Boolean(object.hasInPoint) : false, hasOutPoint: isSet(object.hasOutPoint) ? globalThis.Boolean(object.hasOutPoint) : false, - hasEffects: isSet(object.hasEffects) - ? globalThis.Boolean(object.hasEffects) - : false, - hasTransition: isSet(object.hasTransition) - ? globalThis.Boolean(object.hasTransition) - : false, - hasAudio: isSet(object.hasAudio) - ? globalThis.Boolean(object.hasAudio) - : false, + playRate: isSet(object.playRate) ? globalThis.Number(object.playRate) : 0, + playbackMarkerCount: isSet(object.playbackMarkerCount) + ? globalThis.Number(object.playbackMarkerCount) + : 0, }; }, - toJSON(message: TriggerMediaInformation_Video): unknown { + toJSON(message: TriggerMediaInformation_Transport): unknown { const obj: any = {}; if (message.sourceDurationRange !== 0) { obj.sourceDurationRange = - triggerMediaInformation_Video_DurationRangeToJSON( + triggerMediaInformation_Transport_DurationRangeToJSON( message.sourceDurationRange, ); } + if (message.hasAudioRampIn !== false) { + obj.hasAudioRampIn = message.hasAudioRampIn; + } + if (message.hasAudioRampOut !== false) { + obj.hasAudioRampOut = message.hasAudioRampOut; + } + if (message.hasInPoint !== false) { + obj.hasInPoint = message.hasInPoint; + } + if (message.hasOutPoint !== false) { + obj.hasOutPoint = message.hasOutPoint; + } + if (message.playRate !== 0) { + obj.playRate = message.playRate; + } if (message.playbackMarkerCount !== 0) { obj.playbackMarkerCount = Math.round(message.playbackMarkerCount); } + return obj; + }, + + create, I>>( + base?: I, + ): TriggerMediaInformation_Transport { + return TriggerMediaInformation_Transport.fromPartial(base ?? ({} as any)); + }, + fromPartial< + I extends Exact, I>, + >(object: I): TriggerMediaInformation_Transport { + const message = createBaseTriggerMediaInformation_Transport(); + message.sourceDurationRange = object.sourceDurationRange ?? 0; + message.hasAudioRampIn = object.hasAudioRampIn ?? false; + message.hasAudioRampOut = object.hasAudioRampOut ?? false; + message.hasInPoint = object.hasInPoint ?? false; + message.hasOutPoint = object.hasOutPoint ?? false; + message.playRate = object.playRate ?? 0; + message.playbackMarkerCount = object.playbackMarkerCount ?? 0; + return message; + }, +}; + +function createBaseTriggerMediaInformation_Video(): TriggerMediaInformation_Video { + return { + visualMedia: undefined, + playbackBehavior: 0, + completionTarget: 0, + softLoopEnabled: false, + softLoopDuration: 0, + frameRate: 0, + audioChannelCount: 0, + transport: undefined, + }; +} + +export const TriggerMediaInformation_Video = { + encode( + message: TriggerMediaInformation_Video, + writer: _m0.Writer = _m0.Writer.create(), + ): _m0.Writer { + if (message.visualMedia !== undefined) { + TriggerMediaInformation_VisualMedia.encode( + message.visualMedia, + writer.uint32(58).fork(), + ).ldelim(); + } + if (message.playbackBehavior !== 0) { + writer.uint32(64).int32(message.playbackBehavior); + } + if (message.completionTarget !== 0) { + writer.uint32(72).int32(message.completionTarget); + } + if (message.softLoopEnabled !== false) { + writer.uint32(80).bool(message.softLoopEnabled); + } + if (message.softLoopDuration !== 0) { + writer.uint32(89).double(message.softLoopDuration); + } + if (message.frameRate !== 0) { + writer.uint32(97).double(message.frameRate); + } + if (message.audioChannelCount !== 0) { + writer.uint32(104).uint32(message.audioChannelCount); + } + if (message.transport !== undefined) { + TriggerMediaInformation_Transport.encode( + message.transport, + writer.uint32(114).fork(), + ).ldelim(); + } + return writer; + }, + + decode( + input: _m0.Reader | Uint8Array, + length?: number, + ): TriggerMediaInformation_Video { + const reader = + input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseTriggerMediaInformation_Video(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 7: + if (tag !== 58) { + break; + } + + message.visualMedia = TriggerMediaInformation_VisualMedia.decode( + reader, + reader.uint32(), + ); + continue; + case 8: + if (tag !== 64) { + break; + } + + message.playbackBehavior = reader.int32() as any; + continue; + case 9: + if (tag !== 72) { + break; + } + + message.completionTarget = reader.int32() as any; + continue; + case 10: + if (tag !== 80) { + break; + } + + message.softLoopEnabled = reader.bool(); + continue; + case 11: + if (tag !== 89) { + break; + } + + message.softLoopDuration = reader.double(); + continue; + case 12: + if (tag !== 97) { + break; + } + + message.frameRate = reader.double(); + continue; + case 13: + if (tag !== 104) { + break; + } + + message.audioChannelCount = reader.uint32(); + continue; + case 14: + if (tag !== 114) { + break; + } + + message.transport = TriggerMediaInformation_Transport.decode( + reader, + reader.uint32(), + ); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(object: any): TriggerMediaInformation_Video { + return { + visualMedia: isSet(object.visualMedia) + ? TriggerMediaInformation_VisualMedia.fromJSON(object.visualMedia) + : undefined, + playbackBehavior: isSet(object.playbackBehavior) + ? triggerMediaInformation_Video_PlaybackBehaviorFromJSON( + object.playbackBehavior, + ) + : 0, + completionTarget: isSet(object.completionTarget) + ? triggerMediaInformation_CompletionTargetFromJSON( + object.completionTarget, + ) + : 0, + softLoopEnabled: isSet(object.softLoopEnabled) + ? globalThis.Boolean(object.softLoopEnabled) + : false, + softLoopDuration: isSet(object.softLoopDuration) + ? globalThis.Number(object.softLoopDuration) + : 0, + frameRate: isSet(object.frameRate) + ? globalThis.Number(object.frameRate) + : 0, + audioChannelCount: isSet(object.audioChannelCount) + ? globalThis.Number(object.audioChannelCount) + : 0, + transport: isSet(object.transport) + ? TriggerMediaInformation_Transport.fromJSON(object.transport) + : undefined, + }; + }, + + toJSON(message: TriggerMediaInformation_Video): unknown { + const obj: any = {}; + if (message.visualMedia !== undefined) { + obj.visualMedia = TriggerMediaInformation_VisualMedia.toJSON( + message.visualMedia, + ); + } if (message.playbackBehavior !== 0) { obj.playbackBehavior = triggerMediaInformation_Video_PlaybackBehaviorToJSON( message.playbackBehavior, ); } - if (message.scaleMode !== 0) { - obj.scaleMode = triggerMediaInformation_Video_ScaleModeToJSON( - message.scaleMode, + if (message.completionTarget !== 0) { + obj.completionTarget = triggerMediaInformation_CompletionTargetToJSON( + message.completionTarget, ); } - if (message.hasInPoint === true) { - obj.hasInPoint = message.hasInPoint; + if (message.softLoopEnabled !== false) { + obj.softLoopEnabled = message.softLoopEnabled; } - if (message.hasOutPoint === true) { - obj.hasOutPoint = message.hasOutPoint; + if (message.softLoopDuration !== 0) { + obj.softLoopDuration = message.softLoopDuration; } - if (message.hasEffects === true) { - obj.hasEffects = message.hasEffects; + if (message.frameRate !== 0) { + obj.frameRate = message.frameRate; } - if (message.hasTransition === true) { - obj.hasTransition = message.hasTransition; + if (message.audioChannelCount !== 0) { + obj.audioChannelCount = Math.round(message.audioChannelCount); } - if (message.hasAudio === true) { - obj.hasAudio = message.hasAudio; + if (message.transport !== undefined) { + obj.transport = TriggerMediaInformation_Transport.toJSON( + message.transport, + ); } return obj; }, @@ -646,28 +1558,60 @@ export const TriggerMediaInformation_Video = { object: I, ): TriggerMediaInformation_Video { const message = createBaseTriggerMediaInformation_Video(); - message.sourceDurationRange = object.sourceDurationRange ?? 0; - message.playbackMarkerCount = object.playbackMarkerCount ?? 0; + message.visualMedia = + object.visualMedia !== undefined && object.visualMedia !== null + ? TriggerMediaInformation_VisualMedia.fromPartial(object.visualMedia) + : undefined; message.playbackBehavior = object.playbackBehavior ?? 0; - message.scaleMode = object.scaleMode ?? 0; - message.hasInPoint = object.hasInPoint ?? false; - message.hasOutPoint = object.hasOutPoint ?? false; - message.hasEffects = object.hasEffects ?? false; - message.hasTransition = object.hasTransition ?? false; - message.hasAudio = object.hasAudio ?? false; + message.completionTarget = object.completionTarget ?? 0; + message.softLoopEnabled = object.softLoopEnabled ?? false; + message.softLoopDuration = object.softLoopDuration ?? 0; + message.frameRate = object.frameRate ?? 0; + message.audioChannelCount = object.audioChannelCount ?? 0; + message.transport = + object.transport !== undefined && object.transport !== null + ? TriggerMediaInformation_Transport.fromPartial(object.transport) + : undefined; return message; }, }; function createBaseTriggerMediaInformation_Audio(): TriggerMediaInformation_Audio { - return {}; + return { + behavior: 0, + playbackBehavior: 0, + transition: undefined, + audioChannelCount: 0, + transport: undefined, + }; } export const TriggerMediaInformation_Audio = { encode( - _: TriggerMediaInformation_Audio, + message: TriggerMediaInformation_Audio, writer: _m0.Writer = _m0.Writer.create(), ): _m0.Writer { + if (message.behavior !== 0) { + writer.uint32(8).int32(message.behavior); + } + if (message.playbackBehavior !== 0) { + writer.uint32(16).int32(message.playbackBehavior); + } + if (message.transition !== undefined) { + TriggerMediaInformation_Transition.encode( + message.transition, + writer.uint32(26).fork(), + ).ldelim(); + } + if (message.audioChannelCount !== 0) { + writer.uint32(32).uint32(message.audioChannelCount); + } + if (message.transport !== undefined) { + TriggerMediaInformation_Transport.encode( + message.transport, + writer.uint32(42).fork(), + ).ldelim(); + } return writer; }, @@ -682,6 +1626,47 @@ export const TriggerMediaInformation_Audio = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { + case 1: + if (tag !== 8) { + break; + } + + message.behavior = reader.int32() as any; + continue; + case 2: + if (tag !== 16) { + break; + } + + message.playbackBehavior = reader.int32() as any; + continue; + case 3: + if (tag !== 26) { + break; + } + + message.transition = TriggerMediaInformation_Transition.decode( + reader, + reader.uint32(), + ); + continue; + case 4: + if (tag !== 32) { + break; + } + + message.audioChannelCount = reader.uint32(); + continue; + case 5: + if (tag !== 42) { + break; + } + + message.transport = TriggerMediaInformation_Transport.decode( + reader, + reader.uint32(), + ); + continue; } if ((tag & 7) === 4 || tag === 0) { break; @@ -691,12 +1676,54 @@ export const TriggerMediaInformation_Audio = { return message; }, - fromJSON(_: any): TriggerMediaInformation_Audio { - return {}; + fromJSON(object: any): TriggerMediaInformation_Audio { + return { + behavior: isSet(object.behavior) + ? triggerMediaInformation_Audio_BehaviorFromJSON(object.behavior) + : 0, + playbackBehavior: isSet(object.playbackBehavior) + ? triggerMediaInformation_Audio_PlaybackBehaviorFromJSON( + object.playbackBehavior, + ) + : 0, + transition: isSet(object.transition) + ? TriggerMediaInformation_Transition.fromJSON(object.transition) + : undefined, + audioChannelCount: isSet(object.audioChannelCount) + ? globalThis.Number(object.audioChannelCount) + : 0, + transport: isSet(object.transport) + ? TriggerMediaInformation_Transport.fromJSON(object.transport) + : undefined, + }; }, - toJSON(_: TriggerMediaInformation_Audio): unknown { + toJSON(message: TriggerMediaInformation_Audio): unknown { const obj: any = {}; + if (message.behavior !== 0) { + obj.behavior = triggerMediaInformation_Audio_BehaviorToJSON( + message.behavior, + ); + } + if (message.playbackBehavior !== 0) { + obj.playbackBehavior = + triggerMediaInformation_Audio_PlaybackBehaviorToJSON( + message.playbackBehavior, + ); + } + if (message.transition !== undefined) { + obj.transition = TriggerMediaInformation_Transition.toJSON( + message.transition, + ); + } + if (message.audioChannelCount !== 0) { + obj.audioChannelCount = Math.round(message.audioChannelCount); + } + if (message.transport !== undefined) { + obj.transport = TriggerMediaInformation_Transport.toJSON( + message.transport, + ); + } return obj; }, @@ -706,22 +1733,48 @@ export const TriggerMediaInformation_Audio = { return TriggerMediaInformation_Audio.fromPartial(base ?? ({} as any)); }, fromPartial, I>>( - _: I, + object: I, ): TriggerMediaInformation_Audio { const message = createBaseTriggerMediaInformation_Audio(); + message.behavior = object.behavior ?? 0; + message.playbackBehavior = object.playbackBehavior ?? 0; + message.transition = + object.transition !== undefined && object.transition !== null + ? TriggerMediaInformation_Transition.fromPartial(object.transition) + : undefined; + message.audioChannelCount = object.audioChannelCount ?? 0; + message.transport = + object.transport !== undefined && object.transport !== null + ? TriggerMediaInformation_Transport.fromPartial(object.transport) + : undefined; return message; }, }; function createBaseTriggerMediaInformation_Image(): TriggerMediaInformation_Image { - return {}; + return { visualMedia: undefined, transition: undefined, completionTarget: 0 }; } export const TriggerMediaInformation_Image = { encode( - _: TriggerMediaInformation_Image, + message: TriggerMediaInformation_Image, writer: _m0.Writer = _m0.Writer.create(), ): _m0.Writer { + if (message.visualMedia !== undefined) { + TriggerMediaInformation_VisualMedia.encode( + message.visualMedia, + writer.uint32(10).fork(), + ).ldelim(); + } + if (message.transition !== undefined) { + TriggerMediaInformation_Transition.encode( + message.transition, + writer.uint32(18).fork(), + ).ldelim(); + } + if (message.completionTarget !== 0) { + writer.uint32(24).int32(message.completionTarget); + } return writer; }, @@ -736,6 +1789,33 @@ export const TriggerMediaInformation_Image = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } + + message.visualMedia = TriggerMediaInformation_VisualMedia.decode( + reader, + reader.uint32(), + ); + continue; + case 2: + if (tag !== 18) { + break; + } + + message.transition = TriggerMediaInformation_Transition.decode( + reader, + reader.uint32(), + ); + continue; + case 3: + if (tag !== 24) { + break; + } + + message.completionTarget = reader.int32() as any; + continue; } if ((tag & 7) === 4 || tag === 0) { break; @@ -745,12 +1825,39 @@ export const TriggerMediaInformation_Image = { return message; }, - fromJSON(_: any): TriggerMediaInformation_Image { - return {}; + fromJSON(object: any): TriggerMediaInformation_Image { + return { + visualMedia: isSet(object.visualMedia) + ? TriggerMediaInformation_VisualMedia.fromJSON(object.visualMedia) + : undefined, + transition: isSet(object.transition) + ? TriggerMediaInformation_Transition.fromJSON(object.transition) + : undefined, + completionTarget: isSet(object.completionTarget) + ? triggerMediaInformation_CompletionTargetFromJSON( + object.completionTarget, + ) + : 0, + }; }, - toJSON(_: TriggerMediaInformation_Image): unknown { + toJSON(message: TriggerMediaInformation_Image): unknown { const obj: any = {}; + if (message.visualMedia !== undefined) { + obj.visualMedia = TriggerMediaInformation_VisualMedia.toJSON( + message.visualMedia, + ); + } + if (message.transition !== undefined) { + obj.transition = TriggerMediaInformation_Transition.toJSON( + message.transition, + ); + } + if (message.completionTarget !== 0) { + obj.completionTarget = triggerMediaInformation_CompletionTargetToJSON( + message.completionTarget, + ); + } return obj; }, @@ -760,22 +1867,43 @@ export const TriggerMediaInformation_Image = { return TriggerMediaInformation_Image.fromPartial(base ?? ({} as any)); }, fromPartial, I>>( - _: I, + object: I, ): TriggerMediaInformation_Image { const message = createBaseTriggerMediaInformation_Image(); + message.visualMedia = + object.visualMedia !== undefined && object.visualMedia !== null + ? TriggerMediaInformation_VisualMedia.fromPartial(object.visualMedia) + : undefined; + message.transition = + object.transition !== undefined && object.transition !== null + ? TriggerMediaInformation_Transition.fromPartial(object.transition) + : undefined; + message.completionTarget = object.completionTarget ?? 0; return message; }, }; function createBaseTriggerMediaInformation_LiveVideo(): TriggerMediaInformation_LiveVideo { - return {}; + return { visualMedia: undefined, frameRate: 0, audioChannelCount: 0 }; } export const TriggerMediaInformation_LiveVideo = { encode( - _: TriggerMediaInformation_LiveVideo, + message: TriggerMediaInformation_LiveVideo, writer: _m0.Writer = _m0.Writer.create(), ): _m0.Writer { + if (message.visualMedia !== undefined) { + TriggerMediaInformation_VisualMedia.encode( + message.visualMedia, + writer.uint32(10).fork(), + ).ldelim(); + } + if (message.frameRate !== 0) { + writer.uint32(17).double(message.frameRate); + } + if (message.audioChannelCount !== 0) { + writer.uint32(24).uint32(message.audioChannelCount); + } return writer; }, @@ -790,6 +1918,30 @@ export const TriggerMediaInformation_LiveVideo = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } + + message.visualMedia = TriggerMediaInformation_VisualMedia.decode( + reader, + reader.uint32(), + ); + continue; + case 2: + if (tag !== 17) { + break; + } + + message.frameRate = reader.double(); + continue; + case 3: + if (tag !== 24) { + break; + } + + message.audioChannelCount = reader.uint32(); + continue; } if ((tag & 7) === 4 || tag === 0) { break; @@ -799,12 +1951,33 @@ export const TriggerMediaInformation_LiveVideo = { return message; }, - fromJSON(_: any): TriggerMediaInformation_LiveVideo { - return {}; + fromJSON(object: any): TriggerMediaInformation_LiveVideo { + return { + visualMedia: isSet(object.visualMedia) + ? TriggerMediaInformation_VisualMedia.fromJSON(object.visualMedia) + : undefined, + frameRate: isSet(object.frameRate) + ? globalThis.Number(object.frameRate) + : 0, + audioChannelCount: isSet(object.audioChannelCount) + ? globalThis.Number(object.audioChannelCount) + : 0, + }; }, - toJSON(_: TriggerMediaInformation_LiveVideo): unknown { + toJSON(message: TriggerMediaInformation_LiveVideo): unknown { const obj: any = {}; + if (message.visualMedia !== undefined) { + obj.visualMedia = TriggerMediaInformation_VisualMedia.toJSON( + message.visualMedia, + ); + } + if (message.frameRate !== 0) { + obj.frameRate = message.frameRate; + } + if (message.audioChannelCount !== 0) { + obj.audioChannelCount = Math.round(message.audioChannelCount); + } return obj; }, @@ -815,8 +1988,14 @@ export const TriggerMediaInformation_LiveVideo = { }, fromPartial< I extends Exact, I>, - >(_: I): TriggerMediaInformation_LiveVideo { + >(object: I): TriggerMediaInformation_LiveVideo { const message = createBaseTriggerMediaInformation_LiveVideo(); + message.visualMedia = + object.visualMedia !== undefined && object.visualMedia !== null + ? TriggerMediaInformation_VisualMedia.fromPartial(object.visualMedia) + : undefined; + message.frameRate = object.frameRate ?? 0; + message.audioChannelCount = object.audioChannelCount ?? 0; return message; }, }; diff --git a/proto/analyticsUI.proto b/proto/analyticsUI.proto index 5bc7ca2..927f05b 100755 --- a/proto/analyticsUI.proto +++ b/proto/analyticsUI.proto @@ -960,6 +960,82 @@ message UI { } } + message WelcomeToProPresenter { + message Shown { + enum Source { + SOURCE_FIRST_LAUNCH = 0; + SOURCE_APPLICATION_MENU = 1; + } + + .rv.analytics.UI.WelcomeToProPresenter.Shown.Source source = 1; + } + + message Migration { + } + + message ScreenConfigurationHelp { + } + + message DownloadSampleContent { + } + + message UserGroup { + } + + message Tutorials { + } + + message KnowledgeBase { + } + + message Blog { + } + + message Instagram { + } + + message Facebook { + } + + oneof Component { + .rv.analytics.UI.WelcomeToProPresenter.Shown shown = 1; + .rv.analytics.UI.WelcomeToProPresenter.Migration migration = 2; + .rv.analytics.UI.WelcomeToProPresenter.ScreenConfigurationHelp screen_configuration_help = 3; + .rv.analytics.UI.WelcomeToProPresenter.DownloadSampleContent download_sample_content = 4; + .rv.analytics.UI.WelcomeToProPresenter.UserGroup user_group = 5; + .rv.analytics.UI.WelcomeToProPresenter.Tutorials tutorials = 6; + .rv.analytics.UI.WelcomeToProPresenter.KnowledgeBase knowledge_base = 7; + .rv.analytics.UI.WelcomeToProPresenter.Blog blog = 8; + .rv.analytics.UI.WelcomeToProPresenter.Instagram instagram = 9; + .rv.analytics.UI.WelcomeToProPresenter.Facebook facebook = 10; + } + } + + message TestPattern { + message Shown { + enum Source { + SOURCE_APPLICATION_MENU = 0; + SOURCE_SCREEN_CONFIGURATION = 1; + } + + .rv.analytics.UI.TestPattern.Shown.Source source = 1; + } + + oneof Component { + .rv.analytics.UI.TestPattern.Shown shown = 1; + } + } + + message Preferences { + message CustomLogo { + bool has_logo = 1; + } + + oneof Component { + .rv.analytics.UI.Preferences.CustomLogo custom_logo = 1; + } + } + oneof Component { .rv.analytics.UI.QuickSearch quick_search = 1; .rv.analytics.UI.Toolbar toolbar = 2; @@ -979,6 +1055,9 @@ message UI { .rv.analytics.UI.NetworkGroup network_group = 16; .rv.analytics.UI.CCLI ccli = 17; .rv.analytics.UI.Capture capture = 18; + .rv.analytics.UI.WelcomeToProPresenter welcomeToProPresenter = 19; + .rv.analytics.UI.TestPattern test_pattern = 20; + .rv.analytics.UI.Preferences preferences = 21; } } diff --git a/proto/analyticsUI.ts b/proto/analyticsUI.ts index eefed04..eeb097a 100644 --- a/proto/analyticsUI.ts +++ b/proto/analyticsUI.ts @@ -22,6 +22,9 @@ export interface UI { networkGroup?: UI_NetworkGroup | undefined; ccli?: UI_CCLI | undefined; capture?: UI_Capture | undefined; + welcomeToProPresenter?: UI_WelcomeToProPresenter | undefined; + testPattern?: UI_TestPattern | undefined; + preferences?: UI_Preferences | undefined; } export interface UI_QuickSearch { @@ -2781,6 +2784,135 @@ export function uI_Capture_Shown_SourceToJSON( } } +export interface UI_WelcomeToProPresenter { + shown?: UI_WelcomeToProPresenter_Shown | undefined; + migration?: UI_WelcomeToProPresenter_Migration | undefined; + screenConfigurationHelp?: + | UI_WelcomeToProPresenter_ScreenConfigurationHelp + | undefined; + downloadSampleContent?: + | UI_WelcomeToProPresenter_DownloadSampleContent + | undefined; + userGroup?: UI_WelcomeToProPresenter_UserGroup | undefined; + tutorials?: UI_WelcomeToProPresenter_Tutorials | undefined; + knowledgeBase?: UI_WelcomeToProPresenter_KnowledgeBase | undefined; + blog?: UI_WelcomeToProPresenter_Blog | undefined; + instagram?: UI_WelcomeToProPresenter_Instagram | undefined; + facebook?: UI_WelcomeToProPresenter_Facebook | undefined; +} + +export interface UI_WelcomeToProPresenter_Shown { + source: UI_WelcomeToProPresenter_Shown_Source; +} + +export enum UI_WelcomeToProPresenter_Shown_Source { + SOURCE_FIRST_LAUNCH = 0, + SOURCE_APPLICATION_MENU = 1, + UNRECOGNIZED = -1, +} + +export function uI_WelcomeToProPresenter_Shown_SourceFromJSON( + object: any, +): UI_WelcomeToProPresenter_Shown_Source { + switch (object) { + case 0: + case 'SOURCE_FIRST_LAUNCH': + return UI_WelcomeToProPresenter_Shown_Source.SOURCE_FIRST_LAUNCH; + case 1: + case 'SOURCE_APPLICATION_MENU': + return UI_WelcomeToProPresenter_Shown_Source.SOURCE_APPLICATION_MENU; + case -1: + case 'UNRECOGNIZED': + default: + return UI_WelcomeToProPresenter_Shown_Source.UNRECOGNIZED; + } +} + +export function uI_WelcomeToProPresenter_Shown_SourceToJSON( + object: UI_WelcomeToProPresenter_Shown_Source, +): string { + switch (object) { + case UI_WelcomeToProPresenter_Shown_Source.SOURCE_FIRST_LAUNCH: + return 'SOURCE_FIRST_LAUNCH'; + case UI_WelcomeToProPresenter_Shown_Source.SOURCE_APPLICATION_MENU: + return 'SOURCE_APPLICATION_MENU'; + case UI_WelcomeToProPresenter_Shown_Source.UNRECOGNIZED: + default: + return 'UNRECOGNIZED'; + } +} + +export interface UI_WelcomeToProPresenter_Migration {} + +export interface UI_WelcomeToProPresenter_ScreenConfigurationHelp {} + +export interface UI_WelcomeToProPresenter_DownloadSampleContent {} + +export interface UI_WelcomeToProPresenter_UserGroup {} + +export interface UI_WelcomeToProPresenter_Tutorials {} + +export interface UI_WelcomeToProPresenter_KnowledgeBase {} + +export interface UI_WelcomeToProPresenter_Blog {} + +export interface UI_WelcomeToProPresenter_Instagram {} + +export interface UI_WelcomeToProPresenter_Facebook {} + +export interface UI_TestPattern { + shown?: UI_TestPattern_Shown | undefined; +} + +export interface UI_TestPattern_Shown { + source: UI_TestPattern_Shown_Source; +} + +export enum UI_TestPattern_Shown_Source { + SOURCE_APPLICATION_MENU = 0, + SOURCE_SCREEN_CONFIGURATION = 1, + UNRECOGNIZED = -1, +} + +export function uI_TestPattern_Shown_SourceFromJSON( + object: any, +): UI_TestPattern_Shown_Source { + switch (object) { + case 0: + case 'SOURCE_APPLICATION_MENU': + return UI_TestPattern_Shown_Source.SOURCE_APPLICATION_MENU; + case 1: + case 'SOURCE_SCREEN_CONFIGURATION': + return UI_TestPattern_Shown_Source.SOURCE_SCREEN_CONFIGURATION; + case -1: + case 'UNRECOGNIZED': + default: + return UI_TestPattern_Shown_Source.UNRECOGNIZED; + } +} + +export function uI_TestPattern_Shown_SourceToJSON( + object: UI_TestPattern_Shown_Source, +): string { + switch (object) { + case UI_TestPattern_Shown_Source.SOURCE_APPLICATION_MENU: + return 'SOURCE_APPLICATION_MENU'; + case UI_TestPattern_Shown_Source.SOURCE_SCREEN_CONFIGURATION: + return 'SOURCE_SCREEN_CONFIGURATION'; + case UI_TestPattern_Shown_Source.UNRECOGNIZED: + default: + return 'UNRECOGNIZED'; + } +} + +export interface UI_Preferences { + customLogo?: UI_Preferences_CustomLogo | undefined; +} + +export interface UI_Preferences_CustomLogo { + hasLogo: boolean; +} + function createBaseUI(): UI { return { quickSearch: undefined, @@ -2801,6 +2933,9 @@ function createBaseUI(): UI { networkGroup: undefined, ccli: undefined, capture: undefined, + welcomeToProPresenter: undefined, + testPattern: undefined, + preferences: undefined, }; } @@ -2890,6 +3025,24 @@ export const UI = { if (message.capture !== undefined) { UI_Capture.encode(message.capture, writer.uint32(146).fork()).ldelim(); } + if (message.welcomeToProPresenter !== undefined) { + UI_WelcomeToProPresenter.encode( + message.welcomeToProPresenter, + writer.uint32(154).fork(), + ).ldelim(); + } + if (message.testPattern !== undefined) { + UI_TestPattern.encode( + message.testPattern, + writer.uint32(162).fork(), + ).ldelim(); + } + if (message.preferences !== undefined) { + UI_Preferences.encode( + message.preferences, + writer.uint32(170).fork(), + ).ldelim(); + } return writer; }, @@ -3039,6 +3192,30 @@ export const UI = { message.capture = UI_Capture.decode(reader, reader.uint32()); continue; + case 19: + if (tag !== 154) { + break; + } + + message.welcomeToProPresenter = UI_WelcomeToProPresenter.decode( + reader, + reader.uint32(), + ); + continue; + case 20: + if (tag !== 162) { + break; + } + + message.testPattern = UI_TestPattern.decode(reader, reader.uint32()); + continue; + case 21: + if (tag !== 170) { + break; + } + + message.preferences = UI_Preferences.decode(reader, reader.uint32()); + continue; } if ((tag & 7) === 4 || tag === 0) { break; @@ -3098,6 +3275,15 @@ export const UI = { capture: isSet(object.capture) ? UI_Capture.fromJSON(object.capture) : undefined, + welcomeToProPresenter: isSet(object.welcomeToProPresenter) + ? UI_WelcomeToProPresenter.fromJSON(object.welcomeToProPresenter) + : undefined, + testPattern: isSet(object.testPattern) + ? UI_TestPattern.fromJSON(object.testPattern) + : undefined, + preferences: isSet(object.preferences) + ? UI_Preferences.fromJSON(object.preferences) + : undefined, }; }, @@ -3161,6 +3347,17 @@ export const UI = { if (message.capture !== undefined) { obj.capture = UI_Capture.toJSON(message.capture); } + if (message.welcomeToProPresenter !== undefined) { + obj.welcomeToProPresenter = UI_WelcomeToProPresenter.toJSON( + message.welcomeToProPresenter, + ); + } + if (message.testPattern !== undefined) { + obj.testPattern = UI_TestPattern.toJSON(message.testPattern); + } + if (message.preferences !== undefined) { + obj.preferences = UI_Preferences.toJSON(message.preferences); + } return obj; }, @@ -3243,6 +3440,19 @@ export const UI = { object.capture !== undefined && object.capture !== null ? UI_Capture.fromPartial(object.capture) : undefined; + message.welcomeToProPresenter = + object.welcomeToProPresenter !== undefined && + object.welcomeToProPresenter !== null + ? UI_WelcomeToProPresenter.fromPartial(object.welcomeToProPresenter) + : undefined; + message.testPattern = + object.testPattern !== undefined && object.testPattern !== null + ? UI_TestPattern.fromPartial(object.testPattern) + : undefined; + message.preferences = + object.preferences !== undefined && object.preferences !== null + ? UI_Preferences.fromPartial(object.preferences) + : undefined; return message; }, }; @@ -5456,16 +5666,16 @@ export const UI_MainView_Bible_GenerateSlides = { if (message.referenceLocation !== 0) { writer.uint32(32).int32(message.referenceLocation); } - if (message.showVerseNumbers === true) { + if (message.showVerseNumbers !== false) { writer.uint32(40).bool(message.showVerseNumbers); } - if (message.breakNewVerse === true) { + if (message.breakNewVerse !== false) { writer.uint32(48).bool(message.breakNewVerse); } - if (message.displayTranslation === true) { + if (message.displayTranslation !== false) { writer.uint32(56).bool(message.displayTranslation); } - if (message.preserveFontColor === true) { + if (message.preserveFontColor !== false) { writer.uint32(64).bool(message.preserveFontColor); } if (message.referenceStyle !== 0) { @@ -5615,16 +5825,16 @@ export const UI_MainView_Bible_GenerateSlides = { message.referenceLocation, ); } - if (message.showVerseNumbers === true) { + if (message.showVerseNumbers !== false) { obj.showVerseNumbers = message.showVerseNumbers; } - if (message.breakNewVerse === true) { + if (message.breakNewVerse !== false) { obj.breakNewVerse = message.breakNewVerse; } - if (message.displayTranslation === true) { + if (message.displayTranslation !== false) { obj.displayTranslation = message.displayTranslation; } - if (message.preserveFontColor === true) { + if (message.preserveFontColor !== false) { obj.preserveFontColor = message.preserveFontColor; } if (message.referenceStyle !== 0) { @@ -10173,7 +10383,7 @@ export const UI_TextInspector_UnderlineColor = { message: UI_TextInspector_UnderlineColor, writer: _m0.Writer = _m0.Writer.create(), ): _m0.Writer { - if (message.isEnabled === true) { + if (message.isEnabled !== false) { writer.uint32(8).bool(message.isEnabled); } if (message.selectionMode !== 0) { @@ -10229,7 +10439,7 @@ export const UI_TextInspector_UnderlineColor = { toJSON(message: UI_TextInspector_UnderlineColor): unknown { const obj: any = {}; - if (message.isEnabled === true) { + if (message.isEnabled !== false) { obj.isEnabled = message.isEnabled; } if (message.selectionMode !== 0) { @@ -10438,7 +10648,7 @@ export const UI_TextInspector_ScrollingText_Enable = { message: UI_TextInspector_ScrollingText_Enable, writer: _m0.Writer = _m0.Writer.create(), ): _m0.Writer { - if (message.enabled === true) { + if (message.enabled !== false) { writer.uint32(8).bool(message.enabled); } return writer; @@ -10481,7 +10691,7 @@ export const UI_TextInspector_ScrollingText_Enable = { toJSON(message: UI_TextInspector_ScrollingText_Enable): unknown { const obj: any = {}; - if (message.enabled === true) { + if (message.enabled !== false) { obj.enabled = message.enabled; } return obj; @@ -12239,7 +12449,7 @@ export const UI_ClearGroups_Group_ChangeIcon = { if (message.iconType !== 0) { writer.uint32(8).int32(message.iconType); } - if (message.isTinted === true) { + if (message.isTinted !== false) { writer.uint32(16).bool(message.isTinted); } return writer; @@ -12297,7 +12507,7 @@ export const UI_ClearGroups_Group_ChangeIcon = { message.iconType, ); } - if (message.isTinted === true) { + if (message.isTinted !== false) { obj.isTinted = message.isTinted; } return obj; @@ -13395,7 +13605,7 @@ export const UI_NetworkGroup_Invite = { message: UI_NetworkGroup_Invite, writer: _m0.Writer = _m0.Writer.create(), ): _m0.Writer { - if (message.didAccept === true) { + if (message.didAccept !== false) { writer.uint32(8).bool(message.didAccept); } return writer; @@ -13438,7 +13648,7 @@ export const UI_NetworkGroup_Invite = { toJSON(message: UI_NetworkGroup_Invite): unknown { const obj: any = {}; - if (message.didAccept === true) { + if (message.didAccept !== false) { obj.didAccept = message.didAccept; } return obj; @@ -14059,6 +14269,1237 @@ export const UI_Capture_Shown = { }, }; +function createBaseUI_WelcomeToProPresenter(): UI_WelcomeToProPresenter { + return { + shown: undefined, + migration: undefined, + screenConfigurationHelp: undefined, + downloadSampleContent: undefined, + userGroup: undefined, + tutorials: undefined, + knowledgeBase: undefined, + blog: undefined, + instagram: undefined, + facebook: undefined, + }; +} + +export const UI_WelcomeToProPresenter = { + encode( + message: UI_WelcomeToProPresenter, + writer: _m0.Writer = _m0.Writer.create(), + ): _m0.Writer { + if (message.shown !== undefined) { + UI_WelcomeToProPresenter_Shown.encode( + message.shown, + writer.uint32(10).fork(), + ).ldelim(); + } + if (message.migration !== undefined) { + UI_WelcomeToProPresenter_Migration.encode( + message.migration, + writer.uint32(18).fork(), + ).ldelim(); + } + if (message.screenConfigurationHelp !== undefined) { + UI_WelcomeToProPresenter_ScreenConfigurationHelp.encode( + message.screenConfigurationHelp, + writer.uint32(26).fork(), + ).ldelim(); + } + if (message.downloadSampleContent !== undefined) { + UI_WelcomeToProPresenter_DownloadSampleContent.encode( + message.downloadSampleContent, + writer.uint32(34).fork(), + ).ldelim(); + } + if (message.userGroup !== undefined) { + UI_WelcomeToProPresenter_UserGroup.encode( + message.userGroup, + writer.uint32(42).fork(), + ).ldelim(); + } + if (message.tutorials !== undefined) { + UI_WelcomeToProPresenter_Tutorials.encode( + message.tutorials, + writer.uint32(50).fork(), + ).ldelim(); + } + if (message.knowledgeBase !== undefined) { + UI_WelcomeToProPresenter_KnowledgeBase.encode( + message.knowledgeBase, + writer.uint32(58).fork(), + ).ldelim(); + } + if (message.blog !== undefined) { + UI_WelcomeToProPresenter_Blog.encode( + message.blog, + writer.uint32(66).fork(), + ).ldelim(); + } + if (message.instagram !== undefined) { + UI_WelcomeToProPresenter_Instagram.encode( + message.instagram, + writer.uint32(74).fork(), + ).ldelim(); + } + if (message.facebook !== undefined) { + UI_WelcomeToProPresenter_Facebook.encode( + message.facebook, + writer.uint32(82).fork(), + ).ldelim(); + } + return writer; + }, + + decode( + input: _m0.Reader | Uint8Array, + length?: number, + ): UI_WelcomeToProPresenter { + const reader = + input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseUI_WelcomeToProPresenter(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } + + message.shown = UI_WelcomeToProPresenter_Shown.decode( + reader, + reader.uint32(), + ); + continue; + case 2: + if (tag !== 18) { + break; + } + + message.migration = UI_WelcomeToProPresenter_Migration.decode( + reader, + reader.uint32(), + ); + continue; + case 3: + if (tag !== 26) { + break; + } + + message.screenConfigurationHelp = + UI_WelcomeToProPresenter_ScreenConfigurationHelp.decode( + reader, + reader.uint32(), + ); + continue; + case 4: + if (tag !== 34) { + break; + } + + message.downloadSampleContent = + UI_WelcomeToProPresenter_DownloadSampleContent.decode( + reader, + reader.uint32(), + ); + continue; + case 5: + if (tag !== 42) { + break; + } + + message.userGroup = UI_WelcomeToProPresenter_UserGroup.decode( + reader, + reader.uint32(), + ); + continue; + case 6: + if (tag !== 50) { + break; + } + + message.tutorials = UI_WelcomeToProPresenter_Tutorials.decode( + reader, + reader.uint32(), + ); + continue; + case 7: + if (tag !== 58) { + break; + } + + message.knowledgeBase = UI_WelcomeToProPresenter_KnowledgeBase.decode( + reader, + reader.uint32(), + ); + continue; + case 8: + if (tag !== 66) { + break; + } + + message.blog = UI_WelcomeToProPresenter_Blog.decode( + reader, + reader.uint32(), + ); + continue; + case 9: + if (tag !== 74) { + break; + } + + message.instagram = UI_WelcomeToProPresenter_Instagram.decode( + reader, + reader.uint32(), + ); + continue; + case 10: + if (tag !== 82) { + break; + } + + message.facebook = UI_WelcomeToProPresenter_Facebook.decode( + reader, + reader.uint32(), + ); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(object: any): UI_WelcomeToProPresenter { + return { + shown: isSet(object.shown) + ? UI_WelcomeToProPresenter_Shown.fromJSON(object.shown) + : undefined, + migration: isSet(object.migration) + ? UI_WelcomeToProPresenter_Migration.fromJSON(object.migration) + : undefined, + screenConfigurationHelp: isSet(object.screenConfigurationHelp) + ? UI_WelcomeToProPresenter_ScreenConfigurationHelp.fromJSON( + object.screenConfigurationHelp, + ) + : undefined, + downloadSampleContent: isSet(object.downloadSampleContent) + ? UI_WelcomeToProPresenter_DownloadSampleContent.fromJSON( + object.downloadSampleContent, + ) + : undefined, + userGroup: isSet(object.userGroup) + ? UI_WelcomeToProPresenter_UserGroup.fromJSON(object.userGroup) + : undefined, + tutorials: isSet(object.tutorials) + ? UI_WelcomeToProPresenter_Tutorials.fromJSON(object.tutorials) + : undefined, + knowledgeBase: isSet(object.knowledgeBase) + ? UI_WelcomeToProPresenter_KnowledgeBase.fromJSON(object.knowledgeBase) + : undefined, + blog: isSet(object.blog) + ? UI_WelcomeToProPresenter_Blog.fromJSON(object.blog) + : undefined, + instagram: isSet(object.instagram) + ? UI_WelcomeToProPresenter_Instagram.fromJSON(object.instagram) + : undefined, + facebook: isSet(object.facebook) + ? UI_WelcomeToProPresenter_Facebook.fromJSON(object.facebook) + : undefined, + }; + }, + + toJSON(message: UI_WelcomeToProPresenter): unknown { + const obj: any = {}; + if (message.shown !== undefined) { + obj.shown = UI_WelcomeToProPresenter_Shown.toJSON(message.shown); + } + if (message.migration !== undefined) { + obj.migration = UI_WelcomeToProPresenter_Migration.toJSON( + message.migration, + ); + } + if (message.screenConfigurationHelp !== undefined) { + obj.screenConfigurationHelp = + UI_WelcomeToProPresenter_ScreenConfigurationHelp.toJSON( + message.screenConfigurationHelp, + ); + } + if (message.downloadSampleContent !== undefined) { + obj.downloadSampleContent = + UI_WelcomeToProPresenter_DownloadSampleContent.toJSON( + message.downloadSampleContent, + ); + } + if (message.userGroup !== undefined) { + obj.userGroup = UI_WelcomeToProPresenter_UserGroup.toJSON( + message.userGroup, + ); + } + if (message.tutorials !== undefined) { + obj.tutorials = UI_WelcomeToProPresenter_Tutorials.toJSON( + message.tutorials, + ); + } + if (message.knowledgeBase !== undefined) { + obj.knowledgeBase = UI_WelcomeToProPresenter_KnowledgeBase.toJSON( + message.knowledgeBase, + ); + } + if (message.blog !== undefined) { + obj.blog = UI_WelcomeToProPresenter_Blog.toJSON(message.blog); + } + if (message.instagram !== undefined) { + obj.instagram = UI_WelcomeToProPresenter_Instagram.toJSON( + message.instagram, + ); + } + if (message.facebook !== undefined) { + obj.facebook = UI_WelcomeToProPresenter_Facebook.toJSON(message.facebook); + } + return obj; + }, + + create, I>>( + base?: I, + ): UI_WelcomeToProPresenter { + return UI_WelcomeToProPresenter.fromPartial(base ?? ({} as any)); + }, + fromPartial, I>>( + object: I, + ): UI_WelcomeToProPresenter { + const message = createBaseUI_WelcomeToProPresenter(); + message.shown = + object.shown !== undefined && object.shown !== null + ? UI_WelcomeToProPresenter_Shown.fromPartial(object.shown) + : undefined; + message.migration = + object.migration !== undefined && object.migration !== null + ? UI_WelcomeToProPresenter_Migration.fromPartial(object.migration) + : undefined; + message.screenConfigurationHelp = + object.screenConfigurationHelp !== undefined && + object.screenConfigurationHelp !== null + ? UI_WelcomeToProPresenter_ScreenConfigurationHelp.fromPartial( + object.screenConfigurationHelp, + ) + : undefined; + message.downloadSampleContent = + object.downloadSampleContent !== undefined && + object.downloadSampleContent !== null + ? UI_WelcomeToProPresenter_DownloadSampleContent.fromPartial( + object.downloadSampleContent, + ) + : undefined; + message.userGroup = + object.userGroup !== undefined && object.userGroup !== null + ? UI_WelcomeToProPresenter_UserGroup.fromPartial(object.userGroup) + : undefined; + message.tutorials = + object.tutorials !== undefined && object.tutorials !== null + ? UI_WelcomeToProPresenter_Tutorials.fromPartial(object.tutorials) + : undefined; + message.knowledgeBase = + object.knowledgeBase !== undefined && object.knowledgeBase !== null + ? UI_WelcomeToProPresenter_KnowledgeBase.fromPartial( + object.knowledgeBase, + ) + : undefined; + message.blog = + object.blog !== undefined && object.blog !== null + ? UI_WelcomeToProPresenter_Blog.fromPartial(object.blog) + : undefined; + message.instagram = + object.instagram !== undefined && object.instagram !== null + ? UI_WelcomeToProPresenter_Instagram.fromPartial(object.instagram) + : undefined; + message.facebook = + object.facebook !== undefined && object.facebook !== null + ? UI_WelcomeToProPresenter_Facebook.fromPartial(object.facebook) + : undefined; + return message; + }, +}; + +function createBaseUI_WelcomeToProPresenter_Shown(): UI_WelcomeToProPresenter_Shown { + return { source: 0 }; +} + +export const UI_WelcomeToProPresenter_Shown = { + encode( + message: UI_WelcomeToProPresenter_Shown, + writer: _m0.Writer = _m0.Writer.create(), + ): _m0.Writer { + if (message.source !== 0) { + writer.uint32(8).int32(message.source); + } + return writer; + }, + + decode( + input: _m0.Reader | Uint8Array, + length?: number, + ): UI_WelcomeToProPresenter_Shown { + const reader = + input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseUI_WelcomeToProPresenter_Shown(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 8) { + break; + } + + message.source = reader.int32() as any; + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(object: any): UI_WelcomeToProPresenter_Shown { + return { + source: isSet(object.source) + ? uI_WelcomeToProPresenter_Shown_SourceFromJSON(object.source) + : 0, + }; + }, + + toJSON(message: UI_WelcomeToProPresenter_Shown): unknown { + const obj: any = {}; + if (message.source !== 0) { + obj.source = uI_WelcomeToProPresenter_Shown_SourceToJSON(message.source); + } + return obj; + }, + + create, I>>( + base?: I, + ): UI_WelcomeToProPresenter_Shown { + return UI_WelcomeToProPresenter_Shown.fromPartial(base ?? ({} as any)); + }, + fromPartial, I>>( + object: I, + ): UI_WelcomeToProPresenter_Shown { + const message = createBaseUI_WelcomeToProPresenter_Shown(); + message.source = object.source ?? 0; + return message; + }, +}; + +function createBaseUI_WelcomeToProPresenter_Migration(): UI_WelcomeToProPresenter_Migration { + return {}; +} + +export const UI_WelcomeToProPresenter_Migration = { + encode( + _: UI_WelcomeToProPresenter_Migration, + writer: _m0.Writer = _m0.Writer.create(), + ): _m0.Writer { + return writer; + }, + + decode( + input: _m0.Reader | Uint8Array, + length?: number, + ): UI_WelcomeToProPresenter_Migration { + const reader = + input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseUI_WelcomeToProPresenter_Migration(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(_: any): UI_WelcomeToProPresenter_Migration { + return {}; + }, + + toJSON(_: UI_WelcomeToProPresenter_Migration): unknown { + const obj: any = {}; + return obj; + }, + + create, I>>( + base?: I, + ): UI_WelcomeToProPresenter_Migration { + return UI_WelcomeToProPresenter_Migration.fromPartial(base ?? ({} as any)); + }, + fromPartial< + I extends Exact, I>, + >(_: I): UI_WelcomeToProPresenter_Migration { + const message = createBaseUI_WelcomeToProPresenter_Migration(); + return message; + }, +}; + +function createBaseUI_WelcomeToProPresenter_ScreenConfigurationHelp(): UI_WelcomeToProPresenter_ScreenConfigurationHelp { + return {}; +} + +export const UI_WelcomeToProPresenter_ScreenConfigurationHelp = { + encode( + _: UI_WelcomeToProPresenter_ScreenConfigurationHelp, + writer: _m0.Writer = _m0.Writer.create(), + ): _m0.Writer { + return writer; + }, + + decode( + input: _m0.Reader | Uint8Array, + length?: number, + ): UI_WelcomeToProPresenter_ScreenConfigurationHelp { + const reader = + input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = + createBaseUI_WelcomeToProPresenter_ScreenConfigurationHelp(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(_: any): UI_WelcomeToProPresenter_ScreenConfigurationHelp { + return {}; + }, + + toJSON(_: UI_WelcomeToProPresenter_ScreenConfigurationHelp): unknown { + const obj: any = {}; + return obj; + }, + + create< + I extends Exact< + DeepPartial, + I + >, + >(base?: I): UI_WelcomeToProPresenter_ScreenConfigurationHelp { + return UI_WelcomeToProPresenter_ScreenConfigurationHelp.fromPartial( + base ?? ({} as any), + ); + }, + fromPartial< + I extends Exact< + DeepPartial, + I + >, + >(_: I): UI_WelcomeToProPresenter_ScreenConfigurationHelp { + const message = + createBaseUI_WelcomeToProPresenter_ScreenConfigurationHelp(); + return message; + }, +}; + +function createBaseUI_WelcomeToProPresenter_DownloadSampleContent(): UI_WelcomeToProPresenter_DownloadSampleContent { + return {}; +} + +export const UI_WelcomeToProPresenter_DownloadSampleContent = { + encode( + _: UI_WelcomeToProPresenter_DownloadSampleContent, + writer: _m0.Writer = _m0.Writer.create(), + ): _m0.Writer { + return writer; + }, + + decode( + input: _m0.Reader | Uint8Array, + length?: number, + ): UI_WelcomeToProPresenter_DownloadSampleContent { + const reader = + input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseUI_WelcomeToProPresenter_DownloadSampleContent(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(_: any): UI_WelcomeToProPresenter_DownloadSampleContent { + return {}; + }, + + toJSON(_: UI_WelcomeToProPresenter_DownloadSampleContent): unknown { + const obj: any = {}; + return obj; + }, + + create< + I extends Exact< + DeepPartial, + I + >, + >(base?: I): UI_WelcomeToProPresenter_DownloadSampleContent { + return UI_WelcomeToProPresenter_DownloadSampleContent.fromPartial( + base ?? ({} as any), + ); + }, + fromPartial< + I extends Exact< + DeepPartial, + I + >, + >(_: I): UI_WelcomeToProPresenter_DownloadSampleContent { + const message = createBaseUI_WelcomeToProPresenter_DownloadSampleContent(); + return message; + }, +}; + +function createBaseUI_WelcomeToProPresenter_UserGroup(): UI_WelcomeToProPresenter_UserGroup { + return {}; +} + +export const UI_WelcomeToProPresenter_UserGroup = { + encode( + _: UI_WelcomeToProPresenter_UserGroup, + writer: _m0.Writer = _m0.Writer.create(), + ): _m0.Writer { + return writer; + }, + + decode( + input: _m0.Reader | Uint8Array, + length?: number, + ): UI_WelcomeToProPresenter_UserGroup { + const reader = + input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseUI_WelcomeToProPresenter_UserGroup(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(_: any): UI_WelcomeToProPresenter_UserGroup { + return {}; + }, + + toJSON(_: UI_WelcomeToProPresenter_UserGroup): unknown { + const obj: any = {}; + return obj; + }, + + create, I>>( + base?: I, + ): UI_WelcomeToProPresenter_UserGroup { + return UI_WelcomeToProPresenter_UserGroup.fromPartial(base ?? ({} as any)); + }, + fromPartial< + I extends Exact, I>, + >(_: I): UI_WelcomeToProPresenter_UserGroup { + const message = createBaseUI_WelcomeToProPresenter_UserGroup(); + return message; + }, +}; + +function createBaseUI_WelcomeToProPresenter_Tutorials(): UI_WelcomeToProPresenter_Tutorials { + return {}; +} + +export const UI_WelcomeToProPresenter_Tutorials = { + encode( + _: UI_WelcomeToProPresenter_Tutorials, + writer: _m0.Writer = _m0.Writer.create(), + ): _m0.Writer { + return writer; + }, + + decode( + input: _m0.Reader | Uint8Array, + length?: number, + ): UI_WelcomeToProPresenter_Tutorials { + const reader = + input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseUI_WelcomeToProPresenter_Tutorials(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(_: any): UI_WelcomeToProPresenter_Tutorials { + return {}; + }, + + toJSON(_: UI_WelcomeToProPresenter_Tutorials): unknown { + const obj: any = {}; + return obj; + }, + + create, I>>( + base?: I, + ): UI_WelcomeToProPresenter_Tutorials { + return UI_WelcomeToProPresenter_Tutorials.fromPartial(base ?? ({} as any)); + }, + fromPartial< + I extends Exact, I>, + >(_: I): UI_WelcomeToProPresenter_Tutorials { + const message = createBaseUI_WelcomeToProPresenter_Tutorials(); + return message; + }, +}; + +function createBaseUI_WelcomeToProPresenter_KnowledgeBase(): UI_WelcomeToProPresenter_KnowledgeBase { + return {}; +} + +export const UI_WelcomeToProPresenter_KnowledgeBase = { + encode( + _: UI_WelcomeToProPresenter_KnowledgeBase, + writer: _m0.Writer = _m0.Writer.create(), + ): _m0.Writer { + return writer; + }, + + decode( + input: _m0.Reader | Uint8Array, + length?: number, + ): UI_WelcomeToProPresenter_KnowledgeBase { + const reader = + input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseUI_WelcomeToProPresenter_KnowledgeBase(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(_: any): UI_WelcomeToProPresenter_KnowledgeBase { + return {}; + }, + + toJSON(_: UI_WelcomeToProPresenter_KnowledgeBase): unknown { + const obj: any = {}; + return obj; + }, + + create< + I extends Exact, I>, + >(base?: I): UI_WelcomeToProPresenter_KnowledgeBase { + return UI_WelcomeToProPresenter_KnowledgeBase.fromPartial( + base ?? ({} as any), + ); + }, + fromPartial< + I extends Exact, I>, + >(_: I): UI_WelcomeToProPresenter_KnowledgeBase { + const message = createBaseUI_WelcomeToProPresenter_KnowledgeBase(); + return message; + }, +}; + +function createBaseUI_WelcomeToProPresenter_Blog(): UI_WelcomeToProPresenter_Blog { + return {}; +} + +export const UI_WelcomeToProPresenter_Blog = { + encode( + _: UI_WelcomeToProPresenter_Blog, + writer: _m0.Writer = _m0.Writer.create(), + ): _m0.Writer { + return writer; + }, + + decode( + input: _m0.Reader | Uint8Array, + length?: number, + ): UI_WelcomeToProPresenter_Blog { + const reader = + input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseUI_WelcomeToProPresenter_Blog(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(_: any): UI_WelcomeToProPresenter_Blog { + return {}; + }, + + toJSON(_: UI_WelcomeToProPresenter_Blog): unknown { + const obj: any = {}; + return obj; + }, + + create, I>>( + base?: I, + ): UI_WelcomeToProPresenter_Blog { + return UI_WelcomeToProPresenter_Blog.fromPartial(base ?? ({} as any)); + }, + fromPartial, I>>( + _: I, + ): UI_WelcomeToProPresenter_Blog { + const message = createBaseUI_WelcomeToProPresenter_Blog(); + return message; + }, +}; + +function createBaseUI_WelcomeToProPresenter_Instagram(): UI_WelcomeToProPresenter_Instagram { + return {}; +} + +export const UI_WelcomeToProPresenter_Instagram = { + encode( + _: UI_WelcomeToProPresenter_Instagram, + writer: _m0.Writer = _m0.Writer.create(), + ): _m0.Writer { + return writer; + }, + + decode( + input: _m0.Reader | Uint8Array, + length?: number, + ): UI_WelcomeToProPresenter_Instagram { + const reader = + input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseUI_WelcomeToProPresenter_Instagram(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(_: any): UI_WelcomeToProPresenter_Instagram { + return {}; + }, + + toJSON(_: UI_WelcomeToProPresenter_Instagram): unknown { + const obj: any = {}; + return obj; + }, + + create, I>>( + base?: I, + ): UI_WelcomeToProPresenter_Instagram { + return UI_WelcomeToProPresenter_Instagram.fromPartial(base ?? ({} as any)); + }, + fromPartial< + I extends Exact, I>, + >(_: I): UI_WelcomeToProPresenter_Instagram { + const message = createBaseUI_WelcomeToProPresenter_Instagram(); + return message; + }, +}; + +function createBaseUI_WelcomeToProPresenter_Facebook(): UI_WelcomeToProPresenter_Facebook { + return {}; +} + +export const UI_WelcomeToProPresenter_Facebook = { + encode( + _: UI_WelcomeToProPresenter_Facebook, + writer: _m0.Writer = _m0.Writer.create(), + ): _m0.Writer { + return writer; + }, + + decode( + input: _m0.Reader | Uint8Array, + length?: number, + ): UI_WelcomeToProPresenter_Facebook { + const reader = + input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseUI_WelcomeToProPresenter_Facebook(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(_: any): UI_WelcomeToProPresenter_Facebook { + return {}; + }, + + toJSON(_: UI_WelcomeToProPresenter_Facebook): unknown { + const obj: any = {}; + return obj; + }, + + create, I>>( + base?: I, + ): UI_WelcomeToProPresenter_Facebook { + return UI_WelcomeToProPresenter_Facebook.fromPartial(base ?? ({} as any)); + }, + fromPartial< + I extends Exact, I>, + >(_: I): UI_WelcomeToProPresenter_Facebook { + const message = createBaseUI_WelcomeToProPresenter_Facebook(); + return message; + }, +}; + +function createBaseUI_TestPattern(): UI_TestPattern { + return { shown: undefined }; +} + +export const UI_TestPattern = { + encode( + message: UI_TestPattern, + writer: _m0.Writer = _m0.Writer.create(), + ): _m0.Writer { + if (message.shown !== undefined) { + UI_TestPattern_Shown.encode( + message.shown, + writer.uint32(10).fork(), + ).ldelim(); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): UI_TestPattern { + const reader = + input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseUI_TestPattern(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } + + message.shown = UI_TestPattern_Shown.decode(reader, reader.uint32()); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(object: any): UI_TestPattern { + return { + shown: isSet(object.shown) + ? UI_TestPattern_Shown.fromJSON(object.shown) + : undefined, + }; + }, + + toJSON(message: UI_TestPattern): unknown { + const obj: any = {}; + if (message.shown !== undefined) { + obj.shown = UI_TestPattern_Shown.toJSON(message.shown); + } + return obj; + }, + + create, I>>( + base?: I, + ): UI_TestPattern { + return UI_TestPattern.fromPartial(base ?? ({} as any)); + }, + fromPartial, I>>( + object: I, + ): UI_TestPattern { + const message = createBaseUI_TestPattern(); + message.shown = + object.shown !== undefined && object.shown !== null + ? UI_TestPattern_Shown.fromPartial(object.shown) + : undefined; + return message; + }, +}; + +function createBaseUI_TestPattern_Shown(): UI_TestPattern_Shown { + return { source: 0 }; +} + +export const UI_TestPattern_Shown = { + encode( + message: UI_TestPattern_Shown, + writer: _m0.Writer = _m0.Writer.create(), + ): _m0.Writer { + if (message.source !== 0) { + writer.uint32(8).int32(message.source); + } + return writer; + }, + + decode( + input: _m0.Reader | Uint8Array, + length?: number, + ): UI_TestPattern_Shown { + const reader = + input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseUI_TestPattern_Shown(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 8) { + break; + } + + message.source = reader.int32() as any; + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(object: any): UI_TestPattern_Shown { + return { + source: isSet(object.source) + ? uI_TestPattern_Shown_SourceFromJSON(object.source) + : 0, + }; + }, + + toJSON(message: UI_TestPattern_Shown): unknown { + const obj: any = {}; + if (message.source !== 0) { + obj.source = uI_TestPattern_Shown_SourceToJSON(message.source); + } + return obj; + }, + + create, I>>( + base?: I, + ): UI_TestPattern_Shown { + return UI_TestPattern_Shown.fromPartial(base ?? ({} as any)); + }, + fromPartial, I>>( + object: I, + ): UI_TestPattern_Shown { + const message = createBaseUI_TestPattern_Shown(); + message.source = object.source ?? 0; + return message; + }, +}; + +function createBaseUI_Preferences(): UI_Preferences { + return { customLogo: undefined }; +} + +export const UI_Preferences = { + encode( + message: UI_Preferences, + writer: _m0.Writer = _m0.Writer.create(), + ): _m0.Writer { + if (message.customLogo !== undefined) { + UI_Preferences_CustomLogo.encode( + message.customLogo, + writer.uint32(10).fork(), + ).ldelim(); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): UI_Preferences { + const reader = + input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseUI_Preferences(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } + + message.customLogo = UI_Preferences_CustomLogo.decode( + reader, + reader.uint32(), + ); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(object: any): UI_Preferences { + return { + customLogo: isSet(object.customLogo) + ? UI_Preferences_CustomLogo.fromJSON(object.customLogo) + : undefined, + }; + }, + + toJSON(message: UI_Preferences): unknown { + const obj: any = {}; + if (message.customLogo !== undefined) { + obj.customLogo = UI_Preferences_CustomLogo.toJSON(message.customLogo); + } + return obj; + }, + + create, I>>( + base?: I, + ): UI_Preferences { + return UI_Preferences.fromPartial(base ?? ({} as any)); + }, + fromPartial, I>>( + object: I, + ): UI_Preferences { + const message = createBaseUI_Preferences(); + message.customLogo = + object.customLogo !== undefined && object.customLogo !== null + ? UI_Preferences_CustomLogo.fromPartial(object.customLogo) + : undefined; + return message; + }, +}; + +function createBaseUI_Preferences_CustomLogo(): UI_Preferences_CustomLogo { + return { hasLogo: false }; +} + +export const UI_Preferences_CustomLogo = { + encode( + message: UI_Preferences_CustomLogo, + writer: _m0.Writer = _m0.Writer.create(), + ): _m0.Writer { + if (message.hasLogo !== false) { + writer.uint32(8).bool(message.hasLogo); + } + return writer; + }, + + decode( + input: _m0.Reader | Uint8Array, + length?: number, + ): UI_Preferences_CustomLogo { + const reader = + input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseUI_Preferences_CustomLogo(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 8) { + break; + } + + message.hasLogo = reader.bool(); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(object: any): UI_Preferences_CustomLogo { + return { + hasLogo: isSet(object.hasLogo) + ? globalThis.Boolean(object.hasLogo) + : false, + }; + }, + + toJSON(message: UI_Preferences_CustomLogo): unknown { + const obj: any = {}; + if (message.hasLogo !== false) { + obj.hasLogo = message.hasLogo; + } + return obj; + }, + + create, I>>( + base?: I, + ): UI_Preferences_CustomLogo { + return UI_Preferences_CustomLogo.fromPartial(base ?? ({} as any)); + }, + fromPartial, I>>( + object: I, + ): UI_Preferences_CustomLogo { + const message = createBaseUI_Preferences_CustomLogo(); + message.hasLogo = object.hasLogo ?? false; + return message; + }, +}; + type Builtin = | Date | Function diff --git a/proto/audio.ts b/proto/audio.ts index 3f02714..46ccf06 100644 --- a/proto/audio.ts +++ b/proto/audio.ts @@ -165,7 +165,7 @@ export const Audio_SettingsDocument = { writer.uint32(18).fork(), ).ldelim(); } - if (message.monitorOnMains === true) { + if (message.monitorOnMains !== false) { writer.uint32(24).bool(message.monitorOnMains); } return writer; @@ -237,7 +237,7 @@ export const Audio_SettingsDocument = { if (message.monitorDevice !== undefined) { obj.monitorDevice = Audio_Device.toJSON(message.monitorDevice); } - if (message.monitorOnMains === true) { + if (message.monitorOnMains !== false) { obj.monitorOnMains = message.monitorOnMains; } return obj; @@ -721,7 +721,7 @@ export const Audio_LogicalChannel = { if (message.index !== 0) { writer.uint32(24).uint32(message.index); } - if (message.muted === true) { + if (message.muted !== false) { writer.uint32(32).bool(message.muted); } for (const v of message.physicalAudioChannels) { @@ -730,10 +730,10 @@ export const Audio_LogicalChannel = { writer.uint32(42).fork(), ).ldelim(); } - if (message.solo === true) { + if (message.solo !== false) { writer.uint32(48).bool(message.solo); } - if (message.testTone === true) { + if (message.testTone !== false) { writer.uint32(56).bool(message.testTone); } return writer; @@ -841,7 +841,7 @@ export const Audio_LogicalChannel = { if (message.index !== 0) { obj.index = Math.round(message.index); } - if (message.muted === true) { + if (message.muted !== false) { obj.muted = message.muted; } if (message.physicalAudioChannels?.length) { @@ -849,10 +849,10 @@ export const Audio_LogicalChannel = { Audio_LogicalChannel_OutputChannel.toJSON(e), ); } - if (message.solo === true) { + if (message.solo !== false) { obj.solo = message.solo; } - if (message.testTone === true) { + if (message.testTone !== false) { obj.testTone = message.testTone; } return obj; @@ -896,13 +896,13 @@ export const Audio_LogicalChannel_OutputChannel = { if (message.index !== 0) { writer.uint32(8).uint32(message.index); } - if (message.muted === true) { + if (message.muted !== false) { writer.uint32(16).bool(message.muted); } - if (message.solo === true) { + if (message.solo !== false) { writer.uint32(24).bool(message.solo); } - if (message.testTone === true) { + if (message.testTone !== false) { writer.uint32(32).bool(message.testTone); } return writer; @@ -972,13 +972,13 @@ export const Audio_LogicalChannel_OutputChannel = { if (message.index !== 0) { obj.index = Math.round(message.index); } - if (message.muted === true) { + if (message.muted !== false) { obj.muted = message.muted; } - if (message.solo === true) { + if (message.solo !== false) { obj.solo = message.solo; } - if (message.testTone === true) { + if (message.testTone !== false) { obj.testTone = message.testTone; } return obj; @@ -1013,13 +1013,13 @@ export const Audio_PhysicalChannel = { if (message.index !== 0) { writer.uint32(8).uint32(message.index); } - if (message.muteEnable === true) { + if (message.muteEnable !== false) { writer.uint32(16).bool(message.muteEnable); } - if (message.soloEnable === true) { + if (message.soloEnable !== false) { writer.uint32(24).bool(message.soloEnable); } - if (message.toneEnable === true) { + if (message.toneEnable !== false) { writer.uint32(32).bool(message.toneEnable); } return writer; @@ -1093,13 +1093,13 @@ export const Audio_PhysicalChannel = { if (message.index !== 0) { obj.index = Math.round(message.index); } - if (message.muteEnable === true) { + if (message.muteEnable !== false) { obj.muteEnable = message.muteEnable; } - if (message.soloEnable === true) { + if (message.soloEnable !== false) { obj.soloEnable = message.soloEnable; } - if (message.toneEnable === true) { + if (message.toneEnable !== false) { obj.toneEnable = message.toneEnable; } return obj; diff --git a/proto/background.ts b/proto/background.ts index c577152..dc259db 100644 --- a/proto/background.ts +++ b/proto/background.ts @@ -20,7 +20,7 @@ export const Background = { message: Background, writer: _m0.Writer = _m0.Writer.create(), ): _m0.Writer { - if (message.isEnabled === true) { + if (message.isEnabled !== false) { writer.uint32(24).bool(message.isEnabled); } if (message.color !== undefined) { @@ -87,7 +87,7 @@ export const Background = { toJSON(message: Background): unknown { const obj: any = {}; - if (message.isEnabled === true) { + if (message.isEnabled !== false) { obj.isEnabled = message.isEnabled; } if (message.color !== undefined) { diff --git a/proto/basicTypes.ts b/proto/basicTypes.ts index aa49c14..e7da158 100644 --- a/proto/basicTypes.ts +++ b/proto/basicTypes.ts @@ -969,7 +969,7 @@ export const URL_ExternalRelativePath_Win32ExternalVolume = { if (message.volumeName !== '') { writer.uint32(18).string(message.volumeName); } - if (message.networkShare === true) { + if (message.networkShare !== false) { writer.uint32(24).bool(message.networkShare); } return writer; @@ -1038,7 +1038,7 @@ export const URL_ExternalRelativePath_Win32ExternalVolume = { if (message.volumeName !== '') { obj.volumeName = message.volumeName; } - if (message.networkShare === true) { + if (message.networkShare !== false) { obj.networkShare = message.networkShare; } return obj; diff --git a/proto/calendar.ts b/proto/calendar.ts index f6054e6..5a7471b 100644 --- a/proto/calendar.ts +++ b/proto/calendar.ts @@ -122,7 +122,7 @@ export const Calendar = { for (const v of message.events) { Calendar_Event.encode(v!, writer.uint32(10).fork()).ldelim(); } - if (message.active === true) { + if (message.active !== false) { writer.uint32(16).bool(message.active); } return writer; @@ -173,7 +173,7 @@ export const Calendar = { if (message.events?.length) { obj.events = message.events.map((e) => Calendar_Event.toJSON(e)); } - if (message.active === true) { + if (message.active !== false) { obj.active = message.active; } return obj; diff --git a/proto/ccli.ts b/proto/ccli.ts index 999c906..f9b4f4b 100644 --- a/proto/ccli.ts +++ b/proto/ccli.ts @@ -165,7 +165,7 @@ export const CCLIDocument = { writer.uint32(10).fork(), ).ldelim(); } - if (message.enableCcliDisplay === true) { + if (message.enableCcliDisplay !== false) { writer.uint32(16).bool(message.enableCcliDisplay); } if (message.ccliLicense !== '') { @@ -263,7 +263,7 @@ export const CCLIDocument = { if (message.applicationInfo !== undefined) { obj.applicationInfo = ApplicationInfo.toJSON(message.applicationInfo); } - if (message.enableCcliDisplay === true) { + if (message.enableCcliDisplay !== false) { obj.enableCcliDisplay = message.enableCcliDisplay; } if (message.ccliLicense !== '') { diff --git a/proto/clearGroups.ts b/proto/clearGroups.ts index 19ff1ce..7713805 100644 --- a/proto/clearGroups.ts +++ b/proto/clearGroups.ts @@ -389,7 +389,7 @@ export const ClearGroupsDocument_ClearGroup = { for (const v of message.layerTargets) { Action_ClearType.encode(v!, writer.uint32(26).fork()).ldelim(); } - if (message.isHiddenInPreview === true) { + if (message.isHiddenInPreview !== false) { writer.uint32(32).bool(message.isHiddenInPreview); } if (message.imageData.length !== 0) { @@ -398,7 +398,7 @@ export const ClearGroupsDocument_ClearGroup = { if (message.imageType !== 0) { writer.uint32(48).int32(message.imageType); } - if (message.isIconTinted === true) { + if (message.isIconTinted !== false) { writer.uint32(56).bool(message.isIconTinted); } if (message.iconTintColor !== undefined) { @@ -409,7 +409,7 @@ export const ClearGroupsDocument_ClearGroup = { writer.int32(v); } writer.ldelim(); - if (message.clearPresentationNextSlide === true) { + if (message.clearPresentationNextSlide !== false) { writer.uint32(80).bool(message.clearPresentationNextSlide); } return writer; @@ -563,7 +563,7 @@ export const ClearGroupsDocument_ClearGroup = { Action_ClearType.toJSON(e), ); } - if (message.isHiddenInPreview === true) { + if (message.isHiddenInPreview !== false) { obj.isHiddenInPreview = message.isHiddenInPreview; } if (message.imageData.length !== 0) { @@ -574,7 +574,7 @@ export const ClearGroupsDocument_ClearGroup = { message.imageType, ); } - if (message.isIconTinted === true) { + if (message.isIconTinted !== false) { obj.isIconTinted = message.isIconTinted; } if (message.iconTintColor !== undefined) { @@ -585,7 +585,7 @@ export const ClearGroupsDocument_ClearGroup = { action_ContentDestinationToJSON(e), ); } - if (message.clearPresentationNextSlide === true) { + if (message.clearPresentationNextSlide !== false) { obj.clearPresentationNextSlide = message.clearPresentationNextSlide; } return obj; @@ -623,7 +623,7 @@ export const ClearGroupsDocument_ClearGroup = { }; function bytesFromBase64(b64: string): Uint8Array { - if (globalThis.Buffer) { + if ((globalThis as any).Buffer) { return Uint8Array.from(globalThis.Buffer.from(b64, 'base64')); } else { const bin = globalThis.atob(b64); @@ -636,7 +636,7 @@ function bytesFromBase64(b64: string): Uint8Array { } function base64FromBytes(arr: Uint8Array): string { - if (globalThis.Buffer) { + if ((globalThis as any).Buffer) { return globalThis.Buffer.from(arr).toString('base64'); } else { const bin: string[] = []; diff --git a/proto/collectionElementType.proto b/proto/collectionElementType.proto index c04fdc2..adcddaf 100755 --- a/proto/collectionElementType.proto +++ b/proto/collectionElementType.proto @@ -11,5 +11,6 @@ import "uuid.proto"; message CollectionElementType { .rv.data.UUID parameter_uuid = 1; string parameter_name = 2; + .rv.data.CollectionElementType parent_collection = 3; } diff --git a/proto/collectionElementType.ts b/proto/collectionElementType.ts index d2337d2..ccedc10 100644 --- a/proto/collectionElementType.ts +++ b/proto/collectionElementType.ts @@ -7,10 +7,15 @@ export const protobufPackage = 'rv.data'; export interface CollectionElementType { parameterUuid: UUID | undefined; parameterName: string; + parentCollection: CollectionElementType | undefined; } function createBaseCollectionElementType(): CollectionElementType { - return { parameterUuid: undefined, parameterName: '' }; + return { + parameterUuid: undefined, + parameterName: '', + parentCollection: undefined, + }; } export const CollectionElementType = { @@ -24,6 +29,12 @@ export const CollectionElementType = { if (message.parameterName !== '') { writer.uint32(18).string(message.parameterName); } + if (message.parentCollection !== undefined) { + CollectionElementType.encode( + message.parentCollection, + writer.uint32(26).fork(), + ).ldelim(); + } return writer; }, @@ -52,6 +63,16 @@ export const CollectionElementType = { message.parameterName = reader.string(); continue; + case 3: + if (tag !== 26) { + break; + } + + message.parentCollection = CollectionElementType.decode( + reader, + reader.uint32(), + ); + continue; } if ((tag & 7) === 4 || tag === 0) { break; @@ -69,6 +90,9 @@ export const CollectionElementType = { parameterName: isSet(object.parameterName) ? globalThis.String(object.parameterName) : '', + parentCollection: isSet(object.parentCollection) + ? CollectionElementType.fromJSON(object.parentCollection) + : undefined, }; }, @@ -80,6 +104,11 @@ export const CollectionElementType = { if (message.parameterName !== '') { obj.parameterName = message.parameterName; } + if (message.parentCollection !== undefined) { + obj.parentCollection = CollectionElementType.toJSON( + message.parentCollection, + ); + } return obj; }, @@ -97,6 +126,10 @@ export const CollectionElementType = { ? UUID.fromPartial(object.parameterUuid) : undefined; message.parameterName = object.parameterName ?? ''; + message.parentCollection = + object.parentCollection !== undefined && object.parentCollection !== null + ? CollectionElementType.fromPartial(object.parentCollection) + : undefined; return message; }, }; diff --git a/proto/cue.ts b/proto/cue.ts index e530a6f..6b66615 100644 --- a/proto/cue.ts +++ b/proto/cue.ts @@ -193,7 +193,7 @@ export const Cue = { for (const v of message.pendingImports) { Cue_PendingImportsEntry.encode(v!, writer.uint32(90).fork()).ldelim(); } - if (message.isEnabled === true) { + if (message.isEnabled !== false) { writer.uint32(96).bool(message.isEnabled); } if (message.completionTime !== 0) { @@ -383,7 +383,7 @@ export const Cue = { Cue_PendingImportsEntry.toJSON(e), ); } - if (message.isEnabled === true) { + if (message.isEnabled !== false) { obj.isEnabled = message.isEnabled; } if (message.completionTime !== 0) { diff --git a/proto/digitalAudio.ts b/proto/digitalAudio.ts index af7a079..163656a 100644 --- a/proto/digitalAudio.ts +++ b/proto/digitalAudio.ts @@ -176,7 +176,7 @@ export const DigitalAudio_Setup = { writer.uint32(26).fork(), ).ldelim(); } - if (message.enableSdiNdiDevice === true) { + if (message.enableSdiNdiDevice !== false) { writer.uint32(32).bool(message.enableSdiNdiDevice); } if (message.sdiNdiDevice !== undefined) { @@ -185,10 +185,10 @@ export const DigitalAudio_Setup = { writer.uint32(42).fork(), ).ldelim(); } - if (message.monitorOnMains === true) { + if (message.monitorOnMains !== false) { writer.uint32(48).bool(message.monitorOnMains); } - if (message.disableMainOutputDevice === true) { + if (message.disableMainOutputDevice !== false) { writer.uint32(56).bool(message.disableMainOutputDevice); } return writer; @@ -308,16 +308,16 @@ export const DigitalAudio_Setup = { message.mainOutputDevice, ); } - if (message.enableSdiNdiDevice === true) { + if (message.enableSdiNdiDevice !== false) { obj.enableSdiNdiDevice = message.enableSdiNdiDevice; } if (message.sdiNdiDevice !== undefined) { obj.sdiNdiDevice = DigitalAudio_Device.toJSON(message.sdiNdiDevice); } - if (message.monitorOnMains === true) { + if (message.monitorOnMains !== false) { obj.monitorOnMains = message.monitorOnMains; } - if (message.disableMainOutputDevice === true) { + if (message.disableMainOutputDevice !== false) { obj.disableMainOutputDevice = message.disableMainOutputDevice; } return obj; @@ -371,13 +371,13 @@ export const DigitalAudio_Bus = { if (message.name !== '') { writer.uint32(10).string(message.name); } - if (message.muted === true) { + if (message.muted !== false) { writer.uint32(16).bool(message.muted); } - if (message.solo === true) { + if (message.solo !== false) { writer.uint32(24).bool(message.solo); } - if (message.testTone === true) { + if (message.testTone !== false) { writer.uint32(32).bool(message.testTone); } if (message.masterLevel !== 0) { @@ -457,13 +457,13 @@ export const DigitalAudio_Bus = { if (message.name !== '') { obj.name = message.name; } - if (message.muted === true) { + if (message.muted !== false) { obj.muted = message.muted; } - if (message.solo === true) { + if (message.solo !== false) { obj.solo = message.solo; } - if (message.testTone === true) { + if (message.testTone !== false) { obj.testTone = message.testTone; } if (message.masterLevel !== 0) { @@ -843,13 +843,13 @@ export const DigitalAudio_Device_Channel = { message: DigitalAudio_Device_Channel, writer: _m0.Writer = _m0.Writer.create(), ): _m0.Writer { - if (message.muteEnable === true) { + if (message.muteEnable !== false) { writer.uint32(8).bool(message.muteEnable); } - if (message.soloEnable === true) { + if (message.soloEnable !== false) { writer.uint32(16).bool(message.soloEnable); } - if (message.toneEnable === true) { + if (message.toneEnable !== false) { writer.uint32(24).bool(message.toneEnable); } if (message.audioDelay !== 0) { @@ -936,13 +936,13 @@ export const DigitalAudio_Device_Channel = { toJSON(message: DigitalAudio_Device_Channel): unknown { const obj: any = {}; - if (message.muteEnable === true) { + if (message.muteEnable !== false) { obj.muteEnable = message.muteEnable; } - if (message.soloEnable === true) { + if (message.soloEnable !== false) { obj.soloEnable = message.soloEnable; } - if (message.toneEnable === true) { + if (message.toneEnable !== false) { obj.toneEnable = message.toneEnable; } if (message.audioDelay !== 0) { @@ -992,7 +992,7 @@ export const DigitalAudio_Device_Routing = { for (const v of message.map) { DigitalAudio_Device_Map.encode(v!, writer.uint32(18).fork()).ldelim(); } - if (message.isCustomMap === true) { + if (message.isCustomMap !== false) { writer.uint32(24).bool(message.isCustomMap); } if (message.masterChannel !== undefined) { @@ -1088,7 +1088,7 @@ export const DigitalAudio_Device_Routing = { if (message.map?.length) { obj.map = message.map.map((e) => DigitalAudio_Device_Map.toJSON(e)); } - if (message.isCustomMap === true) { + if (message.isCustomMap !== false) { obj.isCustomMap = message.isCustomMap; } if (message.masterChannel !== undefined) { diff --git a/proto/dmxProfiles.ts b/proto/dmxProfiles.ts index 54baa0a..46870c9 100644 --- a/proto/dmxProfiles.ts +++ b/proto/dmxProfiles.ts @@ -312,7 +312,7 @@ export const DMXProfiles_DMXProfile = { writer.uint32(18).fork(), ).ldelim(); } - if (message.isEnabled === true) { + if (message.isEnabled !== false) { writer.uint32(24).bool(message.isEnabled); } for (const v of message.customMappings) { @@ -410,7 +410,7 @@ export const DMXProfiles_DMXProfile = { if (message.fixture !== undefined) { obj.fixture = DMXProfiles_DMXProfile_Fixture.toJSON(message.fixture); } - if (message.isEnabled === true) { + if (message.isEnabled !== false) { obj.isEnabled = message.isEnabled; } if (message.customMappings?.length) { diff --git a/proto/effects.ts b/proto/effects.ts index 8804f35..725d7ae 100644 --- a/proto/effects.ts +++ b/proto/effects.ts @@ -180,7 +180,7 @@ export const Effect = { if (message.uuid !== undefined) { UUID.encode(message.uuid, writer.uint32(10).fork()).ldelim(); } - if (message.enabled === true) { + if (message.enabled !== false) { writer.uint32(16).bool(message.enabled); } if (message.name !== '') { @@ -296,7 +296,7 @@ export const Effect = { if (message.uuid !== undefined) { obj.uuid = UUID.toJSON(message.uuid); } - if (message.enabled === true) { + if (message.enabled !== false) { obj.enabled = message.enabled; } if (message.name !== '') { diff --git a/proto/font.proto b/proto/font.proto new file mode 100755 index 0000000..56408f4 --- /dev/null +++ b/proto/font.proto @@ -0,0 +1,21 @@ +syntax = "proto3"; + +package rv.data; + +option cc_enable_arenas = true; +option csharp_namespace = "Pro.SerializationInterop.RVProtoData"; +option swift_prefix = "RVData_"; + +message Font { + reserved 3; + reserved 5; + reserved 6; + reserved 7; + string name = 1; + double size = 2; + bool italic = 4; + bool bold = 8; + string family = 9; + string face = 10; +} + diff --git a/proto/font.ts b/proto/font.ts new file mode 100644 index 0000000..843a3e5 --- /dev/null +++ b/proto/font.ts @@ -0,0 +1,163 @@ +/* eslint-disable */ +import _m0 from "protobufjs/minimal"; + +export const protobufPackage = "rv.data"; + +export interface Font { + name: string; + size: number; + italic: boolean; + bold: boolean; + family: string; + face: string; +} + +function createBaseFont(): Font { + return { name: "", size: 0, italic: false, bold: false, family: "", face: "" }; +} + +export const Font = { + encode(message: Font, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.name !== "") { + writer.uint32(10).string(message.name); + } + if (message.size !== 0) { + writer.uint32(17).double(message.size); + } + if (message.italic !== false) { + writer.uint32(32).bool(message.italic); + } + if (message.bold !== false) { + writer.uint32(64).bool(message.bold); + } + if (message.family !== "") { + writer.uint32(74).string(message.family); + } + if (message.face !== "") { + writer.uint32(82).string(message.face); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): Font { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseFont(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } + + message.name = reader.string(); + continue; + case 2: + if (tag !== 17) { + break; + } + + message.size = reader.double(); + continue; + case 4: + if (tag !== 32) { + break; + } + + message.italic = reader.bool(); + continue; + case 8: + if (tag !== 64) { + break; + } + + message.bold = reader.bool(); + continue; + case 9: + if (tag !== 74) { + break; + } + + message.family = reader.string(); + continue; + case 10: + if (tag !== 82) { + break; + } + + message.face = reader.string(); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(object: any): Font { + return { + name: isSet(object.name) ? globalThis.String(object.name) : "", + size: isSet(object.size) ? globalThis.Number(object.size) : 0, + italic: isSet(object.italic) ? globalThis.Boolean(object.italic) : false, + bold: isSet(object.bold) ? globalThis.Boolean(object.bold) : false, + family: isSet(object.family) ? globalThis.String(object.family) : "", + face: isSet(object.face) ? globalThis.String(object.face) : "", + }; + }, + + toJSON(message: Font): unknown { + const obj: any = {}; + if (message.name !== "") { + obj.name = message.name; + } + if (message.size !== 0) { + obj.size = message.size; + } + if (message.italic !== false) { + obj.italic = message.italic; + } + if (message.bold !== false) { + obj.bold = message.bold; + } + if (message.family !== "") { + obj.family = message.family; + } + if (message.face !== "") { + obj.face = message.face; + } + return obj; + }, + + create, I>>(base?: I): Font { + return Font.fromPartial(base ?? ({} as any)); + }, + fromPartial, I>>(object: I): Font { + const message = createBaseFont(); + message.name = object.name ?? ""; + message.size = object.size ?? 0; + message.italic = object.italic ?? false; + message.bold = object.bold ?? false; + message.family = object.family ?? ""; + message.face = object.face ?? ""; + return message; + }, +}; + +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; + +export type DeepPartial = T extends Builtin ? T + : T extends globalThis.Array ? globalThis.Array> + : T extends ReadonlyArray ? ReadonlyArray> + : T extends {} ? { [K in keyof T]?: DeepPartial } + : Partial; + +type KeysOfUnion = T extends T ? keyof T : never; +export type Exact = P extends Builtin ? P + : P & { [K in keyof P]: Exact } & { [K in Exclude>]: never }; + +function isSet(value: any): boolean { + return value !== null && value !== undefined; +} diff --git a/proto/google/protobuf/wrappers.ts b/proto/google/protobuf/wrappers.ts index 6098440..fdf9488 100644 --- a/proto/google/protobuf/wrappers.ts +++ b/proto/google/protobuf/wrappers.ts @@ -427,7 +427,7 @@ export const BoolValue = { message: BoolValue, writer: _m0.Writer = _m0.Writer.create(), ): _m0.Writer { - if (message.value === true) { + if (message.value !== false) { writer.uint32(8).bool(message.value); } return writer; @@ -465,7 +465,7 @@ export const BoolValue = { toJSON(message: BoolValue): unknown { const obj: any = {}; - if (message.value === true) { + if (message.value !== false) { obj.value = message.value; } return obj; @@ -616,7 +616,7 @@ export const BytesValue = { }; function bytesFromBase64(b64: string): Uint8Array { - if (globalThis.Buffer) { + if ((globalThis as any).Buffer) { return Uint8Array.from(globalThis.Buffer.from(b64, 'base64')); } else { const bin = globalThis.atob(b64); @@ -629,7 +629,7 @@ function bytesFromBase64(b64: string): Uint8Array { } function base64FromBytes(arr: Uint8Array): string { - if (globalThis.Buffer) { + if ((globalThis as any).Buffer) { return globalThis.Buffer.from(arr).toString('base64'); } else { const bin: string[] = []; diff --git a/proto/graphicsData.proto b/proto/graphicsData.proto index 3963abb..5d2ef1b 100644 --- a/proto/graphicsData.proto +++ b/proto/graphicsData.proto @@ -11,6 +11,7 @@ import "color.proto"; import "digitalAudio.proto"; import "effects.proto"; import "fileProperties.proto"; +import "font.proto"; import "intRange.proto"; import "url.proto"; import "uuid.proto"; @@ -252,19 +253,6 @@ message Graphics { } message Attributes { - message Font { - reserved 3; - reserved 5; - reserved 6; - reserved 7; - string name = 1; - double size = 2; - bool italic = 4; - bool bold = 8; - string family = 9; - string face = 10; - } - message Underline { enum Style { STYLE_NONE = 0; @@ -362,7 +350,7 @@ message Graphics { ALIGNMENT_NATURAL = 4; } - .rv.data.Graphics.Text.Attributes.Font font = 1; + .rv.data.Font font = 1; .rv.data.Graphics.Text.Attributes.Capitalization capitalization = 2; .rv.data.Graphics.Text.Attributes.Underline underline_style = 4; .rv.data.Color underline_color = 5; @@ -522,6 +510,7 @@ message Media { } .rv.data.Media.ScaleBehavior scale_behavior = 1; + bool is_blurred = 16; .rv.data.Media.ScaleAlignment scale_alignment = 2; bool flipped_horizontally = 3; bool flipped_vertically = 4; diff --git a/proto/graphicsData.ts b/proto/graphicsData.ts index 426b391..fc9908c 100644 --- a/proto/graphicsData.ts +++ b/proto/graphicsData.ts @@ -5,6 +5,7 @@ import { Color } from './color'; import { DigitalAudio_Device_Routing } from './digitalAudio'; import { Effect } from './effects'; import { FileProperties } from './fileProperties'; +import { Font } from './font'; import { IntRange } from './intRange'; import { URL } from './url'; import { UUID } from './uuid'; @@ -748,7 +749,7 @@ export function graphics_Text_ChordPro_NotationToJSON( } export interface Graphics_Text_Attributes { - font: Graphics_Text_Attributes_Font | undefined; + font: Font | undefined; capitalization: Graphics_Text_Attributes_Capitalization; underlineStyle: Graphics_Text_Attributes_Underline | undefined; underlineColor: Color | undefined; @@ -878,15 +879,6 @@ export function graphics_Text_Attributes_AlignmentToJSON( } } -export interface Graphics_Text_Attributes_Font { - name: string; - size: number; - italic: boolean; - bold: boolean; - family: string; - face: string; -} - export interface Graphics_Text_Attributes_Underline { style: Graphics_Text_Attributes_Underline_Style; pattern: Graphics_Text_Attributes_Underline_Pattern; @@ -1504,6 +1496,7 @@ export function media_TransportProperties_RetriggerSettingToJSON( export interface Media_DrawingProperties { scaleBehavior: Media_ScaleBehavior; + isBlurred: boolean; scaleAlignment: Media_ScaleAlignment; flippedHorizontally: boolean; flippedVertically: boolean; @@ -1803,10 +1796,10 @@ export const Graphics_Element = { if (message.opacity !== 0) { writer.uint32(41).double(message.opacity); } - if (message.locked === true) { + if (message.locked !== false) { writer.uint32(48).bool(message.locked); } - if (message.aspectRatioLocked === true) { + if (message.aspectRatioLocked !== false) { writer.uint32(56).bool(message.aspectRatioLocked); } if (message.path !== undefined) { @@ -1833,7 +1826,7 @@ export const Graphics_Element = { if (message.flipMode !== 0) { writer.uint32(120).int32(message.flipMode); } - if (message.hidden === true) { + if (message.hidden !== false) { writer.uint32(128).bool(message.hidden); } if (message.textLineMask !== undefined) { @@ -2035,10 +2028,10 @@ export const Graphics_Element = { if (message.opacity !== 0) { obj.opacity = message.opacity; } - if (message.locked === true) { + if (message.locked !== false) { obj.locked = message.locked; } - if (message.aspectRatioLocked === true) { + if (message.aspectRatioLocked !== false) { obj.aspectRatioLocked = message.aspectRatioLocked; } if (message.path !== undefined) { @@ -2062,7 +2055,7 @@ export const Graphics_Element = { if (message.flipMode !== 0) { obj.flipMode = graphics_Element_FlipModeToJSON(message.flipMode); } - if (message.hidden === true) { + if (message.hidden !== false) { obj.hidden = message.hidden; } if (message.textLineMask !== undefined) { @@ -2506,7 +2499,7 @@ export const Graphics_Path = { message: Graphics_Path, writer: _m0.Writer = _m0.Writer.create(), ): _m0.Writer { - if (message.closed === true) { + if (message.closed !== false) { writer.uint32(8).bool(message.closed); } for (const v of message.points) { @@ -2575,7 +2568,7 @@ export const Graphics_Path = { toJSON(message: Graphics_Path): unknown { const obj: any = {}; - if (message.closed === true) { + if (message.closed !== false) { obj.closed = message.closed; } if (message.points?.length) { @@ -2627,7 +2620,7 @@ export const Graphics_Path_BezierPoint = { if (message.q1 !== undefined) { Graphics_Point.encode(message.q1, writer.uint32(26).fork()).ldelim(); } - if (message.curved === true) { + if (message.curved !== false) { writer.uint32(32).bool(message.curved); } return writer; @@ -2703,7 +2696,7 @@ export const Graphics_Path_BezierPoint = { if (message.q1 !== undefined) { obj.q1 = Graphics_Point.toJSON(message.q1); } - if (message.curved === true) { + if (message.curved !== false) { obj.curved = message.curved; } return obj; @@ -3244,7 +3237,7 @@ export const Graphics_Fill = { message: Graphics_Fill, writer: _m0.Writer = _m0.Writer.create(), ): _m0.Writer { - if (message.enable === true) { + if (message.enable !== false) { writer.uint32(32).bool(message.enable); } if (message.color !== undefined) { @@ -3339,7 +3332,7 @@ export const Graphics_Fill = { toJSON(message: Graphics_Fill): unknown { const obj: any = {}; - if (message.enable === true) { + if (message.enable !== false) { obj.enable = message.enable; } if (message.color !== undefined) { @@ -3935,7 +3928,7 @@ export const Graphics_Shadow = { if (message.opacity !== 0) { writer.uint32(49).double(message.opacity); } - if (message.enable === true) { + if (message.enable !== false) { writer.uint32(56).bool(message.enable); } return writer; @@ -4041,7 +4034,7 @@ export const Graphics_Shadow = { if (message.opacity !== 0) { obj.opacity = message.opacity; } - if (message.enable === true) { + if (message.enable !== false) { obj.enable = message.enable; } return obj; @@ -4093,7 +4086,7 @@ export const Graphics_Stroke = { writer.double(v); } writer.ldelim(); - if (message.enable === true) { + if (message.enable !== false) { writer.uint32(40).bool(message.enable); } return writer; @@ -4189,7 +4182,7 @@ export const Graphics_Stroke = { if (message.pattern?.length) { obj.pattern = message.pattern; } - if (message.enable === true) { + if (message.enable !== false) { obj.enable = message.enable; } return obj; @@ -4231,7 +4224,7 @@ export const Graphics_Feather = { if (message.radius !== 0) { writer.uint32(17).double(message.radius); } - if (message.enable === true) { + if (message.enable !== false) { writer.uint32(24).bool(message.enable); } return writer; @@ -4293,7 +4286,7 @@ export const Graphics_Feather = { if (message.radius !== 0) { obj.radius = message.radius; } - if (message.enable === true) { + if (message.enable !== false) { obj.enable = message.enable; } return obj; @@ -4359,7 +4352,7 @@ export const Graphics_Text = { writer.uint32(66).fork(), ).ldelim(); } - if (message.isSuperscriptStandardized === true) { + if (message.isSuperscriptStandardized !== false) { writer.uint32(72).bool(message.isSuperscriptStandardized); } if (message.transform !== 0) { @@ -4529,7 +4522,7 @@ export const Graphics_Text = { if (message.margins !== undefined) { obj.margins = Graphics_EdgeInsets.toJSON(message.margins); } - if (message.isSuperscriptStandardized === true) { + if (message.isSuperscriptStandardized !== false) { obj.isSuperscriptStandardized = message.isSuperscriptStandardized; } if (message.transform !== 0) { @@ -4596,7 +4589,7 @@ export const Graphics_Text_LineFillMask = { message: Graphics_Text_LineFillMask, writer: _m0.Writer = _m0.Writer.create(), ): _m0.Writer { - if (message.enabled === true) { + if (message.enabled !== false) { writer.uint32(8).bool(message.enabled); } if (message.heightOffset !== 0) { @@ -4704,7 +4697,7 @@ export const Graphics_Text_LineFillMask = { toJSON(message: Graphics_Text_LineFillMask): unknown { const obj: any = {}; - if (message.enabled === true) { + if (message.enabled !== false) { obj.enabled = message.enabled; } if (message.heightOffset !== 0) { @@ -4761,7 +4754,7 @@ export const Graphics_Text_GradientFill = { writer.uint32(10).fork(), ).ldelim(); } - if (message.stretchToDocumentBounds === true) { + if (message.stretchToDocumentBounds !== false) { writer.uint32(16).bool(message.stretchToDocumentBounds); } return writer; @@ -4817,7 +4810,7 @@ export const Graphics_Text_GradientFill = { if (message.gradient !== undefined) { obj.gradient = Graphics_Gradient.toJSON(message.gradient); } - if (message.stretchToDocumentBounds === true) { + if (message.stretchToDocumentBounds !== false) { obj.stretchToDocumentBounds = message.stretchToDocumentBounds; } return obj; @@ -4977,7 +4970,7 @@ export const Graphics_Text_ChordPro = { message: Graphics_Text_ChordPro, writer: _m0.Writer = _m0.Writer.create(), ): _m0.Writer { - if (message.enabled === true) { + if (message.enabled !== false) { writer.uint32(8).bool(message.enabled); } if (message.notation !== 0) { @@ -5044,7 +5037,7 @@ export const Graphics_Text_ChordPro = { toJSON(message: Graphics_Text_ChordPro): unknown { const obj: any = {}; - if (message.enabled === true) { + if (message.enabled !== false) { obj.enabled = message.enabled; } if (message.notation !== 0) { @@ -5104,10 +5097,7 @@ export const Graphics_Text_Attributes = { writer: _m0.Writer = _m0.Writer.create(), ): _m0.Writer { if (message.font !== undefined) { - Graphics_Text_Attributes_Font.encode( - message.font, - writer.uint32(10).fork(), - ).ldelim(); + Font.encode(message.font, writer.uint32(10).fork()).ldelim(); } if (message.capitalization !== 0) { writer.uint32(16).int32(message.capitalization); @@ -5206,10 +5196,7 @@ export const Graphics_Text_Attributes = { break; } - message.font = Graphics_Text_Attributes_Font.decode( - reader, - reader.uint32(), - ); + message.font = Font.decode(reader, reader.uint32()); continue; case 2: if (tag !== 16) { @@ -5365,9 +5352,7 @@ export const Graphics_Text_Attributes = { fromJSON(object: any): Graphics_Text_Attributes { return { - font: isSet(object.font) - ? Graphics_Text_Attributes_Font.fromJSON(object.font) - : undefined, + font: isSet(object.font) ? Font.fromJSON(object.font) : undefined, capitalization: isSet(object.capitalization) ? graphics_Text_Attributes_CapitalizationFromJSON(object.capitalization) : 0, @@ -5425,7 +5410,7 @@ export const Graphics_Text_Attributes = { toJSON(message: Graphics_Text_Attributes): unknown { const obj: any = {}; if (message.font !== undefined) { - obj.font = Graphics_Text_Attributes_Font.toJSON(message.font); + obj.font = Font.toJSON(message.font); } if (message.capitalization !== 0) { obj.capitalization = graphics_Text_Attributes_CapitalizationToJSON( @@ -5506,7 +5491,7 @@ export const Graphics_Text_Attributes = { const message = createBaseGraphics_Text_Attributes(); message.font = object.font !== undefined && object.font !== null - ? Graphics_Text_Attributes_Font.fromPartial(object.font) + ? Font.fromPartial(object.font) : undefined; message.capitalization = object.capitalization ?? 0; message.underlineStyle = @@ -5572,158 +5557,6 @@ export const Graphics_Text_Attributes = { }, }; -function createBaseGraphics_Text_Attributes_Font(): Graphics_Text_Attributes_Font { - return { - name: '', - size: 0, - italic: false, - bold: false, - family: '', - face: '', - }; -} - -export const Graphics_Text_Attributes_Font = { - encode( - message: Graphics_Text_Attributes_Font, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.name !== '') { - writer.uint32(10).string(message.name); - } - if (message.size !== 0) { - writer.uint32(17).double(message.size); - } - if (message.italic === true) { - writer.uint32(32).bool(message.italic); - } - if (message.bold === true) { - writer.uint32(64).bool(message.bold); - } - if (message.family !== '') { - writer.uint32(74).string(message.family); - } - if (message.face !== '') { - writer.uint32(82).string(message.face); - } - return writer; - }, - - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): Graphics_Text_Attributes_Font { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseGraphics_Text_Attributes_Font(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 10) { - break; - } - - message.name = reader.string(); - continue; - case 2: - if (tag !== 17) { - break; - } - - message.size = reader.double(); - continue; - case 4: - if (tag !== 32) { - break; - } - - message.italic = reader.bool(); - continue; - case 8: - if (tag !== 64) { - break; - } - - message.bold = reader.bool(); - continue; - case 9: - if (tag !== 74) { - break; - } - - message.family = reader.string(); - continue; - case 10: - if (tag !== 82) { - break; - } - - message.face = reader.string(); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, - - fromJSON(object: any): Graphics_Text_Attributes_Font { - return { - name: isSet(object.name) ? globalThis.String(object.name) : '', - size: isSet(object.size) ? globalThis.Number(object.size) : 0, - italic: isSet(object.italic) ? globalThis.Boolean(object.italic) : false, - bold: isSet(object.bold) ? globalThis.Boolean(object.bold) : false, - family: isSet(object.family) ? globalThis.String(object.family) : '', - face: isSet(object.face) ? globalThis.String(object.face) : '', - }; - }, - - toJSON(message: Graphics_Text_Attributes_Font): unknown { - const obj: any = {}; - if (message.name !== '') { - obj.name = message.name; - } - if (message.size !== 0) { - obj.size = message.size; - } - if (message.italic === true) { - obj.italic = message.italic; - } - if (message.bold === true) { - obj.bold = message.bold; - } - if (message.family !== '') { - obj.family = message.family; - } - if (message.face !== '') { - obj.face = message.face; - } - return obj; - }, - - create, I>>( - base?: I, - ): Graphics_Text_Attributes_Font { - return Graphics_Text_Attributes_Font.fromPartial(base ?? ({} as any)); - }, - fromPartial, I>>( - object: I, - ): Graphics_Text_Attributes_Font { - const message = createBaseGraphics_Text_Attributes_Font(); - message.name = object.name ?? ''; - message.size = object.size ?? 0; - message.italic = object.italic ?? false; - message.bold = object.bold ?? false; - message.family = object.family ?? ''; - message.face = object.face ?? ''; - return message; - }, -}; - function createBaseGraphics_Text_Attributes_Underline(): Graphics_Text_Attributes_Underline { return { style: 0, pattern: 0, byWord: false }; } @@ -5739,7 +5572,7 @@ export const Graphics_Text_Attributes_Underline = { if (message.pattern !== 0) { writer.uint32(16).int32(message.pattern); } - if (message.byWord === true) { + if (message.byWord !== false) { writer.uint32(24).bool(message.byWord); } return writer; @@ -5808,7 +5641,7 @@ export const Graphics_Text_Attributes_Underline = { message.pattern, ); } - if (message.byWord === true) { + if (message.byWord !== false) { obj.byWord = message.byWord; } return obj; @@ -6289,7 +6122,7 @@ export const Graphics_Text_Attributes_Paragraph_TextList = { message: Graphics_Text_Attributes_Paragraph_TextList, writer: _m0.Writer = _m0.Writer.create(), ): _m0.Writer { - if (message.isEnabled === true) { + if (message.isEnabled !== false) { writer.uint32(8).bool(message.isEnabled); } if (message.numberType !== 0) { @@ -6382,7 +6215,7 @@ export const Graphics_Text_Attributes_Paragraph_TextList = { toJSON(message: Graphics_Text_Attributes_Paragraph_TextList): unknown { const obj: any = {}; - if (message.isEnabled === true) { + if (message.isEnabled !== false) { obj.isEnabled = message.isEnabled; } if (message.numberType !== 0) { @@ -7442,13 +7275,13 @@ export const Media_Audio_Channel = { if (message.index !== 0) { writer.uint32(8).uint32(message.index); } - if (message.muted === true) { + if (message.muted !== false) { writer.uint32(16).bool(message.muted); } if (message.volume !== 0) { writer.uint32(25).double(message.volume); } - if (message.compressLimit === true) { + if (message.compressLimit !== false) { writer.uint32(32).bool(message.compressLimit); } for (const v of message.outputs) { @@ -7530,13 +7363,13 @@ export const Media_Audio_Channel = { if (message.index !== 0) { obj.index = Math.round(message.index); } - if (message.muted === true) { + if (message.muted !== false) { obj.muted = message.muted; } if (message.volume !== 0) { obj.volume = message.volume; } - if (message.compressLimit === true) { + if (message.compressLimit !== false) { obj.compressLimit = message.compressLimit; } if (message.outputs?.length) { @@ -7654,7 +7487,7 @@ export const Media_AudioProperties = { for (const v of message.audioChannels) { Media_Audio_Channel.encode(v!, writer.uint32(18).fork()).ldelim(); } - if (message.isCustomMapping === true) { + if (message.isCustomMapping !== false) { writer.uint32(24).bool(message.isCustomMapping); } return writer; @@ -7725,7 +7558,7 @@ export const Media_AudioProperties = { Media_Audio_Channel.toJSON(e), ); } - if (message.isCustomMapping === true) { + if (message.isCustomMapping !== false) { obj.isCustomMapping = message.isCustomMapping; } return obj; @@ -7786,10 +7619,10 @@ export const Media_TransportProperties = { if (message.fadeOutDuration !== 0) { writer.uint32(65).double(message.fadeOutDuration); } - if (message.shouldFadeIn === true) { + if (message.shouldFadeIn !== false) { writer.uint32(72).bool(message.shouldFadeIn); } - if (message.shouldFadeOut === true) { + if (message.shouldFadeOut !== false) { writer.uint32(80).bool(message.shouldFadeOut); } if (message.endPoint !== 0) { @@ -7964,10 +7797,10 @@ export const Media_TransportProperties = { if (message.fadeOutDuration !== 0) { obj.fadeOutDuration = message.fadeOutDuration; } - if (message.shouldFadeIn === true) { + if (message.shouldFadeIn !== false) { obj.shouldFadeIn = message.shouldFadeIn; } - if (message.shouldFadeOut === true) { + if (message.shouldFadeOut !== false) { obj.shouldFadeOut = message.shouldFadeOut; } if (message.endPoint !== 0) { @@ -8020,6 +7853,7 @@ export const Media_TransportProperties = { function createBaseMedia_DrawingProperties(): Media_DrawingProperties { return { scaleBehavior: 0, + isBlurred: false, scaleAlignment: 0, flippedHorizontally: false, flippedVertically: false, @@ -8045,13 +7879,16 @@ export const Media_DrawingProperties = { if (message.scaleBehavior !== 0) { writer.uint32(8).int32(message.scaleBehavior); } + if (message.isBlurred !== false) { + writer.uint32(128).bool(message.isBlurred); + } if (message.scaleAlignment !== 0) { writer.uint32(16).int32(message.scaleAlignment); } - if (message.flippedHorizontally === true) { + if (message.flippedHorizontally !== false) { writer.uint32(24).bool(message.flippedHorizontally); } - if (message.flippedVertically === true) { + if (message.flippedVertically !== false) { writer.uint32(32).bool(message.flippedVertically); } if (message.naturalSize !== undefined) { @@ -8069,10 +7906,10 @@ export const Media_DrawingProperties = { writer.uint32(58).fork(), ).ldelim(); } - if (message.customImageAspectLocked === true) { + if (message.customImageAspectLocked !== false) { writer.uint32(64).bool(message.customImageAspectLocked); } - if (message.alphaInverted === true) { + if (message.alphaInverted !== false) { writer.uint32(72).bool(message.alphaInverted); } if (message.nativeRotation !== 0) { @@ -8087,7 +7924,7 @@ export const Media_DrawingProperties = { for (const v of message.effects) { Effect.encode(v!, writer.uint32(98).fork()).ldelim(); } - if (message.cropEnable === true) { + if (message.cropEnable !== false) { writer.uint32(104).bool(message.cropEnable); } if (message.cropInsets !== undefined) { @@ -8120,6 +7957,13 @@ export const Media_DrawingProperties = { message.scaleBehavior = reader.int32() as any; continue; + case 16: + if (tag !== 128) { + break; + } + + message.isBlurred = reader.bool(); + continue; case 2: if (tag !== 16) { break; @@ -8241,6 +8085,9 @@ export const Media_DrawingProperties = { scaleBehavior: isSet(object.scaleBehavior) ? media_ScaleBehaviorFromJSON(object.scaleBehavior) : 0, + isBlurred: isSet(object.isBlurred) + ? globalThis.Boolean(object.isBlurred) + : false, scaleAlignment: isSet(object.scaleAlignment) ? media_ScaleAlignmentFromJSON(object.scaleAlignment) : 0, @@ -8293,13 +8140,16 @@ export const Media_DrawingProperties = { if (message.scaleBehavior !== 0) { obj.scaleBehavior = media_ScaleBehaviorToJSON(message.scaleBehavior); } + if (message.isBlurred !== false) { + obj.isBlurred = message.isBlurred; + } if (message.scaleAlignment !== 0) { obj.scaleAlignment = media_ScaleAlignmentToJSON(message.scaleAlignment); } - if (message.flippedHorizontally === true) { + if (message.flippedHorizontally !== false) { obj.flippedHorizontally = message.flippedHorizontally; } - if (message.flippedVertically === true) { + if (message.flippedVertically !== false) { obj.flippedVertically = message.flippedVertically; } if (message.naturalSize !== undefined) { @@ -8311,10 +8161,10 @@ export const Media_DrawingProperties = { if (message.customImageBounds !== undefined) { obj.customImageBounds = Graphics_Rect.toJSON(message.customImageBounds); } - if (message.customImageAspectLocked === true) { + if (message.customImageAspectLocked !== false) { obj.customImageAspectLocked = message.customImageAspectLocked; } - if (message.alphaInverted === true) { + if (message.alphaInverted !== false) { obj.alphaInverted = message.alphaInverted; } if (message.nativeRotation !== 0) { @@ -8330,7 +8180,7 @@ export const Media_DrawingProperties = { if (message.effects?.length) { obj.effects = message.effects.map((e) => Effect.toJSON(e)); } - if (message.cropEnable === true) { + if (message.cropEnable !== false) { obj.cropEnable = message.cropEnable; } if (message.cropInsets !== undefined) { @@ -8352,6 +8202,7 @@ export const Media_DrawingProperties = { ): Media_DrawingProperties { const message = createBaseMedia_DrawingProperties(); message.scaleBehavior = object.scaleBehavior ?? 0; + message.isBlurred = object.isBlurred ?? false; message.scaleAlignment = object.scaleAlignment ?? 0; message.flippedHorizontally = object.flippedHorizontally ?? false; message.flippedVertically = object.flippedVertically ?? false; @@ -8412,7 +8263,7 @@ export const Media_VideoProperties = { if (message.endBehavior !== 0) { writer.uint32(32).int32(message.endBehavior); } - if (message.softLoop === true) { + if (message.softLoop !== false) { writer.uint32(40).bool(message.softLoop); } if (message.softLoopDuration !== 0) { @@ -8522,7 +8373,7 @@ export const Media_VideoProperties = { message.endBehavior, ); } - if (message.softLoop === true) { + if (message.softLoop !== false) { obj.softLoop = message.softLoop; } if (message.softLoopDuration !== 0) { @@ -9308,7 +9159,7 @@ export const Media_WebContentTypeProperties = { }; function bytesFromBase64(b64: string): Uint8Array { - if (globalThis.Buffer) { + if ((globalThis as any).Buffer) { return Uint8Array.from(globalThis.Buffer.from(b64, 'base64')); } else { const bin = globalThis.atob(b64); @@ -9321,7 +9172,7 @@ function bytesFromBase64(b64: string): Uint8Array { } function base64FromBytes(arr: Uint8Array): string { - if (globalThis.Buffer) { + if ((globalThis as any).Buffer) { return globalThis.Buffer.from(arr).toString('base64'); } else { const bin: string[] = []; diff --git a/proto/layers.ts b/proto/layers.ts index 2313ab3..cf59ea1 100644 --- a/proto/layers.ts +++ b/proto/layers.ts @@ -271,10 +271,10 @@ export const Layer = { if (message.color !== undefined) { Color.encode(message.color, writer.uint32(26).fork()).ldelim(); } - if (message.muted === true) { + if (message.muted !== false) { writer.uint32(32).bool(message.muted); } - if (message.hidden === true) { + if (message.hidden !== false) { writer.uint32(40).bool(message.hidden); } if (message.blendMode !== 0) { @@ -482,10 +482,10 @@ export const Layer = { if (message.color !== undefined) { obj.color = Color.toJSON(message.color); } - if (message.muted === true) { + if (message.muted !== false) { obj.muted = message.muted; } - if (message.hidden === true) { + if (message.hidden !== false) { obj.hidden = message.hidden; } if (message.blendMode !== 0) { @@ -1002,7 +1002,7 @@ export const Layer_Blending_Matte_Alpha = { message: Layer_Blending_Matte_Alpha, writer: _m0.Writer = _m0.Writer.create(), ): _m0.Writer { - if (message.inverted === true) { + if (message.inverted !== false) { writer.uint32(8).bool(message.inverted); } return writer; @@ -1045,7 +1045,7 @@ export const Layer_Blending_Matte_Alpha = { toJSON(message: Layer_Blending_Matte_Alpha): unknown { const obj: any = {}; - if (message.inverted === true) { + if (message.inverted !== false) { obj.inverted = message.inverted; } return obj; @@ -1074,7 +1074,7 @@ export const Layer_Blending_Matte_Luma = { message: Layer_Blending_Matte_Luma, writer: _m0.Writer = _m0.Writer.create(), ): _m0.Writer { - if (message.inverted === true) { + if (message.inverted !== false) { writer.uint32(8).bool(message.inverted); } return writer; @@ -1117,7 +1117,7 @@ export const Layer_Blending_Matte_Luma = { toJSON(message: Layer_Blending_Matte_Luma): unknown { const obj: any = {}; - if (message.inverted === true) { + if (message.inverted !== false) { obj.inverted = message.inverted; } return obj; diff --git a/proto/macros.proto b/proto/macros.proto index f785157..ceac123 100644 --- a/proto/macros.proto +++ b/proto/macros.proto @@ -13,14 +13,95 @@ import "uuid.proto"; message MacrosDocument { message Macro { + enum ImageType { + ImageTypeDefault = 0; + ImageTypeOne = 1; + ImageTypeTwo = 2; + ImageTypeThree = 3; + ImageTypeFour = 4; + ImageTypeFive = 5; + ImageTypeSix = 6; + ImageTypeSeven = 7; + ImageTypeEight = 8; + ImageTypeNine = 9; + ImageTypeZero = 10; + ImageTypeArrow = 11; + ImageTypeAudio = 12; + ImageTypeBell = 13; + ImageTypeBulb = 14; + ImageTypeCloud = 15; + ImageTypeCupcake = 16; + ImageTypeExclamation = 17; + ImageTypeFlask = 18; + ImageTypeFlower = 19; + ImageTypeGlasses = 20; + ImageTypeHashtag = 21; + ImageTypeHat = 22; + ImageTypeHeart = 23; + ImageTypeMegaphone = 24; + ImageTypeMessage = 25; + ImageTypePaperclip = 26; + ImageTypePlay = 27; + ImageTypeSlide = 28; + ImageTypeStar = 29; + ImageTypeSun = 30; + ImageTypeSunglasses = 31; + ImageTypeTarget = 32; + ImageTypeTimer = 33; + ImageTypeVideoInput = 34; + ImageTypeXClear = 35; + ImageTypeLetterA = 36; + ImageTypeLetterB = 37; + ImageTypeLetterC = 38; + ImageTypeLetterD = 39; + ImageTypeLetterE = 40; + ImageTypeLetterF = 41; + ImageTypeLetterG = 42; + ImageTypeLetterH = 43; + ImageTypeLetterI = 44; + ImageTypeLetterJ = 45; + ImageTypeLetterK = 46; + ImageTypeLetterL = 47; + ImageTypeLetterM = 48; + ImageTypeLetterN = 49; + ImageTypeLetterO = 50; + ImageTypeLetterP = 51; + ImageTypeLetterQ = 52; + ImageTypeLetterR = 53; + ImageTypeLetterS = 54; + ImageTypeLetterT = 55; + ImageTypeLetterU = 56; + ImageTypeLetterV = 57; + ImageTypeLetterW = 58; + ImageTypeLetterX = 59; + ImageTypeLetterY = 60; + ImageTypeLetterZ = 61; + ImageTypeCustom = 62; + } + .rv.data.UUID uuid = 1; string name = 2; .rv.data.Color color = 3; repeated .rv.data.Action actions = 4; bool trigger_on_startup = 5; + .rv.data.MacrosDocument.Macro.ImageType image_type = 6; + bytes image_data = 7; + } + + message MacroCollection { + message Item { + oneof ItemType { + .rv.data.UUID macro_id = 1; + } + } + + .rv.data.UUID uuid = 1; + string name = 2; + repeated .rv.data.MacrosDocument.MacroCollection.Item items = 3; } .rv.data.ApplicationInfo application_info = 1; repeated .rv.data.MacrosDocument.Macro macros = 2; + repeated .rv.data.MacrosDocument.MacroCollection macro_collections = 3; } diff --git a/proto/macros.ts b/proto/macros.ts index 0562180..e930351 100644 --- a/proto/macros.ts +++ b/proto/macros.ts @@ -10,6 +10,7 @@ export const protobufPackage = 'rv.data'; export interface MacrosDocument { applicationInfo: ApplicationInfo | undefined; macros: MacrosDocument_Macro[]; + macroCollections: MacrosDocument_MacroCollection[]; } export interface MacrosDocument_Macro { @@ -18,10 +19,425 @@ export interface MacrosDocument_Macro { color: Color | undefined; actions: Action[]; triggerOnStartup: boolean; + imageType: MacrosDocument_Macro_ImageType; + imageData: Uint8Array; +} + +export enum MacrosDocument_Macro_ImageType { + ImageTypeDefault = 0, + ImageTypeOne = 1, + ImageTypeTwo = 2, + ImageTypeThree = 3, + ImageTypeFour = 4, + ImageTypeFive = 5, + ImageTypeSix = 6, + ImageTypeSeven = 7, + ImageTypeEight = 8, + ImageTypeNine = 9, + ImageTypeZero = 10, + ImageTypeArrow = 11, + ImageTypeAudio = 12, + ImageTypeBell = 13, + ImageTypeBulb = 14, + ImageTypeCloud = 15, + ImageTypeCupcake = 16, + ImageTypeExclamation = 17, + ImageTypeFlask = 18, + ImageTypeFlower = 19, + ImageTypeGlasses = 20, + ImageTypeHashtag = 21, + ImageTypeHat = 22, + ImageTypeHeart = 23, + ImageTypeMegaphone = 24, + ImageTypeMessage = 25, + ImageTypePaperclip = 26, + ImageTypePlay = 27, + ImageTypeSlide = 28, + ImageTypeStar = 29, + ImageTypeSun = 30, + ImageTypeSunglasses = 31, + ImageTypeTarget = 32, + ImageTypeTimer = 33, + ImageTypeVideoInput = 34, + ImageTypeXClear = 35, + ImageTypeLetterA = 36, + ImageTypeLetterB = 37, + ImageTypeLetterC = 38, + ImageTypeLetterD = 39, + ImageTypeLetterE = 40, + ImageTypeLetterF = 41, + ImageTypeLetterG = 42, + ImageTypeLetterH = 43, + ImageTypeLetterI = 44, + ImageTypeLetterJ = 45, + ImageTypeLetterK = 46, + ImageTypeLetterL = 47, + ImageTypeLetterM = 48, + ImageTypeLetterN = 49, + ImageTypeLetterO = 50, + ImageTypeLetterP = 51, + ImageTypeLetterQ = 52, + ImageTypeLetterR = 53, + ImageTypeLetterS = 54, + ImageTypeLetterT = 55, + ImageTypeLetterU = 56, + ImageTypeLetterV = 57, + ImageTypeLetterW = 58, + ImageTypeLetterX = 59, + ImageTypeLetterY = 60, + ImageTypeLetterZ = 61, + ImageTypeCustom = 62, + UNRECOGNIZED = -1, +} + +export function macrosDocument_Macro_ImageTypeFromJSON( + object: any, +): MacrosDocument_Macro_ImageType { + switch (object) { + case 0: + case 'ImageTypeDefault': + return MacrosDocument_Macro_ImageType.ImageTypeDefault; + case 1: + case 'ImageTypeOne': + return MacrosDocument_Macro_ImageType.ImageTypeOne; + case 2: + case 'ImageTypeTwo': + return MacrosDocument_Macro_ImageType.ImageTypeTwo; + case 3: + case 'ImageTypeThree': + return MacrosDocument_Macro_ImageType.ImageTypeThree; + case 4: + case 'ImageTypeFour': + return MacrosDocument_Macro_ImageType.ImageTypeFour; + case 5: + case 'ImageTypeFive': + return MacrosDocument_Macro_ImageType.ImageTypeFive; + case 6: + case 'ImageTypeSix': + return MacrosDocument_Macro_ImageType.ImageTypeSix; + case 7: + case 'ImageTypeSeven': + return MacrosDocument_Macro_ImageType.ImageTypeSeven; + case 8: + case 'ImageTypeEight': + return MacrosDocument_Macro_ImageType.ImageTypeEight; + case 9: + case 'ImageTypeNine': + return MacrosDocument_Macro_ImageType.ImageTypeNine; + case 10: + case 'ImageTypeZero': + return MacrosDocument_Macro_ImageType.ImageTypeZero; + case 11: + case 'ImageTypeArrow': + return MacrosDocument_Macro_ImageType.ImageTypeArrow; + case 12: + case 'ImageTypeAudio': + return MacrosDocument_Macro_ImageType.ImageTypeAudio; + case 13: + case 'ImageTypeBell': + return MacrosDocument_Macro_ImageType.ImageTypeBell; + case 14: + case 'ImageTypeBulb': + return MacrosDocument_Macro_ImageType.ImageTypeBulb; + case 15: + case 'ImageTypeCloud': + return MacrosDocument_Macro_ImageType.ImageTypeCloud; + case 16: + case 'ImageTypeCupcake': + return MacrosDocument_Macro_ImageType.ImageTypeCupcake; + case 17: + case 'ImageTypeExclamation': + return MacrosDocument_Macro_ImageType.ImageTypeExclamation; + case 18: + case 'ImageTypeFlask': + return MacrosDocument_Macro_ImageType.ImageTypeFlask; + case 19: + case 'ImageTypeFlower': + return MacrosDocument_Macro_ImageType.ImageTypeFlower; + case 20: + case 'ImageTypeGlasses': + return MacrosDocument_Macro_ImageType.ImageTypeGlasses; + case 21: + case 'ImageTypeHashtag': + return MacrosDocument_Macro_ImageType.ImageTypeHashtag; + case 22: + case 'ImageTypeHat': + return MacrosDocument_Macro_ImageType.ImageTypeHat; + case 23: + case 'ImageTypeHeart': + return MacrosDocument_Macro_ImageType.ImageTypeHeart; + case 24: + case 'ImageTypeMegaphone': + return MacrosDocument_Macro_ImageType.ImageTypeMegaphone; + case 25: + case 'ImageTypeMessage': + return MacrosDocument_Macro_ImageType.ImageTypeMessage; + case 26: + case 'ImageTypePaperclip': + return MacrosDocument_Macro_ImageType.ImageTypePaperclip; + case 27: + case 'ImageTypePlay': + return MacrosDocument_Macro_ImageType.ImageTypePlay; + case 28: + case 'ImageTypeSlide': + return MacrosDocument_Macro_ImageType.ImageTypeSlide; + case 29: + case 'ImageTypeStar': + return MacrosDocument_Macro_ImageType.ImageTypeStar; + case 30: + case 'ImageTypeSun': + return MacrosDocument_Macro_ImageType.ImageTypeSun; + case 31: + case 'ImageTypeSunglasses': + return MacrosDocument_Macro_ImageType.ImageTypeSunglasses; + case 32: + case 'ImageTypeTarget': + return MacrosDocument_Macro_ImageType.ImageTypeTarget; + case 33: + case 'ImageTypeTimer': + return MacrosDocument_Macro_ImageType.ImageTypeTimer; + case 34: + case 'ImageTypeVideoInput': + return MacrosDocument_Macro_ImageType.ImageTypeVideoInput; + case 35: + case 'ImageTypeXClear': + return MacrosDocument_Macro_ImageType.ImageTypeXClear; + case 36: + case 'ImageTypeLetterA': + return MacrosDocument_Macro_ImageType.ImageTypeLetterA; + case 37: + case 'ImageTypeLetterB': + return MacrosDocument_Macro_ImageType.ImageTypeLetterB; + case 38: + case 'ImageTypeLetterC': + return MacrosDocument_Macro_ImageType.ImageTypeLetterC; + case 39: + case 'ImageTypeLetterD': + return MacrosDocument_Macro_ImageType.ImageTypeLetterD; + case 40: + case 'ImageTypeLetterE': + return MacrosDocument_Macro_ImageType.ImageTypeLetterE; + case 41: + case 'ImageTypeLetterF': + return MacrosDocument_Macro_ImageType.ImageTypeLetterF; + case 42: + case 'ImageTypeLetterG': + return MacrosDocument_Macro_ImageType.ImageTypeLetterG; + case 43: + case 'ImageTypeLetterH': + return MacrosDocument_Macro_ImageType.ImageTypeLetterH; + case 44: + case 'ImageTypeLetterI': + return MacrosDocument_Macro_ImageType.ImageTypeLetterI; + case 45: + case 'ImageTypeLetterJ': + return MacrosDocument_Macro_ImageType.ImageTypeLetterJ; + case 46: + case 'ImageTypeLetterK': + return MacrosDocument_Macro_ImageType.ImageTypeLetterK; + case 47: + case 'ImageTypeLetterL': + return MacrosDocument_Macro_ImageType.ImageTypeLetterL; + case 48: + case 'ImageTypeLetterM': + return MacrosDocument_Macro_ImageType.ImageTypeLetterM; + case 49: + case 'ImageTypeLetterN': + return MacrosDocument_Macro_ImageType.ImageTypeLetterN; + case 50: + case 'ImageTypeLetterO': + return MacrosDocument_Macro_ImageType.ImageTypeLetterO; + case 51: + case 'ImageTypeLetterP': + return MacrosDocument_Macro_ImageType.ImageTypeLetterP; + case 52: + case 'ImageTypeLetterQ': + return MacrosDocument_Macro_ImageType.ImageTypeLetterQ; + case 53: + case 'ImageTypeLetterR': + return MacrosDocument_Macro_ImageType.ImageTypeLetterR; + case 54: + case 'ImageTypeLetterS': + return MacrosDocument_Macro_ImageType.ImageTypeLetterS; + case 55: + case 'ImageTypeLetterT': + return MacrosDocument_Macro_ImageType.ImageTypeLetterT; + case 56: + case 'ImageTypeLetterU': + return MacrosDocument_Macro_ImageType.ImageTypeLetterU; + case 57: + case 'ImageTypeLetterV': + return MacrosDocument_Macro_ImageType.ImageTypeLetterV; + case 58: + case 'ImageTypeLetterW': + return MacrosDocument_Macro_ImageType.ImageTypeLetterW; + case 59: + case 'ImageTypeLetterX': + return MacrosDocument_Macro_ImageType.ImageTypeLetterX; + case 60: + case 'ImageTypeLetterY': + return MacrosDocument_Macro_ImageType.ImageTypeLetterY; + case 61: + case 'ImageTypeLetterZ': + return MacrosDocument_Macro_ImageType.ImageTypeLetterZ; + case 62: + case 'ImageTypeCustom': + return MacrosDocument_Macro_ImageType.ImageTypeCustom; + case -1: + case 'UNRECOGNIZED': + default: + return MacrosDocument_Macro_ImageType.UNRECOGNIZED; + } +} + +export function macrosDocument_Macro_ImageTypeToJSON( + object: MacrosDocument_Macro_ImageType, +): string { + switch (object) { + case MacrosDocument_Macro_ImageType.ImageTypeDefault: + return 'ImageTypeDefault'; + case MacrosDocument_Macro_ImageType.ImageTypeOne: + return 'ImageTypeOne'; + case MacrosDocument_Macro_ImageType.ImageTypeTwo: + return 'ImageTypeTwo'; + case MacrosDocument_Macro_ImageType.ImageTypeThree: + return 'ImageTypeThree'; + case MacrosDocument_Macro_ImageType.ImageTypeFour: + return 'ImageTypeFour'; + case MacrosDocument_Macro_ImageType.ImageTypeFive: + return 'ImageTypeFive'; + case MacrosDocument_Macro_ImageType.ImageTypeSix: + return 'ImageTypeSix'; + case MacrosDocument_Macro_ImageType.ImageTypeSeven: + return 'ImageTypeSeven'; + case MacrosDocument_Macro_ImageType.ImageTypeEight: + return 'ImageTypeEight'; + case MacrosDocument_Macro_ImageType.ImageTypeNine: + return 'ImageTypeNine'; + case MacrosDocument_Macro_ImageType.ImageTypeZero: + return 'ImageTypeZero'; + case MacrosDocument_Macro_ImageType.ImageTypeArrow: + return 'ImageTypeArrow'; + case MacrosDocument_Macro_ImageType.ImageTypeAudio: + return 'ImageTypeAudio'; + case MacrosDocument_Macro_ImageType.ImageTypeBell: + return 'ImageTypeBell'; + case MacrosDocument_Macro_ImageType.ImageTypeBulb: + return 'ImageTypeBulb'; + case MacrosDocument_Macro_ImageType.ImageTypeCloud: + return 'ImageTypeCloud'; + case MacrosDocument_Macro_ImageType.ImageTypeCupcake: + return 'ImageTypeCupcake'; + case MacrosDocument_Macro_ImageType.ImageTypeExclamation: + return 'ImageTypeExclamation'; + case MacrosDocument_Macro_ImageType.ImageTypeFlask: + return 'ImageTypeFlask'; + case MacrosDocument_Macro_ImageType.ImageTypeFlower: + return 'ImageTypeFlower'; + case MacrosDocument_Macro_ImageType.ImageTypeGlasses: + return 'ImageTypeGlasses'; + case MacrosDocument_Macro_ImageType.ImageTypeHashtag: + return 'ImageTypeHashtag'; + case MacrosDocument_Macro_ImageType.ImageTypeHat: + return 'ImageTypeHat'; + case MacrosDocument_Macro_ImageType.ImageTypeHeart: + return 'ImageTypeHeart'; + case MacrosDocument_Macro_ImageType.ImageTypeMegaphone: + return 'ImageTypeMegaphone'; + case MacrosDocument_Macro_ImageType.ImageTypeMessage: + return 'ImageTypeMessage'; + case MacrosDocument_Macro_ImageType.ImageTypePaperclip: + return 'ImageTypePaperclip'; + case MacrosDocument_Macro_ImageType.ImageTypePlay: + return 'ImageTypePlay'; + case MacrosDocument_Macro_ImageType.ImageTypeSlide: + return 'ImageTypeSlide'; + case MacrosDocument_Macro_ImageType.ImageTypeStar: + return 'ImageTypeStar'; + case MacrosDocument_Macro_ImageType.ImageTypeSun: + return 'ImageTypeSun'; + case MacrosDocument_Macro_ImageType.ImageTypeSunglasses: + return 'ImageTypeSunglasses'; + case MacrosDocument_Macro_ImageType.ImageTypeTarget: + return 'ImageTypeTarget'; + case MacrosDocument_Macro_ImageType.ImageTypeTimer: + return 'ImageTypeTimer'; + case MacrosDocument_Macro_ImageType.ImageTypeVideoInput: + return 'ImageTypeVideoInput'; + case MacrosDocument_Macro_ImageType.ImageTypeXClear: + return 'ImageTypeXClear'; + case MacrosDocument_Macro_ImageType.ImageTypeLetterA: + return 'ImageTypeLetterA'; + case MacrosDocument_Macro_ImageType.ImageTypeLetterB: + return 'ImageTypeLetterB'; + case MacrosDocument_Macro_ImageType.ImageTypeLetterC: + return 'ImageTypeLetterC'; + case MacrosDocument_Macro_ImageType.ImageTypeLetterD: + return 'ImageTypeLetterD'; + case MacrosDocument_Macro_ImageType.ImageTypeLetterE: + return 'ImageTypeLetterE'; + case MacrosDocument_Macro_ImageType.ImageTypeLetterF: + return 'ImageTypeLetterF'; + case MacrosDocument_Macro_ImageType.ImageTypeLetterG: + return 'ImageTypeLetterG'; + case MacrosDocument_Macro_ImageType.ImageTypeLetterH: + return 'ImageTypeLetterH'; + case MacrosDocument_Macro_ImageType.ImageTypeLetterI: + return 'ImageTypeLetterI'; + case MacrosDocument_Macro_ImageType.ImageTypeLetterJ: + return 'ImageTypeLetterJ'; + case MacrosDocument_Macro_ImageType.ImageTypeLetterK: + return 'ImageTypeLetterK'; + case MacrosDocument_Macro_ImageType.ImageTypeLetterL: + return 'ImageTypeLetterL'; + case MacrosDocument_Macro_ImageType.ImageTypeLetterM: + return 'ImageTypeLetterM'; + case MacrosDocument_Macro_ImageType.ImageTypeLetterN: + return 'ImageTypeLetterN'; + case MacrosDocument_Macro_ImageType.ImageTypeLetterO: + return 'ImageTypeLetterO'; + case MacrosDocument_Macro_ImageType.ImageTypeLetterP: + return 'ImageTypeLetterP'; + case MacrosDocument_Macro_ImageType.ImageTypeLetterQ: + return 'ImageTypeLetterQ'; + case MacrosDocument_Macro_ImageType.ImageTypeLetterR: + return 'ImageTypeLetterR'; + case MacrosDocument_Macro_ImageType.ImageTypeLetterS: + return 'ImageTypeLetterS'; + case MacrosDocument_Macro_ImageType.ImageTypeLetterT: + return 'ImageTypeLetterT'; + case MacrosDocument_Macro_ImageType.ImageTypeLetterU: + return 'ImageTypeLetterU'; + case MacrosDocument_Macro_ImageType.ImageTypeLetterV: + return 'ImageTypeLetterV'; + case MacrosDocument_Macro_ImageType.ImageTypeLetterW: + return 'ImageTypeLetterW'; + case MacrosDocument_Macro_ImageType.ImageTypeLetterX: + return 'ImageTypeLetterX'; + case MacrosDocument_Macro_ImageType.ImageTypeLetterY: + return 'ImageTypeLetterY'; + case MacrosDocument_Macro_ImageType.ImageTypeLetterZ: + return 'ImageTypeLetterZ'; + case MacrosDocument_Macro_ImageType.ImageTypeCustom: + return 'ImageTypeCustom'; + case MacrosDocument_Macro_ImageType.UNRECOGNIZED: + default: + return 'UNRECOGNIZED'; + } +} + +export interface MacrosDocument_MacroCollection { + uuid: UUID | undefined; + name: string; + items: MacrosDocument_MacroCollection_Item[]; +} + +export interface MacrosDocument_MacroCollection_Item { + macroId?: UUID | undefined; } function createBaseMacrosDocument(): MacrosDocument { - return { applicationInfo: undefined, macros: [] }; + return { applicationInfo: undefined, macros: [], macroCollections: [] }; } export const MacrosDocument = { @@ -38,6 +454,12 @@ export const MacrosDocument = { for (const v of message.macros) { MacrosDocument_Macro.encode(v!, writer.uint32(18).fork()).ldelim(); } + for (const v of message.macroCollections) { + MacrosDocument_MacroCollection.encode( + v!, + writer.uint32(26).fork(), + ).ldelim(); + } return writer; }, @@ -68,6 +490,15 @@ export const MacrosDocument = { MacrosDocument_Macro.decode(reader, reader.uint32()), ); continue; + case 3: + if (tag !== 26) { + break; + } + + message.macroCollections.push( + MacrosDocument_MacroCollection.decode(reader, reader.uint32()), + ); + continue; } if ((tag & 7) === 4 || tag === 0) { break; @@ -85,6 +516,11 @@ export const MacrosDocument = { macros: globalThis.Array.isArray(object?.macros) ? object.macros.map((e: any) => MacrosDocument_Macro.fromJSON(e)) : [], + macroCollections: globalThis.Array.isArray(object?.macroCollections) + ? object.macroCollections.map((e: any) => + MacrosDocument_MacroCollection.fromJSON(e), + ) + : [], }; }, @@ -96,6 +532,11 @@ export const MacrosDocument = { if (message.macros?.length) { obj.macros = message.macros.map((e) => MacrosDocument_Macro.toJSON(e)); } + if (message.macroCollections?.length) { + obj.macroCollections = message.macroCollections.map((e) => + MacrosDocument_MacroCollection.toJSON(e), + ); + } return obj; }, @@ -114,6 +555,10 @@ export const MacrosDocument = { : undefined; message.macros = object.macros?.map((e) => MacrosDocument_Macro.fromPartial(e)) || []; + message.macroCollections = + object.macroCollections?.map((e) => + MacrosDocument_MacroCollection.fromPartial(e), + ) || []; return message; }, }; @@ -125,6 +570,8 @@ function createBaseMacrosDocument_Macro(): MacrosDocument_Macro { color: undefined, actions: [], triggerOnStartup: false, + imageType: 0, + imageData: new Uint8Array(0), }; } @@ -145,9 +592,15 @@ export const MacrosDocument_Macro = { for (const v of message.actions) { Action.encode(v!, writer.uint32(34).fork()).ldelim(); } - if (message.triggerOnStartup === true) { + if (message.triggerOnStartup !== false) { writer.uint32(40).bool(message.triggerOnStartup); } + if (message.imageType !== 0) { + writer.uint32(48).int32(message.imageType); + } + if (message.imageData.length !== 0) { + writer.uint32(58).bytes(message.imageData); + } return writer; }, @@ -197,6 +650,20 @@ export const MacrosDocument_Macro = { message.triggerOnStartup = reader.bool(); continue; + case 6: + if (tag !== 48) { + break; + } + + message.imageType = reader.int32() as any; + continue; + case 7: + if (tag !== 58) { + break; + } + + message.imageData = reader.bytes(); + continue; } if ((tag & 7) === 4 || tag === 0) { break; @@ -217,6 +684,12 @@ export const MacrosDocument_Macro = { triggerOnStartup: isSet(object.triggerOnStartup) ? globalThis.Boolean(object.triggerOnStartup) : false, + imageType: isSet(object.imageType) + ? macrosDocument_Macro_ImageTypeFromJSON(object.imageType) + : 0, + imageData: isSet(object.imageData) + ? bytesFromBase64(object.imageData) + : new Uint8Array(0), }; }, @@ -234,9 +707,15 @@ export const MacrosDocument_Macro = { if (message.actions?.length) { obj.actions = message.actions.map((e) => Action.toJSON(e)); } - if (message.triggerOnStartup === true) { + if (message.triggerOnStartup !== false) { obj.triggerOnStartup = message.triggerOnStartup; } + if (message.imageType !== 0) { + obj.imageType = macrosDocument_Macro_ImageTypeToJSON(message.imageType); + } + if (message.imageData.length !== 0) { + obj.imageData = base64FromBytes(message.imageData); + } return obj; }, @@ -260,10 +739,229 @@ export const MacrosDocument_Macro = { : undefined; message.actions = object.actions?.map((e) => Action.fromPartial(e)) || []; message.triggerOnStartup = object.triggerOnStartup ?? false; + message.imageType = object.imageType ?? 0; + message.imageData = object.imageData ?? new Uint8Array(0); return message; }, }; +function createBaseMacrosDocument_MacroCollection(): MacrosDocument_MacroCollection { + return { uuid: undefined, name: '', items: [] }; +} + +export const MacrosDocument_MacroCollection = { + encode( + message: MacrosDocument_MacroCollection, + writer: _m0.Writer = _m0.Writer.create(), + ): _m0.Writer { + if (message.uuid !== undefined) { + UUID.encode(message.uuid, writer.uint32(10).fork()).ldelim(); + } + if (message.name !== '') { + writer.uint32(18).string(message.name); + } + for (const v of message.items) { + MacrosDocument_MacroCollection_Item.encode( + v!, + writer.uint32(26).fork(), + ).ldelim(); + } + return writer; + }, + + decode( + input: _m0.Reader | Uint8Array, + length?: number, + ): MacrosDocument_MacroCollection { + const reader = + input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseMacrosDocument_MacroCollection(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } + + message.uuid = UUID.decode(reader, reader.uint32()); + continue; + case 2: + if (tag !== 18) { + break; + } + + message.name = reader.string(); + continue; + case 3: + if (tag !== 26) { + break; + } + + message.items.push( + MacrosDocument_MacroCollection_Item.decode(reader, reader.uint32()), + ); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(object: any): MacrosDocument_MacroCollection { + return { + uuid: isSet(object.uuid) ? UUID.fromJSON(object.uuid) : undefined, + name: isSet(object.name) ? globalThis.String(object.name) : '', + items: globalThis.Array.isArray(object?.items) + ? object.items.map((e: any) => + MacrosDocument_MacroCollection_Item.fromJSON(e), + ) + : [], + }; + }, + + toJSON(message: MacrosDocument_MacroCollection): unknown { + const obj: any = {}; + if (message.uuid !== undefined) { + obj.uuid = UUID.toJSON(message.uuid); + } + if (message.name !== '') { + obj.name = message.name; + } + if (message.items?.length) { + obj.items = message.items.map((e) => + MacrosDocument_MacroCollection_Item.toJSON(e), + ); + } + return obj; + }, + + create, I>>( + base?: I, + ): MacrosDocument_MacroCollection { + return MacrosDocument_MacroCollection.fromPartial(base ?? ({} as any)); + }, + fromPartial, I>>( + object: I, + ): MacrosDocument_MacroCollection { + const message = createBaseMacrosDocument_MacroCollection(); + message.uuid = + object.uuid !== undefined && object.uuid !== null + ? UUID.fromPartial(object.uuid) + : undefined; + message.name = object.name ?? ''; + message.items = + object.items?.map((e) => + MacrosDocument_MacroCollection_Item.fromPartial(e), + ) || []; + return message; + }, +}; + +function createBaseMacrosDocument_MacroCollection_Item(): MacrosDocument_MacroCollection_Item { + return { macroId: undefined }; +} + +export const MacrosDocument_MacroCollection_Item = { + encode( + message: MacrosDocument_MacroCollection_Item, + writer: _m0.Writer = _m0.Writer.create(), + ): _m0.Writer { + if (message.macroId !== undefined) { + UUID.encode(message.macroId, writer.uint32(10).fork()).ldelim(); + } + return writer; + }, + + decode( + input: _m0.Reader | Uint8Array, + length?: number, + ): MacrosDocument_MacroCollection_Item { + const reader = + input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseMacrosDocument_MacroCollection_Item(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } + + message.macroId = UUID.decode(reader, reader.uint32()); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(object: any): MacrosDocument_MacroCollection_Item { + return { + macroId: isSet(object.macroId) + ? UUID.fromJSON(object.macroId) + : undefined, + }; + }, + + toJSON(message: MacrosDocument_MacroCollection_Item): unknown { + const obj: any = {}; + if (message.macroId !== undefined) { + obj.macroId = UUID.toJSON(message.macroId); + } + return obj; + }, + + create, I>>( + base?: I, + ): MacrosDocument_MacroCollection_Item { + return MacrosDocument_MacroCollection_Item.fromPartial(base ?? ({} as any)); + }, + fromPartial< + I extends Exact, I>, + >(object: I): MacrosDocument_MacroCollection_Item { + const message = createBaseMacrosDocument_MacroCollection_Item(); + message.macroId = + object.macroId !== undefined && object.macroId !== null + ? UUID.fromPartial(object.macroId) + : undefined; + return message; + }, +}; + +function bytesFromBase64(b64: string): Uint8Array { + if ((globalThis as any).Buffer) { + return Uint8Array.from(globalThis.Buffer.from(b64, 'base64')); + } else { + const bin = globalThis.atob(b64); + const arr = new Uint8Array(bin.length); + for (let i = 0; i < bin.length; ++i) { + arr[i] = bin.charCodeAt(i); + } + return arr; + } +} + +function base64FromBytes(arr: Uint8Array): string { + if ((globalThis as any).Buffer) { + return globalThis.Buffer.from(arr).toString('base64'); + } else { + const bin: string[] = []; + arr.forEach((byte) => { + bin.push(globalThis.String.fromCharCode(byte)); + }); + return globalThis.btoa(bin.join('')); + } +} + type Builtin = | Date | Function diff --git a/proto/messages.ts b/proto/messages.ts index 78bdd56..5df98f0 100644 --- a/proto/messages.ts +++ b/proto/messages.ts @@ -130,7 +130,7 @@ export const Message = { if (message.timeToRemove !== 0) { writer.uint32(25).double(message.timeToRemove); } - if (message.visibleOnNetwork === true) { + if (message.visibleOnNetwork !== false) { writer.uint32(32).bool(message.visibleOnNetwork); } if (message.template !== undefined) { @@ -278,7 +278,7 @@ export const Message = { if (message.timeToRemove !== 0) { obj.timeToRemove = message.timeToRemove; } - if (message.visibleOnNetwork === true) { + if (message.visibleOnNetwork !== false) { obj.visibleOnNetwork = message.visibleOnNetwork; } if (message.template !== undefined) { diff --git a/proto/planningCenter.ts b/proto/planningCenter.ts index 7617df7..aa5c193 100644 --- a/proto/planningCenter.ts +++ b/proto/planningCenter.ts @@ -672,7 +672,7 @@ export const PlanningCenterPlan_PlanItem_Attachment = { if (message.pcoIdNum !== 0) { writer.uint32(40).uint32(message.pcoIdNum); } - if (message.needsUpdate === true) { + if (message.needsUpdate !== false) { writer.uint32(48).bool(message.needsUpdate); } if (message.updateDate !== undefined) { @@ -800,7 +800,7 @@ export const PlanningCenterPlan_PlanItem_Attachment = { if (message.pcoIdNum !== 0) { obj.pcoIdNum = Math.round(message.pcoIdNum); } - if (message.needsUpdate === true) { + if (message.needsUpdate !== false) { obj.needsUpdate = message.needsUpdate; } if (message.updateDate !== undefined) { diff --git a/proto/playlist.ts b/proto/playlist.ts index 4d7414a..2335738 100644 --- a/proto/playlist.ts +++ b/proto/playlist.ts @@ -256,7 +256,7 @@ export const Playlist = { if (message.type !== 0) { writer.uint32(24).int32(message.type); } - if (message.expanded === true) { + if (message.expanded !== false) { writer.uint32(32).bool(message.expanded); } if (message.targetedLayerUuid !== undefined) { @@ -274,7 +274,7 @@ export const Playlist = { for (const v of message.children) { Playlist.encode(v!, writer.uint32(74).fork()).ldelim(); } - if (message.timecodeEnabled === true) { + if (message.timecodeEnabled !== false) { writer.uint32(80).bool(message.timecodeEnabled); } if (message.timing !== 0) { @@ -510,7 +510,7 @@ export const Playlist = { if (message.type !== 0) { obj.type = playlist_TypeToJSON(message.type); } - if (message.expanded === true) { + if (message.expanded !== false) { obj.expanded = message.expanded; } if (message.targetedLayerUuid !== undefined) { @@ -528,7 +528,7 @@ export const Playlist = { if (message.children?.length) { obj.children = message.children.map((e) => Playlist.toJSON(e)); } - if (message.timecodeEnabled === true) { + if (message.timecodeEnabled !== false) { obj.timecodeEnabled = message.timecodeEnabled; } if (message.timing !== 0) { @@ -960,7 +960,7 @@ export const Playlist_StartupInfo = { message: Playlist_StartupInfo, writer: _m0.Writer = _m0.Writer.create(), ): _m0.Writer { - if (message.triggerOnStartup === true) { + if (message.triggerOnStartup !== false) { writer.uint32(8).bool(message.triggerOnStartup); } return writer; @@ -1003,7 +1003,7 @@ export const Playlist_StartupInfo = { toJSON(message: Playlist_StartupInfo): unknown { const obj: any = {}; - if (message.triggerOnStartup === true) { + if (message.triggerOnStartup !== false) { obj.triggerOnStartup = message.triggerOnStartup; } return obj; @@ -1051,7 +1051,7 @@ export const PlaylistItem = { for (const v of message.tags) { UUID.encode(v!, writer.uint32(58).fork()).ldelim(); } - if (message.isHidden === true) { + if (message.isHidden !== false) { writer.uint32(72).bool(message.isHidden); } if (message.header !== undefined) { @@ -1210,7 +1210,7 @@ export const PlaylistItem = { if (message.tags?.length) { obj.tags = message.tags.map((e) => UUID.toJSON(e)); } - if (message.isHidden === true) { + if (message.isHidden !== false) { obj.isHidden = message.isHidden; } if (message.header !== undefined) { diff --git a/proto/preferences.proto b/proto/preferences.proto new file mode 100755 index 0000000..0b4a5f6 --- /dev/null +++ b/proto/preferences.proto @@ -0,0 +1,195 @@ +syntax = "proto3"; + +package rv.data; + +option cc_enable_arenas = true; +option csharp_namespace = "Pro.SerializationInterop.RVProtoData"; +option swift_prefix = "RVData_"; + +import "action.proto"; +import "cue.proto"; +import "graphicsData.proto"; +import "groups.proto"; +import "labels.proto"; +import "proClockSource.proto"; +import "url.proto"; + +message Preferences { + message General { + bool house_of_worship_integrations = 1; + bool crash_reports = 2; + bool analytics = 3; + string logo_path = 4; + string language = 5; + } + + message Screens { + bool enable_at_launch = 1; + bool show_performance_stats = 2; + bool ignore_background_colors = 3; + .rv.data.ProClockSource clock_source = 4; + bool show_keynote_and_powerpoint = 5; + bool disable_blackmagic_sync_groups = 6; + bool use_directx_rendering = 7; + } + + message Import { + message Image { + message Duration { + message None { + } + + message Time { + double time = 1; + } + + message Random { + double minimum_time = 1; + double maximum_time = 2; + } + + oneof DurationType { + .rv.data.Preferences.Import.Image.Duration.None none = 1; + .rv.data.Preferences.Import.Image.Duration.Time time = 2; + .rv.data.Preferences.Import.Image.Duration.Random random = 3; + } + } + + .rv.data.Action.LayerType layer_type = 1; + .rv.data.Preferences.Import.Image.Duration duration = 2; + .rv.data.Cue.CompletionTargetType next_behavior = 3; + } + + message Video { + .rv.data.Action.LayerType layer_type = 1; + .rv.data.Media.TransportProperties.PlaybackBehavior playback_behavior = 2; + .rv.data.Media.VideoProperties.EndBehavior end_behavior = 3; + .rv.data.Cue.CompletionTargetType next_behavior = 4; + } + + message Audio { + .rv.data.Media.TransportProperties.PlaybackBehavior playback_behavior = 1; + .rv.data.Cue.CompletionTargetType next_behavior = 2; + } + + .rv.data.Media.ScaleBehavior foreground_scaling = 1; + bool foreground_is_blurred = 6; + .rv.data.Media.ScaleBehavior background_scaling = 2; + bool background_is_blurred = 7; + .rv.data.Preferences.Import.Image image = 3; + .rv.data.Preferences.Import.Video video = 4; + .rv.data.Preferences.Import.Audio audio = 5; + } + + message Groups { + .rv.data.ProGroupsDocument groups = 1; + .rv.data.ProLabelsDocument labels = 2; + } + + message Network { + message Network { + bool enable = 1; + string name = 2; + uint32 port = 3; + } + + message Remotes { + message ProRemote { + bool enable = 1; + bool enable_controller = 2; + string controller_password = 3; + bool enable_observer = 4; + string observer_password = 5; + } + + message StageApp { + bool enable = 1; + string password = 2; + } + + .rv.data.Preferences.Network.Remotes.ProRemote pro_remote = 1; + .rv.data.Preferences.Network.Remotes.StageApp stage_app = 2; + } + + message Link { + bool enable = 1; + string link_group = 2; + } + + .rv.data.Preferences.Network.Network network = 1; + .rv.data.Preferences.Network.Remotes remotes = 2; + .rv.data.Preferences.Network.Link link = 3; + } + + message Sync { + enum SyncDirection { + SYNC_DOWN = 0; + SYNC_UP = 1; + } + + string repository = 1; + bool include_libraries = 2; + bool include_media = 3; + bool include_playlists = 4; + bool include_themes = 5; + bool include_support_files = 6; + .rv.data.Preferences.Sync.SyncDirection direction = 7; + bool replace_destination_files = 8; + } + + message Advanced { + message NDIDiscovery { + bool show_local_sources = 1; + string receive_groups = 2; + string additional_search_ips = 3; + } + + message SearchPaths { + message Path { + bool enable = 1; + string name = 2; + string path = 3; + .rv.data.URL.LocalRelativePath.Root url_root = 4; + } + + bool automatically_relink = 1; + repeated .rv.data.Preferences.Advanced.SearchPaths.Path paths = 2; + } + + enum AudioForegroundMediaBehavior { + IGNORE_FOREGROUND_MEDIA = 0; + CLEAR_FOR_ALL_MEDIA = 1; + CLEAR_IF_AUDIO = 2; + PAUSE_FOR_ALL_MEDIA = 3; + PAUSE_IF_AUDIO = 4; + } + + bool suppress_auto_start = 1; + .rv.data.Preferences.Advanced.AudioForegroundMediaBehavior presentation_audio_behavior = 2; + .rv.data.Preferences.Advanced.AudioForegroundMediaBehavior announcements_audio_behavior = 3; + .rv.data.Preferences.Advanced.NDIDiscovery ndi_discovery = 4; + string support_files_path = 5; + bool manage_media_automatically = 6; + .rv.data.Preferences.Advanced.SearchPaths search_paths = 7; + } + + message Updates { + enum Channel { + production = 0; + beta = 1; + } + + bool notify_when_available = 1; + .rv.data.Preferences.Updates.Channel update_channel = 2; + } + + .rv.data.Preferences.General general = 1; + .rv.data.Preferences.Screens screens = 2; + .rv.data.Preferences.Import import = 3; + .rv.data.Preferences.Groups groups = 4; + .rv.data.Preferences.Network network = 5; + .rv.data.Preferences.Sync sync = 6; + .rv.data.Preferences.Advanced advanced = 7; + .rv.data.Preferences.Updates updates = 8; +} + diff --git a/proto/preferences.ts b/proto/preferences.ts new file mode 100644 index 0000000..d98c6e3 --- /dev/null +++ b/proto/preferences.ts @@ -0,0 +1,2845 @@ +/* eslint-disable */ +import _m0 from "protobufjs/minimal"; +import { Action_LayerType, action_LayerTypeFromJSON, action_LayerTypeToJSON } from "./action"; +import { Cue_CompletionTargetType, cue_CompletionTargetTypeFromJSON, cue_CompletionTargetTypeToJSON } from "./cue"; +import { + Media_ScaleBehavior, + media_ScaleBehaviorFromJSON, + media_ScaleBehaviorToJSON, + Media_TransportProperties_PlaybackBehavior, + media_TransportProperties_PlaybackBehaviorFromJSON, + media_TransportProperties_PlaybackBehaviorToJSON, + Media_VideoProperties_EndBehavior, + media_VideoProperties_EndBehaviorFromJSON, + media_VideoProperties_EndBehaviorToJSON, +} from "./graphicsData"; +import { ProGroupsDocument } from "./groups"; +import { ProLabelsDocument } from "./labels"; +import { ProClockSource } from "./proClockSource"; +import { + URL_LocalRelativePath_Root, + uRL_LocalRelativePath_RootFromJSON, + uRL_LocalRelativePath_RootToJSON, +} from "./url"; + +export const protobufPackage = "rv.data"; + +export interface Preferences { + general: Preferences_General | undefined; + screens: Preferences_Screens | undefined; + import: Preferences_Import | undefined; + groups: Preferences_Groups | undefined; + network: Preferences_Network | undefined; + sync: Preferences_Sync | undefined; + advanced: Preferences_Advanced | undefined; + updates: Preferences_Updates | undefined; +} + +export interface Preferences_General { + houseOfWorshipIntegrations: boolean; + crashReports: boolean; + analytics: boolean; + logoPath: string; + language: string; +} + +export interface Preferences_Screens { + enableAtLaunch: boolean; + showPerformanceStats: boolean; + ignoreBackgroundColors: boolean; + clockSource: ProClockSource | undefined; + showKeynoteAndPowerpoint: boolean; + disableBlackmagicSyncGroups: boolean; + useDirectxRendering: boolean; +} + +export interface Preferences_Import { + foregroundScaling: Media_ScaleBehavior; + foregroundIsBlurred: boolean; + backgroundScaling: Media_ScaleBehavior; + backgroundIsBlurred: boolean; + image: Preferences_Import_Image | undefined; + video: Preferences_Import_Video | undefined; + audio: Preferences_Import_Audio | undefined; +} + +export interface Preferences_Import_Image { + layerType: Action_LayerType; + duration: Preferences_Import_Image_Duration | undefined; + nextBehavior: Cue_CompletionTargetType; +} + +export interface Preferences_Import_Image_Duration { + none?: Preferences_Import_Image_Duration_None | undefined; + time?: Preferences_Import_Image_Duration_Time | undefined; + random?: Preferences_Import_Image_Duration_Random | undefined; +} + +export interface Preferences_Import_Image_Duration_None { +} + +export interface Preferences_Import_Image_Duration_Time { + time: number; +} + +export interface Preferences_Import_Image_Duration_Random { + minimumTime: number; + maximumTime: number; +} + +export interface Preferences_Import_Video { + layerType: Action_LayerType; + playbackBehavior: Media_TransportProperties_PlaybackBehavior; + endBehavior: Media_VideoProperties_EndBehavior; + nextBehavior: Cue_CompletionTargetType; +} + +export interface Preferences_Import_Audio { + playbackBehavior: Media_TransportProperties_PlaybackBehavior; + nextBehavior: Cue_CompletionTargetType; +} + +export interface Preferences_Groups { + groups: ProGroupsDocument | undefined; + labels: ProLabelsDocument | undefined; +} + +export interface Preferences_Network { + network: Preferences_Network_Network | undefined; + remotes: Preferences_Network_Remotes | undefined; + link: Preferences_Network_Link | undefined; +} + +export interface Preferences_Network_Network { + enable: boolean; + name: string; + port: number; +} + +export interface Preferences_Network_Remotes { + proRemote: Preferences_Network_Remotes_ProRemote | undefined; + stageApp: Preferences_Network_Remotes_StageApp | undefined; +} + +export interface Preferences_Network_Remotes_ProRemote { + enable: boolean; + enableController: boolean; + controllerPassword: string; + enableObserver: boolean; + observerPassword: string; +} + +export interface Preferences_Network_Remotes_StageApp { + enable: boolean; + password: string; +} + +export interface Preferences_Network_Link { + enable: boolean; + linkGroup: string; +} + +export interface Preferences_Sync { + repository: string; + includeLibraries: boolean; + includeMedia: boolean; + includePlaylists: boolean; + includeThemes: boolean; + includeSupportFiles: boolean; + direction: Preferences_Sync_SyncDirection; + replaceDestinationFiles: boolean; +} + +export enum Preferences_Sync_SyncDirection { + SYNC_DOWN = 0, + SYNC_UP = 1, + UNRECOGNIZED = -1, +} + +export function preferences_Sync_SyncDirectionFromJSON(object: any): Preferences_Sync_SyncDirection { + switch (object) { + case 0: + case "SYNC_DOWN": + return Preferences_Sync_SyncDirection.SYNC_DOWN; + case 1: + case "SYNC_UP": + return Preferences_Sync_SyncDirection.SYNC_UP; + case -1: + case "UNRECOGNIZED": + default: + return Preferences_Sync_SyncDirection.UNRECOGNIZED; + } +} + +export function preferences_Sync_SyncDirectionToJSON(object: Preferences_Sync_SyncDirection): string { + switch (object) { + case Preferences_Sync_SyncDirection.SYNC_DOWN: + return "SYNC_DOWN"; + case Preferences_Sync_SyncDirection.SYNC_UP: + return "SYNC_UP"; + case Preferences_Sync_SyncDirection.UNRECOGNIZED: + default: + return "UNRECOGNIZED"; + } +} + +export interface Preferences_Advanced { + suppressAutoStart: boolean; + presentationAudioBehavior: Preferences_Advanced_AudioForegroundMediaBehavior; + announcementsAudioBehavior: Preferences_Advanced_AudioForegroundMediaBehavior; + ndiDiscovery: Preferences_Advanced_NDIDiscovery | undefined; + supportFilesPath: string; + manageMediaAutomatically: boolean; + searchPaths: Preferences_Advanced_SearchPaths | undefined; +} + +export enum Preferences_Advanced_AudioForegroundMediaBehavior { + IGNORE_FOREGROUND_MEDIA = 0, + CLEAR_FOR_ALL_MEDIA = 1, + CLEAR_IF_AUDIO = 2, + PAUSE_FOR_ALL_MEDIA = 3, + PAUSE_IF_AUDIO = 4, + UNRECOGNIZED = -1, +} + +export function preferences_Advanced_AudioForegroundMediaBehaviorFromJSON( + object: any, +): Preferences_Advanced_AudioForegroundMediaBehavior { + switch (object) { + case 0: + case "IGNORE_FOREGROUND_MEDIA": + return Preferences_Advanced_AudioForegroundMediaBehavior.IGNORE_FOREGROUND_MEDIA; + case 1: + case "CLEAR_FOR_ALL_MEDIA": + return Preferences_Advanced_AudioForegroundMediaBehavior.CLEAR_FOR_ALL_MEDIA; + case 2: + case "CLEAR_IF_AUDIO": + return Preferences_Advanced_AudioForegroundMediaBehavior.CLEAR_IF_AUDIO; + case 3: + case "PAUSE_FOR_ALL_MEDIA": + return Preferences_Advanced_AudioForegroundMediaBehavior.PAUSE_FOR_ALL_MEDIA; + case 4: + case "PAUSE_IF_AUDIO": + return Preferences_Advanced_AudioForegroundMediaBehavior.PAUSE_IF_AUDIO; + case -1: + case "UNRECOGNIZED": + default: + return Preferences_Advanced_AudioForegroundMediaBehavior.UNRECOGNIZED; + } +} + +export function preferences_Advanced_AudioForegroundMediaBehaviorToJSON( + object: Preferences_Advanced_AudioForegroundMediaBehavior, +): string { + switch (object) { + case Preferences_Advanced_AudioForegroundMediaBehavior.IGNORE_FOREGROUND_MEDIA: + return "IGNORE_FOREGROUND_MEDIA"; + case Preferences_Advanced_AudioForegroundMediaBehavior.CLEAR_FOR_ALL_MEDIA: + return "CLEAR_FOR_ALL_MEDIA"; + case Preferences_Advanced_AudioForegroundMediaBehavior.CLEAR_IF_AUDIO: + return "CLEAR_IF_AUDIO"; + case Preferences_Advanced_AudioForegroundMediaBehavior.PAUSE_FOR_ALL_MEDIA: + return "PAUSE_FOR_ALL_MEDIA"; + case Preferences_Advanced_AudioForegroundMediaBehavior.PAUSE_IF_AUDIO: + return "PAUSE_IF_AUDIO"; + case Preferences_Advanced_AudioForegroundMediaBehavior.UNRECOGNIZED: + default: + return "UNRECOGNIZED"; + } +} + +export interface Preferences_Advanced_NDIDiscovery { + showLocalSources: boolean; + receiveGroups: string; + additionalSearchIps: string; +} + +export interface Preferences_Advanced_SearchPaths { + automaticallyRelink: boolean; + paths: Preferences_Advanced_SearchPaths_Path[]; +} + +export interface Preferences_Advanced_SearchPaths_Path { + enable: boolean; + name: string; + path: string; + urlRoot: URL_LocalRelativePath_Root; +} + +export interface Preferences_Updates { + notifyWhenAvailable: boolean; + updateChannel: Preferences_Updates_Channel; +} + +export enum Preferences_Updates_Channel { + production = 0, + beta = 1, + UNRECOGNIZED = -1, +} + +export function preferences_Updates_ChannelFromJSON(object: any): Preferences_Updates_Channel { + switch (object) { + case 0: + case "production": + return Preferences_Updates_Channel.production; + case 1: + case "beta": + return Preferences_Updates_Channel.beta; + case -1: + case "UNRECOGNIZED": + default: + return Preferences_Updates_Channel.UNRECOGNIZED; + } +} + +export function preferences_Updates_ChannelToJSON(object: Preferences_Updates_Channel): string { + switch (object) { + case Preferences_Updates_Channel.production: + return "production"; + case Preferences_Updates_Channel.beta: + return "beta"; + case Preferences_Updates_Channel.UNRECOGNIZED: + default: + return "UNRECOGNIZED"; + } +} + +function createBasePreferences(): Preferences { + return { + general: undefined, + screens: undefined, + import: undefined, + groups: undefined, + network: undefined, + sync: undefined, + advanced: undefined, + updates: undefined, + }; +} + +export const Preferences = { + encode(message: Preferences, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.general !== undefined) { + Preferences_General.encode(message.general, writer.uint32(10).fork()).ldelim(); + } + if (message.screens !== undefined) { + Preferences_Screens.encode(message.screens, writer.uint32(18).fork()).ldelim(); + } + if (message.import !== undefined) { + Preferences_Import.encode(message.import, writer.uint32(26).fork()).ldelim(); + } + if (message.groups !== undefined) { + Preferences_Groups.encode(message.groups, writer.uint32(34).fork()).ldelim(); + } + if (message.network !== undefined) { + Preferences_Network.encode(message.network, writer.uint32(42).fork()).ldelim(); + } + if (message.sync !== undefined) { + Preferences_Sync.encode(message.sync, writer.uint32(50).fork()).ldelim(); + } + if (message.advanced !== undefined) { + Preferences_Advanced.encode(message.advanced, writer.uint32(58).fork()).ldelim(); + } + if (message.updates !== undefined) { + Preferences_Updates.encode(message.updates, writer.uint32(66).fork()).ldelim(); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): Preferences { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBasePreferences(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } + + message.general = Preferences_General.decode(reader, reader.uint32()); + continue; + case 2: + if (tag !== 18) { + break; + } + + message.screens = Preferences_Screens.decode(reader, reader.uint32()); + continue; + case 3: + if (tag !== 26) { + break; + } + + message.import = Preferences_Import.decode(reader, reader.uint32()); + continue; + case 4: + if (tag !== 34) { + break; + } + + message.groups = Preferences_Groups.decode(reader, reader.uint32()); + continue; + case 5: + if (tag !== 42) { + break; + } + + message.network = Preferences_Network.decode(reader, reader.uint32()); + continue; + case 6: + if (tag !== 50) { + break; + } + + message.sync = Preferences_Sync.decode(reader, reader.uint32()); + continue; + case 7: + if (tag !== 58) { + break; + } + + message.advanced = Preferences_Advanced.decode(reader, reader.uint32()); + continue; + case 8: + if (tag !== 66) { + break; + } + + message.updates = Preferences_Updates.decode(reader, reader.uint32()); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(object: any): Preferences { + return { + general: isSet(object.general) ? Preferences_General.fromJSON(object.general) : undefined, + screens: isSet(object.screens) ? Preferences_Screens.fromJSON(object.screens) : undefined, + import: isSet(object.import) ? Preferences_Import.fromJSON(object.import) : undefined, + groups: isSet(object.groups) ? Preferences_Groups.fromJSON(object.groups) : undefined, + network: isSet(object.network) ? Preferences_Network.fromJSON(object.network) : undefined, + sync: isSet(object.sync) ? Preferences_Sync.fromJSON(object.sync) : undefined, + advanced: isSet(object.advanced) ? Preferences_Advanced.fromJSON(object.advanced) : undefined, + updates: isSet(object.updates) ? Preferences_Updates.fromJSON(object.updates) : undefined, + }; + }, + + toJSON(message: Preferences): unknown { + const obj: any = {}; + if (message.general !== undefined) { + obj.general = Preferences_General.toJSON(message.general); + } + if (message.screens !== undefined) { + obj.screens = Preferences_Screens.toJSON(message.screens); + } + if (message.import !== undefined) { + obj.import = Preferences_Import.toJSON(message.import); + } + if (message.groups !== undefined) { + obj.groups = Preferences_Groups.toJSON(message.groups); + } + if (message.network !== undefined) { + obj.network = Preferences_Network.toJSON(message.network); + } + if (message.sync !== undefined) { + obj.sync = Preferences_Sync.toJSON(message.sync); + } + if (message.advanced !== undefined) { + obj.advanced = Preferences_Advanced.toJSON(message.advanced); + } + if (message.updates !== undefined) { + obj.updates = Preferences_Updates.toJSON(message.updates); + } + return obj; + }, + + create, I>>(base?: I): Preferences { + return Preferences.fromPartial(base ?? ({} as any)); + }, + fromPartial, I>>(object: I): Preferences { + const message = createBasePreferences(); + message.general = (object.general !== undefined && object.general !== null) + ? Preferences_General.fromPartial(object.general) + : undefined; + message.screens = (object.screens !== undefined && object.screens !== null) + ? Preferences_Screens.fromPartial(object.screens) + : undefined; + message.import = (object.import !== undefined && object.import !== null) + ? Preferences_Import.fromPartial(object.import) + : undefined; + message.groups = (object.groups !== undefined && object.groups !== null) + ? Preferences_Groups.fromPartial(object.groups) + : undefined; + message.network = (object.network !== undefined && object.network !== null) + ? Preferences_Network.fromPartial(object.network) + : undefined; + message.sync = (object.sync !== undefined && object.sync !== null) + ? Preferences_Sync.fromPartial(object.sync) + : undefined; + message.advanced = (object.advanced !== undefined && object.advanced !== null) + ? Preferences_Advanced.fromPartial(object.advanced) + : undefined; + message.updates = (object.updates !== undefined && object.updates !== null) + ? Preferences_Updates.fromPartial(object.updates) + : undefined; + return message; + }, +}; + +function createBasePreferences_General(): Preferences_General { + return { houseOfWorshipIntegrations: false, crashReports: false, analytics: false, logoPath: "", language: "" }; +} + +export const Preferences_General = { + encode(message: Preferences_General, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.houseOfWorshipIntegrations !== false) { + writer.uint32(8).bool(message.houseOfWorshipIntegrations); + } + if (message.crashReports !== false) { + writer.uint32(16).bool(message.crashReports); + } + if (message.analytics !== false) { + writer.uint32(24).bool(message.analytics); + } + if (message.logoPath !== "") { + writer.uint32(34).string(message.logoPath); + } + if (message.language !== "") { + writer.uint32(42).string(message.language); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): Preferences_General { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBasePreferences_General(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 8) { + break; + } + + message.houseOfWorshipIntegrations = reader.bool(); + continue; + case 2: + if (tag !== 16) { + break; + } + + message.crashReports = reader.bool(); + continue; + case 3: + if (tag !== 24) { + break; + } + + message.analytics = reader.bool(); + continue; + case 4: + if (tag !== 34) { + break; + } + + message.logoPath = reader.string(); + continue; + case 5: + if (tag !== 42) { + break; + } + + message.language = reader.string(); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(object: any): Preferences_General { + return { + houseOfWorshipIntegrations: isSet(object.houseOfWorshipIntegrations) + ? globalThis.Boolean(object.houseOfWorshipIntegrations) + : false, + crashReports: isSet(object.crashReports) ? globalThis.Boolean(object.crashReports) : false, + analytics: isSet(object.analytics) ? globalThis.Boolean(object.analytics) : false, + logoPath: isSet(object.logoPath) ? globalThis.String(object.logoPath) : "", + language: isSet(object.language) ? globalThis.String(object.language) : "", + }; + }, + + toJSON(message: Preferences_General): unknown { + const obj: any = {}; + if (message.houseOfWorshipIntegrations !== false) { + obj.houseOfWorshipIntegrations = message.houseOfWorshipIntegrations; + } + if (message.crashReports !== false) { + obj.crashReports = message.crashReports; + } + if (message.analytics !== false) { + obj.analytics = message.analytics; + } + if (message.logoPath !== "") { + obj.logoPath = message.logoPath; + } + if (message.language !== "") { + obj.language = message.language; + } + return obj; + }, + + create, I>>(base?: I): Preferences_General { + return Preferences_General.fromPartial(base ?? ({} as any)); + }, + fromPartial, I>>(object: I): Preferences_General { + const message = createBasePreferences_General(); + message.houseOfWorshipIntegrations = object.houseOfWorshipIntegrations ?? false; + message.crashReports = object.crashReports ?? false; + message.analytics = object.analytics ?? false; + message.logoPath = object.logoPath ?? ""; + message.language = object.language ?? ""; + return message; + }, +}; + +function createBasePreferences_Screens(): Preferences_Screens { + return { + enableAtLaunch: false, + showPerformanceStats: false, + ignoreBackgroundColors: false, + clockSource: undefined, + showKeynoteAndPowerpoint: false, + disableBlackmagicSyncGroups: false, + useDirectxRendering: false, + }; +} + +export const Preferences_Screens = { + encode(message: Preferences_Screens, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.enableAtLaunch !== false) { + writer.uint32(8).bool(message.enableAtLaunch); + } + if (message.showPerformanceStats !== false) { + writer.uint32(16).bool(message.showPerformanceStats); + } + if (message.ignoreBackgroundColors !== false) { + writer.uint32(24).bool(message.ignoreBackgroundColors); + } + if (message.clockSource !== undefined) { + ProClockSource.encode(message.clockSource, writer.uint32(34).fork()).ldelim(); + } + if (message.showKeynoteAndPowerpoint !== false) { + writer.uint32(40).bool(message.showKeynoteAndPowerpoint); + } + if (message.disableBlackmagicSyncGroups !== false) { + writer.uint32(48).bool(message.disableBlackmagicSyncGroups); + } + if (message.useDirectxRendering !== false) { + writer.uint32(56).bool(message.useDirectxRendering); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): Preferences_Screens { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBasePreferences_Screens(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 8) { + break; + } + + message.enableAtLaunch = reader.bool(); + continue; + case 2: + if (tag !== 16) { + break; + } + + message.showPerformanceStats = reader.bool(); + continue; + case 3: + if (tag !== 24) { + break; + } + + message.ignoreBackgroundColors = reader.bool(); + continue; + case 4: + if (tag !== 34) { + break; + } + + message.clockSource = ProClockSource.decode(reader, reader.uint32()); + continue; + case 5: + if (tag !== 40) { + break; + } + + message.showKeynoteAndPowerpoint = reader.bool(); + continue; + case 6: + if (tag !== 48) { + break; + } + + message.disableBlackmagicSyncGroups = reader.bool(); + continue; + case 7: + if (tag !== 56) { + break; + } + + message.useDirectxRendering = reader.bool(); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(object: any): Preferences_Screens { + return { + enableAtLaunch: isSet(object.enableAtLaunch) ? globalThis.Boolean(object.enableAtLaunch) : false, + showPerformanceStats: isSet(object.showPerformanceStats) + ? globalThis.Boolean(object.showPerformanceStats) + : false, + ignoreBackgroundColors: isSet(object.ignoreBackgroundColors) + ? globalThis.Boolean(object.ignoreBackgroundColors) + : false, + clockSource: isSet(object.clockSource) ? ProClockSource.fromJSON(object.clockSource) : undefined, + showKeynoteAndPowerpoint: isSet(object.showKeynoteAndPowerpoint) + ? globalThis.Boolean(object.showKeynoteAndPowerpoint) + : false, + disableBlackmagicSyncGroups: isSet(object.disableBlackmagicSyncGroups) + ? globalThis.Boolean(object.disableBlackmagicSyncGroups) + : false, + useDirectxRendering: isSet(object.useDirectxRendering) ? globalThis.Boolean(object.useDirectxRendering) : false, + }; + }, + + toJSON(message: Preferences_Screens): unknown { + const obj: any = {}; + if (message.enableAtLaunch !== false) { + obj.enableAtLaunch = message.enableAtLaunch; + } + if (message.showPerformanceStats !== false) { + obj.showPerformanceStats = message.showPerformanceStats; + } + if (message.ignoreBackgroundColors !== false) { + obj.ignoreBackgroundColors = message.ignoreBackgroundColors; + } + if (message.clockSource !== undefined) { + obj.clockSource = ProClockSource.toJSON(message.clockSource); + } + if (message.showKeynoteAndPowerpoint !== false) { + obj.showKeynoteAndPowerpoint = message.showKeynoteAndPowerpoint; + } + if (message.disableBlackmagicSyncGroups !== false) { + obj.disableBlackmagicSyncGroups = message.disableBlackmagicSyncGroups; + } + if (message.useDirectxRendering !== false) { + obj.useDirectxRendering = message.useDirectxRendering; + } + return obj; + }, + + create, I>>(base?: I): Preferences_Screens { + return Preferences_Screens.fromPartial(base ?? ({} as any)); + }, + fromPartial, I>>(object: I): Preferences_Screens { + const message = createBasePreferences_Screens(); + message.enableAtLaunch = object.enableAtLaunch ?? false; + message.showPerformanceStats = object.showPerformanceStats ?? false; + message.ignoreBackgroundColors = object.ignoreBackgroundColors ?? false; + message.clockSource = (object.clockSource !== undefined && object.clockSource !== null) + ? ProClockSource.fromPartial(object.clockSource) + : undefined; + message.showKeynoteAndPowerpoint = object.showKeynoteAndPowerpoint ?? false; + message.disableBlackmagicSyncGroups = object.disableBlackmagicSyncGroups ?? false; + message.useDirectxRendering = object.useDirectxRendering ?? false; + return message; + }, +}; + +function createBasePreferences_Import(): Preferences_Import { + return { + foregroundScaling: 0, + foregroundIsBlurred: false, + backgroundScaling: 0, + backgroundIsBlurred: false, + image: undefined, + video: undefined, + audio: undefined, + }; +} + +export const Preferences_Import = { + encode(message: Preferences_Import, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.foregroundScaling !== 0) { + writer.uint32(8).int32(message.foregroundScaling); + } + if (message.foregroundIsBlurred !== false) { + writer.uint32(48).bool(message.foregroundIsBlurred); + } + if (message.backgroundScaling !== 0) { + writer.uint32(16).int32(message.backgroundScaling); + } + if (message.backgroundIsBlurred !== false) { + writer.uint32(56).bool(message.backgroundIsBlurred); + } + if (message.image !== undefined) { + Preferences_Import_Image.encode(message.image, writer.uint32(26).fork()).ldelim(); + } + if (message.video !== undefined) { + Preferences_Import_Video.encode(message.video, writer.uint32(34).fork()).ldelim(); + } + if (message.audio !== undefined) { + Preferences_Import_Audio.encode(message.audio, writer.uint32(42).fork()).ldelim(); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): Preferences_Import { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBasePreferences_Import(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 8) { + break; + } + + message.foregroundScaling = reader.int32() as any; + continue; + case 6: + if (tag !== 48) { + break; + } + + message.foregroundIsBlurred = reader.bool(); + continue; + case 2: + if (tag !== 16) { + break; + } + + message.backgroundScaling = reader.int32() as any; + continue; + case 7: + if (tag !== 56) { + break; + } + + message.backgroundIsBlurred = reader.bool(); + continue; + case 3: + if (tag !== 26) { + break; + } + + message.image = Preferences_Import_Image.decode(reader, reader.uint32()); + continue; + case 4: + if (tag !== 34) { + break; + } + + message.video = Preferences_Import_Video.decode(reader, reader.uint32()); + continue; + case 5: + if (tag !== 42) { + break; + } + + message.audio = Preferences_Import_Audio.decode(reader, reader.uint32()); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(object: any): Preferences_Import { + return { + foregroundScaling: isSet(object.foregroundScaling) ? media_ScaleBehaviorFromJSON(object.foregroundScaling) : 0, + foregroundIsBlurred: isSet(object.foregroundIsBlurred) ? globalThis.Boolean(object.foregroundIsBlurred) : false, + backgroundScaling: isSet(object.backgroundScaling) ? media_ScaleBehaviorFromJSON(object.backgroundScaling) : 0, + backgroundIsBlurred: isSet(object.backgroundIsBlurred) ? globalThis.Boolean(object.backgroundIsBlurred) : false, + image: isSet(object.image) ? Preferences_Import_Image.fromJSON(object.image) : undefined, + video: isSet(object.video) ? Preferences_Import_Video.fromJSON(object.video) : undefined, + audio: isSet(object.audio) ? Preferences_Import_Audio.fromJSON(object.audio) : undefined, + }; + }, + + toJSON(message: Preferences_Import): unknown { + const obj: any = {}; + if (message.foregroundScaling !== 0) { + obj.foregroundScaling = media_ScaleBehaviorToJSON(message.foregroundScaling); + } + if (message.foregroundIsBlurred !== false) { + obj.foregroundIsBlurred = message.foregroundIsBlurred; + } + if (message.backgroundScaling !== 0) { + obj.backgroundScaling = media_ScaleBehaviorToJSON(message.backgroundScaling); + } + if (message.backgroundIsBlurred !== false) { + obj.backgroundIsBlurred = message.backgroundIsBlurred; + } + if (message.image !== undefined) { + obj.image = Preferences_Import_Image.toJSON(message.image); + } + if (message.video !== undefined) { + obj.video = Preferences_Import_Video.toJSON(message.video); + } + if (message.audio !== undefined) { + obj.audio = Preferences_Import_Audio.toJSON(message.audio); + } + return obj; + }, + + create, I>>(base?: I): Preferences_Import { + return Preferences_Import.fromPartial(base ?? ({} as any)); + }, + fromPartial, I>>(object: I): Preferences_Import { + const message = createBasePreferences_Import(); + message.foregroundScaling = object.foregroundScaling ?? 0; + message.foregroundIsBlurred = object.foregroundIsBlurred ?? false; + message.backgroundScaling = object.backgroundScaling ?? 0; + message.backgroundIsBlurred = object.backgroundIsBlurred ?? false; + message.image = (object.image !== undefined && object.image !== null) + ? Preferences_Import_Image.fromPartial(object.image) + : undefined; + message.video = (object.video !== undefined && object.video !== null) + ? Preferences_Import_Video.fromPartial(object.video) + : undefined; + message.audio = (object.audio !== undefined && object.audio !== null) + ? Preferences_Import_Audio.fromPartial(object.audio) + : undefined; + return message; + }, +}; + +function createBasePreferences_Import_Image(): Preferences_Import_Image { + return { layerType: 0, duration: undefined, nextBehavior: 0 }; +} + +export const Preferences_Import_Image = { + encode(message: Preferences_Import_Image, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.layerType !== 0) { + writer.uint32(8).int32(message.layerType); + } + if (message.duration !== undefined) { + Preferences_Import_Image_Duration.encode(message.duration, writer.uint32(18).fork()).ldelim(); + } + if (message.nextBehavior !== 0) { + writer.uint32(24).int32(message.nextBehavior); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): Preferences_Import_Image { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBasePreferences_Import_Image(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 8) { + break; + } + + message.layerType = reader.int32() as any; + continue; + case 2: + if (tag !== 18) { + break; + } + + message.duration = Preferences_Import_Image_Duration.decode(reader, reader.uint32()); + continue; + case 3: + if (tag !== 24) { + break; + } + + message.nextBehavior = reader.int32() as any; + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(object: any): Preferences_Import_Image { + return { + layerType: isSet(object.layerType) ? action_LayerTypeFromJSON(object.layerType) : 0, + duration: isSet(object.duration) ? Preferences_Import_Image_Duration.fromJSON(object.duration) : undefined, + nextBehavior: isSet(object.nextBehavior) ? cue_CompletionTargetTypeFromJSON(object.nextBehavior) : 0, + }; + }, + + toJSON(message: Preferences_Import_Image): unknown { + const obj: any = {}; + if (message.layerType !== 0) { + obj.layerType = action_LayerTypeToJSON(message.layerType); + } + if (message.duration !== undefined) { + obj.duration = Preferences_Import_Image_Duration.toJSON(message.duration); + } + if (message.nextBehavior !== 0) { + obj.nextBehavior = cue_CompletionTargetTypeToJSON(message.nextBehavior); + } + return obj; + }, + + create, I>>(base?: I): Preferences_Import_Image { + return Preferences_Import_Image.fromPartial(base ?? ({} as any)); + }, + fromPartial, I>>(object: I): Preferences_Import_Image { + const message = createBasePreferences_Import_Image(); + message.layerType = object.layerType ?? 0; + message.duration = (object.duration !== undefined && object.duration !== null) + ? Preferences_Import_Image_Duration.fromPartial(object.duration) + : undefined; + message.nextBehavior = object.nextBehavior ?? 0; + return message; + }, +}; + +function createBasePreferences_Import_Image_Duration(): Preferences_Import_Image_Duration { + return { none: undefined, time: undefined, random: undefined }; +} + +export const Preferences_Import_Image_Duration = { + encode(message: Preferences_Import_Image_Duration, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.none !== undefined) { + Preferences_Import_Image_Duration_None.encode(message.none, writer.uint32(10).fork()).ldelim(); + } + if (message.time !== undefined) { + Preferences_Import_Image_Duration_Time.encode(message.time, writer.uint32(18).fork()).ldelim(); + } + if (message.random !== undefined) { + Preferences_Import_Image_Duration_Random.encode(message.random, writer.uint32(26).fork()).ldelim(); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): Preferences_Import_Image_Duration { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBasePreferences_Import_Image_Duration(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } + + message.none = Preferences_Import_Image_Duration_None.decode(reader, reader.uint32()); + continue; + case 2: + if (tag !== 18) { + break; + } + + message.time = Preferences_Import_Image_Duration_Time.decode(reader, reader.uint32()); + continue; + case 3: + if (tag !== 26) { + break; + } + + message.random = Preferences_Import_Image_Duration_Random.decode(reader, reader.uint32()); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(object: any): Preferences_Import_Image_Duration { + return { + none: isSet(object.none) ? Preferences_Import_Image_Duration_None.fromJSON(object.none) : undefined, + time: isSet(object.time) ? Preferences_Import_Image_Duration_Time.fromJSON(object.time) : undefined, + random: isSet(object.random) ? Preferences_Import_Image_Duration_Random.fromJSON(object.random) : undefined, + }; + }, + + toJSON(message: Preferences_Import_Image_Duration): unknown { + const obj: any = {}; + if (message.none !== undefined) { + obj.none = Preferences_Import_Image_Duration_None.toJSON(message.none); + } + if (message.time !== undefined) { + obj.time = Preferences_Import_Image_Duration_Time.toJSON(message.time); + } + if (message.random !== undefined) { + obj.random = Preferences_Import_Image_Duration_Random.toJSON(message.random); + } + return obj; + }, + + create, I>>( + base?: I, + ): Preferences_Import_Image_Duration { + return Preferences_Import_Image_Duration.fromPartial(base ?? ({} as any)); + }, + fromPartial, I>>( + object: I, + ): Preferences_Import_Image_Duration { + const message = createBasePreferences_Import_Image_Duration(); + message.none = (object.none !== undefined && object.none !== null) + ? Preferences_Import_Image_Duration_None.fromPartial(object.none) + : undefined; + message.time = (object.time !== undefined && object.time !== null) + ? Preferences_Import_Image_Duration_Time.fromPartial(object.time) + : undefined; + message.random = (object.random !== undefined && object.random !== null) + ? Preferences_Import_Image_Duration_Random.fromPartial(object.random) + : undefined; + return message; + }, +}; + +function createBasePreferences_Import_Image_Duration_None(): Preferences_Import_Image_Duration_None { + return {}; +} + +export const Preferences_Import_Image_Duration_None = { + encode(_: Preferences_Import_Image_Duration_None, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): Preferences_Import_Image_Duration_None { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBasePreferences_Import_Image_Duration_None(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(_: any): Preferences_Import_Image_Duration_None { + return {}; + }, + + toJSON(_: Preferences_Import_Image_Duration_None): unknown { + const obj: any = {}; + return obj; + }, + + create, I>>( + base?: I, + ): Preferences_Import_Image_Duration_None { + return Preferences_Import_Image_Duration_None.fromPartial(base ?? ({} as any)); + }, + fromPartial, I>>( + _: I, + ): Preferences_Import_Image_Duration_None { + const message = createBasePreferences_Import_Image_Duration_None(); + return message; + }, +}; + +function createBasePreferences_Import_Image_Duration_Time(): Preferences_Import_Image_Duration_Time { + return { time: 0 }; +} + +export const Preferences_Import_Image_Duration_Time = { + encode(message: Preferences_Import_Image_Duration_Time, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.time !== 0) { + writer.uint32(9).double(message.time); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): Preferences_Import_Image_Duration_Time { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBasePreferences_Import_Image_Duration_Time(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 9) { + break; + } + + message.time = reader.double(); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(object: any): Preferences_Import_Image_Duration_Time { + return { time: isSet(object.time) ? globalThis.Number(object.time) : 0 }; + }, + + toJSON(message: Preferences_Import_Image_Duration_Time): unknown { + const obj: any = {}; + if (message.time !== 0) { + obj.time = message.time; + } + return obj; + }, + + create, I>>( + base?: I, + ): Preferences_Import_Image_Duration_Time { + return Preferences_Import_Image_Duration_Time.fromPartial(base ?? ({} as any)); + }, + fromPartial, I>>( + object: I, + ): Preferences_Import_Image_Duration_Time { + const message = createBasePreferences_Import_Image_Duration_Time(); + message.time = object.time ?? 0; + return message; + }, +}; + +function createBasePreferences_Import_Image_Duration_Random(): Preferences_Import_Image_Duration_Random { + return { minimumTime: 0, maximumTime: 0 }; +} + +export const Preferences_Import_Image_Duration_Random = { + encode(message: Preferences_Import_Image_Duration_Random, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.minimumTime !== 0) { + writer.uint32(9).double(message.minimumTime); + } + if (message.maximumTime !== 0) { + writer.uint32(17).double(message.maximumTime); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): Preferences_Import_Image_Duration_Random { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBasePreferences_Import_Image_Duration_Random(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 9) { + break; + } + + message.minimumTime = reader.double(); + continue; + case 2: + if (tag !== 17) { + break; + } + + message.maximumTime = reader.double(); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(object: any): Preferences_Import_Image_Duration_Random { + return { + minimumTime: isSet(object.minimumTime) ? globalThis.Number(object.minimumTime) : 0, + maximumTime: isSet(object.maximumTime) ? globalThis.Number(object.maximumTime) : 0, + }; + }, + + toJSON(message: Preferences_Import_Image_Duration_Random): unknown { + const obj: any = {}; + if (message.minimumTime !== 0) { + obj.minimumTime = message.minimumTime; + } + if (message.maximumTime !== 0) { + obj.maximumTime = message.maximumTime; + } + return obj; + }, + + create, I>>( + base?: I, + ): Preferences_Import_Image_Duration_Random { + return Preferences_Import_Image_Duration_Random.fromPartial(base ?? ({} as any)); + }, + fromPartial, I>>( + object: I, + ): Preferences_Import_Image_Duration_Random { + const message = createBasePreferences_Import_Image_Duration_Random(); + message.minimumTime = object.minimumTime ?? 0; + message.maximumTime = object.maximumTime ?? 0; + return message; + }, +}; + +function createBasePreferences_Import_Video(): Preferences_Import_Video { + return { layerType: 0, playbackBehavior: 0, endBehavior: 0, nextBehavior: 0 }; +} + +export const Preferences_Import_Video = { + encode(message: Preferences_Import_Video, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.layerType !== 0) { + writer.uint32(8).int32(message.layerType); + } + if (message.playbackBehavior !== 0) { + writer.uint32(16).int32(message.playbackBehavior); + } + if (message.endBehavior !== 0) { + writer.uint32(24).int32(message.endBehavior); + } + if (message.nextBehavior !== 0) { + writer.uint32(32).int32(message.nextBehavior); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): Preferences_Import_Video { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBasePreferences_Import_Video(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 8) { + break; + } + + message.layerType = reader.int32() as any; + continue; + case 2: + if (tag !== 16) { + break; + } + + message.playbackBehavior = reader.int32() as any; + continue; + case 3: + if (tag !== 24) { + break; + } + + message.endBehavior = reader.int32() as any; + continue; + case 4: + if (tag !== 32) { + break; + } + + message.nextBehavior = reader.int32() as any; + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(object: any): Preferences_Import_Video { + return { + layerType: isSet(object.layerType) ? action_LayerTypeFromJSON(object.layerType) : 0, + playbackBehavior: isSet(object.playbackBehavior) + ? media_TransportProperties_PlaybackBehaviorFromJSON(object.playbackBehavior) + : 0, + endBehavior: isSet(object.endBehavior) ? media_VideoProperties_EndBehaviorFromJSON(object.endBehavior) : 0, + nextBehavior: isSet(object.nextBehavior) ? cue_CompletionTargetTypeFromJSON(object.nextBehavior) : 0, + }; + }, + + toJSON(message: Preferences_Import_Video): unknown { + const obj: any = {}; + if (message.layerType !== 0) { + obj.layerType = action_LayerTypeToJSON(message.layerType); + } + if (message.playbackBehavior !== 0) { + obj.playbackBehavior = media_TransportProperties_PlaybackBehaviorToJSON(message.playbackBehavior); + } + if (message.endBehavior !== 0) { + obj.endBehavior = media_VideoProperties_EndBehaviorToJSON(message.endBehavior); + } + if (message.nextBehavior !== 0) { + obj.nextBehavior = cue_CompletionTargetTypeToJSON(message.nextBehavior); + } + return obj; + }, + + create, I>>(base?: I): Preferences_Import_Video { + return Preferences_Import_Video.fromPartial(base ?? ({} as any)); + }, + fromPartial, I>>(object: I): Preferences_Import_Video { + const message = createBasePreferences_Import_Video(); + message.layerType = object.layerType ?? 0; + message.playbackBehavior = object.playbackBehavior ?? 0; + message.endBehavior = object.endBehavior ?? 0; + message.nextBehavior = object.nextBehavior ?? 0; + return message; + }, +}; + +function createBasePreferences_Import_Audio(): Preferences_Import_Audio { + return { playbackBehavior: 0, nextBehavior: 0 }; +} + +export const Preferences_Import_Audio = { + encode(message: Preferences_Import_Audio, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.playbackBehavior !== 0) { + writer.uint32(8).int32(message.playbackBehavior); + } + if (message.nextBehavior !== 0) { + writer.uint32(16).int32(message.nextBehavior); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): Preferences_Import_Audio { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBasePreferences_Import_Audio(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 8) { + break; + } + + message.playbackBehavior = reader.int32() as any; + continue; + case 2: + if (tag !== 16) { + break; + } + + message.nextBehavior = reader.int32() as any; + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(object: any): Preferences_Import_Audio { + return { + playbackBehavior: isSet(object.playbackBehavior) + ? media_TransportProperties_PlaybackBehaviorFromJSON(object.playbackBehavior) + : 0, + nextBehavior: isSet(object.nextBehavior) ? cue_CompletionTargetTypeFromJSON(object.nextBehavior) : 0, + }; + }, + + toJSON(message: Preferences_Import_Audio): unknown { + const obj: any = {}; + if (message.playbackBehavior !== 0) { + obj.playbackBehavior = media_TransportProperties_PlaybackBehaviorToJSON(message.playbackBehavior); + } + if (message.nextBehavior !== 0) { + obj.nextBehavior = cue_CompletionTargetTypeToJSON(message.nextBehavior); + } + return obj; + }, + + create, I>>(base?: I): Preferences_Import_Audio { + return Preferences_Import_Audio.fromPartial(base ?? ({} as any)); + }, + fromPartial, I>>(object: I): Preferences_Import_Audio { + const message = createBasePreferences_Import_Audio(); + message.playbackBehavior = object.playbackBehavior ?? 0; + message.nextBehavior = object.nextBehavior ?? 0; + return message; + }, +}; + +function createBasePreferences_Groups(): Preferences_Groups { + return { groups: undefined, labels: undefined }; +} + +export const Preferences_Groups = { + encode(message: Preferences_Groups, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.groups !== undefined) { + ProGroupsDocument.encode(message.groups, writer.uint32(10).fork()).ldelim(); + } + if (message.labels !== undefined) { + ProLabelsDocument.encode(message.labels, writer.uint32(18).fork()).ldelim(); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): Preferences_Groups { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBasePreferences_Groups(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } + + message.groups = ProGroupsDocument.decode(reader, reader.uint32()); + continue; + case 2: + if (tag !== 18) { + break; + } + + message.labels = ProLabelsDocument.decode(reader, reader.uint32()); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(object: any): Preferences_Groups { + return { + groups: isSet(object.groups) ? ProGroupsDocument.fromJSON(object.groups) : undefined, + labels: isSet(object.labels) ? ProLabelsDocument.fromJSON(object.labels) : undefined, + }; + }, + + toJSON(message: Preferences_Groups): unknown { + const obj: any = {}; + if (message.groups !== undefined) { + obj.groups = ProGroupsDocument.toJSON(message.groups); + } + if (message.labels !== undefined) { + obj.labels = ProLabelsDocument.toJSON(message.labels); + } + return obj; + }, + + create, I>>(base?: I): Preferences_Groups { + return Preferences_Groups.fromPartial(base ?? ({} as any)); + }, + fromPartial, I>>(object: I): Preferences_Groups { + const message = createBasePreferences_Groups(); + message.groups = (object.groups !== undefined && object.groups !== null) + ? ProGroupsDocument.fromPartial(object.groups) + : undefined; + message.labels = (object.labels !== undefined && object.labels !== null) + ? ProLabelsDocument.fromPartial(object.labels) + : undefined; + return message; + }, +}; + +function createBasePreferences_Network(): Preferences_Network { + return { network: undefined, remotes: undefined, link: undefined }; +} + +export const Preferences_Network = { + encode(message: Preferences_Network, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.network !== undefined) { + Preferences_Network_Network.encode(message.network, writer.uint32(10).fork()).ldelim(); + } + if (message.remotes !== undefined) { + Preferences_Network_Remotes.encode(message.remotes, writer.uint32(18).fork()).ldelim(); + } + if (message.link !== undefined) { + Preferences_Network_Link.encode(message.link, writer.uint32(26).fork()).ldelim(); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): Preferences_Network { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBasePreferences_Network(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } + + message.network = Preferences_Network_Network.decode(reader, reader.uint32()); + continue; + case 2: + if (tag !== 18) { + break; + } + + message.remotes = Preferences_Network_Remotes.decode(reader, reader.uint32()); + continue; + case 3: + if (tag !== 26) { + break; + } + + message.link = Preferences_Network_Link.decode(reader, reader.uint32()); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(object: any): Preferences_Network { + return { + network: isSet(object.network) ? Preferences_Network_Network.fromJSON(object.network) : undefined, + remotes: isSet(object.remotes) ? Preferences_Network_Remotes.fromJSON(object.remotes) : undefined, + link: isSet(object.link) ? Preferences_Network_Link.fromJSON(object.link) : undefined, + }; + }, + + toJSON(message: Preferences_Network): unknown { + const obj: any = {}; + if (message.network !== undefined) { + obj.network = Preferences_Network_Network.toJSON(message.network); + } + if (message.remotes !== undefined) { + obj.remotes = Preferences_Network_Remotes.toJSON(message.remotes); + } + if (message.link !== undefined) { + obj.link = Preferences_Network_Link.toJSON(message.link); + } + return obj; + }, + + create, I>>(base?: I): Preferences_Network { + return Preferences_Network.fromPartial(base ?? ({} as any)); + }, + fromPartial, I>>(object: I): Preferences_Network { + const message = createBasePreferences_Network(); + message.network = (object.network !== undefined && object.network !== null) + ? Preferences_Network_Network.fromPartial(object.network) + : undefined; + message.remotes = (object.remotes !== undefined && object.remotes !== null) + ? Preferences_Network_Remotes.fromPartial(object.remotes) + : undefined; + message.link = (object.link !== undefined && object.link !== null) + ? Preferences_Network_Link.fromPartial(object.link) + : undefined; + return message; + }, +}; + +function createBasePreferences_Network_Network(): Preferences_Network_Network { + return { enable: false, name: "", port: 0 }; +} + +export const Preferences_Network_Network = { + encode(message: Preferences_Network_Network, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.enable !== false) { + writer.uint32(8).bool(message.enable); + } + if (message.name !== "") { + writer.uint32(18).string(message.name); + } + if (message.port !== 0) { + writer.uint32(24).uint32(message.port); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): Preferences_Network_Network { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBasePreferences_Network_Network(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 8) { + break; + } + + message.enable = reader.bool(); + continue; + case 2: + if (tag !== 18) { + break; + } + + message.name = reader.string(); + continue; + case 3: + if (tag !== 24) { + break; + } + + message.port = reader.uint32(); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(object: any): Preferences_Network_Network { + return { + enable: isSet(object.enable) ? globalThis.Boolean(object.enable) : false, + name: isSet(object.name) ? globalThis.String(object.name) : "", + port: isSet(object.port) ? globalThis.Number(object.port) : 0, + }; + }, + + toJSON(message: Preferences_Network_Network): unknown { + const obj: any = {}; + if (message.enable !== false) { + obj.enable = message.enable; + } + if (message.name !== "") { + obj.name = message.name; + } + if (message.port !== 0) { + obj.port = Math.round(message.port); + } + return obj; + }, + + create, I>>(base?: I): Preferences_Network_Network { + return Preferences_Network_Network.fromPartial(base ?? ({} as any)); + }, + fromPartial, I>>(object: I): Preferences_Network_Network { + const message = createBasePreferences_Network_Network(); + message.enable = object.enable ?? false; + message.name = object.name ?? ""; + message.port = object.port ?? 0; + return message; + }, +}; + +function createBasePreferences_Network_Remotes(): Preferences_Network_Remotes { + return { proRemote: undefined, stageApp: undefined }; +} + +export const Preferences_Network_Remotes = { + encode(message: Preferences_Network_Remotes, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.proRemote !== undefined) { + Preferences_Network_Remotes_ProRemote.encode(message.proRemote, writer.uint32(10).fork()).ldelim(); + } + if (message.stageApp !== undefined) { + Preferences_Network_Remotes_StageApp.encode(message.stageApp, writer.uint32(18).fork()).ldelim(); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): Preferences_Network_Remotes { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBasePreferences_Network_Remotes(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } + + message.proRemote = Preferences_Network_Remotes_ProRemote.decode(reader, reader.uint32()); + continue; + case 2: + if (tag !== 18) { + break; + } + + message.stageApp = Preferences_Network_Remotes_StageApp.decode(reader, reader.uint32()); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(object: any): Preferences_Network_Remotes { + return { + proRemote: isSet(object.proRemote) ? Preferences_Network_Remotes_ProRemote.fromJSON(object.proRemote) : undefined, + stageApp: isSet(object.stageApp) ? Preferences_Network_Remotes_StageApp.fromJSON(object.stageApp) : undefined, + }; + }, + + toJSON(message: Preferences_Network_Remotes): unknown { + const obj: any = {}; + if (message.proRemote !== undefined) { + obj.proRemote = Preferences_Network_Remotes_ProRemote.toJSON(message.proRemote); + } + if (message.stageApp !== undefined) { + obj.stageApp = Preferences_Network_Remotes_StageApp.toJSON(message.stageApp); + } + return obj; + }, + + create, I>>(base?: I): Preferences_Network_Remotes { + return Preferences_Network_Remotes.fromPartial(base ?? ({} as any)); + }, + fromPartial, I>>(object: I): Preferences_Network_Remotes { + const message = createBasePreferences_Network_Remotes(); + message.proRemote = (object.proRemote !== undefined && object.proRemote !== null) + ? Preferences_Network_Remotes_ProRemote.fromPartial(object.proRemote) + : undefined; + message.stageApp = (object.stageApp !== undefined && object.stageApp !== null) + ? Preferences_Network_Remotes_StageApp.fromPartial(object.stageApp) + : undefined; + return message; + }, +}; + +function createBasePreferences_Network_Remotes_ProRemote(): Preferences_Network_Remotes_ProRemote { + return { + enable: false, + enableController: false, + controllerPassword: "", + enableObserver: false, + observerPassword: "", + }; +} + +export const Preferences_Network_Remotes_ProRemote = { + encode(message: Preferences_Network_Remotes_ProRemote, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.enable !== false) { + writer.uint32(8).bool(message.enable); + } + if (message.enableController !== false) { + writer.uint32(16).bool(message.enableController); + } + if (message.controllerPassword !== "") { + writer.uint32(26).string(message.controllerPassword); + } + if (message.enableObserver !== false) { + writer.uint32(32).bool(message.enableObserver); + } + if (message.observerPassword !== "") { + writer.uint32(42).string(message.observerPassword); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): Preferences_Network_Remotes_ProRemote { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBasePreferences_Network_Remotes_ProRemote(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 8) { + break; + } + + message.enable = reader.bool(); + continue; + case 2: + if (tag !== 16) { + break; + } + + message.enableController = reader.bool(); + continue; + case 3: + if (tag !== 26) { + break; + } + + message.controllerPassword = reader.string(); + continue; + case 4: + if (tag !== 32) { + break; + } + + message.enableObserver = reader.bool(); + continue; + case 5: + if (tag !== 42) { + break; + } + + message.observerPassword = reader.string(); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(object: any): Preferences_Network_Remotes_ProRemote { + return { + enable: isSet(object.enable) ? globalThis.Boolean(object.enable) : false, + enableController: isSet(object.enableController) ? globalThis.Boolean(object.enableController) : false, + controllerPassword: isSet(object.controllerPassword) ? globalThis.String(object.controllerPassword) : "", + enableObserver: isSet(object.enableObserver) ? globalThis.Boolean(object.enableObserver) : false, + observerPassword: isSet(object.observerPassword) ? globalThis.String(object.observerPassword) : "", + }; + }, + + toJSON(message: Preferences_Network_Remotes_ProRemote): unknown { + const obj: any = {}; + if (message.enable !== false) { + obj.enable = message.enable; + } + if (message.enableController !== false) { + obj.enableController = message.enableController; + } + if (message.controllerPassword !== "") { + obj.controllerPassword = message.controllerPassword; + } + if (message.enableObserver !== false) { + obj.enableObserver = message.enableObserver; + } + if (message.observerPassword !== "") { + obj.observerPassword = message.observerPassword; + } + return obj; + }, + + create, I>>( + base?: I, + ): Preferences_Network_Remotes_ProRemote { + return Preferences_Network_Remotes_ProRemote.fromPartial(base ?? ({} as any)); + }, + fromPartial, I>>( + object: I, + ): Preferences_Network_Remotes_ProRemote { + const message = createBasePreferences_Network_Remotes_ProRemote(); + message.enable = object.enable ?? false; + message.enableController = object.enableController ?? false; + message.controllerPassword = object.controllerPassword ?? ""; + message.enableObserver = object.enableObserver ?? false; + message.observerPassword = object.observerPassword ?? ""; + return message; + }, +}; + +function createBasePreferences_Network_Remotes_StageApp(): Preferences_Network_Remotes_StageApp { + return { enable: false, password: "" }; +} + +export const Preferences_Network_Remotes_StageApp = { + encode(message: Preferences_Network_Remotes_StageApp, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.enable !== false) { + writer.uint32(8).bool(message.enable); + } + if (message.password !== "") { + writer.uint32(18).string(message.password); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): Preferences_Network_Remotes_StageApp { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBasePreferences_Network_Remotes_StageApp(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 8) { + break; + } + + message.enable = reader.bool(); + continue; + case 2: + if (tag !== 18) { + break; + } + + message.password = reader.string(); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(object: any): Preferences_Network_Remotes_StageApp { + return { + enable: isSet(object.enable) ? globalThis.Boolean(object.enable) : false, + password: isSet(object.password) ? globalThis.String(object.password) : "", + }; + }, + + toJSON(message: Preferences_Network_Remotes_StageApp): unknown { + const obj: any = {}; + if (message.enable !== false) { + obj.enable = message.enable; + } + if (message.password !== "") { + obj.password = message.password; + } + return obj; + }, + + create, I>>( + base?: I, + ): Preferences_Network_Remotes_StageApp { + return Preferences_Network_Remotes_StageApp.fromPartial(base ?? ({} as any)); + }, + fromPartial, I>>( + object: I, + ): Preferences_Network_Remotes_StageApp { + const message = createBasePreferences_Network_Remotes_StageApp(); + message.enable = object.enable ?? false; + message.password = object.password ?? ""; + return message; + }, +}; + +function createBasePreferences_Network_Link(): Preferences_Network_Link { + return { enable: false, linkGroup: "" }; +} + +export const Preferences_Network_Link = { + encode(message: Preferences_Network_Link, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.enable !== false) { + writer.uint32(8).bool(message.enable); + } + if (message.linkGroup !== "") { + writer.uint32(18).string(message.linkGroup); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): Preferences_Network_Link { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBasePreferences_Network_Link(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 8) { + break; + } + + message.enable = reader.bool(); + continue; + case 2: + if (tag !== 18) { + break; + } + + message.linkGroup = reader.string(); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(object: any): Preferences_Network_Link { + return { + enable: isSet(object.enable) ? globalThis.Boolean(object.enable) : false, + linkGroup: isSet(object.linkGroup) ? globalThis.String(object.linkGroup) : "", + }; + }, + + toJSON(message: Preferences_Network_Link): unknown { + const obj: any = {}; + if (message.enable !== false) { + obj.enable = message.enable; + } + if (message.linkGroup !== "") { + obj.linkGroup = message.linkGroup; + } + return obj; + }, + + create, I>>(base?: I): Preferences_Network_Link { + return Preferences_Network_Link.fromPartial(base ?? ({} as any)); + }, + fromPartial, I>>(object: I): Preferences_Network_Link { + const message = createBasePreferences_Network_Link(); + message.enable = object.enable ?? false; + message.linkGroup = object.linkGroup ?? ""; + return message; + }, +}; + +function createBasePreferences_Sync(): Preferences_Sync { + return { + repository: "", + includeLibraries: false, + includeMedia: false, + includePlaylists: false, + includeThemes: false, + includeSupportFiles: false, + direction: 0, + replaceDestinationFiles: false, + }; +} + +export const Preferences_Sync = { + encode(message: Preferences_Sync, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.repository !== "") { + writer.uint32(10).string(message.repository); + } + if (message.includeLibraries !== false) { + writer.uint32(16).bool(message.includeLibraries); + } + if (message.includeMedia !== false) { + writer.uint32(24).bool(message.includeMedia); + } + if (message.includePlaylists !== false) { + writer.uint32(32).bool(message.includePlaylists); + } + if (message.includeThemes !== false) { + writer.uint32(40).bool(message.includeThemes); + } + if (message.includeSupportFiles !== false) { + writer.uint32(48).bool(message.includeSupportFiles); + } + if (message.direction !== 0) { + writer.uint32(56).int32(message.direction); + } + if (message.replaceDestinationFiles !== false) { + writer.uint32(64).bool(message.replaceDestinationFiles); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): Preferences_Sync { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBasePreferences_Sync(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } + + message.repository = reader.string(); + continue; + case 2: + if (tag !== 16) { + break; + } + + message.includeLibraries = reader.bool(); + continue; + case 3: + if (tag !== 24) { + break; + } + + message.includeMedia = reader.bool(); + continue; + case 4: + if (tag !== 32) { + break; + } + + message.includePlaylists = reader.bool(); + continue; + case 5: + if (tag !== 40) { + break; + } + + message.includeThemes = reader.bool(); + continue; + case 6: + if (tag !== 48) { + break; + } + + message.includeSupportFiles = reader.bool(); + continue; + case 7: + if (tag !== 56) { + break; + } + + message.direction = reader.int32() as any; + continue; + case 8: + if (tag !== 64) { + break; + } + + message.replaceDestinationFiles = reader.bool(); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(object: any): Preferences_Sync { + return { + repository: isSet(object.repository) ? globalThis.String(object.repository) : "", + includeLibraries: isSet(object.includeLibraries) ? globalThis.Boolean(object.includeLibraries) : false, + includeMedia: isSet(object.includeMedia) ? globalThis.Boolean(object.includeMedia) : false, + includePlaylists: isSet(object.includePlaylists) ? globalThis.Boolean(object.includePlaylists) : false, + includeThemes: isSet(object.includeThemes) ? globalThis.Boolean(object.includeThemes) : false, + includeSupportFiles: isSet(object.includeSupportFiles) ? globalThis.Boolean(object.includeSupportFiles) : false, + direction: isSet(object.direction) ? preferences_Sync_SyncDirectionFromJSON(object.direction) : 0, + replaceDestinationFiles: isSet(object.replaceDestinationFiles) + ? globalThis.Boolean(object.replaceDestinationFiles) + : false, + }; + }, + + toJSON(message: Preferences_Sync): unknown { + const obj: any = {}; + if (message.repository !== "") { + obj.repository = message.repository; + } + if (message.includeLibraries !== false) { + obj.includeLibraries = message.includeLibraries; + } + if (message.includeMedia !== false) { + obj.includeMedia = message.includeMedia; + } + if (message.includePlaylists !== false) { + obj.includePlaylists = message.includePlaylists; + } + if (message.includeThemes !== false) { + obj.includeThemes = message.includeThemes; + } + if (message.includeSupportFiles !== false) { + obj.includeSupportFiles = message.includeSupportFiles; + } + if (message.direction !== 0) { + obj.direction = preferences_Sync_SyncDirectionToJSON(message.direction); + } + if (message.replaceDestinationFiles !== false) { + obj.replaceDestinationFiles = message.replaceDestinationFiles; + } + return obj; + }, + + create, I>>(base?: I): Preferences_Sync { + return Preferences_Sync.fromPartial(base ?? ({} as any)); + }, + fromPartial, I>>(object: I): Preferences_Sync { + const message = createBasePreferences_Sync(); + message.repository = object.repository ?? ""; + message.includeLibraries = object.includeLibraries ?? false; + message.includeMedia = object.includeMedia ?? false; + message.includePlaylists = object.includePlaylists ?? false; + message.includeThemes = object.includeThemes ?? false; + message.includeSupportFiles = object.includeSupportFiles ?? false; + message.direction = object.direction ?? 0; + message.replaceDestinationFiles = object.replaceDestinationFiles ?? false; + return message; + }, +}; + +function createBasePreferences_Advanced(): Preferences_Advanced { + return { + suppressAutoStart: false, + presentationAudioBehavior: 0, + announcementsAudioBehavior: 0, + ndiDiscovery: undefined, + supportFilesPath: "", + manageMediaAutomatically: false, + searchPaths: undefined, + }; +} + +export const Preferences_Advanced = { + encode(message: Preferences_Advanced, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.suppressAutoStart !== false) { + writer.uint32(8).bool(message.suppressAutoStart); + } + if (message.presentationAudioBehavior !== 0) { + writer.uint32(16).int32(message.presentationAudioBehavior); + } + if (message.announcementsAudioBehavior !== 0) { + writer.uint32(24).int32(message.announcementsAudioBehavior); + } + if (message.ndiDiscovery !== undefined) { + Preferences_Advanced_NDIDiscovery.encode(message.ndiDiscovery, writer.uint32(34).fork()).ldelim(); + } + if (message.supportFilesPath !== "") { + writer.uint32(42).string(message.supportFilesPath); + } + if (message.manageMediaAutomatically !== false) { + writer.uint32(48).bool(message.manageMediaAutomatically); + } + if (message.searchPaths !== undefined) { + Preferences_Advanced_SearchPaths.encode(message.searchPaths, writer.uint32(58).fork()).ldelim(); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): Preferences_Advanced { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBasePreferences_Advanced(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 8) { + break; + } + + message.suppressAutoStart = reader.bool(); + continue; + case 2: + if (tag !== 16) { + break; + } + + message.presentationAudioBehavior = reader.int32() as any; + continue; + case 3: + if (tag !== 24) { + break; + } + + message.announcementsAudioBehavior = reader.int32() as any; + continue; + case 4: + if (tag !== 34) { + break; + } + + message.ndiDiscovery = Preferences_Advanced_NDIDiscovery.decode(reader, reader.uint32()); + continue; + case 5: + if (tag !== 42) { + break; + } + + message.supportFilesPath = reader.string(); + continue; + case 6: + if (tag !== 48) { + break; + } + + message.manageMediaAutomatically = reader.bool(); + continue; + case 7: + if (tag !== 58) { + break; + } + + message.searchPaths = Preferences_Advanced_SearchPaths.decode(reader, reader.uint32()); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(object: any): Preferences_Advanced { + return { + suppressAutoStart: isSet(object.suppressAutoStart) ? globalThis.Boolean(object.suppressAutoStart) : false, + presentationAudioBehavior: isSet(object.presentationAudioBehavior) + ? preferences_Advanced_AudioForegroundMediaBehaviorFromJSON(object.presentationAudioBehavior) + : 0, + announcementsAudioBehavior: isSet(object.announcementsAudioBehavior) + ? preferences_Advanced_AudioForegroundMediaBehaviorFromJSON(object.announcementsAudioBehavior) + : 0, + ndiDiscovery: isSet(object.ndiDiscovery) + ? Preferences_Advanced_NDIDiscovery.fromJSON(object.ndiDiscovery) + : undefined, + supportFilesPath: isSet(object.supportFilesPath) ? globalThis.String(object.supportFilesPath) : "", + manageMediaAutomatically: isSet(object.manageMediaAutomatically) + ? globalThis.Boolean(object.manageMediaAutomatically) + : false, + searchPaths: isSet(object.searchPaths) + ? Preferences_Advanced_SearchPaths.fromJSON(object.searchPaths) + : undefined, + }; + }, + + toJSON(message: Preferences_Advanced): unknown { + const obj: any = {}; + if (message.suppressAutoStart !== false) { + obj.suppressAutoStart = message.suppressAutoStart; + } + if (message.presentationAudioBehavior !== 0) { + obj.presentationAudioBehavior = preferences_Advanced_AudioForegroundMediaBehaviorToJSON( + message.presentationAudioBehavior, + ); + } + if (message.announcementsAudioBehavior !== 0) { + obj.announcementsAudioBehavior = preferences_Advanced_AudioForegroundMediaBehaviorToJSON( + message.announcementsAudioBehavior, + ); + } + if (message.ndiDiscovery !== undefined) { + obj.ndiDiscovery = Preferences_Advanced_NDIDiscovery.toJSON(message.ndiDiscovery); + } + if (message.supportFilesPath !== "") { + obj.supportFilesPath = message.supportFilesPath; + } + if (message.manageMediaAutomatically !== false) { + obj.manageMediaAutomatically = message.manageMediaAutomatically; + } + if (message.searchPaths !== undefined) { + obj.searchPaths = Preferences_Advanced_SearchPaths.toJSON(message.searchPaths); + } + return obj; + }, + + create, I>>(base?: I): Preferences_Advanced { + return Preferences_Advanced.fromPartial(base ?? ({} as any)); + }, + fromPartial, I>>(object: I): Preferences_Advanced { + const message = createBasePreferences_Advanced(); + message.suppressAutoStart = object.suppressAutoStart ?? false; + message.presentationAudioBehavior = object.presentationAudioBehavior ?? 0; + message.announcementsAudioBehavior = object.announcementsAudioBehavior ?? 0; + message.ndiDiscovery = (object.ndiDiscovery !== undefined && object.ndiDiscovery !== null) + ? Preferences_Advanced_NDIDiscovery.fromPartial(object.ndiDiscovery) + : undefined; + message.supportFilesPath = object.supportFilesPath ?? ""; + message.manageMediaAutomatically = object.manageMediaAutomatically ?? false; + message.searchPaths = (object.searchPaths !== undefined && object.searchPaths !== null) + ? Preferences_Advanced_SearchPaths.fromPartial(object.searchPaths) + : undefined; + return message; + }, +}; + +function createBasePreferences_Advanced_NDIDiscovery(): Preferences_Advanced_NDIDiscovery { + return { showLocalSources: false, receiveGroups: "", additionalSearchIps: "" }; +} + +export const Preferences_Advanced_NDIDiscovery = { + encode(message: Preferences_Advanced_NDIDiscovery, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.showLocalSources !== false) { + writer.uint32(8).bool(message.showLocalSources); + } + if (message.receiveGroups !== "") { + writer.uint32(18).string(message.receiveGroups); + } + if (message.additionalSearchIps !== "") { + writer.uint32(26).string(message.additionalSearchIps); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): Preferences_Advanced_NDIDiscovery { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBasePreferences_Advanced_NDIDiscovery(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 8) { + break; + } + + message.showLocalSources = reader.bool(); + continue; + case 2: + if (tag !== 18) { + break; + } + + message.receiveGroups = reader.string(); + continue; + case 3: + if (tag !== 26) { + break; + } + + message.additionalSearchIps = reader.string(); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(object: any): Preferences_Advanced_NDIDiscovery { + return { + showLocalSources: isSet(object.showLocalSources) ? globalThis.Boolean(object.showLocalSources) : false, + receiveGroups: isSet(object.receiveGroups) ? globalThis.String(object.receiveGroups) : "", + additionalSearchIps: isSet(object.additionalSearchIps) ? globalThis.String(object.additionalSearchIps) : "", + }; + }, + + toJSON(message: Preferences_Advanced_NDIDiscovery): unknown { + const obj: any = {}; + if (message.showLocalSources !== false) { + obj.showLocalSources = message.showLocalSources; + } + if (message.receiveGroups !== "") { + obj.receiveGroups = message.receiveGroups; + } + if (message.additionalSearchIps !== "") { + obj.additionalSearchIps = message.additionalSearchIps; + } + return obj; + }, + + create, I>>( + base?: I, + ): Preferences_Advanced_NDIDiscovery { + return Preferences_Advanced_NDIDiscovery.fromPartial(base ?? ({} as any)); + }, + fromPartial, I>>( + object: I, + ): Preferences_Advanced_NDIDiscovery { + const message = createBasePreferences_Advanced_NDIDiscovery(); + message.showLocalSources = object.showLocalSources ?? false; + message.receiveGroups = object.receiveGroups ?? ""; + message.additionalSearchIps = object.additionalSearchIps ?? ""; + return message; + }, +}; + +function createBasePreferences_Advanced_SearchPaths(): Preferences_Advanced_SearchPaths { + return { automaticallyRelink: false, paths: [] }; +} + +export const Preferences_Advanced_SearchPaths = { + encode(message: Preferences_Advanced_SearchPaths, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.automaticallyRelink !== false) { + writer.uint32(8).bool(message.automaticallyRelink); + } + for (const v of message.paths) { + Preferences_Advanced_SearchPaths_Path.encode(v!, writer.uint32(18).fork()).ldelim(); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): Preferences_Advanced_SearchPaths { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBasePreferences_Advanced_SearchPaths(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 8) { + break; + } + + message.automaticallyRelink = reader.bool(); + continue; + case 2: + if (tag !== 18) { + break; + } + + message.paths.push(Preferences_Advanced_SearchPaths_Path.decode(reader, reader.uint32())); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(object: any): Preferences_Advanced_SearchPaths { + return { + automaticallyRelink: isSet(object.automaticallyRelink) ? globalThis.Boolean(object.automaticallyRelink) : false, + paths: globalThis.Array.isArray(object?.paths) + ? object.paths.map((e: any) => Preferences_Advanced_SearchPaths_Path.fromJSON(e)) + : [], + }; + }, + + toJSON(message: Preferences_Advanced_SearchPaths): unknown { + const obj: any = {}; + if (message.automaticallyRelink !== false) { + obj.automaticallyRelink = message.automaticallyRelink; + } + if (message.paths?.length) { + obj.paths = message.paths.map((e) => Preferences_Advanced_SearchPaths_Path.toJSON(e)); + } + return obj; + }, + + create, I>>( + base?: I, + ): Preferences_Advanced_SearchPaths { + return Preferences_Advanced_SearchPaths.fromPartial(base ?? ({} as any)); + }, + fromPartial, I>>( + object: I, + ): Preferences_Advanced_SearchPaths { + const message = createBasePreferences_Advanced_SearchPaths(); + message.automaticallyRelink = object.automaticallyRelink ?? false; + message.paths = object.paths?.map((e) => Preferences_Advanced_SearchPaths_Path.fromPartial(e)) || []; + return message; + }, +}; + +function createBasePreferences_Advanced_SearchPaths_Path(): Preferences_Advanced_SearchPaths_Path { + return { enable: false, name: "", path: "", urlRoot: 0 }; +} + +export const Preferences_Advanced_SearchPaths_Path = { + encode(message: Preferences_Advanced_SearchPaths_Path, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.enable !== false) { + writer.uint32(8).bool(message.enable); + } + if (message.name !== "") { + writer.uint32(18).string(message.name); + } + if (message.path !== "") { + writer.uint32(26).string(message.path); + } + if (message.urlRoot !== 0) { + writer.uint32(32).int32(message.urlRoot); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): Preferences_Advanced_SearchPaths_Path { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBasePreferences_Advanced_SearchPaths_Path(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 8) { + break; + } + + message.enable = reader.bool(); + continue; + case 2: + if (tag !== 18) { + break; + } + + message.name = reader.string(); + continue; + case 3: + if (tag !== 26) { + break; + } + + message.path = reader.string(); + continue; + case 4: + if (tag !== 32) { + break; + } + + message.urlRoot = reader.int32() as any; + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(object: any): Preferences_Advanced_SearchPaths_Path { + return { + enable: isSet(object.enable) ? globalThis.Boolean(object.enable) : false, + name: isSet(object.name) ? globalThis.String(object.name) : "", + path: isSet(object.path) ? globalThis.String(object.path) : "", + urlRoot: isSet(object.urlRoot) ? uRL_LocalRelativePath_RootFromJSON(object.urlRoot) : 0, + }; + }, + + toJSON(message: Preferences_Advanced_SearchPaths_Path): unknown { + const obj: any = {}; + if (message.enable !== false) { + obj.enable = message.enable; + } + if (message.name !== "") { + obj.name = message.name; + } + if (message.path !== "") { + obj.path = message.path; + } + if (message.urlRoot !== 0) { + obj.urlRoot = uRL_LocalRelativePath_RootToJSON(message.urlRoot); + } + return obj; + }, + + create, I>>( + base?: I, + ): Preferences_Advanced_SearchPaths_Path { + return Preferences_Advanced_SearchPaths_Path.fromPartial(base ?? ({} as any)); + }, + fromPartial, I>>( + object: I, + ): Preferences_Advanced_SearchPaths_Path { + const message = createBasePreferences_Advanced_SearchPaths_Path(); + message.enable = object.enable ?? false; + message.name = object.name ?? ""; + message.path = object.path ?? ""; + message.urlRoot = object.urlRoot ?? 0; + return message; + }, +}; + +function createBasePreferences_Updates(): Preferences_Updates { + return { notifyWhenAvailable: false, updateChannel: 0 }; +} + +export const Preferences_Updates = { + encode(message: Preferences_Updates, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.notifyWhenAvailable !== false) { + writer.uint32(8).bool(message.notifyWhenAvailable); + } + if (message.updateChannel !== 0) { + writer.uint32(16).int32(message.updateChannel); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): Preferences_Updates { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBasePreferences_Updates(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 8) { + break; + } + + message.notifyWhenAvailable = reader.bool(); + continue; + case 2: + if (tag !== 16) { + break; + } + + message.updateChannel = reader.int32() as any; + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(object: any): Preferences_Updates { + return { + notifyWhenAvailable: isSet(object.notifyWhenAvailable) ? globalThis.Boolean(object.notifyWhenAvailable) : false, + updateChannel: isSet(object.updateChannel) ? preferences_Updates_ChannelFromJSON(object.updateChannel) : 0, + }; + }, + + toJSON(message: Preferences_Updates): unknown { + const obj: any = {}; + if (message.notifyWhenAvailable !== false) { + obj.notifyWhenAvailable = message.notifyWhenAvailable; + } + if (message.updateChannel !== 0) { + obj.updateChannel = preferences_Updates_ChannelToJSON(message.updateChannel); + } + return obj; + }, + + create, I>>(base?: I): Preferences_Updates { + return Preferences_Updates.fromPartial(base ?? ({} as any)); + }, + fromPartial, I>>(object: I): Preferences_Updates { + const message = createBasePreferences_Updates(); + message.notifyWhenAvailable = object.notifyWhenAvailable ?? false; + message.updateChannel = object.updateChannel ?? 0; + return message; + }, +}; + +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; + +export type DeepPartial = T extends Builtin ? T + : T extends globalThis.Array ? globalThis.Array> + : T extends ReadonlyArray ? ReadonlyArray> + : T extends {} ? { [K in keyof T]?: DeepPartial } + : Partial; + +type KeysOfUnion = T extends T ? keyof T : never; +export type Exact = P extends Builtin ? P + : P & { [K in keyof P]: Exact } & { [K in Exclude>]: never }; + +function isSet(value: any): boolean { + return value !== null && value !== undefined; +} diff --git a/proto/presentation.ts b/proto/presentation.ts index 6a36ed4..93f5b12 100644 --- a/proto/presentation.ts +++ b/proto/presentation.ts @@ -727,7 +727,7 @@ export const Presentation_CCLI = { if (message.songNumber !== 0) { writer.uint32(48).uint32(message.songNumber); } - if (message.display === true) { + if (message.display !== false) { writer.uint32(56).bool(message.display); } if (message.album !== '') { @@ -867,7 +867,7 @@ export const Presentation_CCLI = { if (message.songNumber !== 0) { obj.songNumber = Math.round(message.songNumber); } - if (message.display === true) { + if (message.display !== false) { obj.display = message.display; } if (message.album !== '') { @@ -1136,13 +1136,13 @@ export const Presentation_Timeline = { if (message.duration !== 0) { writer.uint32(41).double(message.duration); } - if (message.loop === true) { + if (message.loop !== false) { writer.uint32(48).bool(message.loop); } if (message.audioAction !== undefined) { Action.encode(message.audioAction, writer.uint32(66).fork()).ldelim(); } - if (message.timecodeEnable === true) { + if (message.timecodeEnable !== false) { writer.uint32(72).bool(message.timecodeEnable); } if (message.timecodeOffset !== 0) { @@ -1257,13 +1257,13 @@ export const Presentation_Timeline = { if (message.duration !== 0) { obj.duration = message.duration; } - if (message.loop === true) { + if (message.loop !== false) { obj.loop = message.loop; } if (message.audioAction !== undefined) { obj.audioAction = Action.toJSON(message.audioAction); } - if (message.timecodeEnable === true) { + if (message.timecodeEnable !== false) { obj.timecodeEnable = message.timecodeEnable; } if (message.timecodeOffset !== 0) { @@ -1919,7 +1919,7 @@ export const Presentation_Music = { }; function bytesFromBase64(b64: string): Uint8Array { - if (globalThis.Buffer) { + if ((globalThis as any).Buffer) { return Uint8Array.from(globalThis.Buffer.from(b64, 'base64')); } else { const bin = globalThis.atob(b64); @@ -1932,7 +1932,7 @@ function bytesFromBase64(b64: string): Uint8Array { } function base64FromBytes(arr: Uint8Array): string { - if (globalThis.Buffer) { + if ((globalThis as any).Buffer) { return globalThis.Buffer.from(arr).toString('base64'); } else { const bin: string[] = []; diff --git a/proto/presentationSlide.ts b/proto/presentationSlide.ts index 258601d..b284a9a 100644 --- a/proto/presentationSlide.ts +++ b/proto/presentationSlide.ts @@ -287,7 +287,7 @@ export const PresentationSlide_Notes = { }; function bytesFromBase64(b64: string): Uint8Array { - if (globalThis.Buffer) { + if ((globalThis as any).Buffer) { return Uint8Array.from(globalThis.Buffer.from(b64, 'base64')); } else { const bin = globalThis.atob(b64); @@ -300,7 +300,7 @@ function bytesFromBase64(b64: string): Uint8Array { } function base64FromBytes(arr: Uint8Array): string { - if (globalThis.Buffer) { + if ((globalThis as any).Buffer) { return globalThis.Buffer.from(arr).toString('base64'); } else { const bin: string[] = []; diff --git a/proto/proApi.proto b/proto/proApi.proto index 98c3a94..eb4da97 100644 --- a/proto/proApi.proto +++ b/proto/proApi.proto @@ -43,6 +43,8 @@ message ProApiNetworkConfiguration { string stage_password = 10; bool link_enable = 11; string web_resource_root = 12; + uint32 tcp_stream_port = 13; + bool tcp_stream_enable = 14; } message ProLink { @@ -249,6 +251,8 @@ message ProLink { string public_ip = 2; uint32 port = 3; bool success = 4; + uint32 tcp_stream_port = 5; + bool tcp_stream_success = 6; } message ConfigurationRequest { @@ -561,6 +565,7 @@ message NetworkAPI { message API_Macro { .rv.data.NetworkAPI.IndexOrNameIdentifier identifier = 1; + repeated .rv.data.NetworkAPI.IndexOrNameIdentifier index_path_components = 2; } message API_Look { diff --git a/proto/proApi.ts b/proto/proApi.ts index e2c07df..5b115c9 100644 --- a/proto/proApi.ts +++ b/proto/proApi.ts @@ -40,6 +40,8 @@ export interface ProApiNetworkConfiguration { stagePassword: string; linkEnable: boolean; webResourceRoot: string; + tcpStreamPort: number; + tcpStreamEnable: boolean; } export interface ProLink {} @@ -322,6 +324,8 @@ export interface ProLink_HandlerIn_ServerState { publicIp: string; port: number; success: boolean; + tcpStreamPort: number; + tcpStreamSuccess: boolean; } export interface ProLink_HandlerIn_ConfigurationRequest {} @@ -802,6 +806,7 @@ export interface NetworkAPI_Action_APIMessage_ClearMessage { export interface NetworkAPI_Action_APIMacro { identifier: NetworkAPI_IndexOrNameIdentifier | undefined; + indexPathComponents: NetworkAPI_IndexOrNameIdentifier[]; } export interface NetworkAPI_Action_APILook { @@ -1134,6 +1139,8 @@ function createBaseProApiNetworkConfiguration(): ProApiNetworkConfiguration { stagePassword: '', linkEnable: false, webResourceRoot: '', + tcpStreamPort: 0, + tcpStreamEnable: false, }; } @@ -1142,7 +1149,7 @@ export const ProApiNetworkConfiguration = { message: ProApiNetworkConfiguration, writer: _m0.Writer = _m0.Writer.create(), ): _m0.Writer { - if (message.enableNetwork === true) { + if (message.enableNetwork !== false) { writer.uint32(8).bool(message.enableNetwork); } if (message.port !== 0) { @@ -1151,33 +1158,39 @@ export const ProApiNetworkConfiguration = { if (message.networkName !== '') { writer.uint32(26).string(message.networkName); } - if (message.remoteEnable === true) { + if (message.remoteEnable !== false) { writer.uint32(32).bool(message.remoteEnable); } - if (message.remoteControlEnable === true) { + if (message.remoteControlEnable !== false) { writer.uint32(40).bool(message.remoteControlEnable); } if (message.remoteControlPassword !== '') { writer.uint32(50).string(message.remoteControlPassword); } - if (message.remoteObserveEnable === true) { + if (message.remoteObserveEnable !== false) { writer.uint32(56).bool(message.remoteObserveEnable); } if (message.remoteObservePassword !== '') { writer.uint32(66).string(message.remoteObservePassword); } - if (message.stageEnable === true) { + if (message.stageEnable !== false) { writer.uint32(72).bool(message.stageEnable); } if (message.stagePassword !== '') { writer.uint32(82).string(message.stagePassword); } - if (message.linkEnable === true) { + if (message.linkEnable !== false) { writer.uint32(88).bool(message.linkEnable); } if (message.webResourceRoot !== '') { writer.uint32(98).string(message.webResourceRoot); } + if (message.tcpStreamPort !== 0) { + writer.uint32(104).uint32(message.tcpStreamPort); + } + if (message.tcpStreamEnable !== false) { + writer.uint32(112).bool(message.tcpStreamEnable); + } return writer; }, @@ -1276,6 +1289,20 @@ export const ProApiNetworkConfiguration = { message.webResourceRoot = reader.string(); continue; + case 13: + if (tag !== 104) { + break; + } + + message.tcpStreamPort = reader.uint32(); + continue; + case 14: + if (tag !== 112) { + break; + } + + message.tcpStreamEnable = reader.bool(); + continue; } if ((tag & 7) === 4 || tag === 0) { break; @@ -1321,12 +1348,18 @@ export const ProApiNetworkConfiguration = { webResourceRoot: isSet(object.webResourceRoot) ? globalThis.String(object.webResourceRoot) : '', + tcpStreamPort: isSet(object.tcpStreamPort) + ? globalThis.Number(object.tcpStreamPort) + : 0, + tcpStreamEnable: isSet(object.tcpStreamEnable) + ? globalThis.Boolean(object.tcpStreamEnable) + : false, }; }, toJSON(message: ProApiNetworkConfiguration): unknown { const obj: any = {}; - if (message.enableNetwork === true) { + if (message.enableNetwork !== false) { obj.enableNetwork = message.enableNetwork; } if (message.port !== 0) { @@ -1335,33 +1368,39 @@ export const ProApiNetworkConfiguration = { if (message.networkName !== '') { obj.networkName = message.networkName; } - if (message.remoteEnable === true) { + if (message.remoteEnable !== false) { obj.remoteEnable = message.remoteEnable; } - if (message.remoteControlEnable === true) { + if (message.remoteControlEnable !== false) { obj.remoteControlEnable = message.remoteControlEnable; } if (message.remoteControlPassword !== '') { obj.remoteControlPassword = message.remoteControlPassword; } - if (message.remoteObserveEnable === true) { + if (message.remoteObserveEnable !== false) { obj.remoteObserveEnable = message.remoteObserveEnable; } if (message.remoteObservePassword !== '') { obj.remoteObservePassword = message.remoteObservePassword; } - if (message.stageEnable === true) { + if (message.stageEnable !== false) { obj.stageEnable = message.stageEnable; } if (message.stagePassword !== '') { obj.stagePassword = message.stagePassword; } - if (message.linkEnable === true) { + if (message.linkEnable !== false) { obj.linkEnable = message.linkEnable; } if (message.webResourceRoot !== '') { obj.webResourceRoot = message.webResourceRoot; } + if (message.tcpStreamPort !== 0) { + obj.tcpStreamPort = Math.round(message.tcpStreamPort); + } + if (message.tcpStreamEnable !== false) { + obj.tcpStreamEnable = message.tcpStreamEnable; + } return obj; }, @@ -1386,6 +1425,8 @@ export const ProApiNetworkConfiguration = { message.stagePassword = object.stagePassword ?? ''; message.linkEnable = object.linkEnable ?? false; message.webResourceRoot = object.webResourceRoot ?? ''; + message.tcpStreamPort = object.tcpStreamPort ?? 0; + message.tcpStreamEnable = object.tcpStreamEnable ?? false; return message; }, }; @@ -5536,7 +5577,14 @@ export const ProLink_HandlerIn_ProPresenterInfo = { }; function createBaseProLink_HandlerIn_ServerState(): ProLink_HandlerIn_ServerState { - return { localIp: '', publicIp: '', port: 0, success: false }; + return { + localIp: '', + publicIp: '', + port: 0, + success: false, + tcpStreamPort: 0, + tcpStreamSuccess: false, + }; } export const ProLink_HandlerIn_ServerState = { @@ -5553,9 +5601,15 @@ export const ProLink_HandlerIn_ServerState = { if (message.port !== 0) { writer.uint32(24).uint32(message.port); } - if (message.success === true) { + if (message.success !== false) { writer.uint32(32).bool(message.success); } + if (message.tcpStreamPort !== 0) { + writer.uint32(40).uint32(message.tcpStreamPort); + } + if (message.tcpStreamSuccess !== false) { + writer.uint32(48).bool(message.tcpStreamSuccess); + } return writer; }, @@ -5598,6 +5652,20 @@ export const ProLink_HandlerIn_ServerState = { message.success = reader.bool(); continue; + case 5: + if (tag !== 40) { + break; + } + + message.tcpStreamPort = reader.uint32(); + continue; + case 6: + if (tag !== 48) { + break; + } + + message.tcpStreamSuccess = reader.bool(); + continue; } if ((tag & 7) === 4 || tag === 0) { break; @@ -5617,6 +5685,12 @@ export const ProLink_HandlerIn_ServerState = { success: isSet(object.success) ? globalThis.Boolean(object.success) : false, + tcpStreamPort: isSet(object.tcpStreamPort) + ? globalThis.Number(object.tcpStreamPort) + : 0, + tcpStreamSuccess: isSet(object.tcpStreamSuccess) + ? globalThis.Boolean(object.tcpStreamSuccess) + : false, }; }, @@ -5631,9 +5705,15 @@ export const ProLink_HandlerIn_ServerState = { if (message.port !== 0) { obj.port = Math.round(message.port); } - if (message.success === true) { + if (message.success !== false) { obj.success = message.success; } + if (message.tcpStreamPort !== 0) { + obj.tcpStreamPort = Math.round(message.tcpStreamPort); + } + if (message.tcpStreamSuccess !== false) { + obj.tcpStreamSuccess = message.tcpStreamSuccess; + } return obj; }, @@ -5650,6 +5730,8 @@ export const ProLink_HandlerIn_ServerState = { message.publicIp = object.publicIp ?? ''; message.port = object.port ?? 0; message.success = object.success ?? false; + message.tcpStreamPort = object.tcpStreamPort ?? 0; + message.tcpStreamSuccess = object.tcpStreamSuccess ?? false; return message; }, }; @@ -6116,7 +6198,7 @@ export const ProLink_HandlerOut_GroupJoinConfirmation = { message: ProLink_HandlerOut_GroupJoinConfirmation, writer: _m0.Writer = _m0.Writer.create(), ): _m0.Writer { - if (message.accept === true) { + if (message.accept !== false) { writer.uint32(8).bool(message.accept); } return writer; @@ -6157,7 +6239,7 @@ export const ProLink_HandlerOut_GroupJoinConfirmation = { toJSON(message: ProLink_HandlerOut_GroupJoinConfirmation): unknown { const obj: any = {}; - if (message.accept === true) { + if (message.accept !== false) { obj.accept = message.accept; } return obj; @@ -8552,7 +8634,7 @@ export const NetworkAPI_Action_APIPrerollComplete = { if (message.id !== 0) { writer.uint32(8).uint64(message.id); } - if (message.failed === true) { + if (message.failed !== false) { writer.uint32(16).bool(message.failed); } if (message.latency !== 0) { @@ -8615,7 +8697,7 @@ export const NetworkAPI_Action_APIPrerollComplete = { if (message.id !== 0) { obj.id = Math.round(message.id); } - if (message.failed === true) { + if (message.failed !== false) { obj.failed = message.failed; } if (message.latency !== 0) { @@ -11136,7 +11218,7 @@ export const NetworkAPI_Action_APIMessage_ClearMessage = { }; function createBaseNetworkAPI_Action_APIMacro(): NetworkAPI_Action_APIMacro { - return { identifier: undefined }; + return { identifier: undefined, indexPathComponents: [] }; } export const NetworkAPI_Action_APIMacro = { @@ -11150,6 +11232,12 @@ export const NetworkAPI_Action_APIMacro = { writer.uint32(10).fork(), ).ldelim(); } + for (const v of message.indexPathComponents) { + NetworkAPI_IndexOrNameIdentifier.encode( + v!, + writer.uint32(18).fork(), + ).ldelim(); + } return writer; }, @@ -11174,6 +11262,15 @@ export const NetworkAPI_Action_APIMacro = { reader.uint32(), ); continue; + case 2: + if (tag !== 18) { + break; + } + + message.indexPathComponents.push( + NetworkAPI_IndexOrNameIdentifier.decode(reader, reader.uint32()), + ); + continue; } if ((tag & 7) === 4 || tag === 0) { break; @@ -11188,6 +11285,11 @@ export const NetworkAPI_Action_APIMacro = { identifier: isSet(object.identifier) ? NetworkAPI_IndexOrNameIdentifier.fromJSON(object.identifier) : undefined, + indexPathComponents: globalThis.Array.isArray(object?.indexPathComponents) + ? object.indexPathComponents.map((e: any) => + NetworkAPI_IndexOrNameIdentifier.fromJSON(e), + ) + : [], }; }, @@ -11198,6 +11300,11 @@ export const NetworkAPI_Action_APIMacro = { message.identifier, ); } + if (message.indexPathComponents?.length) { + obj.indexPathComponents = message.indexPathComponents.map((e) => + NetworkAPI_IndexOrNameIdentifier.toJSON(e), + ); + } return obj; }, @@ -11214,6 +11321,10 @@ export const NetworkAPI_Action_APIMacro = { object.identifier !== undefined && object.identifier !== null ? NetworkAPI_IndexOrNameIdentifier.fromPartial(object.identifier) : undefined; + message.indexPathComponents = + object.indexPathComponents?.map((e) => + NetworkAPI_IndexOrNameIdentifier.fromPartial(e), + ) || []; return message; }, }; diff --git a/proto/proApiV1Announcement.ts b/proto/proApiV1Announcement.ts index 1bbbc3e..ac9c4dc 100644 --- a/proto/proApiV1Announcement.ts +++ b/proto/proApiV1Announcement.ts @@ -1432,7 +1432,7 @@ export const APIV1AnnouncementResponse_ActiveTimelineStatus = { message: APIV1AnnouncementResponse_ActiveTimelineStatus, writer: _m0.Writer = _m0.Writer.create(), ): _m0.Writer { - if (message.isRunning === true) { + if (message.isRunning !== false) { writer.uint32(8).bool(message.isRunning); } if (message.currentTime !== 0) { @@ -1488,7 +1488,7 @@ export const APIV1AnnouncementResponse_ActiveTimelineStatus = { toJSON(message: APIV1AnnouncementResponse_ActiveTimelineStatus): unknown { const obj: any = {}; - if (message.isRunning === true) { + if (message.isRunning !== false) { obj.isRunning = message.isRunning; } if (message.currentTime !== 0) { diff --git a/proto/proApiV1BasicTypes.ts b/proto/proApiV1BasicTypes.ts index a9f1302..e349047 100644 --- a/proto/proApiV1BasicTypes.ts +++ b/proto/proApiV1BasicTypes.ts @@ -1715,10 +1715,10 @@ export const APIV1PlaylistItem = { if (message.type !== 0) { writer.uint32(16).int32(message.type); } - if (message.isHidden === true) { + if (message.isHidden !== false) { writer.uint32(24).bool(message.isHidden); } - if (message.isPco === true) { + if (message.isPco !== false) { writer.uint32(32).bool(message.isPco); } if (message.headerColor !== undefined) { @@ -1817,10 +1817,10 @@ export const APIV1PlaylistItem = { if (message.type !== 0) { obj.type = aPIV1PlaylistItem_APIV1PlaylistItemTypeToJSON(message.type); } - if (message.isHidden === true) { + if (message.isHidden !== false) { obj.isHidden = message.isHidden; } - if (message.isPco === true) { + if (message.isPco !== false) { obj.isPco = message.isPco; } if (message.headerColor !== undefined) { @@ -1888,13 +1888,13 @@ export const APIV1ClearGroup = { writer.int32(v); } writer.ldelim(); - if (message.stopTimelineAnnouncements === true) { + if (message.stopTimelineAnnouncements !== false) { writer.uint32(40).bool(message.stopTimelineAnnouncements); } - if (message.stopTimelinePresentation === true) { + if (message.stopTimelinePresentation !== false) { writer.uint32(48).bool(message.stopTimelinePresentation); } - if (message.clearNextPresentation === true) { + if (message.clearNextPresentation !== false) { writer.uint32(56).bool(message.clearNextPresentation); } return writer; @@ -2014,13 +2014,13 @@ export const APIV1ClearGroup = { aPIV1ClearGroup_APIV1ClearGroupLayerTypeToJSON(e), ); } - if (message.stopTimelineAnnouncements === true) { + if (message.stopTimelineAnnouncements !== false) { obj.stopTimelineAnnouncements = message.stopTimelineAnnouncements; } - if (message.stopTimelinePresentation === true) { + if (message.stopTimelinePresentation !== false) { obj.stopTimelinePresentation = message.stopTimelinePresentation; } - if (message.clearNextPresentation === true) { + if (message.clearNextPresentation !== false) { obj.clearNextPresentation = message.clearNextPresentation; } return obj; @@ -2440,7 +2440,7 @@ export const APIV1Message_APIV1MessageToken_APIV1TimerToken = { if (message.id !== undefined) { APIV1Identifier.encode(message.id, writer.uint32(10).fork()).ldelim(); } - if (message.allowsOverrun === true) { + if (message.allowsOverrun !== false) { writer.uint32(16).bool(message.allowsOverrun); } if (message.format !== undefined) { @@ -2567,7 +2567,7 @@ export const APIV1Message_APIV1MessageToken_APIV1TimerToken = { if (message.id !== undefined) { obj.id = APIV1Identifier.toJSON(message.id); } - if (message.allowsOverrun === true) { + if (message.allowsOverrun !== false) { obj.allowsOverrun = message.allowsOverrun; } if (message.format !== undefined) { @@ -2646,7 +2646,7 @@ export const APIV1Message_APIV1MessageToken_APIV1ClockToken = { if (message.time !== 0) { writer.uint32(16).int32(message.time); } - if (message.is24Hours === true) { + if (message.is24Hours !== false) { writer.uint32(24).bool(message.is24Hours); } return writer; @@ -2725,7 +2725,7 @@ export const APIV1Message_APIV1MessageToken_APIV1ClockToken = { message.time, ); } - if (message.is24Hours === true) { + if (message.is24Hours !== false) { obj.is24Hours = message.is24Hours; } return obj; @@ -2773,7 +2773,7 @@ export const APIV1Timer = { if (message.id !== undefined) { APIV1Identifier.encode(message.id, writer.uint32(10).fork()).ldelim(); } - if (message.allowsOverrun === true) { + if (message.allowsOverrun !== false) { writer.uint32(16).bool(message.allowsOverrun); } if (message.countdown !== undefined) { @@ -2881,7 +2881,7 @@ export const APIV1Timer = { if (message.id !== undefined) { obj.id = APIV1Identifier.toJSON(message.id); } - if (message.allowsOverrun === true) { + if (message.allowsOverrun !== false) { obj.allowsOverrun = message.allowsOverrun; } if (message.countdown !== undefined) { @@ -3104,7 +3104,7 @@ export const APIV1Timer_APIV1TimerElapsed = { if (message.endTime !== 0) { writer.uint32(16).int32(message.endTime); } - if (message.hasEndTime === true) { + if (message.hasEndTime !== false) { writer.uint32(24).bool(message.hasEndTime); } return writer; @@ -3171,7 +3171,7 @@ export const APIV1Timer_APIV1TimerElapsed = { if (message.endTime !== 0) { obj.endTime = Math.round(message.endTime); } - if (message.hasEndTime === true) { + if (message.hasEndTime !== false) { obj.hasEndTime = message.hasEndTime; } return obj; @@ -3637,22 +3637,22 @@ export const APIV1Screen = { message: APIV1Screen, writer: _m0.Writer = _m0.Writer.create(), ): _m0.Writer { - if (message.videoInput === true) { + if (message.videoInput !== false) { writer.uint32(8).bool(message.videoInput); } - if (message.media === true) { + if (message.media !== false) { writer.uint32(16).bool(message.media); } - if (message.slide === true) { + if (message.slide !== false) { writer.uint32(24).bool(message.slide); } - if (message.announcements === true) { + if (message.announcements !== false) { writer.uint32(32).bool(message.announcements); } - if (message.props === true) { + if (message.props !== false) { writer.uint32(40).bool(message.props); } - if (message.messages === true) { + if (message.messages !== false) { writer.uint32(48).bool(message.messages); } if (message.presentation !== '') { @@ -3760,22 +3760,22 @@ export const APIV1Screen = { toJSON(message: APIV1Screen): unknown { const obj: any = {}; - if (message.videoInput === true) { + if (message.videoInput !== false) { obj.videoInput = message.videoInput; } - if (message.media === true) { + if (message.media !== false) { obj.media = message.media; } - if (message.slide === true) { + if (message.slide !== false) { obj.slide = message.slide; } - if (message.announcements === true) { + if (message.announcements !== false) { obj.announcements = message.announcements; } - if (message.props === true) { + if (message.props !== false) { obj.props = message.props; } - if (message.messages === true) { + if (message.messages !== false) { obj.messages = message.messages; } if (message.presentation !== '') { @@ -4867,7 +4867,7 @@ export const APIV1RTMPCapture = { if (message.encoding !== '') { writer.uint32(26).string(message.encoding); } - if (message.saveLocal === true) { + if (message.saveLocal !== false) { writer.uint32(32).bool(message.saveLocal); } if (message.fileLocation !== '') { @@ -4955,7 +4955,7 @@ export const APIV1RTMPCapture = { if (message.encoding !== '') { obj.encoding = message.encoding; } - if (message.saveLocal === true) { + if (message.saveLocal !== false) { obj.saveLocal = message.saveLocal; } if (message.fileLocation !== '') { @@ -5131,7 +5131,7 @@ export const APIV1Presentation = { writer.uint32(18).fork(), ).ldelim(); } - if (message.hasTimeline === true) { + if (message.hasTimeline !== false) { writer.uint32(24).bool(message.hasTimeline); } if (message.presentationPath !== '') { @@ -5227,7 +5227,7 @@ export const APIV1Presentation = { APIV1Presentation_SlideGroup.toJSON(e), ); } - if (message.hasTimeline === true) { + if (message.hasTimeline !== false) { obj.hasTimeline = message.hasTimeline; } if (message.presentationPath !== '') { @@ -5392,7 +5392,7 @@ export const APIV1Presentation_SlideGroup_Slide = { message: APIV1Presentation_SlideGroup_Slide, writer: _m0.Writer = _m0.Writer.create(), ): _m0.Writer { - if (message.enabled === true) { + if (message.enabled !== false) { writer.uint32(8).bool(message.enabled); } if (message.notes !== '') { @@ -5479,7 +5479,7 @@ export const APIV1Presentation_SlideGroup_Slide = { toJSON(message: APIV1Presentation_SlideGroup_Slide): unknown { const obj: any = {}; - if (message.enabled === true) { + if (message.enabled !== false) { obj.enabled = message.enabled; } if (message.notes !== '') { @@ -6204,7 +6204,7 @@ export const APIV1PropData = { if (message.id !== undefined) { APIV1Identifier.encode(message.id, writer.uint32(10).fork()).ldelim(); } - if (message.isActive === true) { + if (message.isActive !== false) { writer.uint32(16).bool(message.isActive); } return writer; @@ -6255,7 +6255,7 @@ export const APIV1PropData = { if (message.id !== undefined) { obj.id = APIV1Identifier.toJSON(message.id); } - if (message.isActive === true) { + if (message.isActive !== false) { obj.isActive = message.isActive; } return obj; diff --git a/proto/proApiV1Capture.ts b/proto/proApiV1Capture.ts index bba3dfb..8de9401 100644 --- a/proto/proApiV1Capture.ts +++ b/proto/proApiV1Capture.ts @@ -601,7 +601,7 @@ export const APIV1RTMPCapture = { if (message.encoding !== '') { writer.uint32(26).string(message.encoding); } - if (message.saveLocal === true) { + if (message.saveLocal !== false) { writer.uint32(32).bool(message.saveLocal); } if (message.fileLocation !== '') { @@ -689,7 +689,7 @@ export const APIV1RTMPCapture = { if (message.encoding !== '') { obj.encoding = message.encoding; } - if (message.saveLocal === true) { + if (message.saveLocal !== false) { obj.saveLocal = message.saveLocal; } if (message.fileLocation !== '') { diff --git a/proto/proApiV1Clear.ts b/proto/proApiV1Clear.ts index c9da3bc..b0fc319 100644 --- a/proto/proApiV1Clear.ts +++ b/proto/proApiV1Clear.ts @@ -214,13 +214,13 @@ export const APIV1ClearGroup = { writer.int32(v); } writer.ldelim(); - if (message.stopTimelineAnnouncements === true) { + if (message.stopTimelineAnnouncements !== false) { writer.uint32(40).bool(message.stopTimelineAnnouncements); } - if (message.stopTimelinePresentation === true) { + if (message.stopTimelinePresentation !== false) { writer.uint32(48).bool(message.stopTimelinePresentation); } - if (message.clearNextPresentation === true) { + if (message.clearNextPresentation !== false) { writer.uint32(56).bool(message.clearNextPresentation); } return writer; @@ -340,13 +340,13 @@ export const APIV1ClearGroup = { aPIV1ClearGroup_APIV1ClearGroupLayerTypeToJSON(e), ); } - if (message.stopTimelineAnnouncements === true) { + if (message.stopTimelineAnnouncements !== false) { obj.stopTimelineAnnouncements = message.stopTimelineAnnouncements; } - if (message.stopTimelinePresentation === true) { + if (message.stopTimelinePresentation !== false) { obj.stopTimelinePresentation = message.stopTimelinePresentation; } - if (message.clearNextPresentation === true) { + if (message.clearNextPresentation !== false) { obj.clearNextPresentation = message.clearNextPresentation; } return obj; @@ -2260,7 +2260,7 @@ export const APIV1ClearResponse_PutGroupIcon = { }; function bytesFromBase64(b64: string): Uint8Array { - if (globalThis.Buffer) { + if ((globalThis as any).Buffer) { return Uint8Array.from(globalThis.Buffer.from(b64, 'base64')); } else { const bin = globalThis.atob(b64); @@ -2273,7 +2273,7 @@ function bytesFromBase64(b64: string): Uint8Array { } function base64FromBytes(arr: Uint8Array): string { - if (globalThis.Buffer) { + if ((globalThis as any).Buffer) { return globalThis.Buffer.from(arr).toString('base64'); } else { const bin: string[] = []; diff --git a/proto/proApiV1Looks.ts b/proto/proApiV1Looks.ts index b75b185..f15723b 100644 --- a/proto/proApiV1Looks.ts +++ b/proto/proApiV1Looks.ts @@ -203,22 +203,22 @@ export const APIV1Screen = { message: APIV1Screen, writer: _m0.Writer = _m0.Writer.create(), ): _m0.Writer { - if (message.videoInput === true) { + if (message.videoInput !== false) { writer.uint32(8).bool(message.videoInput); } - if (message.media === true) { + if (message.media !== false) { writer.uint32(16).bool(message.media); } - if (message.slide === true) { + if (message.slide !== false) { writer.uint32(24).bool(message.slide); } - if (message.announcements === true) { + if (message.announcements !== false) { writer.uint32(32).bool(message.announcements); } - if (message.props === true) { + if (message.props !== false) { writer.uint32(40).bool(message.props); } - if (message.messages === true) { + if (message.messages !== false) { writer.uint32(48).bool(message.messages); } if (message.presentation !== '') { @@ -326,22 +326,22 @@ export const APIV1Screen = { toJSON(message: APIV1Screen): unknown { const obj: any = {}; - if (message.videoInput === true) { + if (message.videoInput !== false) { obj.videoInput = message.videoInput; } - if (message.media === true) { + if (message.media !== false) { obj.media = message.media; } - if (message.slide === true) { + if (message.slide !== false) { obj.slide = message.slide; } - if (message.announcements === true) { + if (message.announcements !== false) { obj.announcements = message.announcements; } - if (message.props === true) { + if (message.props !== false) { obj.props = message.props; } - if (message.messages === true) { + if (message.messages !== false) { obj.messages = message.messages; } if (message.presentation !== '') { diff --git a/proto/proApiV1Macro.proto b/proto/proApiV1Macro.proto index 2f41853..3682166 100755 --- a/proto/proApiV1Macro.proto +++ b/proto/proApiV1Macro.proto @@ -12,6 +12,12 @@ import "proApiV1Identifier.proto"; message API_v1_Macro { .rv.data.API_v1_Identifier id = 1; .rv.data.API_v1_Color color = 2; + string image_type = 3; +} + +message API_v1_Macro_Collection { + .rv.data.API_v1_Identifier id = 1; + repeated .rv.data.API_v1_Macro macros = 2; } message API_v1_Macro_Request { @@ -26,6 +32,7 @@ message API_v1_Macro_Request { string id = 1; string name_change = 2; .rv.data.API_v1_Color color_change = 3; + string image_type_change = 4; } message DeleteMacro { @@ -36,12 +43,49 @@ message API_v1_Macro_Request { string id = 1; } + message MacroCollections { + } + + message GetMacroCollection { + string id = 1; + } + + message PostMacroCollections { + string name = 1; + } + + message PutMacroCollection { + string id = 1; + .rv.data.API_v1_Macro_Collection changes = 2; + } + + message DeleteMacroCollection { + string id = 1; + } + + message MacroIcon { + string id = 1; + } + + message PutMacroIcon { + string id = 1; + string content_type = 2; + bytes icon = 3; + } + oneof Request { .rv.data.API_v1_Macro_Request.Macros macros = 1; .rv.data.API_v1_Macro_Request.GetMacro get_macro = 2; .rv.data.API_v1_Macro_Request.PutMacro put_macro = 3; .rv.data.API_v1_Macro_Request.DeleteMacro delete_macro = 4; .rv.data.API_v1_Macro_Request.TriggerMacro trigger_macro = 5; + .rv.data.API_v1_Macro_Request.MacroCollections macro_collections = 6; + .rv.data.API_v1_Macro_Request.GetMacroCollection get_macro_collection = 7; + .rv.data.API_v1_Macro_Request.PostMacroCollections post_macro_collections = 8; + .rv.data.API_v1_Macro_Request.PutMacroCollection put_macro_collection = 9; + .rv.data.API_v1_Macro_Request.DeleteMacroCollection delete_macro_collection = 10; + .rv.data.API_v1_Macro_Request.MacroIcon macro_icon = 11; + .rv.data.API_v1_Macro_Request.PutMacroIcon put_macro_icon = 12; } } @@ -64,12 +108,50 @@ message API_v1_Macro_Response { message TriggerMacro { } + message MacroCollections { + message Collections { + repeated .rv.data.API_v1_Macro_Collection collections = 1; + } + + .rv.data.API_v1_Macro_Response.MacroCollections.Collections macro_collections = 1; + } + + message GetMacroCollection { + .rv.data.API_v1_Macro_Collection macro_collection = 1; + } + + message PostMacroCollections { + .rv.data.API_v1_Macro_Collection macro_collection = 1; + } + + message PutMacroCollection { + .rv.data.API_v1_Macro_Collection macro_collection = 1; + } + + message DeleteMacroCollection { + } + + message MacroIcon { + string content_type = 1; + bytes icon = 2; + } + + message PutMacroIcon { + } + oneof Response { .rv.data.API_v1_Macro_Response.Macros macros = 1; .rv.data.API_v1_Macro_Response.GetMacro get_macro = 2; .rv.data.API_v1_Macro_Response.PutMacro put_macro = 3; .rv.data.API_v1_Macro_Response.DeleteMacro delete_macro = 4; .rv.data.API_v1_Macro_Response.TriggerMacro trigger_macro = 5; + .rv.data.API_v1_Macro_Response.MacroCollections macro_collections = 6; + .rv.data.API_v1_Macro_Response.GetMacroCollection get_macro_collection = 7; + .rv.data.API_v1_Macro_Response.PostMacroCollections post_macro_collections = 8; + .rv.data.API_v1_Macro_Response.PutMacroCollection put_macro_collection = 9; + .rv.data.API_v1_Macro_Response.DeleteMacroCollection delete_macro_collection = 10; + .rv.data.API_v1_Macro_Response.MacroIcon macro_icon = 11; + .rv.data.API_v1_Macro_Response.PutMacroIcon put_macro_icon = 12; } } diff --git a/proto/proApiV1Macro.ts b/proto/proApiV1Macro.ts index bb13cbc..48a734f 100644 --- a/proto/proApiV1Macro.ts +++ b/proto/proApiV1Macro.ts @@ -8,6 +8,12 @@ export const protobufPackage = 'rv.data'; export interface APIV1Macro { id: APIV1Identifier | undefined; color: APIV1Color | undefined; + imageType: string; +} + +export interface APIV1MacroCollection { + id: APIV1Identifier | undefined; + macros: APIV1Macro[]; } export interface APIV1MacroRequest { @@ -16,6 +22,13 @@ export interface APIV1MacroRequest { putMacro?: APIV1MacroRequest_PutMacro | undefined; deleteMacro?: APIV1MacroRequest_DeleteMacro | undefined; triggerMacro?: APIV1MacroRequest_TriggerMacro | undefined; + macroCollections?: APIV1MacroRequest_MacroCollections | undefined; + getMacroCollection?: APIV1MacroRequest_GetMacroCollection | undefined; + postMacroCollections?: APIV1MacroRequest_PostMacroCollections | undefined; + putMacroCollection?: APIV1MacroRequest_PutMacroCollection | undefined; + deleteMacroCollection?: APIV1MacroRequest_DeleteMacroCollection | undefined; + macroIcon?: APIV1MacroRequest_MacroIcon | undefined; + putMacroIcon?: APIV1MacroRequest_PutMacroIcon | undefined; } export interface APIV1MacroRequest_Macros {} @@ -28,6 +41,7 @@ export interface APIV1MacroRequest_PutMacro { id: string; nameChange: string; colorChange: APIV1Color | undefined; + imageTypeChange: string; } export interface APIV1MacroRequest_DeleteMacro { @@ -38,12 +52,48 @@ export interface APIV1MacroRequest_TriggerMacro { id: string; } +export interface APIV1MacroRequest_MacroCollections {} + +export interface APIV1MacroRequest_GetMacroCollection { + id: string; +} + +export interface APIV1MacroRequest_PostMacroCollections { + name: string; +} + +export interface APIV1MacroRequest_PutMacroCollection { + id: string; + changes: APIV1MacroCollection | undefined; +} + +export interface APIV1MacroRequest_DeleteMacroCollection { + id: string; +} + +export interface APIV1MacroRequest_MacroIcon { + id: string; +} + +export interface APIV1MacroRequest_PutMacroIcon { + id: string; + contentType: string; + icon: Uint8Array; +} + export interface APIV1MacroResponse { macros?: APIV1MacroResponse_Macros | undefined; getMacro?: APIV1MacroResponse_GetMacro | undefined; putMacro?: APIV1MacroResponse_PutMacro | undefined; deleteMacro?: APIV1MacroResponse_DeleteMacro | undefined; triggerMacro?: APIV1MacroResponse_TriggerMacro | undefined; + macroCollections?: APIV1MacroResponse_MacroCollections | undefined; + getMacroCollection?: APIV1MacroResponse_GetMacroCollection | undefined; + postMacroCollections?: APIV1MacroResponse_PostMacroCollections | undefined; + putMacroCollection?: APIV1MacroResponse_PutMacroCollection | undefined; + deleteMacroCollection?: APIV1MacroResponse_DeleteMacroCollection | undefined; + macroIcon?: APIV1MacroResponse_MacroIcon | undefined; + putMacroIcon?: APIV1MacroResponse_PutMacroIcon | undefined; } export interface APIV1MacroResponse_Macros { @@ -62,8 +112,37 @@ export interface APIV1MacroResponse_DeleteMacro {} export interface APIV1MacroResponse_TriggerMacro {} +export interface APIV1MacroResponse_MacroCollections { + macroCollections: APIV1MacroResponse_MacroCollections_Collections | undefined; +} + +export interface APIV1MacroResponse_MacroCollections_Collections { + collections: APIV1MacroCollection[]; +} + +export interface APIV1MacroResponse_GetMacroCollection { + macroCollection: APIV1MacroCollection | undefined; +} + +export interface APIV1MacroResponse_PostMacroCollections { + macroCollection: APIV1MacroCollection | undefined; +} + +export interface APIV1MacroResponse_PutMacroCollection { + macroCollection: APIV1MacroCollection | undefined; +} + +export interface APIV1MacroResponse_DeleteMacroCollection {} + +export interface APIV1MacroResponse_MacroIcon { + contentType: string; + icon: Uint8Array; +} + +export interface APIV1MacroResponse_PutMacroIcon {} + function createBaseAPIV1Macro(): APIV1Macro { - return { id: undefined, color: undefined }; + return { id: undefined, color: undefined, imageType: '' }; } export const APIV1Macro = { @@ -77,6 +156,9 @@ export const APIV1Macro = { if (message.color !== undefined) { APIV1Color.encode(message.color, writer.uint32(18).fork()).ldelim(); } + if (message.imageType !== '') { + writer.uint32(26).string(message.imageType); + } return writer; }, @@ -102,6 +184,13 @@ export const APIV1Macro = { message.color = APIV1Color.decode(reader, reader.uint32()); continue; + case 3: + if (tag !== 26) { + break; + } + + message.imageType = reader.string(); + continue; } if ((tag & 7) === 4 || tag === 0) { break; @@ -117,6 +206,9 @@ export const APIV1Macro = { color: isSet(object.color) ? APIV1Color.fromJSON(object.color) : undefined, + imageType: isSet(object.imageType) + ? globalThis.String(object.imageType) + : '', }; }, @@ -128,6 +220,9 @@ export const APIV1Macro = { if (message.color !== undefined) { obj.color = APIV1Color.toJSON(message.color); } + if (message.imageType !== '') { + obj.imageType = message.imageType; + } return obj; }, @@ -146,6 +241,97 @@ export const APIV1Macro = { object.color !== undefined && object.color !== null ? APIV1Color.fromPartial(object.color) : undefined; + message.imageType = object.imageType ?? ''; + return message; + }, +}; + +function createBaseAPIV1MacroCollection(): APIV1MacroCollection { + return { id: undefined, macros: [] }; +} + +export const APIV1MacroCollection = { + encode( + message: APIV1MacroCollection, + writer: _m0.Writer = _m0.Writer.create(), + ): _m0.Writer { + if (message.id !== undefined) { + APIV1Identifier.encode(message.id, writer.uint32(10).fork()).ldelim(); + } + for (const v of message.macros) { + APIV1Macro.encode(v!, writer.uint32(18).fork()).ldelim(); + } + return writer; + }, + + decode( + input: _m0.Reader | Uint8Array, + length?: number, + ): APIV1MacroCollection { + const reader = + input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseAPIV1MacroCollection(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } + + message.id = APIV1Identifier.decode(reader, reader.uint32()); + continue; + case 2: + if (tag !== 18) { + break; + } + + message.macros.push(APIV1Macro.decode(reader, reader.uint32())); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(object: any): APIV1MacroCollection { + return { + id: isSet(object.id) ? APIV1Identifier.fromJSON(object.id) : undefined, + macros: globalThis.Array.isArray(object?.macros) + ? object.macros.map((e: any) => APIV1Macro.fromJSON(e)) + : [], + }; + }, + + toJSON(message: APIV1MacroCollection): unknown { + const obj: any = {}; + if (message.id !== undefined) { + obj.id = APIV1Identifier.toJSON(message.id); + } + if (message.macros?.length) { + obj.macros = message.macros.map((e) => APIV1Macro.toJSON(e)); + } + return obj; + }, + + create, I>>( + base?: I, + ): APIV1MacroCollection { + return APIV1MacroCollection.fromPartial(base ?? ({} as any)); + }, + fromPartial, I>>( + object: I, + ): APIV1MacroCollection { + const message = createBaseAPIV1MacroCollection(); + message.id = + object.id !== undefined && object.id !== null + ? APIV1Identifier.fromPartial(object.id) + : undefined; + message.macros = object.macros?.map((e) => APIV1Macro.fromPartial(e)) || []; return message; }, }; @@ -157,6 +343,13 @@ function createBaseAPIV1MacroRequest(): APIV1MacroRequest { putMacro: undefined, deleteMacro: undefined, triggerMacro: undefined, + macroCollections: undefined, + getMacroCollection: undefined, + postMacroCollections: undefined, + putMacroCollection: undefined, + deleteMacroCollection: undefined, + macroIcon: undefined, + putMacroIcon: undefined, }; } @@ -195,6 +388,48 @@ export const APIV1MacroRequest = { writer.uint32(42).fork(), ).ldelim(); } + if (message.macroCollections !== undefined) { + APIV1MacroRequest_MacroCollections.encode( + message.macroCollections, + writer.uint32(50).fork(), + ).ldelim(); + } + if (message.getMacroCollection !== undefined) { + APIV1MacroRequest_GetMacroCollection.encode( + message.getMacroCollection, + writer.uint32(58).fork(), + ).ldelim(); + } + if (message.postMacroCollections !== undefined) { + APIV1MacroRequest_PostMacroCollections.encode( + message.postMacroCollections, + writer.uint32(66).fork(), + ).ldelim(); + } + if (message.putMacroCollection !== undefined) { + APIV1MacroRequest_PutMacroCollection.encode( + message.putMacroCollection, + writer.uint32(74).fork(), + ).ldelim(); + } + if (message.deleteMacroCollection !== undefined) { + APIV1MacroRequest_DeleteMacroCollection.encode( + message.deleteMacroCollection, + writer.uint32(82).fork(), + ).ldelim(); + } + if (message.macroIcon !== undefined) { + APIV1MacroRequest_MacroIcon.encode( + message.macroIcon, + writer.uint32(90).fork(), + ).ldelim(); + } + if (message.putMacroIcon !== undefined) { + APIV1MacroRequest_PutMacroIcon.encode( + message.putMacroIcon, + writer.uint32(98).fork(), + ).ldelim(); + } return writer; }, @@ -256,6 +491,80 @@ export const APIV1MacroRequest = { reader.uint32(), ); continue; + case 6: + if (tag !== 50) { + break; + } + + message.macroCollections = APIV1MacroRequest_MacroCollections.decode( + reader, + reader.uint32(), + ); + continue; + case 7: + if (tag !== 58) { + break; + } + + message.getMacroCollection = + APIV1MacroRequest_GetMacroCollection.decode( + reader, + reader.uint32(), + ); + continue; + case 8: + if (tag !== 66) { + break; + } + + message.postMacroCollections = + APIV1MacroRequest_PostMacroCollections.decode( + reader, + reader.uint32(), + ); + continue; + case 9: + if (tag !== 74) { + break; + } + + message.putMacroCollection = + APIV1MacroRequest_PutMacroCollection.decode( + reader, + reader.uint32(), + ); + continue; + case 10: + if (tag !== 82) { + break; + } + + message.deleteMacroCollection = + APIV1MacroRequest_DeleteMacroCollection.decode( + reader, + reader.uint32(), + ); + continue; + case 11: + if (tag !== 90) { + break; + } + + message.macroIcon = APIV1MacroRequest_MacroIcon.decode( + reader, + reader.uint32(), + ); + continue; + case 12: + if (tag !== 98) { + break; + } + + message.putMacroIcon = APIV1MacroRequest_PutMacroIcon.decode( + reader, + reader.uint32(), + ); + continue; } if ((tag & 7) === 4 || tag === 0) { break; @@ -282,6 +591,35 @@ export const APIV1MacroRequest = { triggerMacro: isSet(object.triggerMacro) ? APIV1MacroRequest_TriggerMacro.fromJSON(object.triggerMacro) : undefined, + macroCollections: isSet(object.macroCollections) + ? APIV1MacroRequest_MacroCollections.fromJSON(object.macroCollections) + : undefined, + getMacroCollection: isSet(object.getMacroCollection) + ? APIV1MacroRequest_GetMacroCollection.fromJSON( + object.getMacroCollection, + ) + : undefined, + postMacroCollections: isSet(object.postMacroCollections) + ? APIV1MacroRequest_PostMacroCollections.fromJSON( + object.postMacroCollections, + ) + : undefined, + putMacroCollection: isSet(object.putMacroCollection) + ? APIV1MacroRequest_PutMacroCollection.fromJSON( + object.putMacroCollection, + ) + : undefined, + deleteMacroCollection: isSet(object.deleteMacroCollection) + ? APIV1MacroRequest_DeleteMacroCollection.fromJSON( + object.deleteMacroCollection, + ) + : undefined, + macroIcon: isSet(object.macroIcon) + ? APIV1MacroRequest_MacroIcon.fromJSON(object.macroIcon) + : undefined, + putMacroIcon: isSet(object.putMacroIcon) + ? APIV1MacroRequest_PutMacroIcon.fromJSON(object.putMacroIcon) + : undefined, }; }, @@ -306,6 +644,40 @@ export const APIV1MacroRequest = { message.triggerMacro, ); } + if (message.macroCollections !== undefined) { + obj.macroCollections = APIV1MacroRequest_MacroCollections.toJSON( + message.macroCollections, + ); + } + if (message.getMacroCollection !== undefined) { + obj.getMacroCollection = APIV1MacroRequest_GetMacroCollection.toJSON( + message.getMacroCollection, + ); + } + if (message.postMacroCollections !== undefined) { + obj.postMacroCollections = APIV1MacroRequest_PostMacroCollections.toJSON( + message.postMacroCollections, + ); + } + if (message.putMacroCollection !== undefined) { + obj.putMacroCollection = APIV1MacroRequest_PutMacroCollection.toJSON( + message.putMacroCollection, + ); + } + if (message.deleteMacroCollection !== undefined) { + obj.deleteMacroCollection = + APIV1MacroRequest_DeleteMacroCollection.toJSON( + message.deleteMacroCollection, + ); + } + if (message.macroIcon !== undefined) { + obj.macroIcon = APIV1MacroRequest_MacroIcon.toJSON(message.macroIcon); + } + if (message.putMacroIcon !== undefined) { + obj.putMacroIcon = APIV1MacroRequest_PutMacroIcon.toJSON( + message.putMacroIcon, + ); + } return obj; }, @@ -338,6 +710,48 @@ export const APIV1MacroRequest = { object.triggerMacro !== undefined && object.triggerMacro !== null ? APIV1MacroRequest_TriggerMacro.fromPartial(object.triggerMacro) : undefined; + message.macroCollections = + object.macroCollections !== undefined && object.macroCollections !== null + ? APIV1MacroRequest_MacroCollections.fromPartial( + object.macroCollections, + ) + : undefined; + message.getMacroCollection = + object.getMacroCollection !== undefined && + object.getMacroCollection !== null + ? APIV1MacroRequest_GetMacroCollection.fromPartial( + object.getMacroCollection, + ) + : undefined; + message.postMacroCollections = + object.postMacroCollections !== undefined && + object.postMacroCollections !== null + ? APIV1MacroRequest_PostMacroCollections.fromPartial( + object.postMacroCollections, + ) + : undefined; + message.putMacroCollection = + object.putMacroCollection !== undefined && + object.putMacroCollection !== null + ? APIV1MacroRequest_PutMacroCollection.fromPartial( + object.putMacroCollection, + ) + : undefined; + message.deleteMacroCollection = + object.deleteMacroCollection !== undefined && + object.deleteMacroCollection !== null + ? APIV1MacroRequest_DeleteMacroCollection.fromPartial( + object.deleteMacroCollection, + ) + : undefined; + message.macroIcon = + object.macroIcon !== undefined && object.macroIcon !== null + ? APIV1MacroRequest_MacroIcon.fromPartial(object.macroIcon) + : undefined; + message.putMacroIcon = + object.putMacroIcon !== undefined && object.putMacroIcon !== null + ? APIV1MacroRequest_PutMacroIcon.fromPartial(object.putMacroIcon) + : undefined; return message; }, }; @@ -465,7 +879,12 @@ export const APIV1MacroRequest_GetMacro = { }; function createBaseAPIV1MacroRequest_PutMacro(): APIV1MacroRequest_PutMacro { - return { id: '', nameChange: '', colorChange: undefined }; + return { + id: '', + nameChange: '', + colorChange: undefined, + imageTypeChange: '', + }; } export const APIV1MacroRequest_PutMacro = { @@ -482,6 +901,9 @@ export const APIV1MacroRequest_PutMacro = { if (message.colorChange !== undefined) { APIV1Color.encode(message.colorChange, writer.uint32(26).fork()).ldelim(); } + if (message.imageTypeChange !== '') { + writer.uint32(34).string(message.imageTypeChange); + } return writer; }, @@ -517,6 +939,13 @@ export const APIV1MacroRequest_PutMacro = { message.colorChange = APIV1Color.decode(reader, reader.uint32()); continue; + case 4: + if (tag !== 34) { + break; + } + + message.imageTypeChange = reader.string(); + continue; } if ((tag & 7) === 4 || tag === 0) { break; @@ -535,6 +964,9 @@ export const APIV1MacroRequest_PutMacro = { colorChange: isSet(object.colorChange) ? APIV1Color.fromJSON(object.colorChange) : undefined, + imageTypeChange: isSet(object.imageTypeChange) + ? globalThis.String(object.imageTypeChange) + : '', }; }, @@ -549,6 +981,9 @@ export const APIV1MacroRequest_PutMacro = { if (message.colorChange !== undefined) { obj.colorChange = APIV1Color.toJSON(message.colorChange); } + if (message.imageTypeChange !== '') { + obj.imageTypeChange = message.imageTypeChange; + } return obj; }, @@ -567,6 +1002,7 @@ export const APIV1MacroRequest_PutMacro = { object.colorChange !== undefined && object.colorChange !== null ? APIV1Color.fromPartial(object.colorChange) : undefined; + message.imageTypeChange = object.imageTypeChange ?? ''; return message; }, }; @@ -707,110 +1143,1412 @@ export const APIV1MacroRequest_TriggerMacro = { }, }; -function createBaseAPIV1MacroResponse(): APIV1MacroResponse { - return { - macros: undefined, - getMacro: undefined, - putMacro: undefined, - deleteMacro: undefined, - triggerMacro: undefined, - }; +function createBaseAPIV1MacroRequest_MacroCollections(): APIV1MacroRequest_MacroCollections { + return {}; } -export const APIV1MacroResponse = { +export const APIV1MacroRequest_MacroCollections = { encode( - message: APIV1MacroResponse, + _: APIV1MacroRequest_MacroCollections, writer: _m0.Writer = _m0.Writer.create(), ): _m0.Writer { - if (message.macros !== undefined) { - APIV1MacroResponse_Macros.encode( - message.macros, - writer.uint32(10).fork(), - ).ldelim(); - } - if (message.getMacro !== undefined) { - APIV1MacroResponse_GetMacro.encode( - message.getMacro, - writer.uint32(18).fork(), - ).ldelim(); - } - if (message.putMacro !== undefined) { - APIV1MacroResponse_PutMacro.encode( - message.putMacro, - writer.uint32(26).fork(), - ).ldelim(); - } - if (message.deleteMacro !== undefined) { - APIV1MacroResponse_DeleteMacro.encode( - message.deleteMacro, - writer.uint32(34).fork(), - ).ldelim(); - } - if (message.triggerMacro !== undefined) { - APIV1MacroResponse_TriggerMacro.encode( - message.triggerMacro, - writer.uint32(42).fork(), - ).ldelim(); - } return writer; }, - decode(input: _m0.Reader | Uint8Array, length?: number): APIV1MacroResponse { + decode( + input: _m0.Reader | Uint8Array, + length?: number, + ): APIV1MacroRequest_MacroCollections { const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseAPIV1MacroResponse(); + const message = createBaseAPIV1MacroRequest_MacroCollections(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if (tag !== 10) { + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(_: any): APIV1MacroRequest_MacroCollections { + return {}; + }, + + toJSON(_: APIV1MacroRequest_MacroCollections): unknown { + const obj: any = {}; + return obj; + }, + + create, I>>( + base?: I, + ): APIV1MacroRequest_MacroCollections { + return APIV1MacroRequest_MacroCollections.fromPartial(base ?? ({} as any)); + }, + fromPartial< + I extends Exact, I>, + >(_: I): APIV1MacroRequest_MacroCollections { + const message = createBaseAPIV1MacroRequest_MacroCollections(); + return message; + }, +}; + +function createBaseAPIV1MacroRequest_GetMacroCollection(): APIV1MacroRequest_GetMacroCollection { + return { id: '' }; +} + +export const APIV1MacroRequest_GetMacroCollection = { + encode( + message: APIV1MacroRequest_GetMacroCollection, + writer: _m0.Writer = _m0.Writer.create(), + ): _m0.Writer { + if (message.id !== '') { + writer.uint32(10).string(message.id); + } + return writer; + }, + + decode( + input: _m0.Reader | Uint8Array, + length?: number, + ): APIV1MacroRequest_GetMacroCollection { + const reader = + input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseAPIV1MacroRequest_GetMacroCollection(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { break; } - message.macros = APIV1MacroResponse_Macros.decode( - reader, - reader.uint32(), - ); + message.id = reader.string(); continue; - case 2: - if (tag !== 18) { + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(object: any): APIV1MacroRequest_GetMacroCollection { + return { id: isSet(object.id) ? globalThis.String(object.id) : '' }; + }, + + toJSON(message: APIV1MacroRequest_GetMacroCollection): unknown { + const obj: any = {}; + if (message.id !== '') { + obj.id = message.id; + } + return obj; + }, + + create, I>>( + base?: I, + ): APIV1MacroRequest_GetMacroCollection { + return APIV1MacroRequest_GetMacroCollection.fromPartial( + base ?? ({} as any), + ); + }, + fromPartial< + I extends Exact, I>, + >(object: I): APIV1MacroRequest_GetMacroCollection { + const message = createBaseAPIV1MacroRequest_GetMacroCollection(); + message.id = object.id ?? ''; + return message; + }, +}; + +function createBaseAPIV1MacroRequest_PostMacroCollections(): APIV1MacroRequest_PostMacroCollections { + return { name: '' }; +} + +export const APIV1MacroRequest_PostMacroCollections = { + encode( + message: APIV1MacroRequest_PostMacroCollections, + writer: _m0.Writer = _m0.Writer.create(), + ): _m0.Writer { + if (message.name !== '') { + writer.uint32(10).string(message.name); + } + return writer; + }, + + decode( + input: _m0.Reader | Uint8Array, + length?: number, + ): APIV1MacroRequest_PostMacroCollections { + const reader = + input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseAPIV1MacroRequest_PostMacroCollections(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { break; } - message.getMacro = APIV1MacroResponse_GetMacro.decode( - reader, - reader.uint32(), - ); + message.name = reader.string(); continue; - case 3: - if (tag !== 26) { + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(object: any): APIV1MacroRequest_PostMacroCollections { + return { name: isSet(object.name) ? globalThis.String(object.name) : '' }; + }, + + toJSON(message: APIV1MacroRequest_PostMacroCollections): unknown { + const obj: any = {}; + if (message.name !== '') { + obj.name = message.name; + } + return obj; + }, + + create< + I extends Exact, I>, + >(base?: I): APIV1MacroRequest_PostMacroCollections { + return APIV1MacroRequest_PostMacroCollections.fromPartial( + base ?? ({} as any), + ); + }, + fromPartial< + I extends Exact, I>, + >(object: I): APIV1MacroRequest_PostMacroCollections { + const message = createBaseAPIV1MacroRequest_PostMacroCollections(); + message.name = object.name ?? ''; + return message; + }, +}; + +function createBaseAPIV1MacroRequest_PutMacroCollection(): APIV1MacroRequest_PutMacroCollection { + return { id: '', changes: undefined }; +} + +export const APIV1MacroRequest_PutMacroCollection = { + encode( + message: APIV1MacroRequest_PutMacroCollection, + writer: _m0.Writer = _m0.Writer.create(), + ): _m0.Writer { + if (message.id !== '') { + writer.uint32(10).string(message.id); + } + if (message.changes !== undefined) { + APIV1MacroCollection.encode( + message.changes, + writer.uint32(18).fork(), + ).ldelim(); + } + return writer; + }, + + decode( + input: _m0.Reader | Uint8Array, + length?: number, + ): APIV1MacroRequest_PutMacroCollection { + const reader = + input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseAPIV1MacroRequest_PutMacroCollection(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { break; } - message.putMacro = APIV1MacroResponse_PutMacro.decode( - reader, - reader.uint32(), - ); + message.id = reader.string(); continue; - case 4: - if (tag !== 34) { + case 2: + if (tag !== 18) { break; } - message.deleteMacro = APIV1MacroResponse_DeleteMacro.decode( + message.changes = APIV1MacroCollection.decode( reader, reader.uint32(), ); continue; - case 5: - if (tag !== 42) { + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(object: any): APIV1MacroRequest_PutMacroCollection { + return { + id: isSet(object.id) ? globalThis.String(object.id) : '', + changes: isSet(object.changes) + ? APIV1MacroCollection.fromJSON(object.changes) + : undefined, + }; + }, + + toJSON(message: APIV1MacroRequest_PutMacroCollection): unknown { + const obj: any = {}; + if (message.id !== '') { + obj.id = message.id; + } + if (message.changes !== undefined) { + obj.changes = APIV1MacroCollection.toJSON(message.changes); + } + return obj; + }, + + create, I>>( + base?: I, + ): APIV1MacroRequest_PutMacroCollection { + return APIV1MacroRequest_PutMacroCollection.fromPartial( + base ?? ({} as any), + ); + }, + fromPartial< + I extends Exact, I>, + >(object: I): APIV1MacroRequest_PutMacroCollection { + const message = createBaseAPIV1MacroRequest_PutMacroCollection(); + message.id = object.id ?? ''; + message.changes = + object.changes !== undefined && object.changes !== null + ? APIV1MacroCollection.fromPartial(object.changes) + : undefined; + return message; + }, +}; + +function createBaseAPIV1MacroRequest_DeleteMacroCollection(): APIV1MacroRequest_DeleteMacroCollection { + return { id: '' }; +} + +export const APIV1MacroRequest_DeleteMacroCollection = { + encode( + message: APIV1MacroRequest_DeleteMacroCollection, + writer: _m0.Writer = _m0.Writer.create(), + ): _m0.Writer { + if (message.id !== '') { + writer.uint32(10).string(message.id); + } + return writer; + }, + + decode( + input: _m0.Reader | Uint8Array, + length?: number, + ): APIV1MacroRequest_DeleteMacroCollection { + const reader = + input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseAPIV1MacroRequest_DeleteMacroCollection(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } + + message.id = reader.string(); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(object: any): APIV1MacroRequest_DeleteMacroCollection { + return { id: isSet(object.id) ? globalThis.String(object.id) : '' }; + }, + + toJSON(message: APIV1MacroRequest_DeleteMacroCollection): unknown { + const obj: any = {}; + if (message.id !== '') { + obj.id = message.id; + } + return obj; + }, + + create< + I extends Exact, I>, + >(base?: I): APIV1MacroRequest_DeleteMacroCollection { + return APIV1MacroRequest_DeleteMacroCollection.fromPartial( + base ?? ({} as any), + ); + }, + fromPartial< + I extends Exact, I>, + >(object: I): APIV1MacroRequest_DeleteMacroCollection { + const message = createBaseAPIV1MacroRequest_DeleteMacroCollection(); + message.id = object.id ?? ''; + return message; + }, +}; + +function createBaseAPIV1MacroRequest_MacroIcon(): APIV1MacroRequest_MacroIcon { + return { id: '' }; +} + +export const APIV1MacroRequest_MacroIcon = { + encode( + message: APIV1MacroRequest_MacroIcon, + writer: _m0.Writer = _m0.Writer.create(), + ): _m0.Writer { + if (message.id !== '') { + writer.uint32(10).string(message.id); + } + return writer; + }, + + decode( + input: _m0.Reader | Uint8Array, + length?: number, + ): APIV1MacroRequest_MacroIcon { + const reader = + input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseAPIV1MacroRequest_MacroIcon(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } + + message.id = reader.string(); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(object: any): APIV1MacroRequest_MacroIcon { + return { id: isSet(object.id) ? globalThis.String(object.id) : '' }; + }, + + toJSON(message: APIV1MacroRequest_MacroIcon): unknown { + const obj: any = {}; + if (message.id !== '') { + obj.id = message.id; + } + return obj; + }, + + create, I>>( + base?: I, + ): APIV1MacroRequest_MacroIcon { + return APIV1MacroRequest_MacroIcon.fromPartial(base ?? ({} as any)); + }, + fromPartial, I>>( + object: I, + ): APIV1MacroRequest_MacroIcon { + const message = createBaseAPIV1MacroRequest_MacroIcon(); + message.id = object.id ?? ''; + return message; + }, +}; + +function createBaseAPIV1MacroRequest_PutMacroIcon(): APIV1MacroRequest_PutMacroIcon { + return { id: '', contentType: '', icon: new Uint8Array(0) }; +} + +export const APIV1MacroRequest_PutMacroIcon = { + encode( + message: APIV1MacroRequest_PutMacroIcon, + writer: _m0.Writer = _m0.Writer.create(), + ): _m0.Writer { + if (message.id !== '') { + writer.uint32(10).string(message.id); + } + if (message.contentType !== '') { + writer.uint32(18).string(message.contentType); + } + if (message.icon.length !== 0) { + writer.uint32(26).bytes(message.icon); + } + return writer; + }, + + decode( + input: _m0.Reader | Uint8Array, + length?: number, + ): APIV1MacroRequest_PutMacroIcon { + const reader = + input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseAPIV1MacroRequest_PutMacroIcon(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } + + message.id = reader.string(); + continue; + case 2: + if (tag !== 18) { + break; + } + + message.contentType = reader.string(); + continue; + case 3: + if (tag !== 26) { + break; + } + + message.icon = reader.bytes(); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(object: any): APIV1MacroRequest_PutMacroIcon { + return { + id: isSet(object.id) ? globalThis.String(object.id) : '', + contentType: isSet(object.contentType) + ? globalThis.String(object.contentType) + : '', + icon: isSet(object.icon) + ? bytesFromBase64(object.icon) + : new Uint8Array(0), + }; + }, + + toJSON(message: APIV1MacroRequest_PutMacroIcon): unknown { + const obj: any = {}; + if (message.id !== '') { + obj.id = message.id; + } + if (message.contentType !== '') { + obj.contentType = message.contentType; + } + if (message.icon.length !== 0) { + obj.icon = base64FromBytes(message.icon); + } + return obj; + }, + + create, I>>( + base?: I, + ): APIV1MacroRequest_PutMacroIcon { + return APIV1MacroRequest_PutMacroIcon.fromPartial(base ?? ({} as any)); + }, + fromPartial, I>>( + object: I, + ): APIV1MacroRequest_PutMacroIcon { + const message = createBaseAPIV1MacroRequest_PutMacroIcon(); + message.id = object.id ?? ''; + message.contentType = object.contentType ?? ''; + message.icon = object.icon ?? new Uint8Array(0); + return message; + }, +}; + +function createBaseAPIV1MacroResponse(): APIV1MacroResponse { + return { + macros: undefined, + getMacro: undefined, + putMacro: undefined, + deleteMacro: undefined, + triggerMacro: undefined, + macroCollections: undefined, + getMacroCollection: undefined, + postMacroCollections: undefined, + putMacroCollection: undefined, + deleteMacroCollection: undefined, + macroIcon: undefined, + putMacroIcon: undefined, + }; +} + +export const APIV1MacroResponse = { + encode( + message: APIV1MacroResponse, + writer: _m0.Writer = _m0.Writer.create(), + ): _m0.Writer { + if (message.macros !== undefined) { + APIV1MacroResponse_Macros.encode( + message.macros, + writer.uint32(10).fork(), + ).ldelim(); + } + if (message.getMacro !== undefined) { + APIV1MacroResponse_GetMacro.encode( + message.getMacro, + writer.uint32(18).fork(), + ).ldelim(); + } + if (message.putMacro !== undefined) { + APIV1MacroResponse_PutMacro.encode( + message.putMacro, + writer.uint32(26).fork(), + ).ldelim(); + } + if (message.deleteMacro !== undefined) { + APIV1MacroResponse_DeleteMacro.encode( + message.deleteMacro, + writer.uint32(34).fork(), + ).ldelim(); + } + if (message.triggerMacro !== undefined) { + APIV1MacroResponse_TriggerMacro.encode( + message.triggerMacro, + writer.uint32(42).fork(), + ).ldelim(); + } + if (message.macroCollections !== undefined) { + APIV1MacroResponse_MacroCollections.encode( + message.macroCollections, + writer.uint32(50).fork(), + ).ldelim(); + } + if (message.getMacroCollection !== undefined) { + APIV1MacroResponse_GetMacroCollection.encode( + message.getMacroCollection, + writer.uint32(58).fork(), + ).ldelim(); + } + if (message.postMacroCollections !== undefined) { + APIV1MacroResponse_PostMacroCollections.encode( + message.postMacroCollections, + writer.uint32(66).fork(), + ).ldelim(); + } + if (message.putMacroCollection !== undefined) { + APIV1MacroResponse_PutMacroCollection.encode( + message.putMacroCollection, + writer.uint32(74).fork(), + ).ldelim(); + } + if (message.deleteMacroCollection !== undefined) { + APIV1MacroResponse_DeleteMacroCollection.encode( + message.deleteMacroCollection, + writer.uint32(82).fork(), + ).ldelim(); + } + if (message.macroIcon !== undefined) { + APIV1MacroResponse_MacroIcon.encode( + message.macroIcon, + writer.uint32(90).fork(), + ).ldelim(); + } + if (message.putMacroIcon !== undefined) { + APIV1MacroResponse_PutMacroIcon.encode( + message.putMacroIcon, + writer.uint32(98).fork(), + ).ldelim(); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): APIV1MacroResponse { + const reader = + input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseAPIV1MacroResponse(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } + + message.macros = APIV1MacroResponse_Macros.decode( + reader, + reader.uint32(), + ); + continue; + case 2: + if (tag !== 18) { + break; + } + + message.getMacro = APIV1MacroResponse_GetMacro.decode( + reader, + reader.uint32(), + ); + continue; + case 3: + if (tag !== 26) { + break; + } + + message.putMacro = APIV1MacroResponse_PutMacro.decode( + reader, + reader.uint32(), + ); + continue; + case 4: + if (tag !== 34) { + break; + } + + message.deleteMacro = APIV1MacroResponse_DeleteMacro.decode( + reader, + reader.uint32(), + ); + continue; + case 5: + if (tag !== 42) { + break; + } + + message.triggerMacro = APIV1MacroResponse_TriggerMacro.decode( + reader, + reader.uint32(), + ); + continue; + case 6: + if (tag !== 50) { + break; + } + + message.macroCollections = APIV1MacroResponse_MacroCollections.decode( + reader, + reader.uint32(), + ); + continue; + case 7: + if (tag !== 58) { + break; + } + + message.getMacroCollection = + APIV1MacroResponse_GetMacroCollection.decode( + reader, + reader.uint32(), + ); + continue; + case 8: + if (tag !== 66) { + break; + } + + message.postMacroCollections = + APIV1MacroResponse_PostMacroCollections.decode( + reader, + reader.uint32(), + ); + continue; + case 9: + if (tag !== 74) { + break; + } + + message.putMacroCollection = + APIV1MacroResponse_PutMacroCollection.decode( + reader, + reader.uint32(), + ); + continue; + case 10: + if (tag !== 82) { + break; + } + + message.deleteMacroCollection = + APIV1MacroResponse_DeleteMacroCollection.decode( + reader, + reader.uint32(), + ); + continue; + case 11: + if (tag !== 90) { + break; + } + + message.macroIcon = APIV1MacroResponse_MacroIcon.decode( + reader, + reader.uint32(), + ); + continue; + case 12: + if (tag !== 98) { + break; + } + + message.putMacroIcon = APIV1MacroResponse_PutMacroIcon.decode( + reader, + reader.uint32(), + ); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(object: any): APIV1MacroResponse { + return { + macros: isSet(object.macros) + ? APIV1MacroResponse_Macros.fromJSON(object.macros) + : undefined, + getMacro: isSet(object.getMacro) + ? APIV1MacroResponse_GetMacro.fromJSON(object.getMacro) + : undefined, + putMacro: isSet(object.putMacro) + ? APIV1MacroResponse_PutMacro.fromJSON(object.putMacro) + : undefined, + deleteMacro: isSet(object.deleteMacro) + ? APIV1MacroResponse_DeleteMacro.fromJSON(object.deleteMacro) + : undefined, + triggerMacro: isSet(object.triggerMacro) + ? APIV1MacroResponse_TriggerMacro.fromJSON(object.triggerMacro) + : undefined, + macroCollections: isSet(object.macroCollections) + ? APIV1MacroResponse_MacroCollections.fromJSON(object.macroCollections) + : undefined, + getMacroCollection: isSet(object.getMacroCollection) + ? APIV1MacroResponse_GetMacroCollection.fromJSON( + object.getMacroCollection, + ) + : undefined, + postMacroCollections: isSet(object.postMacroCollections) + ? APIV1MacroResponse_PostMacroCollections.fromJSON( + object.postMacroCollections, + ) + : undefined, + putMacroCollection: isSet(object.putMacroCollection) + ? APIV1MacroResponse_PutMacroCollection.fromJSON( + object.putMacroCollection, + ) + : undefined, + deleteMacroCollection: isSet(object.deleteMacroCollection) + ? APIV1MacroResponse_DeleteMacroCollection.fromJSON( + object.deleteMacroCollection, + ) + : undefined, + macroIcon: isSet(object.macroIcon) + ? APIV1MacroResponse_MacroIcon.fromJSON(object.macroIcon) + : undefined, + putMacroIcon: isSet(object.putMacroIcon) + ? APIV1MacroResponse_PutMacroIcon.fromJSON(object.putMacroIcon) + : undefined, + }; + }, + + toJSON(message: APIV1MacroResponse): unknown { + const obj: any = {}; + if (message.macros !== undefined) { + obj.macros = APIV1MacroResponse_Macros.toJSON(message.macros); + } + if (message.getMacro !== undefined) { + obj.getMacro = APIV1MacroResponse_GetMacro.toJSON(message.getMacro); + } + if (message.putMacro !== undefined) { + obj.putMacro = APIV1MacroResponse_PutMacro.toJSON(message.putMacro); + } + if (message.deleteMacro !== undefined) { + obj.deleteMacro = APIV1MacroResponse_DeleteMacro.toJSON( + message.deleteMacro, + ); + } + if (message.triggerMacro !== undefined) { + obj.triggerMacro = APIV1MacroResponse_TriggerMacro.toJSON( + message.triggerMacro, + ); + } + if (message.macroCollections !== undefined) { + obj.macroCollections = APIV1MacroResponse_MacroCollections.toJSON( + message.macroCollections, + ); + } + if (message.getMacroCollection !== undefined) { + obj.getMacroCollection = APIV1MacroResponse_GetMacroCollection.toJSON( + message.getMacroCollection, + ); + } + if (message.postMacroCollections !== undefined) { + obj.postMacroCollections = APIV1MacroResponse_PostMacroCollections.toJSON( + message.postMacroCollections, + ); + } + if (message.putMacroCollection !== undefined) { + obj.putMacroCollection = APIV1MacroResponse_PutMacroCollection.toJSON( + message.putMacroCollection, + ); + } + if (message.deleteMacroCollection !== undefined) { + obj.deleteMacroCollection = + APIV1MacroResponse_DeleteMacroCollection.toJSON( + message.deleteMacroCollection, + ); + } + if (message.macroIcon !== undefined) { + obj.macroIcon = APIV1MacroResponse_MacroIcon.toJSON(message.macroIcon); + } + if (message.putMacroIcon !== undefined) { + obj.putMacroIcon = APIV1MacroResponse_PutMacroIcon.toJSON( + message.putMacroIcon, + ); + } + return obj; + }, + + create, I>>( + base?: I, + ): APIV1MacroResponse { + return APIV1MacroResponse.fromPartial(base ?? ({} as any)); + }, + fromPartial, I>>( + object: I, + ): APIV1MacroResponse { + const message = createBaseAPIV1MacroResponse(); + message.macros = + object.macros !== undefined && object.macros !== null + ? APIV1MacroResponse_Macros.fromPartial(object.macros) + : undefined; + message.getMacro = + object.getMacro !== undefined && object.getMacro !== null + ? APIV1MacroResponse_GetMacro.fromPartial(object.getMacro) + : undefined; + message.putMacro = + object.putMacro !== undefined && object.putMacro !== null + ? APIV1MacroResponse_PutMacro.fromPartial(object.putMacro) + : undefined; + message.deleteMacro = + object.deleteMacro !== undefined && object.deleteMacro !== null + ? APIV1MacroResponse_DeleteMacro.fromPartial(object.deleteMacro) + : undefined; + message.triggerMacro = + object.triggerMacro !== undefined && object.triggerMacro !== null + ? APIV1MacroResponse_TriggerMacro.fromPartial(object.triggerMacro) + : undefined; + message.macroCollections = + object.macroCollections !== undefined && object.macroCollections !== null + ? APIV1MacroResponse_MacroCollections.fromPartial( + object.macroCollections, + ) + : undefined; + message.getMacroCollection = + object.getMacroCollection !== undefined && + object.getMacroCollection !== null + ? APIV1MacroResponse_GetMacroCollection.fromPartial( + object.getMacroCollection, + ) + : undefined; + message.postMacroCollections = + object.postMacroCollections !== undefined && + object.postMacroCollections !== null + ? APIV1MacroResponse_PostMacroCollections.fromPartial( + object.postMacroCollections, + ) + : undefined; + message.putMacroCollection = + object.putMacroCollection !== undefined && + object.putMacroCollection !== null + ? APIV1MacroResponse_PutMacroCollection.fromPartial( + object.putMacroCollection, + ) + : undefined; + message.deleteMacroCollection = + object.deleteMacroCollection !== undefined && + object.deleteMacroCollection !== null + ? APIV1MacroResponse_DeleteMacroCollection.fromPartial( + object.deleteMacroCollection, + ) + : undefined; + message.macroIcon = + object.macroIcon !== undefined && object.macroIcon !== null + ? APIV1MacroResponse_MacroIcon.fromPartial(object.macroIcon) + : undefined; + message.putMacroIcon = + object.putMacroIcon !== undefined && object.putMacroIcon !== null + ? APIV1MacroResponse_PutMacroIcon.fromPartial(object.putMacroIcon) + : undefined; + return message; + }, +}; + +function createBaseAPIV1MacroResponse_Macros(): APIV1MacroResponse_Macros { + return { macros: [] }; +} + +export const APIV1MacroResponse_Macros = { + encode( + message: APIV1MacroResponse_Macros, + writer: _m0.Writer = _m0.Writer.create(), + ): _m0.Writer { + for (const v of message.macros) { + APIV1Macro.encode(v!, writer.uint32(10).fork()).ldelim(); + } + return writer; + }, + + decode( + input: _m0.Reader | Uint8Array, + length?: number, + ): APIV1MacroResponse_Macros { + const reader = + input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseAPIV1MacroResponse_Macros(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } + + message.macros.push(APIV1Macro.decode(reader, reader.uint32())); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(object: any): APIV1MacroResponse_Macros { + return { + macros: globalThis.Array.isArray(object?.macros) + ? object.macros.map((e: any) => APIV1Macro.fromJSON(e)) + : [], + }; + }, + + toJSON(message: APIV1MacroResponse_Macros): unknown { + const obj: any = {}; + if (message.macros?.length) { + obj.macros = message.macros.map((e) => APIV1Macro.toJSON(e)); + } + return obj; + }, + + create, I>>( + base?: I, + ): APIV1MacroResponse_Macros { + return APIV1MacroResponse_Macros.fromPartial(base ?? ({} as any)); + }, + fromPartial, I>>( + object: I, + ): APIV1MacroResponse_Macros { + const message = createBaseAPIV1MacroResponse_Macros(); + message.macros = object.macros?.map((e) => APIV1Macro.fromPartial(e)) || []; + return message; + }, +}; + +function createBaseAPIV1MacroResponse_GetMacro(): APIV1MacroResponse_GetMacro { + return { macro: undefined }; +} + +export const APIV1MacroResponse_GetMacro = { + encode( + message: APIV1MacroResponse_GetMacro, + writer: _m0.Writer = _m0.Writer.create(), + ): _m0.Writer { + if (message.macro !== undefined) { + APIV1Macro.encode(message.macro, writer.uint32(10).fork()).ldelim(); + } + return writer; + }, + + decode( + input: _m0.Reader | Uint8Array, + length?: number, + ): APIV1MacroResponse_GetMacro { + const reader = + input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseAPIV1MacroResponse_GetMacro(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } + + message.macro = APIV1Macro.decode(reader, reader.uint32()); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(object: any): APIV1MacroResponse_GetMacro { + return { + macro: isSet(object.macro) + ? APIV1Macro.fromJSON(object.macro) + : undefined, + }; + }, + + toJSON(message: APIV1MacroResponse_GetMacro): unknown { + const obj: any = {}; + if (message.macro !== undefined) { + obj.macro = APIV1Macro.toJSON(message.macro); + } + return obj; + }, + + create, I>>( + base?: I, + ): APIV1MacroResponse_GetMacro { + return APIV1MacroResponse_GetMacro.fromPartial(base ?? ({} as any)); + }, + fromPartial, I>>( + object: I, + ): APIV1MacroResponse_GetMacro { + const message = createBaseAPIV1MacroResponse_GetMacro(); + message.macro = + object.macro !== undefined && object.macro !== null + ? APIV1Macro.fromPartial(object.macro) + : undefined; + return message; + }, +}; + +function createBaseAPIV1MacroResponse_PutMacro(): APIV1MacroResponse_PutMacro { + return { macro: undefined }; +} + +export const APIV1MacroResponse_PutMacro = { + encode( + message: APIV1MacroResponse_PutMacro, + writer: _m0.Writer = _m0.Writer.create(), + ): _m0.Writer { + if (message.macro !== undefined) { + APIV1Macro.encode(message.macro, writer.uint32(10).fork()).ldelim(); + } + return writer; + }, + + decode( + input: _m0.Reader | Uint8Array, + length?: number, + ): APIV1MacroResponse_PutMacro { + const reader = + input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseAPIV1MacroResponse_PutMacro(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } + + message.macro = APIV1Macro.decode(reader, reader.uint32()); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(object: any): APIV1MacroResponse_PutMacro { + return { + macro: isSet(object.macro) + ? APIV1Macro.fromJSON(object.macro) + : undefined, + }; + }, + + toJSON(message: APIV1MacroResponse_PutMacro): unknown { + const obj: any = {}; + if (message.macro !== undefined) { + obj.macro = APIV1Macro.toJSON(message.macro); + } + return obj; + }, + + create, I>>( + base?: I, + ): APIV1MacroResponse_PutMacro { + return APIV1MacroResponse_PutMacro.fromPartial(base ?? ({} as any)); + }, + fromPartial, I>>( + object: I, + ): APIV1MacroResponse_PutMacro { + const message = createBaseAPIV1MacroResponse_PutMacro(); + message.macro = + object.macro !== undefined && object.macro !== null + ? APIV1Macro.fromPartial(object.macro) + : undefined; + return message; + }, +}; + +function createBaseAPIV1MacroResponse_DeleteMacro(): APIV1MacroResponse_DeleteMacro { + return {}; +} + +export const APIV1MacroResponse_DeleteMacro = { + encode( + _: APIV1MacroResponse_DeleteMacro, + writer: _m0.Writer = _m0.Writer.create(), + ): _m0.Writer { + return writer; + }, + + decode( + input: _m0.Reader | Uint8Array, + length?: number, + ): APIV1MacroResponse_DeleteMacro { + const reader = + input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseAPIV1MacroResponse_DeleteMacro(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(_: any): APIV1MacroResponse_DeleteMacro { + return {}; + }, + + toJSON(_: APIV1MacroResponse_DeleteMacro): unknown { + const obj: any = {}; + return obj; + }, + + create, I>>( + base?: I, + ): APIV1MacroResponse_DeleteMacro { + return APIV1MacroResponse_DeleteMacro.fromPartial(base ?? ({} as any)); + }, + fromPartial, I>>( + _: I, + ): APIV1MacroResponse_DeleteMacro { + const message = createBaseAPIV1MacroResponse_DeleteMacro(); + return message; + }, +}; + +function createBaseAPIV1MacroResponse_TriggerMacro(): APIV1MacroResponse_TriggerMacro { + return {}; +} + +export const APIV1MacroResponse_TriggerMacro = { + encode( + _: APIV1MacroResponse_TriggerMacro, + writer: _m0.Writer = _m0.Writer.create(), + ): _m0.Writer { + return writer; + }, + + decode( + input: _m0.Reader | Uint8Array, + length?: number, + ): APIV1MacroResponse_TriggerMacro { + const reader = + input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseAPIV1MacroResponse_TriggerMacro(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(_: any): APIV1MacroResponse_TriggerMacro { + return {}; + }, + + toJSON(_: APIV1MacroResponse_TriggerMacro): unknown { + const obj: any = {}; + return obj; + }, + + create, I>>( + base?: I, + ): APIV1MacroResponse_TriggerMacro { + return APIV1MacroResponse_TriggerMacro.fromPartial(base ?? ({} as any)); + }, + fromPartial, I>>( + _: I, + ): APIV1MacroResponse_TriggerMacro { + const message = createBaseAPIV1MacroResponse_TriggerMacro(); + return message; + }, +}; + +function createBaseAPIV1MacroResponse_MacroCollections(): APIV1MacroResponse_MacroCollections { + return { macroCollections: undefined }; +} + +export const APIV1MacroResponse_MacroCollections = { + encode( + message: APIV1MacroResponse_MacroCollections, + writer: _m0.Writer = _m0.Writer.create(), + ): _m0.Writer { + if (message.macroCollections !== undefined) { + APIV1MacroResponse_MacroCollections_Collections.encode( + message.macroCollections, + writer.uint32(10).fork(), + ).ldelim(); + } + return writer; + }, + + decode( + input: _m0.Reader | Uint8Array, + length?: number, + ): APIV1MacroResponse_MacroCollections { + const reader = + input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseAPIV1MacroResponse_MacroCollections(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } + + message.macroCollections = + APIV1MacroResponse_MacroCollections_Collections.decode( + reader, + reader.uint32(), + ); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(object: any): APIV1MacroResponse_MacroCollections { + return { + macroCollections: isSet(object.macroCollections) + ? APIV1MacroResponse_MacroCollections_Collections.fromJSON( + object.macroCollections, + ) + : undefined, + }; + }, + + toJSON(message: APIV1MacroResponse_MacroCollections): unknown { + const obj: any = {}; + if (message.macroCollections !== undefined) { + obj.macroCollections = + APIV1MacroResponse_MacroCollections_Collections.toJSON( + message.macroCollections, + ); + } + return obj; + }, + + create, I>>( + base?: I, + ): APIV1MacroResponse_MacroCollections { + return APIV1MacroResponse_MacroCollections.fromPartial(base ?? ({} as any)); + }, + fromPartial< + I extends Exact, I>, + >(object: I): APIV1MacroResponse_MacroCollections { + const message = createBaseAPIV1MacroResponse_MacroCollections(); + message.macroCollections = + object.macroCollections !== undefined && object.macroCollections !== null + ? APIV1MacroResponse_MacroCollections_Collections.fromPartial( + object.macroCollections, + ) + : undefined; + return message; + }, +}; + +function createBaseAPIV1MacroResponse_MacroCollections_Collections(): APIV1MacroResponse_MacroCollections_Collections { + return { collections: [] }; +} + +export const APIV1MacroResponse_MacroCollections_Collections = { + encode( + message: APIV1MacroResponse_MacroCollections_Collections, + writer: _m0.Writer = _m0.Writer.create(), + ): _m0.Writer { + for (const v of message.collections) { + APIV1MacroCollection.encode(v!, writer.uint32(10).fork()).ldelim(); + } + return writer; + }, + + decode( + input: _m0.Reader | Uint8Array, + length?: number, + ): APIV1MacroResponse_MacroCollections_Collections { + const reader = + input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseAPIV1MacroResponse_MacroCollections_Collections(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { break; } - message.triggerMacro = APIV1MacroResponse_TriggerMacro.decode( - reader, - reader.uint32(), + message.collections.push( + APIV1MacroCollection.decode(reader, reader.uint32()), ); continue; } @@ -822,94 +2560,61 @@ export const APIV1MacroResponse = { return message; }, - fromJSON(object: any): APIV1MacroResponse { + fromJSON(object: any): APIV1MacroResponse_MacroCollections_Collections { return { - macros: isSet(object.macros) - ? APIV1MacroResponse_Macros.fromJSON(object.macros) - : undefined, - getMacro: isSet(object.getMacro) - ? APIV1MacroResponse_GetMacro.fromJSON(object.getMacro) - : undefined, - putMacro: isSet(object.putMacro) - ? APIV1MacroResponse_PutMacro.fromJSON(object.putMacro) - : undefined, - deleteMacro: isSet(object.deleteMacro) - ? APIV1MacroResponse_DeleteMacro.fromJSON(object.deleteMacro) - : undefined, - triggerMacro: isSet(object.triggerMacro) - ? APIV1MacroResponse_TriggerMacro.fromJSON(object.triggerMacro) - : undefined, + collections: globalThis.Array.isArray(object?.collections) + ? object.collections.map((e: any) => APIV1MacroCollection.fromJSON(e)) + : [], }; }, - toJSON(message: APIV1MacroResponse): unknown { + toJSON(message: APIV1MacroResponse_MacroCollections_Collections): unknown { const obj: any = {}; - if (message.macros !== undefined) { - obj.macros = APIV1MacroResponse_Macros.toJSON(message.macros); - } - if (message.getMacro !== undefined) { - obj.getMacro = APIV1MacroResponse_GetMacro.toJSON(message.getMacro); - } - if (message.putMacro !== undefined) { - obj.putMacro = APIV1MacroResponse_PutMacro.toJSON(message.putMacro); - } - if (message.deleteMacro !== undefined) { - obj.deleteMacro = APIV1MacroResponse_DeleteMacro.toJSON( - message.deleteMacro, - ); - } - if (message.triggerMacro !== undefined) { - obj.triggerMacro = APIV1MacroResponse_TriggerMacro.toJSON( - message.triggerMacro, + if (message.collections?.length) { + obj.collections = message.collections.map((e) => + APIV1MacroCollection.toJSON(e), ); } return obj; }, - create, I>>( - base?: I, - ): APIV1MacroResponse { - return APIV1MacroResponse.fromPartial(base ?? ({} as any)); - }, - fromPartial, I>>( - object: I, - ): APIV1MacroResponse { - const message = createBaseAPIV1MacroResponse(); - message.macros = - object.macros !== undefined && object.macros !== null - ? APIV1MacroResponse_Macros.fromPartial(object.macros) - : undefined; - message.getMacro = - object.getMacro !== undefined && object.getMacro !== null - ? APIV1MacroResponse_GetMacro.fromPartial(object.getMacro) - : undefined; - message.putMacro = - object.putMacro !== undefined && object.putMacro !== null - ? APIV1MacroResponse_PutMacro.fromPartial(object.putMacro) - : undefined; - message.deleteMacro = - object.deleteMacro !== undefined && object.deleteMacro !== null - ? APIV1MacroResponse_DeleteMacro.fromPartial(object.deleteMacro) - : undefined; - message.triggerMacro = - object.triggerMacro !== undefined && object.triggerMacro !== null - ? APIV1MacroResponse_TriggerMacro.fromPartial(object.triggerMacro) - : undefined; + create< + I extends Exact< + DeepPartial, + I + >, + >(base?: I): APIV1MacroResponse_MacroCollections_Collections { + return APIV1MacroResponse_MacroCollections_Collections.fromPartial( + base ?? ({} as any), + ); + }, + fromPartial< + I extends Exact< + DeepPartial, + I + >, + >(object: I): APIV1MacroResponse_MacroCollections_Collections { + const message = createBaseAPIV1MacroResponse_MacroCollections_Collections(); + message.collections = + object.collections?.map((e) => APIV1MacroCollection.fromPartial(e)) || []; return message; }, }; -function createBaseAPIV1MacroResponse_Macros(): APIV1MacroResponse_Macros { - return { macros: [] }; +function createBaseAPIV1MacroResponse_GetMacroCollection(): APIV1MacroResponse_GetMacroCollection { + return { macroCollection: undefined }; } -export const APIV1MacroResponse_Macros = { +export const APIV1MacroResponse_GetMacroCollection = { encode( - message: APIV1MacroResponse_Macros, + message: APIV1MacroResponse_GetMacroCollection, writer: _m0.Writer = _m0.Writer.create(), ): _m0.Writer { - for (const v of message.macros) { - APIV1Macro.encode(v!, writer.uint32(10).fork()).ldelim(); + if (message.macroCollection !== undefined) { + APIV1MacroCollection.encode( + message.macroCollection, + writer.uint32(10).fork(), + ).ldelim(); } return writer; }, @@ -917,11 +2622,11 @@ export const APIV1MacroResponse_Macros = { decode( input: _m0.Reader | Uint8Array, length?: number, - ): APIV1MacroResponse_Macros { + ): APIV1MacroResponse_GetMacroCollection { const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseAPIV1MacroResponse_Macros(); + const message = createBaseAPIV1MacroResponse_GetMacroCollection(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { @@ -930,7 +2635,10 @@ export const APIV1MacroResponse_Macros = { break; } - message.macros.push(APIV1Macro.decode(reader, reader.uint32())); + message.macroCollection = APIV1MacroCollection.decode( + reader, + reader.uint32(), + ); continue; } if ((tag & 7) === 4 || tag === 0) { @@ -941,47 +2649,57 @@ export const APIV1MacroResponse_Macros = { return message; }, - fromJSON(object: any): APIV1MacroResponse_Macros { + fromJSON(object: any): APIV1MacroResponse_GetMacroCollection { return { - macros: globalThis.Array.isArray(object?.macros) - ? object.macros.map((e: any) => APIV1Macro.fromJSON(e)) - : [], + macroCollection: isSet(object.macroCollection) + ? APIV1MacroCollection.fromJSON(object.macroCollection) + : undefined, }; }, - toJSON(message: APIV1MacroResponse_Macros): unknown { + toJSON(message: APIV1MacroResponse_GetMacroCollection): unknown { const obj: any = {}; - if (message.macros?.length) { - obj.macros = message.macros.map((e) => APIV1Macro.toJSON(e)); + if (message.macroCollection !== undefined) { + obj.macroCollection = APIV1MacroCollection.toJSON( + message.macroCollection, + ); } return obj; }, - create, I>>( - base?: I, - ): APIV1MacroResponse_Macros { - return APIV1MacroResponse_Macros.fromPartial(base ?? ({} as any)); - }, - fromPartial, I>>( - object: I, - ): APIV1MacroResponse_Macros { - const message = createBaseAPIV1MacroResponse_Macros(); - message.macros = object.macros?.map((e) => APIV1Macro.fromPartial(e)) || []; + create< + I extends Exact, I>, + >(base?: I): APIV1MacroResponse_GetMacroCollection { + return APIV1MacroResponse_GetMacroCollection.fromPartial( + base ?? ({} as any), + ); + }, + fromPartial< + I extends Exact, I>, + >(object: I): APIV1MacroResponse_GetMacroCollection { + const message = createBaseAPIV1MacroResponse_GetMacroCollection(); + message.macroCollection = + object.macroCollection !== undefined && object.macroCollection !== null + ? APIV1MacroCollection.fromPartial(object.macroCollection) + : undefined; return message; }, }; -function createBaseAPIV1MacroResponse_GetMacro(): APIV1MacroResponse_GetMacro { - return { macro: undefined }; +function createBaseAPIV1MacroResponse_PostMacroCollections(): APIV1MacroResponse_PostMacroCollections { + return { macroCollection: undefined }; } -export const APIV1MacroResponse_GetMacro = { +export const APIV1MacroResponse_PostMacroCollections = { encode( - message: APIV1MacroResponse_GetMacro, + message: APIV1MacroResponse_PostMacroCollections, writer: _m0.Writer = _m0.Writer.create(), ): _m0.Writer { - if (message.macro !== undefined) { - APIV1Macro.encode(message.macro, writer.uint32(10).fork()).ldelim(); + if (message.macroCollection !== undefined) { + APIV1MacroCollection.encode( + message.macroCollection, + writer.uint32(10).fork(), + ).ldelim(); } return writer; }, @@ -989,11 +2707,11 @@ export const APIV1MacroResponse_GetMacro = { decode( input: _m0.Reader | Uint8Array, length?: number, - ): APIV1MacroResponse_GetMacro { + ): APIV1MacroResponse_PostMacroCollections { const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseAPIV1MacroResponse_GetMacro(); + const message = createBaseAPIV1MacroResponse_PostMacroCollections(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { @@ -1002,7 +2720,10 @@ export const APIV1MacroResponse_GetMacro = { break; } - message.macro = APIV1Macro.decode(reader, reader.uint32()); + message.macroCollection = APIV1MacroCollection.decode( + reader, + reader.uint32(), + ); continue; } if ((tag & 7) === 4 || tag === 0) { @@ -1013,50 +2734,57 @@ export const APIV1MacroResponse_GetMacro = { return message; }, - fromJSON(object: any): APIV1MacroResponse_GetMacro { + fromJSON(object: any): APIV1MacroResponse_PostMacroCollections { return { - macro: isSet(object.macro) - ? APIV1Macro.fromJSON(object.macro) + macroCollection: isSet(object.macroCollection) + ? APIV1MacroCollection.fromJSON(object.macroCollection) : undefined, }; }, - toJSON(message: APIV1MacroResponse_GetMacro): unknown { + toJSON(message: APIV1MacroResponse_PostMacroCollections): unknown { const obj: any = {}; - if (message.macro !== undefined) { - obj.macro = APIV1Macro.toJSON(message.macro); + if (message.macroCollection !== undefined) { + obj.macroCollection = APIV1MacroCollection.toJSON( + message.macroCollection, + ); } return obj; }, - create, I>>( - base?: I, - ): APIV1MacroResponse_GetMacro { - return APIV1MacroResponse_GetMacro.fromPartial(base ?? ({} as any)); - }, - fromPartial, I>>( - object: I, - ): APIV1MacroResponse_GetMacro { - const message = createBaseAPIV1MacroResponse_GetMacro(); - message.macro = - object.macro !== undefined && object.macro !== null - ? APIV1Macro.fromPartial(object.macro) + create< + I extends Exact, I>, + >(base?: I): APIV1MacroResponse_PostMacroCollections { + return APIV1MacroResponse_PostMacroCollections.fromPartial( + base ?? ({} as any), + ); + }, + fromPartial< + I extends Exact, I>, + >(object: I): APIV1MacroResponse_PostMacroCollections { + const message = createBaseAPIV1MacroResponse_PostMacroCollections(); + message.macroCollection = + object.macroCollection !== undefined && object.macroCollection !== null + ? APIV1MacroCollection.fromPartial(object.macroCollection) : undefined; return message; }, }; -function createBaseAPIV1MacroResponse_PutMacro(): APIV1MacroResponse_PutMacro { - return { macro: undefined }; +function createBaseAPIV1MacroResponse_PutMacroCollection(): APIV1MacroResponse_PutMacroCollection { + return { macroCollection: undefined }; } -export const APIV1MacroResponse_PutMacro = { +export const APIV1MacroResponse_PutMacroCollection = { encode( - message: APIV1MacroResponse_PutMacro, + message: APIV1MacroResponse_PutMacroCollection, writer: _m0.Writer = _m0.Writer.create(), ): _m0.Writer { - if (message.macro !== undefined) { - APIV1Macro.encode(message.macro, writer.uint32(10).fork()).ldelim(); + if (message.macroCollection !== undefined) { + APIV1MacroCollection.encode( + message.macroCollection, + writer.uint32(10).fork(), + ).ldelim(); } return writer; }, @@ -1064,11 +2792,11 @@ export const APIV1MacroResponse_PutMacro = { decode( input: _m0.Reader | Uint8Array, length?: number, - ): APIV1MacroResponse_PutMacro { + ): APIV1MacroResponse_PutMacroCollection { const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseAPIV1MacroResponse_PutMacro(); + const message = createBaseAPIV1MacroResponse_PutMacroCollection(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { @@ -1077,7 +2805,10 @@ export const APIV1MacroResponse_PutMacro = { break; } - message.macro = APIV1Macro.decode(reader, reader.uint32()); + message.macroCollection = APIV1MacroCollection.decode( + reader, + reader.uint32(), + ); continue; } if ((tag & 7) === 4 || tag === 0) { @@ -1088,46 +2819,50 @@ export const APIV1MacroResponse_PutMacro = { return message; }, - fromJSON(object: any): APIV1MacroResponse_PutMacro { + fromJSON(object: any): APIV1MacroResponse_PutMacroCollection { return { - macro: isSet(object.macro) - ? APIV1Macro.fromJSON(object.macro) + macroCollection: isSet(object.macroCollection) + ? APIV1MacroCollection.fromJSON(object.macroCollection) : undefined, }; }, - toJSON(message: APIV1MacroResponse_PutMacro): unknown { + toJSON(message: APIV1MacroResponse_PutMacroCollection): unknown { const obj: any = {}; - if (message.macro !== undefined) { - obj.macro = APIV1Macro.toJSON(message.macro); + if (message.macroCollection !== undefined) { + obj.macroCollection = APIV1MacroCollection.toJSON( + message.macroCollection, + ); } return obj; }, - create, I>>( - base?: I, - ): APIV1MacroResponse_PutMacro { - return APIV1MacroResponse_PutMacro.fromPartial(base ?? ({} as any)); - }, - fromPartial, I>>( - object: I, - ): APIV1MacroResponse_PutMacro { - const message = createBaseAPIV1MacroResponse_PutMacro(); - message.macro = - object.macro !== undefined && object.macro !== null - ? APIV1Macro.fromPartial(object.macro) + create< + I extends Exact, I>, + >(base?: I): APIV1MacroResponse_PutMacroCollection { + return APIV1MacroResponse_PutMacroCollection.fromPartial( + base ?? ({} as any), + ); + }, + fromPartial< + I extends Exact, I>, + >(object: I): APIV1MacroResponse_PutMacroCollection { + const message = createBaseAPIV1MacroResponse_PutMacroCollection(); + message.macroCollection = + object.macroCollection !== undefined && object.macroCollection !== null + ? APIV1MacroCollection.fromPartial(object.macroCollection) : undefined; return message; }, }; -function createBaseAPIV1MacroResponse_DeleteMacro(): APIV1MacroResponse_DeleteMacro { +function createBaseAPIV1MacroResponse_DeleteMacroCollection(): APIV1MacroResponse_DeleteMacroCollection { return {}; } -export const APIV1MacroResponse_DeleteMacro = { +export const APIV1MacroResponse_DeleteMacroCollection = { encode( - _: APIV1MacroResponse_DeleteMacro, + _: APIV1MacroResponse_DeleteMacroCollection, writer: _m0.Writer = _m0.Writer.create(), ): _m0.Writer { return writer; @@ -1136,11 +2871,11 @@ export const APIV1MacroResponse_DeleteMacro = { decode( input: _m0.Reader | Uint8Array, length?: number, - ): APIV1MacroResponse_DeleteMacro { + ): APIV1MacroResponse_DeleteMacroCollection { const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseAPIV1MacroResponse_DeleteMacro(); + const message = createBaseAPIV1MacroResponse_DeleteMacroCollection(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { @@ -1153,35 +2888,126 @@ export const APIV1MacroResponse_DeleteMacro = { return message; }, - fromJSON(_: any): APIV1MacroResponse_DeleteMacro { + fromJSON(_: any): APIV1MacroResponse_DeleteMacroCollection { return {}; }, - toJSON(_: APIV1MacroResponse_DeleteMacro): unknown { + toJSON(_: APIV1MacroResponse_DeleteMacroCollection): unknown { const obj: any = {}; return obj; }, - create, I>>( + create< + I extends Exact, I>, + >(base?: I): APIV1MacroResponse_DeleteMacroCollection { + return APIV1MacroResponse_DeleteMacroCollection.fromPartial( + base ?? ({} as any), + ); + }, + fromPartial< + I extends Exact, I>, + >(_: I): APIV1MacroResponse_DeleteMacroCollection { + const message = createBaseAPIV1MacroResponse_DeleteMacroCollection(); + return message; + }, +}; + +function createBaseAPIV1MacroResponse_MacroIcon(): APIV1MacroResponse_MacroIcon { + return { contentType: '', icon: new Uint8Array(0) }; +} + +export const APIV1MacroResponse_MacroIcon = { + encode( + message: APIV1MacroResponse_MacroIcon, + writer: _m0.Writer = _m0.Writer.create(), + ): _m0.Writer { + if (message.contentType !== '') { + writer.uint32(10).string(message.contentType); + } + if (message.icon.length !== 0) { + writer.uint32(18).bytes(message.icon); + } + return writer; + }, + + decode( + input: _m0.Reader | Uint8Array, + length?: number, + ): APIV1MacroResponse_MacroIcon { + const reader = + input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseAPIV1MacroResponse_MacroIcon(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } + + message.contentType = reader.string(); + continue; + case 2: + if (tag !== 18) { + break; + } + + message.icon = reader.bytes(); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(object: any): APIV1MacroResponse_MacroIcon { + return { + contentType: isSet(object.contentType) + ? globalThis.String(object.contentType) + : '', + icon: isSet(object.icon) + ? bytesFromBase64(object.icon) + : new Uint8Array(0), + }; + }, + + toJSON(message: APIV1MacroResponse_MacroIcon): unknown { + const obj: any = {}; + if (message.contentType !== '') { + obj.contentType = message.contentType; + } + if (message.icon.length !== 0) { + obj.icon = base64FromBytes(message.icon); + } + return obj; + }, + + create, I>>( base?: I, - ): APIV1MacroResponse_DeleteMacro { - return APIV1MacroResponse_DeleteMacro.fromPartial(base ?? ({} as any)); + ): APIV1MacroResponse_MacroIcon { + return APIV1MacroResponse_MacroIcon.fromPartial(base ?? ({} as any)); }, - fromPartial, I>>( - _: I, - ): APIV1MacroResponse_DeleteMacro { - const message = createBaseAPIV1MacroResponse_DeleteMacro(); + fromPartial, I>>( + object: I, + ): APIV1MacroResponse_MacroIcon { + const message = createBaseAPIV1MacroResponse_MacroIcon(); + message.contentType = object.contentType ?? ''; + message.icon = object.icon ?? new Uint8Array(0); return message; }, }; -function createBaseAPIV1MacroResponse_TriggerMacro(): APIV1MacroResponse_TriggerMacro { +function createBaseAPIV1MacroResponse_PutMacroIcon(): APIV1MacroResponse_PutMacroIcon { return {}; } -export const APIV1MacroResponse_TriggerMacro = { +export const APIV1MacroResponse_PutMacroIcon = { encode( - _: APIV1MacroResponse_TriggerMacro, + _: APIV1MacroResponse_PutMacroIcon, writer: _m0.Writer = _m0.Writer.create(), ): _m0.Writer { return writer; @@ -1190,11 +3016,11 @@ export const APIV1MacroResponse_TriggerMacro = { decode( input: _m0.Reader | Uint8Array, length?: number, - ): APIV1MacroResponse_TriggerMacro { + ): APIV1MacroResponse_PutMacroIcon { const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseAPIV1MacroResponse_TriggerMacro(); + const message = createBaseAPIV1MacroResponse_PutMacroIcon(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { @@ -1207,28 +3033,53 @@ export const APIV1MacroResponse_TriggerMacro = { return message; }, - fromJSON(_: any): APIV1MacroResponse_TriggerMacro { + fromJSON(_: any): APIV1MacroResponse_PutMacroIcon { return {}; }, - toJSON(_: APIV1MacroResponse_TriggerMacro): unknown { + toJSON(_: APIV1MacroResponse_PutMacroIcon): unknown { const obj: any = {}; return obj; }, - create, I>>( + create, I>>( base?: I, - ): APIV1MacroResponse_TriggerMacro { - return APIV1MacroResponse_TriggerMacro.fromPartial(base ?? ({} as any)); + ): APIV1MacroResponse_PutMacroIcon { + return APIV1MacroResponse_PutMacroIcon.fromPartial(base ?? ({} as any)); }, - fromPartial, I>>( + fromPartial, I>>( _: I, - ): APIV1MacroResponse_TriggerMacro { - const message = createBaseAPIV1MacroResponse_TriggerMacro(); + ): APIV1MacroResponse_PutMacroIcon { + const message = createBaseAPIV1MacroResponse_PutMacroIcon(); return message; }, }; +function bytesFromBase64(b64: string): Uint8Array { + if ((globalThis as any).Buffer) { + return Uint8Array.from(globalThis.Buffer.from(b64, 'base64')); + } else { + const bin = globalThis.atob(b64); + const arr = new Uint8Array(bin.length); + for (let i = 0; i < bin.length; ++i) { + arr[i] = bin.charCodeAt(i); + } + return arr; + } +} + +function base64FromBytes(arr: Uint8Array): string { + if ((globalThis as any).Buffer) { + return globalThis.Buffer.from(arr).toString('base64'); + } else { + const bin: string[] = []; + arr.forEach((byte) => { + bin.push(globalThis.String.fromCharCode(byte)); + }); + return globalThis.btoa(bin.join('')); + } +} + type Builtin = | Date | Function diff --git a/proto/proApiV1Masks.ts b/proto/proApiV1Masks.ts index 19d82eb..d8cf54c 100644 --- a/proto/proApiV1Masks.ts +++ b/proto/proApiV1Masks.ts @@ -729,7 +729,7 @@ export const APIV1MasksResponse_GetThumbnail = { }; function bytesFromBase64(b64: string): Uint8Array { - if (globalThis.Buffer) { + if ((globalThis as any).Buffer) { return Uint8Array.from(globalThis.Buffer.from(b64, 'base64')); } else { const bin = globalThis.atob(b64); @@ -742,7 +742,7 @@ function bytesFromBase64(b64: string): Uint8Array { } function base64FromBytes(arr: Uint8Array): string { - if (globalThis.Buffer) { + if ((globalThis as any).Buffer) { return globalThis.Buffer.from(arr).toString('base64'); } else { const bin: string[] = []; diff --git a/proto/proApiV1Media.ts b/proto/proApiV1Media.ts index d193ffe..c439192 100644 --- a/proto/proApiV1Media.ts +++ b/proto/proApiV1Media.ts @@ -1971,7 +1971,7 @@ export const APIV1MediaResponse_EmptyMessage = { }; function bytesFromBase64(b64: string): Uint8Array { - if (globalThis.Buffer) { + if ((globalThis as any).Buffer) { return Uint8Array.from(globalThis.Buffer.from(b64, 'base64')); } else { const bin = globalThis.atob(b64); @@ -1984,7 +1984,7 @@ function bytesFromBase64(b64: string): Uint8Array { } function base64FromBytes(arr: Uint8Array): string { - if (globalThis.Buffer) { + if ((globalThis as any).Buffer) { return globalThis.Buffer.from(arr).toString('base64'); } else { const bin: string[] = []; diff --git a/proto/proApiV1Message.proto b/proto/proApiV1Message.proto index aea905b..2b04506 100755 --- a/proto/proApiV1Message.proto +++ b/proto/proApiV1Message.proto @@ -52,6 +52,7 @@ message API_v1_Message { string message = 2; repeated .rv.data.API_v1_Message.API_v1_MessageToken tokens = 3; .rv.data.API_v1_Identifier theme = 4; + bool visible_on_network = 5; } message API_v1_Message_Request { diff --git a/proto/proApiV1Message.ts b/proto/proApiV1Message.ts index 3140558..bc5c356 100644 --- a/proto/proApiV1Message.ts +++ b/proto/proApiV1Message.ts @@ -15,6 +15,7 @@ export interface APIV1Message { message: string; tokens: APIV1Message_APIV1MessageToken[]; theme: APIV1Identifier | undefined; + visibleOnNetwork: boolean; } export interface APIV1Message_APIV1MessageToken { @@ -169,7 +170,13 @@ export interface APIV1MessageResponse_TriggerMessage {} export interface APIV1MessageResponse_ClearMessage {} function createBaseAPIV1Message(): APIV1Message { - return { id: undefined, message: '', tokens: [], theme: undefined }; + return { + id: undefined, + message: '', + tokens: [], + theme: undefined, + visibleOnNetwork: false, + }; } export const APIV1Message = { @@ -192,6 +199,9 @@ export const APIV1Message = { if (message.theme !== undefined) { APIV1Identifier.encode(message.theme, writer.uint32(34).fork()).ldelim(); } + if (message.visibleOnNetwork !== false) { + writer.uint32(40).bool(message.visibleOnNetwork); + } return writer; }, @@ -233,6 +243,13 @@ export const APIV1Message = { message.theme = APIV1Identifier.decode(reader, reader.uint32()); continue; + case 5: + if (tag !== 40) { + break; + } + + message.visibleOnNetwork = reader.bool(); + continue; } if ((tag & 7) === 4 || tag === 0) { break; @@ -254,6 +271,9 @@ export const APIV1Message = { theme: isSet(object.theme) ? APIV1Identifier.fromJSON(object.theme) : undefined, + visibleOnNetwork: isSet(object.visibleOnNetwork) + ? globalThis.Boolean(object.visibleOnNetwork) + : false, }; }, @@ -273,6 +293,9 @@ export const APIV1Message = { if (message.theme !== undefined) { obj.theme = APIV1Identifier.toJSON(message.theme); } + if (message.visibleOnNetwork !== false) { + obj.visibleOnNetwork = message.visibleOnNetwork; + } return obj; }, @@ -298,6 +321,7 @@ export const APIV1Message = { object.theme !== undefined && object.theme !== null ? APIV1Identifier.fromPartial(object.theme) : undefined; + message.visibleOnNetwork = object.visibleOnNetwork ?? false; return message; }, }; @@ -555,7 +579,7 @@ export const APIV1Message_APIV1MessageToken_APIV1TimerToken = { if (message.id !== undefined) { APIV1Identifier.encode(message.id, writer.uint32(10).fork()).ldelim(); } - if (message.allowsOverrun === true) { + if (message.allowsOverrun !== false) { writer.uint32(16).bool(message.allowsOverrun); } if (message.format !== undefined) { @@ -682,7 +706,7 @@ export const APIV1Message_APIV1MessageToken_APIV1TimerToken = { if (message.id !== undefined) { obj.id = APIV1Identifier.toJSON(message.id); } - if (message.allowsOverrun === true) { + if (message.allowsOverrun !== false) { obj.allowsOverrun = message.allowsOverrun; } if (message.format !== undefined) { @@ -761,7 +785,7 @@ export const APIV1Message_APIV1MessageToken_APIV1ClockToken = { if (message.time !== 0) { writer.uint32(16).int32(message.time); } - if (message.is24Hours === true) { + if (message.is24Hours !== false) { writer.uint32(24).bool(message.is24Hours); } return writer; @@ -840,7 +864,7 @@ export const APIV1Message_APIV1MessageToken_APIV1ClockToken = { message.time, ); } - if (message.is24Hours === true) { + if (message.is24Hours !== false) { obj.is24Hours = message.is24Hours; } return obj; diff --git a/proto/proApiV1Playlist.proto b/proto/proApiV1Playlist.proto index 2f83769..b969fc2 100755 --- a/proto/proApiV1Playlist.proto +++ b/proto/proApiV1Playlist.proto @@ -10,6 +10,7 @@ import "google/protobuf/wrappers.proto"; import "proApiV1Color.proto"; import "proApiV1ContentType.proto"; import "proApiV1Identifier.proto"; +import "proApiV1PresentationPlaylistItem.proto"; message API_v1_Playlist { enum API_v1_PlaylistType { @@ -43,6 +44,7 @@ message API_v1_PlaylistItem { bool is_pco = 4; .rv.data.API_v1_Color header_color = 5; .google.protobuf.UInt32Value duration = 6; + .rv.data.API_v1_PlaylistPresentationItem presentation_info = 7; } message API_v1_Playlist_Request { diff --git a/proto/proApiV1Playlist.ts b/proto/proApiV1Playlist.ts index 17db870..2a03a0f 100644 --- a/proto/proApiV1Playlist.ts +++ b/proto/proApiV1Playlist.ts @@ -8,6 +8,7 @@ import { aPIV1ContentTypeToJSON, } from './proApiV1ContentType'; import { APIV1Identifier } from './proApiV1Identifier'; +import { APIV1PlaylistPresentationItem } from './proApiV1PresentationPlaylistItem'; export const protobufPackage = 'rv.data'; @@ -66,6 +67,7 @@ export interface APIV1PlaylistItem { isPco: boolean; headerColor: APIV1Color | undefined; duration: number | undefined; + presentationInfo: APIV1PlaylistPresentationItem | undefined; } export enum APIV1PlaylistItem_APIV1PlaylistItemType { @@ -502,6 +504,7 @@ function createBaseAPIV1PlaylistItem(): APIV1PlaylistItem { isPco: false, headerColor: undefined, duration: undefined, + presentationInfo: undefined, }; } @@ -516,10 +519,10 @@ export const APIV1PlaylistItem = { if (message.type !== 0) { writer.uint32(16).int32(message.type); } - if (message.isHidden === true) { + if (message.isHidden !== false) { writer.uint32(24).bool(message.isHidden); } - if (message.isPco === true) { + if (message.isPco !== false) { writer.uint32(32).bool(message.isPco); } if (message.headerColor !== undefined) { @@ -531,6 +534,12 @@ export const APIV1PlaylistItem = { writer.uint32(50).fork(), ).ldelim(); } + if (message.presentationInfo !== undefined) { + APIV1PlaylistPresentationItem.encode( + message.presentationInfo, + writer.uint32(58).fork(), + ).ldelim(); + } return writer; }, @@ -584,6 +593,16 @@ export const APIV1PlaylistItem = { message.duration = UInt32Value.decode(reader, reader.uint32()).value; continue; + case 7: + if (tag !== 58) { + break; + } + + message.presentationInfo = APIV1PlaylistPresentationItem.decode( + reader, + reader.uint32(), + ); + continue; } if ((tag & 7) === 4 || tag === 0) { break; @@ -607,6 +626,9 @@ export const APIV1PlaylistItem = { ? APIV1Color.fromJSON(object.headerColor) : undefined, duration: isSet(object.duration) ? Number(object.duration) : undefined, + presentationInfo: isSet(object.presentationInfo) + ? APIV1PlaylistPresentationItem.fromJSON(object.presentationInfo) + : undefined, }; }, @@ -618,10 +640,10 @@ export const APIV1PlaylistItem = { if (message.type !== 0) { obj.type = aPIV1PlaylistItem_APIV1PlaylistItemTypeToJSON(message.type); } - if (message.isHidden === true) { + if (message.isHidden !== false) { obj.isHidden = message.isHidden; } - if (message.isPco === true) { + if (message.isPco !== false) { obj.isPco = message.isPco; } if (message.headerColor !== undefined) { @@ -630,6 +652,11 @@ export const APIV1PlaylistItem = { if (message.duration !== undefined) { obj.duration = message.duration; } + if (message.presentationInfo !== undefined) { + obj.presentationInfo = APIV1PlaylistPresentationItem.toJSON( + message.presentationInfo, + ); + } return obj; }, @@ -654,6 +681,10 @@ export const APIV1PlaylistItem = { ? APIV1Color.fromPartial(object.headerColor) : undefined; message.duration = object.duration ?? undefined; + message.presentationInfo = + object.presentationInfo !== undefined && object.presentationInfo !== null + ? APIV1PlaylistPresentationItem.fromPartial(object.presentationInfo) + : undefined; return message; }, }; @@ -4098,7 +4129,7 @@ export const APIV1PlaylistResponse_EmptyMessage = { }; function bytesFromBase64(b64: string): Uint8Array { - if (globalThis.Buffer) { + if ((globalThis as any).Buffer) { return Uint8Array.from(globalThis.Buffer.from(b64, 'base64')); } else { const bin = globalThis.atob(b64); @@ -4111,7 +4142,7 @@ function bytesFromBase64(b64: string): Uint8Array { } function base64FromBytes(arr: Uint8Array): string { - if (globalThis.Buffer) { + if ((globalThis as any).Buffer) { return globalThis.Buffer.from(arr).toString('base64'); } else { const bin: string[] = []; diff --git a/proto/proApiV1Preroll.ts b/proto/proApiV1Preroll.ts index 19c49c1..ea3cac4 100644 --- a/proto/proApiV1Preroll.ts +++ b/proto/proApiV1Preroll.ts @@ -1575,7 +1575,7 @@ export const APIV1PrerollResponse_ActivatePrerollItem = { message: APIV1PrerollResponse_ActivatePrerollItem, writer: _m0.Writer = _m0.Writer.create(), ): _m0.Writer { - if (message.success === true) { + if (message.success !== false) { writer.uint32(8).bool(message.success); } return writer; @@ -1618,7 +1618,7 @@ export const APIV1PrerollResponse_ActivatePrerollItem = { toJSON(message: APIV1PrerollResponse_ActivatePrerollItem): unknown { const obj: any = {}; - if (message.success === true) { + if (message.success !== false) { obj.success = message.success; } return obj; @@ -1649,7 +1649,7 @@ export const APIV1PrerollResponse_CancelPrerollItem = { message: APIV1PrerollResponse_CancelPrerollItem, writer: _m0.Writer = _m0.Writer.create(), ): _m0.Writer { - if (message.success === true) { + if (message.success !== false) { writer.uint32(8).bool(message.success); } return writer; @@ -1692,7 +1692,7 @@ export const APIV1PrerollResponse_CancelPrerollItem = { toJSON(message: APIV1PrerollResponse_CancelPrerollItem): unknown { const obj: any = {}; - if (message.success === true) { + if (message.success !== false) { obj.success = message.success; } return obj; diff --git a/proto/proApiV1Presentation.ts b/proto/proApiV1Presentation.ts index 6fee29c..2122ff6 100644 --- a/proto/proApiV1Presentation.ts +++ b/proto/proApiV1Presentation.ts @@ -368,7 +368,7 @@ export const APIV1Presentation = { writer.uint32(18).fork(), ).ldelim(); } - if (message.hasTimeline === true) { + if (message.hasTimeline !== false) { writer.uint32(24).bool(message.hasTimeline); } if (message.presentationPath !== '') { @@ -464,7 +464,7 @@ export const APIV1Presentation = { APIV1Presentation_SlideGroup.toJSON(e), ); } - if (message.hasTimeline === true) { + if (message.hasTimeline !== false) { obj.hasTimeline = message.hasTimeline; } if (message.presentationPath !== '') { @@ -629,7 +629,7 @@ export const APIV1Presentation_SlideGroup_Slide = { message: APIV1Presentation_SlideGroup_Slide, writer: _m0.Writer = _m0.Writer.create(), ): _m0.Writer { - if (message.enabled === true) { + if (message.enabled !== false) { writer.uint32(8).bool(message.enabled); } if (message.notes !== '') { @@ -716,7 +716,7 @@ export const APIV1Presentation_SlideGroup_Slide = { toJSON(message: APIV1Presentation_SlideGroup_Slide): unknown { const obj: any = {}; - if (message.enabled === true) { + if (message.enabled !== false) { obj.enabled = message.enabled; } if (message.notes !== '') { @@ -4048,7 +4048,7 @@ export const APIV1PresentationResponse_ActivePresentationTimelineStatus = { message: APIV1PresentationResponse_ActivePresentationTimelineStatus, writer: _m0.Writer = _m0.Writer.create(), ): _m0.Writer { - if (message.isRunning === true) { + if (message.isRunning !== false) { writer.uint32(8).bool(message.isRunning); } if (message.currentTime !== 0) { @@ -4109,7 +4109,7 @@ export const APIV1PresentationResponse_ActivePresentationTimelineStatus = { message: APIV1PresentationResponse_ActivePresentationTimelineStatus, ): unknown { const obj: any = {}; - if (message.isRunning === true) { + if (message.isRunning !== false) { obj.isRunning = message.isRunning; } if (message.currentTime !== 0) { @@ -4151,7 +4151,7 @@ export const APIV1PresentationResponse_FocusedPresentationTimelineStatus = { message: APIV1PresentationResponse_FocusedPresentationTimelineStatus, writer: _m0.Writer = _m0.Writer.create(), ): _m0.Writer { - if (message.isRunning === true) { + if (message.isRunning !== false) { writer.uint32(8).bool(message.isRunning); } if (message.currentTime !== 0) { @@ -4212,7 +4212,7 @@ export const APIV1PresentationResponse_FocusedPresentationTimelineStatus = { message: APIV1PresentationResponse_FocusedPresentationTimelineStatus, ): unknown { const obj: any = {}; - if (message.isRunning === true) { + if (message.isRunning !== false) { obj.isRunning = message.isRunning; } if (message.currentTime !== 0) { @@ -4464,7 +4464,7 @@ export const APIV1PresentationResponse_EmptyMessage = { }; function bytesFromBase64(b64: string): Uint8Array { - if (globalThis.Buffer) { + if ((globalThis as any).Buffer) { return Uint8Array.from(globalThis.Buffer.from(b64, 'base64')); } else { const bin = globalThis.atob(b64); @@ -4477,7 +4477,7 @@ function bytesFromBase64(b64: string): Uint8Array { } function base64FromBytes(arr: Uint8Array): string { - if (globalThis.Buffer) { + if ((globalThis as any).Buffer) { return globalThis.Buffer.from(arr).toString('base64'); } else { const bin: string[] = []; diff --git a/proto/proApiV1PresentationPlaylistItem.proto b/proto/proApiV1PresentationPlaylistItem.proto new file mode 100755 index 0000000..2991ea7 --- /dev/null +++ b/proto/proApiV1PresentationPlaylistItem.proto @@ -0,0 +1,12 @@ +syntax = "proto3"; + +package rv.data; + +option cc_enable_arenas = true; +option csharp_namespace = "Pro.SerializationInterop.RVProtoData"; +option swift_prefix = "RVData_"; + +message API_v1_PlaylistPresentationItem { + string presentation_uuid = 1; +} + diff --git a/proto/proApiV1PresentationPlaylistItem.ts b/proto/proApiV1PresentationPlaylistItem.ts new file mode 100644 index 0000000..6fe15a8 --- /dev/null +++ b/proto/proApiV1PresentationPlaylistItem.ts @@ -0,0 +1,83 @@ +/* eslint-disable */ +import _m0 from "protobufjs/minimal"; + +export const protobufPackage = "rv.data"; + +export interface APIV1PlaylistPresentationItem { + presentationUuid: string; +} + +function createBaseAPIV1PlaylistPresentationItem(): APIV1PlaylistPresentationItem { + return { presentationUuid: "" }; +} + +export const APIV1PlaylistPresentationItem = { + encode(message: APIV1PlaylistPresentationItem, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.presentationUuid !== "") { + writer.uint32(10).string(message.presentationUuid); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): APIV1PlaylistPresentationItem { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseAPIV1PlaylistPresentationItem(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } + + message.presentationUuid = reader.string(); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(object: any): APIV1PlaylistPresentationItem { + return { presentationUuid: isSet(object.presentationUuid) ? globalThis.String(object.presentationUuid) : "" }; + }, + + toJSON(message: APIV1PlaylistPresentationItem): unknown { + const obj: any = {}; + if (message.presentationUuid !== "") { + obj.presentationUuid = message.presentationUuid; + } + return obj; + }, + + create, I>>(base?: I): APIV1PlaylistPresentationItem { + return APIV1PlaylistPresentationItem.fromPartial(base ?? ({} as any)); + }, + fromPartial, I>>( + object: I, + ): APIV1PlaylistPresentationItem { + const message = createBaseAPIV1PlaylistPresentationItem(); + message.presentationUuid = object.presentationUuid ?? ""; + return message; + }, +}; + +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; + +export type DeepPartial = T extends Builtin ? T + : T extends globalThis.Array ? globalThis.Array> + : T extends ReadonlyArray ? ReadonlyArray> + : T extends {} ? { [K in keyof T]?: DeepPartial } + : Partial; + +type KeysOfUnion = T extends T ? keyof T : never; +export type Exact = P extends Builtin ? P + : P & { [K in keyof P]: Exact } & { [K in Exclude>]: never }; + +function isSet(value: any): boolean { + return value !== null && value !== undefined; +} diff --git a/proto/proApiV1Prop.ts b/proto/proApiV1Prop.ts index 98f40e3..469d930 100644 --- a/proto/proApiV1Prop.ts +++ b/proto/proApiV1Prop.ts @@ -80,7 +80,7 @@ export const APIV1PropData = { if (message.id !== undefined) { APIV1Identifier.encode(message.id, writer.uint32(10).fork()).ldelim(); } - if (message.isActive === true) { + if (message.isActive !== false) { writer.uint32(16).bool(message.isActive); } return writer; @@ -131,7 +131,7 @@ export const APIV1PropData = { if (message.id !== undefined) { obj.id = APIV1Identifier.toJSON(message.id); } - if (message.isActive === true) { + if (message.isActive !== false) { obj.isActive = message.isActive; } return obj; @@ -1387,7 +1387,7 @@ export const APIV1PropResponse_GetThumbnail = { }; function bytesFromBase64(b64: string): Uint8Array { - if (globalThis.Buffer) { + if ((globalThis as any).Buffer) { return Uint8Array.from(globalThis.Buffer.from(b64, 'base64')); } else { const bin = globalThis.atob(b64); @@ -1400,7 +1400,7 @@ function bytesFromBase64(b64: string): Uint8Array { } function base64FromBytes(arr: Uint8Array): string { - if (globalThis.Buffer) { + if ((globalThis as any).Buffer) { return globalThis.Buffer.from(arr).toString('base64'); } else { const bin: string[] = []; diff --git a/proto/proApiV1Stage.ts b/proto/proApiV1Stage.ts index 5976def..b2724d8 100644 --- a/proto/proApiV1Stage.ts +++ b/proto/proApiV1Stage.ts @@ -2552,7 +2552,7 @@ export const APIV1StageResponse_GetLayoutThumbnail = { }; function bytesFromBase64(b64: string): Uint8Array { - if (globalThis.Buffer) { + if ((globalThis as any).Buffer) { return Uint8Array.from(globalThis.Buffer.from(b64, 'base64')); } else { const bin = globalThis.atob(b64); @@ -2565,7 +2565,7 @@ function bytesFromBase64(b64: string): Uint8Array { } function base64FromBytes(arr: Uint8Array): string { - if (globalThis.Buffer) { + if ((globalThis as any).Buffer) { return globalThis.Buffer.from(arr).toString('base64'); } else { const bin: string[] = []; diff --git a/proto/proApiV1Status.ts b/proto/proApiV1Status.ts index 376ef7b..d3b03ff 100644 --- a/proto/proApiV1Status.ts +++ b/proto/proApiV1Status.ts @@ -703,7 +703,7 @@ export const APIV1StatusRequest_PutStageScreens = { message: APIV1StatusRequest_PutStageScreens, writer: _m0.Writer = _m0.Writer.create(), ): _m0.Writer { - if (message.enabled === true) { + if (message.enabled !== false) { writer.uint32(8).bool(message.enabled); } return writer; @@ -746,7 +746,7 @@ export const APIV1StatusRequest_PutStageScreens = { toJSON(message: APIV1StatusRequest_PutStageScreens): unknown { const obj: any = {}; - if (message.enabled === true) { + if (message.enabled !== false) { obj.enabled = message.enabled; } return obj; @@ -831,7 +831,7 @@ export const APIV1StatusRequest_PutAudienceScreens = { message: APIV1StatusRequest_PutAudienceScreens, writer: _m0.Writer = _m0.Writer.create(), ): _m0.Writer { - if (message.enabled === true) { + if (message.enabled !== false) { writer.uint32(8).bool(message.enabled); } return writer; @@ -874,7 +874,7 @@ export const APIV1StatusRequest_PutAudienceScreens = { toJSON(message: APIV1StatusRequest_PutAudienceScreens): unknown { const obj: any = {}; - if (message.enabled === true) { + if (message.enabled !== false) { obj.enabled = message.enabled; } return obj; @@ -1289,25 +1289,25 @@ export const APIV1StatusResponse_GetLayers = { message: APIV1StatusResponse_GetLayers, writer: _m0.Writer = _m0.Writer.create(), ): _m0.Writer { - if (message.videoInput === true) { + if (message.videoInput !== false) { writer.uint32(8).bool(message.videoInput); } - if (message.media === true) { + if (message.media !== false) { writer.uint32(16).bool(message.media); } - if (message.slide === true) { + if (message.slide !== false) { writer.uint32(24).bool(message.slide); } - if (message.announcements === true) { + if (message.announcements !== false) { writer.uint32(32).bool(message.announcements); } - if (message.props === true) { + if (message.props !== false) { writer.uint32(40).bool(message.props); } - if (message.messages === true) { + if (message.messages !== false) { writer.uint32(48).bool(message.messages); } - if (message.audio === true) { + if (message.audio !== false) { writer.uint32(56).bool(message.audio); } return writer; @@ -1402,25 +1402,25 @@ export const APIV1StatusResponse_GetLayers = { toJSON(message: APIV1StatusResponse_GetLayers): unknown { const obj: any = {}; - if (message.videoInput === true) { + if (message.videoInput !== false) { obj.videoInput = message.videoInput; } - if (message.media === true) { + if (message.media !== false) { obj.media = message.media; } - if (message.slide === true) { + if (message.slide !== false) { obj.slide = message.slide; } - if (message.announcements === true) { + if (message.announcements !== false) { obj.announcements = message.announcements; } - if (message.props === true) { + if (message.props !== false) { obj.props = message.props; } - if (message.messages === true) { + if (message.messages !== false) { obj.messages = message.messages; } - if (message.audio === true) { + if (message.audio !== false) { obj.audio = message.audio; } return obj; @@ -1455,7 +1455,7 @@ export const APIV1StatusResponse_GetStageScreens = { message: APIV1StatusResponse_GetStageScreens, writer: _m0.Writer = _m0.Writer.create(), ): _m0.Writer { - if (message.enabled === true) { + if (message.enabled !== false) { writer.uint32(8).bool(message.enabled); } return writer; @@ -1498,7 +1498,7 @@ export const APIV1StatusResponse_GetStageScreens = { toJSON(message: APIV1StatusResponse_GetStageScreens): unknown { const obj: any = {}; - if (message.enabled === true) { + if (message.enabled !== false) { obj.enabled = message.enabled; } return obj; @@ -1581,7 +1581,7 @@ export const APIV1StatusResponse_GetAudienceScreens = { message: APIV1StatusResponse_GetAudienceScreens, writer: _m0.Writer = _m0.Writer.create(), ): _m0.Writer { - if (message.enabled === true) { + if (message.enabled !== false) { writer.uint32(8).bool(message.enabled); } return writer; @@ -1624,7 +1624,7 @@ export const APIV1StatusResponse_GetAudienceScreens = { toJSON(message: APIV1StatusResponse_GetAudienceScreens): unknown { const obj: any = {}; - if (message.enabled === true) { + if (message.enabled !== false) { obj.enabled = message.enabled; } return obj; diff --git a/proto/proApiV1Theme.ts b/proto/proApiV1Theme.ts index 1c2109b..a7497dd 100644 --- a/proto/proApiV1Theme.ts +++ b/proto/proApiV1Theme.ts @@ -2407,7 +2407,7 @@ export const APIV1ThemeResponse_GetThemeSlideThumbnail = { }; function bytesFromBase64(b64: string): Uint8Array { - if (globalThis.Buffer) { + if ((globalThis as any).Buffer) { return Uint8Array.from(globalThis.Buffer.from(b64, 'base64')); } else { const bin = globalThis.atob(b64); @@ -2420,7 +2420,7 @@ function bytesFromBase64(b64: string): Uint8Array { } function base64FromBytes(arr: Uint8Array): string { - if (globalThis.Buffer) { + if ((globalThis as any).Buffer) { return globalThis.Buffer.from(arr).toString('base64'); } else { const bin: string[] = []; diff --git a/proto/proApiV1Timer.ts b/proto/proApiV1Timer.ts index 408c3ab..e8f7ef4 100644 --- a/proto/proApiV1Timer.ts +++ b/proto/proApiV1Timer.ts @@ -596,7 +596,7 @@ export const APIV1Timer = { if (message.id !== undefined) { APIV1Identifier.encode(message.id, writer.uint32(10).fork()).ldelim(); } - if (message.allowsOverrun === true) { + if (message.allowsOverrun !== false) { writer.uint32(16).bool(message.allowsOverrun); } if (message.countdown !== undefined) { @@ -704,7 +704,7 @@ export const APIV1Timer = { if (message.id !== undefined) { obj.id = APIV1Identifier.toJSON(message.id); } - if (message.allowsOverrun === true) { + if (message.allowsOverrun !== false) { obj.allowsOverrun = message.allowsOverrun; } if (message.countdown !== undefined) { @@ -927,7 +927,7 @@ export const APIV1Timer_APIV1TimerElapsed = { if (message.endTime !== 0) { writer.uint32(16).int32(message.endTime); } - if (message.hasEndTime === true) { + if (message.hasEndTime !== false) { writer.uint32(24).bool(message.hasEndTime); } return writer; @@ -994,7 +994,7 @@ export const APIV1Timer_APIV1TimerElapsed = { if (message.endTime !== 0) { obj.endTime = Math.round(message.endTime); } - if (message.hasEndTime === true) { + if (message.hasEndTime !== false) { obj.hasEndTime = message.hasEndTime; } return obj; @@ -1488,7 +1488,7 @@ export const APIV1TimerRequest_CreateTimer = { if (message.name !== '') { writer.uint32(10).string(message.name); } - if (message.allowsOverrun === true) { + if (message.allowsOverrun !== false) { writer.uint32(16).bool(message.allowsOverrun); } if (message.countdown !== undefined) { @@ -1599,7 +1599,7 @@ export const APIV1TimerRequest_CreateTimer = { if (message.name !== '') { obj.name = message.name; } - if (message.allowsOverrun === true) { + if (message.allowsOverrun !== false) { obj.allowsOverrun = message.allowsOverrun; } if (message.countdown !== undefined) { diff --git a/proto/proApiV1Transport.ts b/proto/proApiV1Transport.ts index fff5459..ca2285c 100644 --- a/proto/proApiV1Transport.ts +++ b/proto/proApiV1Transport.ts @@ -1975,7 +1975,7 @@ export const APIV1TransportResponse_GetAutoAdvance = { message: APIV1TransportResponse_GetAutoAdvance, writer: _m0.Writer = _m0.Writer.create(), ): _m0.Writer { - if (message.autoAdvance === true) { + if (message.autoAdvance !== false) { writer.uint32(8).bool(message.autoAdvance); } return writer; @@ -2018,7 +2018,7 @@ export const APIV1TransportResponse_GetAutoAdvance = { toJSON(message: APIV1TransportResponse_GetAutoAdvance): unknown { const obj: any = {}; - if (message.autoAdvance === true) { + if (message.autoAdvance !== false) { obj.autoAdvance = message.autoAdvance; } return obj; @@ -2112,7 +2112,7 @@ export const APIV1TransportResponse_GetCurrentMedia = { message: APIV1TransportResponse_GetCurrentMedia, writer: _m0.Writer = _m0.Writer.create(), ): _m0.Writer { - if (message.isPlaying === true) { + if (message.isPlaying !== false) { writer.uint32(8).bool(message.isPlaying); } if (message.uuid !== undefined) { @@ -2124,7 +2124,7 @@ export const APIV1TransportResponse_GetCurrentMedia = { if (message.artist !== '') { writer.uint32(34).string(message.artist); } - if (message.audioOnly === true) { + if (message.audioOnly !== false) { writer.uint32(40).bool(message.audioOnly); } if (message.duration !== 0) { @@ -2212,7 +2212,7 @@ export const APIV1TransportResponse_GetCurrentMedia = { toJSON(message: APIV1TransportResponse_GetCurrentMedia): unknown { const obj: any = {}; - if (message.isPlaying === true) { + if (message.isPlaying !== false) { obj.isPlaying = message.isPlaying; } if (message.uuid !== undefined) { @@ -2224,7 +2224,7 @@ export const APIV1TransportResponse_GetCurrentMedia = { if (message.artist !== '') { obj.artist = message.artist; } - if (message.audioOnly === true) { + if (message.audioOnly !== false) { obj.audioOnly = message.audioOnly; } if (message.duration !== 0) { diff --git a/proto/proAudienceLook.proto b/proto/proAudienceLook.proto index a13725a..223c202 100644 --- a/proto/proAudienceLook.proto +++ b/proto/proAudienceLook.proto @@ -28,6 +28,7 @@ message ProAudienceLook { string name = 2; repeated .rv.data.ProAudienceLook.ProScreenLook screen_looks = 3; .rv.data.UUID original_look_uuid = 4; + double transition_duration = 5; } message AudienceLookCollection { diff --git a/proto/proAudienceLook.ts b/proto/proAudienceLook.ts index 959cbed..b5f7c26 100644 --- a/proto/proAudienceLook.ts +++ b/proto/proAudienceLook.ts @@ -10,6 +10,7 @@ export interface ProAudienceLook { name: string; screenLooks: ProAudienceLook_ProScreenLook[]; originalLookUuid: UUID | undefined; + transitionDuration: number; } export interface ProAudienceLook_ProScreenLook { @@ -36,6 +37,7 @@ function createBaseProAudienceLook(): ProAudienceLook { name: '', screenLooks: [], originalLookUuid: undefined, + transitionDuration: 0, }; } @@ -59,6 +61,9 @@ export const ProAudienceLook = { if (message.originalLookUuid !== undefined) { UUID.encode(message.originalLookUuid, writer.uint32(34).fork()).ldelim(); } + if (message.transitionDuration !== 0) { + writer.uint32(41).double(message.transitionDuration); + } return writer; }, @@ -100,6 +105,13 @@ export const ProAudienceLook = { message.originalLookUuid = UUID.decode(reader, reader.uint32()); continue; + case 5: + if (tag !== 41) { + break; + } + + message.transitionDuration = reader.double(); + continue; } if ((tag & 7) === 4 || tag === 0) { break; @@ -121,6 +133,9 @@ export const ProAudienceLook = { originalLookUuid: isSet(object.originalLookUuid) ? UUID.fromJSON(object.originalLookUuid) : undefined, + transitionDuration: isSet(object.transitionDuration) + ? globalThis.Number(object.transitionDuration) + : 0, }; }, @@ -140,6 +155,9 @@ export const ProAudienceLook = { if (message.originalLookUuid !== undefined) { obj.originalLookUuid = UUID.toJSON(message.originalLookUuid); } + if (message.transitionDuration !== 0) { + obj.transitionDuration = message.transitionDuration; + } return obj; }, @@ -165,6 +183,7 @@ export const ProAudienceLook = { object.originalLookUuid !== undefined && object.originalLookUuid !== null ? UUID.fromPartial(object.originalLookUuid) : undefined; + message.transitionDuration = object.transitionDuration ?? 0; return message; }, }; @@ -193,13 +212,13 @@ export const ProAudienceLook_ProScreenLook = { if (message.proScreenUuid !== undefined) { UUID.encode(message.proScreenUuid, writer.uint32(10).fork()).ldelim(); } - if (message.propsEnabled === true) { + if (message.propsEnabled !== false) { writer.uint32(16).bool(message.propsEnabled); } - if (message.liveVideoEnabled === true) { + if (message.liveVideoEnabled !== false) { writer.uint32(24).bool(message.liveVideoEnabled); } - if (message.presentationBackgroundEnabled === true) { + if (message.presentationBackgroundEnabled !== false) { writer.uint32(32).bool(message.presentationBackgroundEnabled); } if (message.templateDocumentFilePath !== undefined) { @@ -211,19 +230,19 @@ export const ProAudienceLook_ProScreenLook = { if (message.templateSlideUuid !== undefined) { UUID.encode(message.templateSlideUuid, writer.uint32(50).fork()).ldelim(); } - if (message.presentationForegroundEnabled === true) { + if (message.presentationForegroundEnabled !== false) { writer.uint32(56).bool(message.presentationForegroundEnabled); } if (message.maskUuid !== undefined) { UUID.encode(message.maskUuid, writer.uint32(66).fork()).ldelim(); } - if (message.announcementsEnabled === true) { + if (message.announcementsEnabled !== false) { writer.uint32(72).bool(message.announcementsEnabled); } - if (message.propsLayerEnabled === true) { + if (message.propsLayerEnabled !== false) { writer.uint32(80).bool(message.propsLayerEnabled); } - if (message.messagesLayerEnabled === true) { + if (message.messagesLayerEnabled !== false) { writer.uint32(88).bool(message.messagesLayerEnabled); } return writer; @@ -372,13 +391,13 @@ export const ProAudienceLook_ProScreenLook = { if (message.proScreenUuid !== undefined) { obj.proScreenUuid = UUID.toJSON(message.proScreenUuid); } - if (message.propsEnabled === true) { + if (message.propsEnabled !== false) { obj.propsEnabled = message.propsEnabled; } - if (message.liveVideoEnabled === true) { + if (message.liveVideoEnabled !== false) { obj.liveVideoEnabled = message.liveVideoEnabled; } - if (message.presentationBackgroundEnabled === true) { + if (message.presentationBackgroundEnabled !== false) { obj.presentationBackgroundEnabled = message.presentationBackgroundEnabled; } if (message.templateDocumentFilePath !== undefined) { @@ -389,19 +408,19 @@ export const ProAudienceLook_ProScreenLook = { if (message.templateSlideUuid !== undefined) { obj.templateSlideUuid = UUID.toJSON(message.templateSlideUuid); } - if (message.presentationForegroundEnabled === true) { + if (message.presentationForegroundEnabled !== false) { obj.presentationForegroundEnabled = message.presentationForegroundEnabled; } if (message.maskUuid !== undefined) { obj.maskUuid = UUID.toJSON(message.maskUuid); } - if (message.announcementsEnabled === true) { + if (message.announcementsEnabled !== false) { obj.announcementsEnabled = message.announcementsEnabled; } - if (message.propsLayerEnabled === true) { + if (message.propsLayerEnabled !== false) { obj.propsLayerEnabled = message.propsLayerEnabled; } - if (message.messagesLayerEnabled === true) { + if (message.messagesLayerEnabled !== false) { obj.messagesLayerEnabled = message.messagesLayerEnabled; } return obj; diff --git a/proto/proClockSource.proto b/proto/proClockSource.proto new file mode 100755 index 0000000..d1e4d3e --- /dev/null +++ b/proto/proClockSource.proto @@ -0,0 +1,22 @@ +syntax = "proto3"; + +package rv.data; + +option cc_enable_arenas = true; +option csharp_namespace = "Pro.SerializationInterop.RVProtoData"; +option swift_prefix = "RVData_"; + +message ProClockSource { + enum Type { + TYPE_UNKOWN = 0; + TYPE_INPUT = 1; + TYPE_OUTPUT = 2; + } + + string uuid = 1; + string name = 2; + bool connected = 3; + bool active = 4; + .rv.data.ProClockSource.Type type = 5; +} + diff --git a/proto/proClockSource.ts b/proto/proClockSource.ts new file mode 100644 index 0000000..f4324f6 --- /dev/null +++ b/proto/proClockSource.ts @@ -0,0 +1,186 @@ +/* eslint-disable */ +import _m0 from "protobufjs/minimal"; + +export const protobufPackage = "rv.data"; + +export interface ProClockSource { + uuid: string; + name: string; + connected: boolean; + active: boolean; + type: ProClockSource_Type; +} + +export enum ProClockSource_Type { + TYPE_UNKOWN = 0, + TYPE_INPUT = 1, + TYPE_OUTPUT = 2, + UNRECOGNIZED = -1, +} + +export function proClockSource_TypeFromJSON(object: any): ProClockSource_Type { + switch (object) { + case 0: + case "TYPE_UNKOWN": + return ProClockSource_Type.TYPE_UNKOWN; + case 1: + case "TYPE_INPUT": + return ProClockSource_Type.TYPE_INPUT; + case 2: + case "TYPE_OUTPUT": + return ProClockSource_Type.TYPE_OUTPUT; + case -1: + case "UNRECOGNIZED": + default: + return ProClockSource_Type.UNRECOGNIZED; + } +} + +export function proClockSource_TypeToJSON(object: ProClockSource_Type): string { + switch (object) { + case ProClockSource_Type.TYPE_UNKOWN: + return "TYPE_UNKOWN"; + case ProClockSource_Type.TYPE_INPUT: + return "TYPE_INPUT"; + case ProClockSource_Type.TYPE_OUTPUT: + return "TYPE_OUTPUT"; + case ProClockSource_Type.UNRECOGNIZED: + default: + return "UNRECOGNIZED"; + } +} + +function createBaseProClockSource(): ProClockSource { + return { uuid: "", name: "", connected: false, active: false, type: 0 }; +} + +export const ProClockSource = { + encode(message: ProClockSource, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.uuid !== "") { + writer.uint32(10).string(message.uuid); + } + if (message.name !== "") { + writer.uint32(18).string(message.name); + } + if (message.connected !== false) { + writer.uint32(24).bool(message.connected); + } + if (message.active !== false) { + writer.uint32(32).bool(message.active); + } + if (message.type !== 0) { + writer.uint32(40).int32(message.type); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): ProClockSource { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseProClockSource(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } + + message.uuid = reader.string(); + continue; + case 2: + if (tag !== 18) { + break; + } + + message.name = reader.string(); + continue; + case 3: + if (tag !== 24) { + break; + } + + message.connected = reader.bool(); + continue; + case 4: + if (tag !== 32) { + break; + } + + message.active = reader.bool(); + continue; + case 5: + if (tag !== 40) { + break; + } + + message.type = reader.int32() as any; + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(object: any): ProClockSource { + return { + uuid: isSet(object.uuid) ? globalThis.String(object.uuid) : "", + name: isSet(object.name) ? globalThis.String(object.name) : "", + connected: isSet(object.connected) ? globalThis.Boolean(object.connected) : false, + active: isSet(object.active) ? globalThis.Boolean(object.active) : false, + type: isSet(object.type) ? proClockSource_TypeFromJSON(object.type) : 0, + }; + }, + + toJSON(message: ProClockSource): unknown { + const obj: any = {}; + if (message.uuid !== "") { + obj.uuid = message.uuid; + } + if (message.name !== "") { + obj.name = message.name; + } + if (message.connected !== false) { + obj.connected = message.connected; + } + if (message.active !== false) { + obj.active = message.active; + } + if (message.type !== 0) { + obj.type = proClockSource_TypeToJSON(message.type); + } + return obj; + }, + + create, I>>(base?: I): ProClockSource { + return ProClockSource.fromPartial(base ?? ({} as any)); + }, + fromPartial, I>>(object: I): ProClockSource { + const message = createBaseProClockSource(); + message.uuid = object.uuid ?? ""; + message.name = object.name ?? ""; + message.connected = object.connected ?? false; + message.active = object.active ?? false; + message.type = object.type ?? 0; + return message; + }, +}; + +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; + +export type DeepPartial = T extends Builtin ? T + : T extends globalThis.Array ? globalThis.Array> + : T extends ReadonlyArray ? ReadonlyArray> + : T extends {} ? { [K in keyof T]?: DeepPartial } + : Partial; + +type KeysOfUnion = T extends T ? keyof T : never; +export type Exact = P extends Builtin ? P + : P & { [K in keyof P]: Exact } & { [K in Exclude>]: never }; + +function isSet(value: any): boolean { + return value !== null && value !== undefined; +} diff --git a/proto/proCore.proto b/proto/proCore.proto index ffccb7a..2f041cd 100644 --- a/proto/proCore.proto +++ b/proto/proCore.proto @@ -16,8 +16,11 @@ import "input.proto"; import "macros.proto"; import "messages.proto"; import "playlist.proto"; +import "preferences.proto"; import "presentation.proto"; +import "proCoreTestPatterns.proto"; import "propDocument.proto"; +import "propresenter.proto"; import "slide.proto"; import "recording.proto"; import "stage.proto"; @@ -28,6 +31,7 @@ import "proworkspace.proto"; import "digitalAudio.proto"; import "proAudienceLook.proto"; import "proMask.proto"; +import "timedPlayback.proto"; message MediaMetadataRequestInfo { string file_path = 1; @@ -73,23 +77,6 @@ message MediaMetadataRequestResponse { .rv.data.MediaMetadataRequestResponse.BitmapInfo generated_bitmap_info = 2; } -message TriggerSource { - message Library { - string path = 1; - string presentation_name = 2; - } - - message Playlist { - .rv.data.UUID identifier = 1; - .rv.data.UUID item_identifier = 2; - } - - oneof Location { - .rv.data.TriggerSource.Library library_location = 1; - .rv.data.TriggerSource.Playlist playlist_location = 2; - } -} - message NetworkIdentifier { message IndexOrName { oneof Component { @@ -113,6 +100,7 @@ message TriggerOptions { double start_position = 9; .rv.data.TriggerSource trigger_source = 10; .rv.data.NetworkIdentifier network_identifier = 11; + bool request_client_context = 12; } message ControlTransport { @@ -168,6 +156,7 @@ message ControlTransport { message SetScaleModeControlType { .rv.data.Media.ScaleBehavior mode = 1; + bool is_blurred = 3; .rv.data.Media.ScaleAlignment alignment = 2; } @@ -295,129 +284,24 @@ message TextSegmentRequest { double start_position = 2; } -message ProClockSource { - enum Type { - TYPE_UNKOWN = 0; - TYPE_INPUT = 1; - TYPE_OUTPUT = 2; - } - - string uuid = 1; - string name = 2; - bool connected = 3; - bool active = 4; - .rv.data.ProClockSource.Type type = 5; -} - -message TimedPlayback { - message Sequence { - message SequenceItem { - .rv.data.UUID identifier = 1; - double time = 2; - .rv.data.TriggerSource trigger_source = 3; - .rv.data.Action.ContentDestination content_destination = 4; - double end_time = 7; - oneof Item { - .rv.data.Cue cue = 5; - .rv.data.Action action = 6; - } - } - - repeated .rv.data.TimedPlayback.Sequence.SequenceItem sequence = 1; - .rv.data.Action.ContentDestination content_destination = 2; - .rv.data.Presentation presentation = 3; - } - - message Timing { - message LayerTransport { - int32 layer = 1; - } - - message SMPTETimecode { - enum Format { - FORMAT_24_FPS = 0; - FORMAT_25_FPS = 1; - FORMAT_29_97_FPS = 2; - FORMAT_30_FPS = 3; - } - - string device_identifier = 1; - int32 channel = 2; - .rv.data.TimedPlayback.Timing.SMPTETimecode.Format format = 3; - double offset = 4; - } - - message Internal { - double duration = 1; - bool should_loop = 2; - } - - oneof Source { - .rv.data.TimedPlayback.Timing.LayerTransport layer_transport = 1; - .rv.data.TimedPlayback.Timing.SMPTETimecode smpte_timecode = 2; - .rv.data.TimedPlayback.Timing.Internal internal = 3; - } - } - - message Update { - message Play { - } - - message Record { - bool is_recording = 1; - } - - message Pause { - } - - message Reset { - } - - message JumpToTime { - double time = 1; - } - - message StartScrub { - double time = 1; - } - - message EndScrub { - double time = 2; - } - - message Duration { - double duration = 1; - } - - message Loop { - bool loop = 1; - } - - message MonitorSource { - bool enable = 1; - } - - oneof ActionType { - .rv.data.TimedPlayback.Update.Play play = 1; - .rv.data.TimedPlayback.Update.Record record = 2; - .rv.data.TimedPlayback.Update.Pause pause = 3; - .rv.data.TimedPlayback.Update.Reset reset = 4; - .rv.data.TimedPlayback.Update.JumpToTime jump_to_time = 5; - .rv.data.TimedPlayback.Update.StartScrub start_scrub = 6; - .rv.data.TimedPlayback.Update.EndScrub end_scrub = 7; - .rv.data.TimedPlayback.Update.Duration duration = 8; - .rv.data.TimedPlayback.Update.Loop loop = 9; - .rv.data.TimedPlayback.Sequence update_sequence = 10; - .rv.data.TimedPlayback.Update.MonitorSource monitor_source = 11; - } +message TriggerCue { + message PresentationCue { + .rv.data.Presentation presentation = 1; + .rv.data.UUID arrangement_id = 2; + int32 cue_index = 3; } - .rv.data.TimedPlayback.Sequence sequence = 1; - .rv.data.TimedPlayback.Timing timing = 2; + uint64 trigger_handle = 1; + .rv.data.TriggerOptions trigger_options = 2; + .rv.data.Cue cue = 3; + .rv.data.TriggerCue.PresentationCue presentation = 4; + .rv.data.Playlist playlist = 5; + uint64 client_data = 6; } message NetworkTriggerDataItem { .rv.data.TriggerOptions trigger_options = 3; + .rv.data.TriggerCue trigger_cue = 4; oneof Type { .rv.data.Action action = 1; .rv.data.Cue cue = 2; @@ -453,21 +337,6 @@ message ValidateEncoderResponse { bool is_valid = 1; } -message TriggerCue { - message PresentationCue { - .rv.data.Presentation presentation = 1; - .rv.data.UUID arrangement_id = 2; - int32 cue_index = 3; - } - - uint64 trigger_handle = 1; - .rv.data.TriggerOptions trigger_options = 2; - .rv.data.Cue cue = 3; - .rv.data.TriggerCue.PresentationCue presentation = 4; - .rv.data.Playlist playlist = 5; - uint64 client_data = 6; -} - message CaptureActionRequest { message StartResi { } @@ -507,6 +376,18 @@ message CaptureActionResponse { } } +message MacroIcons { + message MacroIcon { + .rv.data.MacrosDocument.Macro.ImageType image_type = 1; + bytes image_data = 2; + } + + repeated .rv.data.MacroIcons.MacroIcon icons = 1; +} + +message GenericEvent { +} + message SendData { int32 message_id = 1; oneof MessageType { @@ -526,6 +407,22 @@ message SendData { .rv.data.Recording.SettingsDocument recording_settings_document = 15; .rv.data.CaptureActionResponse capture_action_response = 16; .rv.data.CopyrightLayout copyright_layout = 17; + .rv.data.Transition global_background_transition = 18; + .rv.data.Transition global_messages_transition = 19; + .rv.data.Transition global_foreground_transition = 20; + .rv.data.Transition global_bible_transition = 21; + .rv.data.Transition global_props_transition = 22; + .rv.data.Transition global_audio_transition = 23; + .rv.data.Preferences preferences = 24; + .rv.data.TestPatternRequest test_pattern = 25; + .rv.data.GenericEvent startup_complete = 26; + .rv.data.PlaylistDocument visual_playlist_doc = 27; + .rv.data.PlaylistDocument audio_playlist_doc = 28; + .rv.data.GenericEvent kill_watchdog = 29; + .rv.data.MacroIcons macro_icons = 30; + .rv.data.GenericEvent debug_trigger_data_dump = 31; + .rv.data.PlaylistDocument library_playlist_doc = 32; + .rv.data.UUID audio_playlist_focus_uuid = 33; } } @@ -544,6 +441,7 @@ message TimerRuntimeState { bool is_running = 4; bool has_overrun = 5; .rv.data.TimerRuntimeState.ResourceState state = 6; + double current_time = 7; } message TimerStateUpdate { @@ -551,12 +449,25 @@ message TimerStateUpdate { .rv.data.TimerRuntimeState state = 2; } +message HandledException { + string description = 1; +} + +message CoreDataStateDump { + .rv.data.MacrosDocument macros = 1; +} + message SendDataResponse { int32 message_id = 1; oneof MessageType { .rv.data.ValidateEncoderResponse validate_encoder_response = 2; .rv.data.TimerStateUpdate timer_state = 3; .rv.data.CaptureActionRequest capture_action_request = 4; + .rv.data.TestPatternResponse test_pattern = 5; + .rv.data.HandledException handled_exception = 6; + .rv.data.CoreDataStateDump test_state_dump = 7; + .rv.data.UUID audio_playlist_focus_uuid = 8; + .rv.data.UUID audio_playlist_item_triggered_uuid = 9; } } @@ -604,13 +515,13 @@ message TriggerTransferRenderState { message SlideState { .rv.data.Presentation presentation = 1; - .rv.data.UUID playlist_uuid = 2; - string playlist_name = 3; - .rv.data.UUID current_cue = 4; - .rv.data.UUID next_cue = 5; - .rv.data.TriggerTransferRenderState.AutoAdvanceState auto_advance = 6; - .rv.data.TriggerTransferRenderState.TimelineState timeline_state = 7; - int32 current_cue_index = 8; + .rv.data.Playlist playlist = 2; + .rv.data.UUID current_cue = 3; + .rv.data.UUID next_cue = 4; + .rv.data.TriggerTransferRenderState.AutoAdvanceState auto_advance = 5; + .rv.data.TriggerTransferRenderState.TimelineState timeline_state = 6; + int32 current_cue_index = 7; + int32 current_playlist_index = 8; } message TimecodeState { diff --git a/proto/proCore.ts b/proto/proCore.ts index 0db564a..e88e99c 100644 --- a/proto/proCore.ts +++ b/proto/proCore.ts @@ -14,7 +14,7 @@ import { AlphaType, alphaTypeFromJSON, alphaTypeToJSON } from './alphaType'; import { CCLIDocument, CopyrightLayout } from './ccli'; import { Cue } from './cue'; import { DigitalAudio_Setup } from './digitalAudio'; -import { Effect } from './effects'; +import { Effect, Transition } from './effects'; import { Graphics_BackgroundEffect, Graphics_EdgeInsets, @@ -33,13 +33,21 @@ import { media_ScaleBehaviorToJSON, } from './graphicsData'; import { AudioInput, VideoInput } from './input'; -import { MacrosDocument } from './macros'; +import { + MacrosDocument, + MacrosDocument_Macro_ImageType, + macrosDocument_Macro_ImageTypeFromJSON, + macrosDocument_Macro_ImageTypeToJSON, +} from './macros'; import { MessageDocument } from './messages'; import { Playlist } from './playlist'; +import { Preferences } from './preferences'; import { Presentation } from './presentation'; import { AudienceLookCollection, ProAudienceLook } from './proAudienceLook'; +import { TestPatternRequest, TestPatternResponse } from './proCoreTestPatterns'; import { MaskCollection } from './proMask'; import { PropDocument } from './propDocument'; +import { PlaylistDocument } from './propresenter'; import { ProPresenterWorkspace } from './proworkspace'; import { Recording_SettingsDocument, @@ -48,6 +56,7 @@ import { } from './recording'; import { Slide } from './slide'; import { Stage_Document } from './stage'; +import { TriggerSource } from './timedPlayback'; import { Timer, TimersDocument } from './timers'; import { URL } from './url'; import { UUID } from './uuid'; @@ -140,21 +149,6 @@ export interface MediaMetadataRequestResponse_BitmapInfo { height: number; } -export interface TriggerSource { - libraryLocation?: TriggerSource_Library | undefined; - playlistLocation?: TriggerSource_Playlist | undefined; -} - -export interface TriggerSource_Library { - path: string; - presentationName: string; -} - -export interface TriggerSource_Playlist { - identifier: UUID | undefined; - itemIdentifier: UUID | undefined; -} - export interface NetworkIdentifier { identifiers: NetworkIdentifier_IndexOrName[]; } @@ -176,6 +170,7 @@ export interface TriggerOptions { startPosition: number; triggerSource: TriggerSource | undefined; networkIdentifier: NetworkIdentifier | undefined; + requestClientContext: boolean; } export interface ControlTransport { @@ -255,6 +250,7 @@ export interface ControlTransport_MarkOutPointControlType { export interface ControlTransport_SetScaleModeControlType { mode: Media_ScaleBehavior; + isBlurred: boolean; alignment: Media_ScaleAlignment; } @@ -349,195 +345,24 @@ export interface TextSegmentRequest_Segment { size: number; } -export interface ProClockSource { - uuid: string; - name: string; - connected: boolean; - active: boolean; - type: ProClockSource_Type; -} - -export enum ProClockSource_Type { - TYPE_UNKOWN = 0, - TYPE_INPUT = 1, - TYPE_OUTPUT = 2, - UNRECOGNIZED = -1, -} - -export function proClockSource_TypeFromJSON(object: any): ProClockSource_Type { - switch (object) { - case 0: - case 'TYPE_UNKOWN': - return ProClockSource_Type.TYPE_UNKOWN; - case 1: - case 'TYPE_INPUT': - return ProClockSource_Type.TYPE_INPUT; - case 2: - case 'TYPE_OUTPUT': - return ProClockSource_Type.TYPE_OUTPUT; - case -1: - case 'UNRECOGNIZED': - default: - return ProClockSource_Type.UNRECOGNIZED; - } -} - -export function proClockSource_TypeToJSON(object: ProClockSource_Type): string { - switch (object) { - case ProClockSource_Type.TYPE_UNKOWN: - return 'TYPE_UNKOWN'; - case ProClockSource_Type.TYPE_INPUT: - return 'TYPE_INPUT'; - case ProClockSource_Type.TYPE_OUTPUT: - return 'TYPE_OUTPUT'; - case ProClockSource_Type.UNRECOGNIZED: - default: - return 'UNRECOGNIZED'; - } -} - -export interface TimedPlayback { - sequence: TimedPlayback_Sequence | undefined; - timing: TimedPlayback_Timing | undefined; +export interface TriggerCue { + triggerHandle: number; + triggerOptions: TriggerOptions | undefined; + cue: Cue | undefined; + presentation: TriggerCue_PresentationCue | undefined; + playlist: Playlist | undefined; + clientData: number; } -export interface TimedPlayback_Sequence { - sequence: TimedPlayback_Sequence_SequenceItem[]; - contentDestination: Action_ContentDestination; +export interface TriggerCue_PresentationCue { presentation: Presentation | undefined; -} - -export interface TimedPlayback_Sequence_SequenceItem { - identifier: UUID | undefined; - time: number; - triggerSource: TriggerSource | undefined; - contentDestination: Action_ContentDestination; - endTime: number; - cue?: Cue | undefined; - action?: Action | undefined; -} - -export interface TimedPlayback_Timing { - layerTransport?: TimedPlayback_Timing_LayerTransport | undefined; - smpteTimecode?: TimedPlayback_Timing_SMPTETimecode | undefined; - internal?: TimedPlayback_Timing_Internal | undefined; -} - -export interface TimedPlayback_Timing_LayerTransport { - layer: number; -} - -export interface TimedPlayback_Timing_SMPTETimecode { - deviceIdentifier: string; - channel: number; - format: TimedPlayback_Timing_SMPTETimecode_Format; - offset: number; -} - -export enum TimedPlayback_Timing_SMPTETimecode_Format { - FORMAT_24_FPS = 0, - FORMAT_25_FPS = 1, - FORMAT_29_97_FPS = 2, - FORMAT_30_FPS = 3, - UNRECOGNIZED = -1, -} - -export function timedPlayback_Timing_SMPTETimecode_FormatFromJSON( - object: any, -): TimedPlayback_Timing_SMPTETimecode_Format { - switch (object) { - case 0: - case 'FORMAT_24_FPS': - return TimedPlayback_Timing_SMPTETimecode_Format.FORMAT_24_FPS; - case 1: - case 'FORMAT_25_FPS': - return TimedPlayback_Timing_SMPTETimecode_Format.FORMAT_25_FPS; - case 2: - case 'FORMAT_29_97_FPS': - return TimedPlayback_Timing_SMPTETimecode_Format.FORMAT_29_97_FPS; - case 3: - case 'FORMAT_30_FPS': - return TimedPlayback_Timing_SMPTETimecode_Format.FORMAT_30_FPS; - case -1: - case 'UNRECOGNIZED': - default: - return TimedPlayback_Timing_SMPTETimecode_Format.UNRECOGNIZED; - } -} - -export function timedPlayback_Timing_SMPTETimecode_FormatToJSON( - object: TimedPlayback_Timing_SMPTETimecode_Format, -): string { - switch (object) { - case TimedPlayback_Timing_SMPTETimecode_Format.FORMAT_24_FPS: - return 'FORMAT_24_FPS'; - case TimedPlayback_Timing_SMPTETimecode_Format.FORMAT_25_FPS: - return 'FORMAT_25_FPS'; - case TimedPlayback_Timing_SMPTETimecode_Format.FORMAT_29_97_FPS: - return 'FORMAT_29_97_FPS'; - case TimedPlayback_Timing_SMPTETimecode_Format.FORMAT_30_FPS: - return 'FORMAT_30_FPS'; - case TimedPlayback_Timing_SMPTETimecode_Format.UNRECOGNIZED: - default: - return 'UNRECOGNIZED'; - } -} - -export interface TimedPlayback_Timing_Internal { - duration: number; - shouldLoop: boolean; -} - -export interface TimedPlayback_Update { - play?: TimedPlayback_Update_Play | undefined; - record?: TimedPlayback_Update_Record | undefined; - pause?: TimedPlayback_Update_Pause | undefined; - reset?: TimedPlayback_Update_Reset | undefined; - jumpToTime?: TimedPlayback_Update_JumpToTime | undefined; - startScrub?: TimedPlayback_Update_StartScrub | undefined; - endScrub?: TimedPlayback_Update_EndScrub | undefined; - duration?: TimedPlayback_Update_Duration | undefined; - loop?: TimedPlayback_Update_Loop | undefined; - updateSequence?: TimedPlayback_Sequence | undefined; - monitorSource?: TimedPlayback_Update_MonitorSource | undefined; -} - -export interface TimedPlayback_Update_Play {} - -export interface TimedPlayback_Update_Record { - isRecording: boolean; -} - -export interface TimedPlayback_Update_Pause {} - -export interface TimedPlayback_Update_Reset {} - -export interface TimedPlayback_Update_JumpToTime { - time: number; -} - -export interface TimedPlayback_Update_StartScrub { - time: number; -} - -export interface TimedPlayback_Update_EndScrub { - time: number; -} - -export interface TimedPlayback_Update_Duration { - duration: number; -} - -export interface TimedPlayback_Update_Loop { - loop: boolean; -} - -export interface TimedPlayback_Update_MonitorSource { - enable: boolean; + arrangementId: UUID | undefined; + cueIndex: number; } export interface NetworkTriggerDataItem { triggerOptions: TriggerOptions | undefined; + triggerCue: TriggerCue | undefined; action?: Action | undefined; cue?: Cue | undefined; } @@ -611,21 +436,6 @@ export interface ValidateEncoderResponse { isValid: boolean; } -export interface TriggerCue { - triggerHandle: number; - triggerOptions: TriggerOptions | undefined; - cue: Cue | undefined; - presentation: TriggerCue_PresentationCue | undefined; - playlist: Playlist | undefined; - clientData: number; -} - -export interface TriggerCue_PresentationCue { - presentation: Presentation | undefined; - arrangementId: UUID | undefined; - cueIndex: number; -} - export interface CaptureActionRequest { startResi?: CaptureActionRequest_StartResi | undefined; stopCapture?: CaptureActionRequest_StopCapture | undefined; @@ -658,6 +468,17 @@ export interface CaptureActionResponse_StopCapture { stopCapture: boolean; } +export interface MacroIcons { + icons: MacroIcons_MacroIcon[]; +} + +export interface MacroIcons_MacroIcon { + imageType: MacrosDocument_Macro_ImageType; + imageData: Uint8Array; +} + +export interface GenericEvent {} + export interface SendData { messageId: number; workspace?: ProPresenterWorkspace | undefined; @@ -676,6 +497,22 @@ export interface SendData { recordingSettingsDocument?: Recording_SettingsDocument | undefined; captureActionResponse?: CaptureActionResponse | undefined; copyrightLayout?: CopyrightLayout | undefined; + globalBackgroundTransition?: Transition | undefined; + globalMessagesTransition?: Transition | undefined; + globalForegroundTransition?: Transition | undefined; + globalBibleTransition?: Transition | undefined; + globalPropsTransition?: Transition | undefined; + globalAudioTransition?: Transition | undefined; + preferences?: Preferences | undefined; + testPattern?: TestPatternRequest | undefined; + startupComplete?: GenericEvent | undefined; + visualPlaylistDoc?: PlaylistDocument | undefined; + audioPlaylistDoc?: PlaylistDocument | undefined; + killWatchdog?: GenericEvent | undefined; + macroIcons?: MacroIcons | undefined; + debugTriggerDataDump?: GenericEvent | undefined; + libraryPlaylistDoc?: PlaylistDocument | undefined; + audioPlaylistFocusUuid?: UUID | undefined; } export interface TimerRuntimeState { @@ -685,6 +522,7 @@ export interface TimerRuntimeState { isRunning: boolean; hasOverrun: boolean; state: TimerRuntimeState_ResourceState; + currentTime: number; } export enum TimerRuntimeState_ResourceState { @@ -747,11 +585,24 @@ export interface TimerStateUpdate { state: TimerRuntimeState | undefined; } +export interface HandledException { + description: string; +} + +export interface CoreDataStateDump { + macros: MacrosDocument | undefined; +} + export interface SendDataResponse { messageId: number; validateEncoderResponse?: ValidateEncoderResponse | undefined; timerState?: TimerStateUpdate | undefined; captureActionRequest?: CaptureActionRequest | undefined; + testPattern?: TestPatternResponse | undefined; + handledException?: HandledException | undefined; + testStateDump?: CoreDataStateDump | undefined; + audioPlaylistFocusUuid?: UUID | undefined; + audioPlaylistItemTriggeredUuid?: UUID | undefined; } export interface TriggerTransferRenderState { @@ -854,13 +705,13 @@ export interface TriggerTransferRenderState_TimelineState { export interface TriggerTransferRenderState_SlideState { presentation: Presentation | undefined; - playlistUuid: UUID | undefined; - playlistName: string; + playlist: Playlist | undefined; currentCue: UUID | undefined; nextCue: UUID | undefined; autoAdvance: TriggerTransferRenderState_AutoAdvanceState | undefined; timelineState: TriggerTransferRenderState_TimelineState | undefined; currentCueIndex: number; + currentPlaylistIndex: number; } export interface TriggerTransferRenderState_TimecodeState { @@ -955,10 +806,10 @@ export const MediaMetadataRequestInfo = { if (message.nativeRotation !== 0) { writer.uint32(56).int32(message.nativeRotation); } - if (message.flippedHorizontally === true) { + if (message.flippedHorizontally !== false) { writer.uint32(64).bool(message.flippedHorizontally); } - if (message.flippedVertically === true) { + if (message.flippedVertically !== false) { writer.uint32(72).bool(message.flippedVertically); } if (message.alphaType !== 0) { @@ -1116,10 +967,10 @@ export const MediaMetadataRequestInfo = { message.nativeRotation, ); } - if (message.flippedHorizontally === true) { + if (message.flippedHorizontally !== false) { obj.flippedHorizontally = message.flippedHorizontally; } - if (message.flippedVertically === true) { + if (message.flippedVertically !== false) { obj.flippedVertically = message.flippedVertically; } if (message.alphaType !== 0) { @@ -1322,7 +1173,7 @@ export const MediaMetadataRequestResponse_Metadata = { if (message.contentType !== 0) { writer.uint32(80).int32(message.contentType); } - if (message.hasAlphaChannel === true) { + if (message.hasAlphaChannel !== false) { writer.uint32(88).bool(message.hasAlphaChannel); } return writer; @@ -1483,7 +1334,7 @@ export const MediaMetadataRequestResponse_Metadata = { message.contentType, ); } - if (message.hasAlphaChannel === true) { + if (message.hasAlphaChannel !== false) { obj.hasAlphaChannel = message.hasAlphaChannel; } return obj; @@ -1602,35 +1453,29 @@ export const MediaMetadataRequestResponse_BitmapInfo = { }, }; -function createBaseTriggerSource(): TriggerSource { - return { libraryLocation: undefined, playlistLocation: undefined }; +function createBaseNetworkIdentifier(): NetworkIdentifier { + return { identifiers: [] }; } -export const TriggerSource = { +export const NetworkIdentifier = { encode( - message: TriggerSource, + message: NetworkIdentifier, writer: _m0.Writer = _m0.Writer.create(), ): _m0.Writer { - if (message.libraryLocation !== undefined) { - TriggerSource_Library.encode( - message.libraryLocation, + for (const v of message.identifiers) { + NetworkIdentifier_IndexOrName.encode( + v!, writer.uint32(10).fork(), ).ldelim(); } - if (message.playlistLocation !== undefined) { - TriggerSource_Playlist.encode( - message.playlistLocation, - writer.uint32(18).fork(), - ).ldelim(); - } return writer; }, - decode(input: _m0.Reader | Uint8Array, length?: number): TriggerSource { + decode(input: _m0.Reader | Uint8Array, length?: number): NetworkIdentifier { const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseTriggerSource(); + const message = createBaseNetworkIdentifier(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { @@ -1639,19 +1484,8 @@ export const TriggerSource = { break; } - message.libraryLocation = TriggerSource_Library.decode( - reader, - reader.uint32(), - ); - continue; - case 2: - if (tag !== 18) { - break; - } - - message.playlistLocation = TriggerSource_Playlist.decode( - reader, - reader.uint32(), + message.identifiers.push( + NetworkIdentifier_IndexOrName.decode(reader, reader.uint32()), ); continue; } @@ -1663,67 +1497,57 @@ export const TriggerSource = { return message; }, - fromJSON(object: any): TriggerSource { + fromJSON(object: any): NetworkIdentifier { return { - libraryLocation: isSet(object.libraryLocation) - ? TriggerSource_Library.fromJSON(object.libraryLocation) - : undefined, - playlistLocation: isSet(object.playlistLocation) - ? TriggerSource_Playlist.fromJSON(object.playlistLocation) - : undefined, + identifiers: globalThis.Array.isArray(object?.identifiers) + ? object.identifiers.map((e: any) => + NetworkIdentifier_IndexOrName.fromJSON(e), + ) + : [], }; }, - toJSON(message: TriggerSource): unknown { + toJSON(message: NetworkIdentifier): unknown { const obj: any = {}; - if (message.libraryLocation !== undefined) { - obj.libraryLocation = TriggerSource_Library.toJSON( - message.libraryLocation, - ); - } - if (message.playlistLocation !== undefined) { - obj.playlistLocation = TriggerSource_Playlist.toJSON( - message.playlistLocation, + if (message.identifiers?.length) { + obj.identifiers = message.identifiers.map((e) => + NetworkIdentifier_IndexOrName.toJSON(e), ); } return obj; }, - create, I>>( + create, I>>( base?: I, - ): TriggerSource { - return TriggerSource.fromPartial(base ?? ({} as any)); + ): NetworkIdentifier { + return NetworkIdentifier.fromPartial(base ?? ({} as any)); }, - fromPartial, I>>( + fromPartial, I>>( object: I, - ): TriggerSource { - const message = createBaseTriggerSource(); - message.libraryLocation = - object.libraryLocation !== undefined && object.libraryLocation !== null - ? TriggerSource_Library.fromPartial(object.libraryLocation) - : undefined; - message.playlistLocation = - object.playlistLocation !== undefined && object.playlistLocation !== null - ? TriggerSource_Playlist.fromPartial(object.playlistLocation) - : undefined; + ): NetworkIdentifier { + const message = createBaseNetworkIdentifier(); + message.identifiers = + object.identifiers?.map((e) => + NetworkIdentifier_IndexOrName.fromPartial(e), + ) || []; return message; }, }; -function createBaseTriggerSource_Library(): TriggerSource_Library { - return { path: '', presentationName: '' }; +function createBaseNetworkIdentifier_IndexOrName(): NetworkIdentifier_IndexOrName { + return { index: undefined, name: undefined }; } -export const TriggerSource_Library = { +export const NetworkIdentifier_IndexOrName = { encode( - message: TriggerSource_Library, + message: NetworkIdentifier_IndexOrName, writer: _m0.Writer = _m0.Writer.create(), ): _m0.Writer { - if (message.path !== '') { - writer.uint32(10).string(message.path); + if (message.index !== undefined) { + writer.uint32(8).int32(message.index); } - if (message.presentationName !== '') { - writer.uint32(18).string(message.presentationName); + if (message.name !== undefined) { + writer.uint32(18).string(message.name); } return writer; }, @@ -1731,27 +1555,27 @@ export const TriggerSource_Library = { decode( input: _m0.Reader | Uint8Array, length?: number, - ): TriggerSource_Library { + ): NetworkIdentifier_IndexOrName { const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseTriggerSource_Library(); + const message = createBaseNetworkIdentifier_IndexOrName(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { case 1: - if (tag !== 10) { + if (tag !== 8) { break; } - message.path = reader.string(); + message.index = reader.int32(); continue; case 2: if (tag !== 18) { break; } - message.presentationName = reader.string(); + message.name = reader.string(); continue; } if ((tag & 7) === 4 || tag === 0) { @@ -1762,345 +1586,83 @@ export const TriggerSource_Library = { return message; }, - fromJSON(object: any): TriggerSource_Library { + fromJSON(object: any): NetworkIdentifier_IndexOrName { return { - path: isSet(object.path) ? globalThis.String(object.path) : '', - presentationName: isSet(object.presentationName) - ? globalThis.String(object.presentationName) - : '', + index: isSet(object.index) ? globalThis.Number(object.index) : undefined, + name: isSet(object.name) ? globalThis.String(object.name) : undefined, }; }, - toJSON(message: TriggerSource_Library): unknown { + toJSON(message: NetworkIdentifier_IndexOrName): unknown { const obj: any = {}; - if (message.path !== '') { - obj.path = message.path; + if (message.index !== undefined) { + obj.index = Math.round(message.index); } - if (message.presentationName !== '') { - obj.presentationName = message.presentationName; + if (message.name !== undefined) { + obj.name = message.name; } return obj; }, - create, I>>( + create, I>>( base?: I, - ): TriggerSource_Library { - return TriggerSource_Library.fromPartial(base ?? ({} as any)); + ): NetworkIdentifier_IndexOrName { + return NetworkIdentifier_IndexOrName.fromPartial(base ?? ({} as any)); }, - fromPartial, I>>( + fromPartial, I>>( object: I, - ): TriggerSource_Library { - const message = createBaseTriggerSource_Library(); - message.path = object.path ?? ''; - message.presentationName = object.presentationName ?? ''; + ): NetworkIdentifier_IndexOrName { + const message = createBaseNetworkIdentifier_IndexOrName(); + message.index = object.index ?? undefined; + message.name = object.name ?? undefined; return message; }, }; -function createBaseTriggerSource_Playlist(): TriggerSource_Playlist { - return { identifier: undefined, itemIdentifier: undefined }; +function createBaseTriggerOptions(): TriggerOptions { + return { + contentDestination: 0, + suppressAutoStartVideo: false, + suppressMediaBackground: false, + forceRetrigger: false, + resetChordChart: false, + fromPlaylistLibrary: false, + fromTimeline: false, + ignoreAnalytics: false, + startPosition: 0, + triggerSource: undefined, + networkIdentifier: undefined, + requestClientContext: false, + }; } -export const TriggerSource_Playlist = { +export const TriggerOptions = { encode( - message: TriggerSource_Playlist, + message: TriggerOptions, writer: _m0.Writer = _m0.Writer.create(), ): _m0.Writer { - if (message.identifier !== undefined) { - UUID.encode(message.identifier, writer.uint32(10).fork()).ldelim(); + if (message.contentDestination !== 0) { + writer.uint32(8).int32(message.contentDestination); } - if (message.itemIdentifier !== undefined) { - UUID.encode(message.itemIdentifier, writer.uint32(18).fork()).ldelim(); + if (message.suppressAutoStartVideo !== false) { + writer.uint32(16).bool(message.suppressAutoStartVideo); } - return writer; - }, - - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): TriggerSource_Playlist { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseTriggerSource_Playlist(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 10) { - break; - } - - message.identifier = UUID.decode(reader, reader.uint32()); - continue; - case 2: - if (tag !== 18) { - break; - } - - message.itemIdentifier = UUID.decode(reader, reader.uint32()); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, - - fromJSON(object: any): TriggerSource_Playlist { - return { - identifier: isSet(object.identifier) - ? UUID.fromJSON(object.identifier) - : undefined, - itemIdentifier: isSet(object.itemIdentifier) - ? UUID.fromJSON(object.itemIdentifier) - : undefined, - }; - }, - - toJSON(message: TriggerSource_Playlist): unknown { - const obj: any = {}; - if (message.identifier !== undefined) { - obj.identifier = UUID.toJSON(message.identifier); - } - if (message.itemIdentifier !== undefined) { - obj.itemIdentifier = UUID.toJSON(message.itemIdentifier); - } - return obj; - }, - - create, I>>( - base?: I, - ): TriggerSource_Playlist { - return TriggerSource_Playlist.fromPartial(base ?? ({} as any)); - }, - fromPartial, I>>( - object: I, - ): TriggerSource_Playlist { - const message = createBaseTriggerSource_Playlist(); - message.identifier = - object.identifier !== undefined && object.identifier !== null - ? UUID.fromPartial(object.identifier) - : undefined; - message.itemIdentifier = - object.itemIdentifier !== undefined && object.itemIdentifier !== null - ? UUID.fromPartial(object.itemIdentifier) - : undefined; - return message; - }, -}; - -function createBaseNetworkIdentifier(): NetworkIdentifier { - return { identifiers: [] }; -} - -export const NetworkIdentifier = { - encode( - message: NetworkIdentifier, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - for (const v of message.identifiers) { - NetworkIdentifier_IndexOrName.encode( - v!, - writer.uint32(10).fork(), - ).ldelim(); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): NetworkIdentifier { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseNetworkIdentifier(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 10) { - break; - } - - message.identifiers.push( - NetworkIdentifier_IndexOrName.decode(reader, reader.uint32()), - ); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, - - fromJSON(object: any): NetworkIdentifier { - return { - identifiers: globalThis.Array.isArray(object?.identifiers) - ? object.identifiers.map((e: any) => - NetworkIdentifier_IndexOrName.fromJSON(e), - ) - : [], - }; - }, - - toJSON(message: NetworkIdentifier): unknown { - const obj: any = {}; - if (message.identifiers?.length) { - obj.identifiers = message.identifiers.map((e) => - NetworkIdentifier_IndexOrName.toJSON(e), - ); - } - return obj; - }, - - create, I>>( - base?: I, - ): NetworkIdentifier { - return NetworkIdentifier.fromPartial(base ?? ({} as any)); - }, - fromPartial, I>>( - object: I, - ): NetworkIdentifier { - const message = createBaseNetworkIdentifier(); - message.identifiers = - object.identifiers?.map((e) => - NetworkIdentifier_IndexOrName.fromPartial(e), - ) || []; - return message; - }, -}; - -function createBaseNetworkIdentifier_IndexOrName(): NetworkIdentifier_IndexOrName { - return { index: undefined, name: undefined }; -} - -export const NetworkIdentifier_IndexOrName = { - encode( - message: NetworkIdentifier_IndexOrName, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.index !== undefined) { - writer.uint32(8).int32(message.index); - } - if (message.name !== undefined) { - writer.uint32(18).string(message.name); - } - return writer; - }, - - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): NetworkIdentifier_IndexOrName { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseNetworkIdentifier_IndexOrName(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 8) { - break; - } - - message.index = reader.int32(); - continue; - case 2: - if (tag !== 18) { - break; - } - - message.name = reader.string(); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, - - fromJSON(object: any): NetworkIdentifier_IndexOrName { - return { - index: isSet(object.index) ? globalThis.Number(object.index) : undefined, - name: isSet(object.name) ? globalThis.String(object.name) : undefined, - }; - }, - - toJSON(message: NetworkIdentifier_IndexOrName): unknown { - const obj: any = {}; - if (message.index !== undefined) { - obj.index = Math.round(message.index); - } - if (message.name !== undefined) { - obj.name = message.name; - } - return obj; - }, - - create, I>>( - base?: I, - ): NetworkIdentifier_IndexOrName { - return NetworkIdentifier_IndexOrName.fromPartial(base ?? ({} as any)); - }, - fromPartial, I>>( - object: I, - ): NetworkIdentifier_IndexOrName { - const message = createBaseNetworkIdentifier_IndexOrName(); - message.index = object.index ?? undefined; - message.name = object.name ?? undefined; - return message; - }, -}; - -function createBaseTriggerOptions(): TriggerOptions { - return { - contentDestination: 0, - suppressAutoStartVideo: false, - suppressMediaBackground: false, - forceRetrigger: false, - resetChordChart: false, - fromPlaylistLibrary: false, - fromTimeline: false, - ignoreAnalytics: false, - startPosition: 0, - triggerSource: undefined, - networkIdentifier: undefined, - }; -} - -export const TriggerOptions = { - encode( - message: TriggerOptions, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.contentDestination !== 0) { - writer.uint32(8).int32(message.contentDestination); - } - if (message.suppressAutoStartVideo === true) { - writer.uint32(16).bool(message.suppressAutoStartVideo); - } - if (message.suppressMediaBackground === true) { + if (message.suppressMediaBackground !== false) { writer.uint32(24).bool(message.suppressMediaBackground); } - if (message.forceRetrigger === true) { + if (message.forceRetrigger !== false) { writer.uint32(32).bool(message.forceRetrigger); } - if (message.resetChordChart === true) { + if (message.resetChordChart !== false) { writer.uint32(40).bool(message.resetChordChart); } - if (message.fromPlaylistLibrary === true) { + if (message.fromPlaylistLibrary !== false) { writer.uint32(48).bool(message.fromPlaylistLibrary); } - if (message.fromTimeline === true) { + if (message.fromTimeline !== false) { writer.uint32(56).bool(message.fromTimeline); } - if (message.ignoreAnalytics === true) { + if (message.ignoreAnalytics !== false) { writer.uint32(64).bool(message.ignoreAnalytics); } if (message.startPosition !== 0) { @@ -2118,6 +1680,9 @@ export const TriggerOptions = { writer.uint32(90).fork(), ).ldelim(); } + if (message.requestClientContext !== false) { + writer.uint32(96).bool(message.requestClientContext); + } return writer; }, @@ -2209,6 +1774,13 @@ export const TriggerOptions = { reader.uint32(), ); continue; + case 12: + if (tag !== 96) { + break; + } + + message.requestClientContext = reader.bool(); + continue; } if ((tag & 7) === 4 || tag === 0) { break; @@ -2253,6 +1825,9 @@ export const TriggerOptions = { networkIdentifier: isSet(object.networkIdentifier) ? NetworkIdentifier.fromJSON(object.networkIdentifier) : undefined, + requestClientContext: isSet(object.requestClientContext) + ? globalThis.Boolean(object.requestClientContext) + : false, }; }, @@ -2263,25 +1838,25 @@ export const TriggerOptions = { message.contentDestination, ); } - if (message.suppressAutoStartVideo === true) { + if (message.suppressAutoStartVideo !== false) { obj.suppressAutoStartVideo = message.suppressAutoStartVideo; } - if (message.suppressMediaBackground === true) { + if (message.suppressMediaBackground !== false) { obj.suppressMediaBackground = message.suppressMediaBackground; } - if (message.forceRetrigger === true) { + if (message.forceRetrigger !== false) { obj.forceRetrigger = message.forceRetrigger; } - if (message.resetChordChart === true) { + if (message.resetChordChart !== false) { obj.resetChordChart = message.resetChordChart; } - if (message.fromPlaylistLibrary === true) { + if (message.fromPlaylistLibrary !== false) { obj.fromPlaylistLibrary = message.fromPlaylistLibrary; } - if (message.fromTimeline === true) { + if (message.fromTimeline !== false) { obj.fromTimeline = message.fromTimeline; } - if (message.ignoreAnalytics === true) { + if (message.ignoreAnalytics !== false) { obj.ignoreAnalytics = message.ignoreAnalytics; } if (message.startPosition !== 0) { @@ -2295,6 +1870,9 @@ export const TriggerOptions = { message.networkIdentifier, ); } + if (message.requestClientContext !== false) { + obj.requestClientContext = message.requestClientContext; + } return obj; }, @@ -2325,6 +1903,7 @@ export const TriggerOptions = { object.networkIdentifier !== null ? NetworkIdentifier.fromPartial(object.networkIdentifier) : undefined; + message.requestClientContext = object.requestClientContext ?? false; return message; }, }; @@ -4135,7 +3714,7 @@ export const ControlTransport_MarkOutPointControlType = { }; function createBaseControlTransport_SetScaleModeControlType(): ControlTransport_SetScaleModeControlType { - return { mode: 0, alignment: 0 }; + return { mode: 0, isBlurred: false, alignment: 0 }; } export const ControlTransport_SetScaleModeControlType = { @@ -4146,6 +3725,9 @@ export const ControlTransport_SetScaleModeControlType = { if (message.mode !== 0) { writer.uint32(8).int32(message.mode); } + if (message.isBlurred !== false) { + writer.uint32(24).bool(message.isBlurred); + } if (message.alignment !== 0) { writer.uint32(16).int32(message.alignment); } @@ -4170,6 +3752,13 @@ export const ControlTransport_SetScaleModeControlType = { message.mode = reader.int32() as any; continue; + case 3: + if (tag !== 24) { + break; + } + + message.isBlurred = reader.bool(); + continue; case 2: if (tag !== 16) { break; @@ -4189,6 +3778,9 @@ export const ControlTransport_SetScaleModeControlType = { fromJSON(object: any): ControlTransport_SetScaleModeControlType { return { mode: isSet(object.mode) ? media_ScaleBehaviorFromJSON(object.mode) : 0, + isBlurred: isSet(object.isBlurred) + ? globalThis.Boolean(object.isBlurred) + : false, alignment: isSet(object.alignment) ? media_ScaleAlignmentFromJSON(object.alignment) : 0, @@ -4200,6 +3792,9 @@ export const ControlTransport_SetScaleModeControlType = { if (message.mode !== 0) { obj.mode = media_ScaleBehaviorToJSON(message.mode); } + if (message.isBlurred !== false) { + obj.isBlurred = message.isBlurred; + } if (message.alignment !== 0) { obj.alignment = media_ScaleAlignmentToJSON(message.alignment); } @@ -4218,6 +3813,7 @@ export const ControlTransport_SetScaleModeControlType = { >(object: I): ControlTransport_SetScaleModeControlType { const message = createBaseControlTransport_SetScaleModeControlType(); message.mode = object.mode ?? 0; + message.isBlurred = object.isBlurred ?? false; message.alignment = object.alignment ?? 0; return message; }, @@ -4232,10 +3828,10 @@ export const ControlTransport_SetFlippedModeControlType = { message: ControlTransport_SetFlippedModeControlType, writer: _m0.Writer = _m0.Writer.create(), ): _m0.Writer { - if (message.horizontal === true) { + if (message.horizontal !== false) { writer.uint32(8).bool(message.horizontal); } - if (message.vertical === true) { + if (message.vertical !== false) { writer.uint32(16).bool(message.vertical); } return writer; @@ -4288,10 +3884,10 @@ export const ControlTransport_SetFlippedModeControlType = { toJSON(message: ControlTransport_SetFlippedModeControlType): unknown { const obj: any = {}; - if (message.horizontal === true) { + if (message.horizontal !== false) { obj.horizontal = message.horizontal; } - if (message.vertical === true) { + if (message.vertical !== false) { obj.vertical = message.vertical; } return obj; @@ -5049,10 +4645,10 @@ export const ControlTransport_SetAudioFadeType = { if (message.fadeOutDuration !== 0) { writer.uint32(17).double(message.fadeOutDuration); } - if (message.shouldFadeIn === true) { + if (message.shouldFadeIn !== false) { writer.uint32(24).bool(message.shouldFadeIn); } - if (message.shouldFadeOut === true) { + if (message.shouldFadeOut !== false) { writer.uint32(32).bool(message.shouldFadeOut); } return writer; @@ -5131,10 +4727,10 @@ export const ControlTransport_SetAudioFadeType = { if (message.fadeOutDuration !== 0) { obj.fadeOutDuration = message.fadeOutDuration; } - if (message.shouldFadeIn === true) { + if (message.shouldFadeIn !== false) { obj.shouldFadeIn = message.shouldFadeIn; } - if (message.shouldFadeOut === true) { + if (message.shouldFadeOut !== false) { obj.shouldFadeOut = message.shouldFadeOut; } return obj; @@ -5912,1871 +5508,104 @@ export const TextSegmentRequest_Segment = { }, }; -function createBaseProClockSource(): ProClockSource { - return { uuid: '', name: '', connected: false, active: false, type: 0 }; +function createBaseTriggerCue(): TriggerCue { + return { + triggerHandle: 0, + triggerOptions: undefined, + cue: undefined, + presentation: undefined, + playlist: undefined, + clientData: 0, + }; } -export const ProClockSource = { +export const TriggerCue = { encode( - message: ProClockSource, + message: TriggerCue, writer: _m0.Writer = _m0.Writer.create(), ): _m0.Writer { - if (message.uuid !== '') { - writer.uint32(10).string(message.uuid); - } - if (message.name !== '') { - writer.uint32(18).string(message.name); - } - if (message.connected === true) { - writer.uint32(24).bool(message.connected); - } - if (message.active === true) { - writer.uint32(32).bool(message.active); + if (message.triggerHandle !== 0) { + writer.uint32(8).uint64(message.triggerHandle); } - if (message.type !== 0) { - writer.uint32(40).int32(message.type); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): ProClockSource { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseProClockSource(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 10) { - break; - } - - message.uuid = reader.string(); - continue; - case 2: - if (tag !== 18) { - break; - } - - message.name = reader.string(); - continue; - case 3: - if (tag !== 24) { - break; - } - - message.connected = reader.bool(); - continue; - case 4: - if (tag !== 32) { - break; - } - - message.active = reader.bool(); - continue; - case 5: - if (tag !== 40) { - break; - } - - message.type = reader.int32() as any; - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, - - fromJSON(object: any): ProClockSource { - return { - uuid: isSet(object.uuid) ? globalThis.String(object.uuid) : '', - name: isSet(object.name) ? globalThis.String(object.name) : '', - connected: isSet(object.connected) - ? globalThis.Boolean(object.connected) - : false, - active: isSet(object.active) ? globalThis.Boolean(object.active) : false, - type: isSet(object.type) ? proClockSource_TypeFromJSON(object.type) : 0, - }; - }, - - toJSON(message: ProClockSource): unknown { - const obj: any = {}; - if (message.uuid !== '') { - obj.uuid = message.uuid; - } - if (message.name !== '') { - obj.name = message.name; - } - if (message.connected === true) { - obj.connected = message.connected; - } - if (message.active === true) { - obj.active = message.active; - } - if (message.type !== 0) { - obj.type = proClockSource_TypeToJSON(message.type); - } - return obj; - }, - - create, I>>( - base?: I, - ): ProClockSource { - return ProClockSource.fromPartial(base ?? ({} as any)); - }, - fromPartial, I>>( - object: I, - ): ProClockSource { - const message = createBaseProClockSource(); - message.uuid = object.uuid ?? ''; - message.name = object.name ?? ''; - message.connected = object.connected ?? false; - message.active = object.active ?? false; - message.type = object.type ?? 0; - return message; - }, -}; - -function createBaseTimedPlayback(): TimedPlayback { - return { sequence: undefined, timing: undefined }; -} - -export const TimedPlayback = { - encode( - message: TimedPlayback, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.sequence !== undefined) { - TimedPlayback_Sequence.encode( - message.sequence, - writer.uint32(10).fork(), - ).ldelim(); - } - if (message.timing !== undefined) { - TimedPlayback_Timing.encode( - message.timing, + if (message.triggerOptions !== undefined) { + TriggerOptions.encode( + message.triggerOptions, writer.uint32(18).fork(), ).ldelim(); } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): TimedPlayback { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseTimedPlayback(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 10) { - break; - } - - message.sequence = TimedPlayback_Sequence.decode( - reader, - reader.uint32(), - ); - continue; - case 2: - if (tag !== 18) { - break; - } - - message.timing = TimedPlayback_Timing.decode(reader, reader.uint32()); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, - - fromJSON(object: any): TimedPlayback { - return { - sequence: isSet(object.sequence) - ? TimedPlayback_Sequence.fromJSON(object.sequence) - : undefined, - timing: isSet(object.timing) - ? TimedPlayback_Timing.fromJSON(object.timing) - : undefined, - }; - }, - - toJSON(message: TimedPlayback): unknown { - const obj: any = {}; - if (message.sequence !== undefined) { - obj.sequence = TimedPlayback_Sequence.toJSON(message.sequence); - } - if (message.timing !== undefined) { - obj.timing = TimedPlayback_Timing.toJSON(message.timing); - } - return obj; - }, - - create, I>>( - base?: I, - ): TimedPlayback { - return TimedPlayback.fromPartial(base ?? ({} as any)); - }, - fromPartial, I>>( - object: I, - ): TimedPlayback { - const message = createBaseTimedPlayback(); - message.sequence = - object.sequence !== undefined && object.sequence !== null - ? TimedPlayback_Sequence.fromPartial(object.sequence) - : undefined; - message.timing = - object.timing !== undefined && object.timing !== null - ? TimedPlayback_Timing.fromPartial(object.timing) - : undefined; - return message; - }, -}; - -function createBaseTimedPlayback_Sequence(): TimedPlayback_Sequence { - return { sequence: [], contentDestination: 0, presentation: undefined }; -} - -export const TimedPlayback_Sequence = { - encode( - message: TimedPlayback_Sequence, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - for (const v of message.sequence) { - TimedPlayback_Sequence_SequenceItem.encode( - v!, - writer.uint32(10).fork(), - ).ldelim(); - } - if (message.contentDestination !== 0) { - writer.uint32(16).int32(message.contentDestination); + if (message.cue !== undefined) { + Cue.encode(message.cue, writer.uint32(26).fork()).ldelim(); } if (message.presentation !== undefined) { - Presentation.encode( + TriggerCue_PresentationCue.encode( message.presentation, - writer.uint32(26).fork(), + writer.uint32(34).fork(), ).ldelim(); } - return writer; - }, - - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): TimedPlayback_Sequence { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseTimedPlayback_Sequence(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 10) { - break; - } - - message.sequence.push( - TimedPlayback_Sequence_SequenceItem.decode(reader, reader.uint32()), - ); - continue; - case 2: - if (tag !== 16) { - break; - } - - message.contentDestination = reader.int32() as any; - continue; - case 3: - if (tag !== 26) { - break; - } - - message.presentation = Presentation.decode(reader, reader.uint32()); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, - - fromJSON(object: any): TimedPlayback_Sequence { - return { - sequence: globalThis.Array.isArray(object?.sequence) - ? object.sequence.map((e: any) => - TimedPlayback_Sequence_SequenceItem.fromJSON(e), - ) - : [], - contentDestination: isSet(object.contentDestination) - ? action_ContentDestinationFromJSON(object.contentDestination) - : 0, - presentation: isSet(object.presentation) - ? Presentation.fromJSON(object.presentation) - : undefined, - }; - }, - - toJSON(message: TimedPlayback_Sequence): unknown { - const obj: any = {}; - if (message.sequence?.length) { - obj.sequence = message.sequence.map((e) => - TimedPlayback_Sequence_SequenceItem.toJSON(e), - ); - } - if (message.contentDestination !== 0) { - obj.contentDestination = action_ContentDestinationToJSON( - message.contentDestination, - ); - } - if (message.presentation !== undefined) { - obj.presentation = Presentation.toJSON(message.presentation); - } - return obj; - }, - - create, I>>( - base?: I, - ): TimedPlayback_Sequence { - return TimedPlayback_Sequence.fromPartial(base ?? ({} as any)); - }, - fromPartial, I>>( - object: I, - ): TimedPlayback_Sequence { - const message = createBaseTimedPlayback_Sequence(); - message.sequence = - object.sequence?.map((e) => - TimedPlayback_Sequence_SequenceItem.fromPartial(e), - ) || []; - message.contentDestination = object.contentDestination ?? 0; - message.presentation = - object.presentation !== undefined && object.presentation !== null - ? Presentation.fromPartial(object.presentation) - : undefined; - return message; - }, -}; - -function createBaseTimedPlayback_Sequence_SequenceItem(): TimedPlayback_Sequence_SequenceItem { - return { - identifier: undefined, - time: 0, - triggerSource: undefined, - contentDestination: 0, - endTime: 0, - cue: undefined, - action: undefined, - }; -} - -export const TimedPlayback_Sequence_SequenceItem = { - encode( - message: TimedPlayback_Sequence_SequenceItem, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.identifier !== undefined) { - UUID.encode(message.identifier, writer.uint32(10).fork()).ldelim(); - } - if (message.time !== 0) { - writer.uint32(17).double(message.time); - } - if (message.triggerSource !== undefined) { - TriggerSource.encode( - message.triggerSource, - writer.uint32(26).fork(), - ).ldelim(); - } - if (message.contentDestination !== 0) { - writer.uint32(32).int32(message.contentDestination); - } - if (message.endTime !== 0) { - writer.uint32(57).double(message.endTime); - } - if (message.cue !== undefined) { - Cue.encode(message.cue, writer.uint32(42).fork()).ldelim(); - } - if (message.action !== undefined) { - Action.encode(message.action, writer.uint32(50).fork()).ldelim(); - } - return writer; - }, - - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): TimedPlayback_Sequence_SequenceItem { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseTimedPlayback_Sequence_SequenceItem(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 10) { - break; - } - - message.identifier = UUID.decode(reader, reader.uint32()); - continue; - case 2: - if (tag !== 17) { - break; - } - - message.time = reader.double(); - continue; - case 3: - if (tag !== 26) { - break; - } - - message.triggerSource = TriggerSource.decode(reader, reader.uint32()); - continue; - case 4: - if (tag !== 32) { - break; - } - - message.contentDestination = reader.int32() as any; - continue; - case 7: - if (tag !== 57) { - break; - } - - message.endTime = reader.double(); - continue; - case 5: - if (tag !== 42) { - break; - } - - message.cue = Cue.decode(reader, reader.uint32()); - continue; - case 6: - if (tag !== 50) { - break; - } - - message.action = Action.decode(reader, reader.uint32()); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, - - fromJSON(object: any): TimedPlayback_Sequence_SequenceItem { - return { - identifier: isSet(object.identifier) - ? UUID.fromJSON(object.identifier) - : undefined, - time: isSet(object.time) ? globalThis.Number(object.time) : 0, - triggerSource: isSet(object.triggerSource) - ? TriggerSource.fromJSON(object.triggerSource) - : undefined, - contentDestination: isSet(object.contentDestination) - ? action_ContentDestinationFromJSON(object.contentDestination) - : 0, - endTime: isSet(object.endTime) ? globalThis.Number(object.endTime) : 0, - cue: isSet(object.cue) ? Cue.fromJSON(object.cue) : undefined, - action: isSet(object.action) ? Action.fromJSON(object.action) : undefined, - }; - }, - - toJSON(message: TimedPlayback_Sequence_SequenceItem): unknown { - const obj: any = {}; - if (message.identifier !== undefined) { - obj.identifier = UUID.toJSON(message.identifier); - } - if (message.time !== 0) { - obj.time = message.time; - } - if (message.triggerSource !== undefined) { - obj.triggerSource = TriggerSource.toJSON(message.triggerSource); - } - if (message.contentDestination !== 0) { - obj.contentDestination = action_ContentDestinationToJSON( - message.contentDestination, - ); - } - if (message.endTime !== 0) { - obj.endTime = message.endTime; - } - if (message.cue !== undefined) { - obj.cue = Cue.toJSON(message.cue); - } - if (message.action !== undefined) { - obj.action = Action.toJSON(message.action); - } - return obj; - }, - - create, I>>( - base?: I, - ): TimedPlayback_Sequence_SequenceItem { - return TimedPlayback_Sequence_SequenceItem.fromPartial(base ?? ({} as any)); - }, - fromPartial< - I extends Exact, I>, - >(object: I): TimedPlayback_Sequence_SequenceItem { - const message = createBaseTimedPlayback_Sequence_SequenceItem(); - message.identifier = - object.identifier !== undefined && object.identifier !== null - ? UUID.fromPartial(object.identifier) - : undefined; - message.time = object.time ?? 0; - message.triggerSource = - object.triggerSource !== undefined && object.triggerSource !== null - ? TriggerSource.fromPartial(object.triggerSource) - : undefined; - message.contentDestination = object.contentDestination ?? 0; - message.endTime = object.endTime ?? 0; - message.cue = - object.cue !== undefined && object.cue !== null - ? Cue.fromPartial(object.cue) - : undefined; - message.action = - object.action !== undefined && object.action !== null - ? Action.fromPartial(object.action) - : undefined; - return message; - }, -}; - -function createBaseTimedPlayback_Timing(): TimedPlayback_Timing { - return { - layerTransport: undefined, - smpteTimecode: undefined, - internal: undefined, - }; -} - -export const TimedPlayback_Timing = { - encode( - message: TimedPlayback_Timing, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.layerTransport !== undefined) { - TimedPlayback_Timing_LayerTransport.encode( - message.layerTransport, - writer.uint32(10).fork(), - ).ldelim(); - } - if (message.smpteTimecode !== undefined) { - TimedPlayback_Timing_SMPTETimecode.encode( - message.smpteTimecode, - writer.uint32(18).fork(), - ).ldelim(); - } - if (message.internal !== undefined) { - TimedPlayback_Timing_Internal.encode( - message.internal, - writer.uint32(26).fork(), - ).ldelim(); - } - return writer; - }, - - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): TimedPlayback_Timing { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseTimedPlayback_Timing(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 10) { - break; - } - - message.layerTransport = TimedPlayback_Timing_LayerTransport.decode( - reader, - reader.uint32(), - ); - continue; - case 2: - if (tag !== 18) { - break; - } - - message.smpteTimecode = TimedPlayback_Timing_SMPTETimecode.decode( - reader, - reader.uint32(), - ); - continue; - case 3: - if (tag !== 26) { - break; - } - - message.internal = TimedPlayback_Timing_Internal.decode( - reader, - reader.uint32(), - ); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, - - fromJSON(object: any): TimedPlayback_Timing { - return { - layerTransport: isSet(object.layerTransport) - ? TimedPlayback_Timing_LayerTransport.fromJSON(object.layerTransport) - : undefined, - smpteTimecode: isSet(object.smpteTimecode) - ? TimedPlayback_Timing_SMPTETimecode.fromJSON(object.smpteTimecode) - : undefined, - internal: isSet(object.internal) - ? TimedPlayback_Timing_Internal.fromJSON(object.internal) - : undefined, - }; - }, - - toJSON(message: TimedPlayback_Timing): unknown { - const obj: any = {}; - if (message.layerTransport !== undefined) { - obj.layerTransport = TimedPlayback_Timing_LayerTransport.toJSON( - message.layerTransport, - ); - } - if (message.smpteTimecode !== undefined) { - obj.smpteTimecode = TimedPlayback_Timing_SMPTETimecode.toJSON( - message.smpteTimecode, - ); - } - if (message.internal !== undefined) { - obj.internal = TimedPlayback_Timing_Internal.toJSON(message.internal); - } - return obj; - }, - - create, I>>( - base?: I, - ): TimedPlayback_Timing { - return TimedPlayback_Timing.fromPartial(base ?? ({} as any)); - }, - fromPartial, I>>( - object: I, - ): TimedPlayback_Timing { - const message = createBaseTimedPlayback_Timing(); - message.layerTransport = - object.layerTransport !== undefined && object.layerTransport !== null - ? TimedPlayback_Timing_LayerTransport.fromPartial(object.layerTransport) - : undefined; - message.smpteTimecode = - object.smpteTimecode !== undefined && object.smpteTimecode !== null - ? TimedPlayback_Timing_SMPTETimecode.fromPartial(object.smpteTimecode) - : undefined; - message.internal = - object.internal !== undefined && object.internal !== null - ? TimedPlayback_Timing_Internal.fromPartial(object.internal) - : undefined; - return message; - }, -}; - -function createBaseTimedPlayback_Timing_LayerTransport(): TimedPlayback_Timing_LayerTransport { - return { layer: 0 }; -} - -export const TimedPlayback_Timing_LayerTransport = { - encode( - message: TimedPlayback_Timing_LayerTransport, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.layer !== 0) { - writer.uint32(8).int32(message.layer); - } - return writer; - }, - - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): TimedPlayback_Timing_LayerTransport { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseTimedPlayback_Timing_LayerTransport(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 8) { - break; - } - - message.layer = reader.int32(); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, - - fromJSON(object: any): TimedPlayback_Timing_LayerTransport { - return { layer: isSet(object.layer) ? globalThis.Number(object.layer) : 0 }; - }, - - toJSON(message: TimedPlayback_Timing_LayerTransport): unknown { - const obj: any = {}; - if (message.layer !== 0) { - obj.layer = Math.round(message.layer); - } - return obj; - }, - - create, I>>( - base?: I, - ): TimedPlayback_Timing_LayerTransport { - return TimedPlayback_Timing_LayerTransport.fromPartial(base ?? ({} as any)); - }, - fromPartial< - I extends Exact, I>, - >(object: I): TimedPlayback_Timing_LayerTransport { - const message = createBaseTimedPlayback_Timing_LayerTransport(); - message.layer = object.layer ?? 0; - return message; - }, -}; - -function createBaseTimedPlayback_Timing_SMPTETimecode(): TimedPlayback_Timing_SMPTETimecode { - return { deviceIdentifier: '', channel: 0, format: 0, offset: 0 }; -} - -export const TimedPlayback_Timing_SMPTETimecode = { - encode( - message: TimedPlayback_Timing_SMPTETimecode, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.deviceIdentifier !== '') { - writer.uint32(10).string(message.deviceIdentifier); - } - if (message.channel !== 0) { - writer.uint32(16).int32(message.channel); - } - if (message.format !== 0) { - writer.uint32(24).int32(message.format); - } - if (message.offset !== 0) { - writer.uint32(33).double(message.offset); - } - return writer; - }, - - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): TimedPlayback_Timing_SMPTETimecode { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseTimedPlayback_Timing_SMPTETimecode(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 10) { - break; - } - - message.deviceIdentifier = reader.string(); - continue; - case 2: - if (tag !== 16) { - break; - } - - message.channel = reader.int32(); - continue; - case 3: - if (tag !== 24) { - break; - } - - message.format = reader.int32() as any; - continue; - case 4: - if (tag !== 33) { - break; - } - - message.offset = reader.double(); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, - - fromJSON(object: any): TimedPlayback_Timing_SMPTETimecode { - return { - deviceIdentifier: isSet(object.deviceIdentifier) - ? globalThis.String(object.deviceIdentifier) - : '', - channel: isSet(object.channel) ? globalThis.Number(object.channel) : 0, - format: isSet(object.format) - ? timedPlayback_Timing_SMPTETimecode_FormatFromJSON(object.format) - : 0, - offset: isSet(object.offset) ? globalThis.Number(object.offset) : 0, - }; - }, - - toJSON(message: TimedPlayback_Timing_SMPTETimecode): unknown { - const obj: any = {}; - if (message.deviceIdentifier !== '') { - obj.deviceIdentifier = message.deviceIdentifier; - } - if (message.channel !== 0) { - obj.channel = Math.round(message.channel); - } - if (message.format !== 0) { - obj.format = timedPlayback_Timing_SMPTETimecode_FormatToJSON( - message.format, - ); - } - if (message.offset !== 0) { - obj.offset = message.offset; - } - return obj; - }, - - create, I>>( - base?: I, - ): TimedPlayback_Timing_SMPTETimecode { - return TimedPlayback_Timing_SMPTETimecode.fromPartial(base ?? ({} as any)); - }, - fromPartial< - I extends Exact, I>, - >(object: I): TimedPlayback_Timing_SMPTETimecode { - const message = createBaseTimedPlayback_Timing_SMPTETimecode(); - message.deviceIdentifier = object.deviceIdentifier ?? ''; - message.channel = object.channel ?? 0; - message.format = object.format ?? 0; - message.offset = object.offset ?? 0; - return message; - }, -}; - -function createBaseTimedPlayback_Timing_Internal(): TimedPlayback_Timing_Internal { - return { duration: 0, shouldLoop: false }; -} - -export const TimedPlayback_Timing_Internal = { - encode( - message: TimedPlayback_Timing_Internal, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.duration !== 0) { - writer.uint32(9).double(message.duration); - } - if (message.shouldLoop === true) { - writer.uint32(16).bool(message.shouldLoop); - } - return writer; - }, - - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): TimedPlayback_Timing_Internal { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseTimedPlayback_Timing_Internal(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 9) { - break; - } - - message.duration = reader.double(); - continue; - case 2: - if (tag !== 16) { - break; - } - - message.shouldLoop = reader.bool(); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, - - fromJSON(object: any): TimedPlayback_Timing_Internal { - return { - duration: isSet(object.duration) ? globalThis.Number(object.duration) : 0, - shouldLoop: isSet(object.shouldLoop) - ? globalThis.Boolean(object.shouldLoop) - : false, - }; - }, - - toJSON(message: TimedPlayback_Timing_Internal): unknown { - const obj: any = {}; - if (message.duration !== 0) { - obj.duration = message.duration; - } - if (message.shouldLoop === true) { - obj.shouldLoop = message.shouldLoop; - } - return obj; - }, - - create, I>>( - base?: I, - ): TimedPlayback_Timing_Internal { - return TimedPlayback_Timing_Internal.fromPartial(base ?? ({} as any)); - }, - fromPartial, I>>( - object: I, - ): TimedPlayback_Timing_Internal { - const message = createBaseTimedPlayback_Timing_Internal(); - message.duration = object.duration ?? 0; - message.shouldLoop = object.shouldLoop ?? false; - return message; - }, -}; - -function createBaseTimedPlayback_Update(): TimedPlayback_Update { - return { - play: undefined, - record: undefined, - pause: undefined, - reset: undefined, - jumpToTime: undefined, - startScrub: undefined, - endScrub: undefined, - duration: undefined, - loop: undefined, - updateSequence: undefined, - monitorSource: undefined, - }; -} - -export const TimedPlayback_Update = { - encode( - message: TimedPlayback_Update, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.play !== undefined) { - TimedPlayback_Update_Play.encode( - message.play, - writer.uint32(10).fork(), - ).ldelim(); - } - if (message.record !== undefined) { - TimedPlayback_Update_Record.encode( - message.record, - writer.uint32(18).fork(), - ).ldelim(); - } - if (message.pause !== undefined) { - TimedPlayback_Update_Pause.encode( - message.pause, - writer.uint32(26).fork(), - ).ldelim(); - } - if (message.reset !== undefined) { - TimedPlayback_Update_Reset.encode( - message.reset, - writer.uint32(34).fork(), - ).ldelim(); - } - if (message.jumpToTime !== undefined) { - TimedPlayback_Update_JumpToTime.encode( - message.jumpToTime, - writer.uint32(42).fork(), - ).ldelim(); - } - if (message.startScrub !== undefined) { - TimedPlayback_Update_StartScrub.encode( - message.startScrub, - writer.uint32(50).fork(), - ).ldelim(); - } - if (message.endScrub !== undefined) { - TimedPlayback_Update_EndScrub.encode( - message.endScrub, - writer.uint32(58).fork(), - ).ldelim(); - } - if (message.duration !== undefined) { - TimedPlayback_Update_Duration.encode( - message.duration, - writer.uint32(66).fork(), - ).ldelim(); - } - if (message.loop !== undefined) { - TimedPlayback_Update_Loop.encode( - message.loop, - writer.uint32(74).fork(), - ).ldelim(); - } - if (message.updateSequence !== undefined) { - TimedPlayback_Sequence.encode( - message.updateSequence, - writer.uint32(82).fork(), - ).ldelim(); - } - if (message.monitorSource !== undefined) { - TimedPlayback_Update_MonitorSource.encode( - message.monitorSource, - writer.uint32(90).fork(), - ).ldelim(); - } - return writer; - }, - - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): TimedPlayback_Update { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseTimedPlayback_Update(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 10) { - break; - } - - message.play = TimedPlayback_Update_Play.decode( - reader, - reader.uint32(), - ); - continue; - case 2: - if (tag !== 18) { - break; - } - - message.record = TimedPlayback_Update_Record.decode( - reader, - reader.uint32(), - ); - continue; - case 3: - if (tag !== 26) { - break; - } - - message.pause = TimedPlayback_Update_Pause.decode( - reader, - reader.uint32(), - ); - continue; - case 4: - if (tag !== 34) { - break; - } - - message.reset = TimedPlayback_Update_Reset.decode( - reader, - reader.uint32(), - ); - continue; - case 5: - if (tag !== 42) { - break; - } - - message.jumpToTime = TimedPlayback_Update_JumpToTime.decode( - reader, - reader.uint32(), - ); - continue; - case 6: - if (tag !== 50) { - break; - } - - message.startScrub = TimedPlayback_Update_StartScrub.decode( - reader, - reader.uint32(), - ); - continue; - case 7: - if (tag !== 58) { - break; - } - - message.endScrub = TimedPlayback_Update_EndScrub.decode( - reader, - reader.uint32(), - ); - continue; - case 8: - if (tag !== 66) { - break; - } - - message.duration = TimedPlayback_Update_Duration.decode( - reader, - reader.uint32(), - ); - continue; - case 9: - if (tag !== 74) { - break; - } - - message.loop = TimedPlayback_Update_Loop.decode( - reader, - reader.uint32(), - ); - continue; - case 10: - if (tag !== 82) { - break; - } - - message.updateSequence = TimedPlayback_Sequence.decode( - reader, - reader.uint32(), - ); - continue; - case 11: - if (tag !== 90) { - break; - } - - message.monitorSource = TimedPlayback_Update_MonitorSource.decode( - reader, - reader.uint32(), - ); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, - - fromJSON(object: any): TimedPlayback_Update { - return { - play: isSet(object.play) - ? TimedPlayback_Update_Play.fromJSON(object.play) - : undefined, - record: isSet(object.record) - ? TimedPlayback_Update_Record.fromJSON(object.record) - : undefined, - pause: isSet(object.pause) - ? TimedPlayback_Update_Pause.fromJSON(object.pause) - : undefined, - reset: isSet(object.reset) - ? TimedPlayback_Update_Reset.fromJSON(object.reset) - : undefined, - jumpToTime: isSet(object.jumpToTime) - ? TimedPlayback_Update_JumpToTime.fromJSON(object.jumpToTime) - : undefined, - startScrub: isSet(object.startScrub) - ? TimedPlayback_Update_StartScrub.fromJSON(object.startScrub) - : undefined, - endScrub: isSet(object.endScrub) - ? TimedPlayback_Update_EndScrub.fromJSON(object.endScrub) - : undefined, - duration: isSet(object.duration) - ? TimedPlayback_Update_Duration.fromJSON(object.duration) - : undefined, - loop: isSet(object.loop) - ? TimedPlayback_Update_Loop.fromJSON(object.loop) - : undefined, - updateSequence: isSet(object.updateSequence) - ? TimedPlayback_Sequence.fromJSON(object.updateSequence) - : undefined, - monitorSource: isSet(object.monitorSource) - ? TimedPlayback_Update_MonitorSource.fromJSON(object.monitorSource) - : undefined, - }; - }, - - toJSON(message: TimedPlayback_Update): unknown { - const obj: any = {}; - if (message.play !== undefined) { - obj.play = TimedPlayback_Update_Play.toJSON(message.play); - } - if (message.record !== undefined) { - obj.record = TimedPlayback_Update_Record.toJSON(message.record); - } - if (message.pause !== undefined) { - obj.pause = TimedPlayback_Update_Pause.toJSON(message.pause); - } - if (message.reset !== undefined) { - obj.reset = TimedPlayback_Update_Reset.toJSON(message.reset); - } - if (message.jumpToTime !== undefined) { - obj.jumpToTime = TimedPlayback_Update_JumpToTime.toJSON( - message.jumpToTime, - ); - } - if (message.startScrub !== undefined) { - obj.startScrub = TimedPlayback_Update_StartScrub.toJSON( - message.startScrub, - ); - } - if (message.endScrub !== undefined) { - obj.endScrub = TimedPlayback_Update_EndScrub.toJSON(message.endScrub); - } - if (message.duration !== undefined) { - obj.duration = TimedPlayback_Update_Duration.toJSON(message.duration); - } - if (message.loop !== undefined) { - obj.loop = TimedPlayback_Update_Loop.toJSON(message.loop); - } - if (message.updateSequence !== undefined) { - obj.updateSequence = TimedPlayback_Sequence.toJSON( - message.updateSequence, - ); - } - if (message.monitorSource !== undefined) { - obj.monitorSource = TimedPlayback_Update_MonitorSource.toJSON( - message.monitorSource, - ); - } - return obj; - }, - - create, I>>( - base?: I, - ): TimedPlayback_Update { - return TimedPlayback_Update.fromPartial(base ?? ({} as any)); - }, - fromPartial, I>>( - object: I, - ): TimedPlayback_Update { - const message = createBaseTimedPlayback_Update(); - message.play = - object.play !== undefined && object.play !== null - ? TimedPlayback_Update_Play.fromPartial(object.play) - : undefined; - message.record = - object.record !== undefined && object.record !== null - ? TimedPlayback_Update_Record.fromPartial(object.record) - : undefined; - message.pause = - object.pause !== undefined && object.pause !== null - ? TimedPlayback_Update_Pause.fromPartial(object.pause) - : undefined; - message.reset = - object.reset !== undefined && object.reset !== null - ? TimedPlayback_Update_Reset.fromPartial(object.reset) - : undefined; - message.jumpToTime = - object.jumpToTime !== undefined && object.jumpToTime !== null - ? TimedPlayback_Update_JumpToTime.fromPartial(object.jumpToTime) - : undefined; - message.startScrub = - object.startScrub !== undefined && object.startScrub !== null - ? TimedPlayback_Update_StartScrub.fromPartial(object.startScrub) - : undefined; - message.endScrub = - object.endScrub !== undefined && object.endScrub !== null - ? TimedPlayback_Update_EndScrub.fromPartial(object.endScrub) - : undefined; - message.duration = - object.duration !== undefined && object.duration !== null - ? TimedPlayback_Update_Duration.fromPartial(object.duration) - : undefined; - message.loop = - object.loop !== undefined && object.loop !== null - ? TimedPlayback_Update_Loop.fromPartial(object.loop) - : undefined; - message.updateSequence = - object.updateSequence !== undefined && object.updateSequence !== null - ? TimedPlayback_Sequence.fromPartial(object.updateSequence) - : undefined; - message.monitorSource = - object.monitorSource !== undefined && object.monitorSource !== null - ? TimedPlayback_Update_MonitorSource.fromPartial(object.monitorSource) - : undefined; - return message; - }, -}; - -function createBaseTimedPlayback_Update_Play(): TimedPlayback_Update_Play { - return {}; -} - -export const TimedPlayback_Update_Play = { - encode( - _: TimedPlayback_Update_Play, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - return writer; - }, - - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): TimedPlayback_Update_Play { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseTimedPlayback_Update_Play(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, - - fromJSON(_: any): TimedPlayback_Update_Play { - return {}; - }, - - toJSON(_: TimedPlayback_Update_Play): unknown { - const obj: any = {}; - return obj; - }, - - create, I>>( - base?: I, - ): TimedPlayback_Update_Play { - return TimedPlayback_Update_Play.fromPartial(base ?? ({} as any)); - }, - fromPartial, I>>( - _: I, - ): TimedPlayback_Update_Play { - const message = createBaseTimedPlayback_Update_Play(); - return message; - }, -}; - -function createBaseTimedPlayback_Update_Record(): TimedPlayback_Update_Record { - return { isRecording: false }; -} - -export const TimedPlayback_Update_Record = { - encode( - message: TimedPlayback_Update_Record, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.isRecording === true) { - writer.uint32(8).bool(message.isRecording); - } - return writer; - }, - - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): TimedPlayback_Update_Record { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseTimedPlayback_Update_Record(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 8) { - break; - } - - message.isRecording = reader.bool(); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, - - fromJSON(object: any): TimedPlayback_Update_Record { - return { - isRecording: isSet(object.isRecording) - ? globalThis.Boolean(object.isRecording) - : false, - }; - }, - - toJSON(message: TimedPlayback_Update_Record): unknown { - const obj: any = {}; - if (message.isRecording === true) { - obj.isRecording = message.isRecording; - } - return obj; - }, - - create, I>>( - base?: I, - ): TimedPlayback_Update_Record { - return TimedPlayback_Update_Record.fromPartial(base ?? ({} as any)); - }, - fromPartial, I>>( - object: I, - ): TimedPlayback_Update_Record { - const message = createBaseTimedPlayback_Update_Record(); - message.isRecording = object.isRecording ?? false; - return message; - }, -}; - -function createBaseTimedPlayback_Update_Pause(): TimedPlayback_Update_Pause { - return {}; -} - -export const TimedPlayback_Update_Pause = { - encode( - _: TimedPlayback_Update_Pause, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - return writer; - }, - - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): TimedPlayback_Update_Pause { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseTimedPlayback_Update_Pause(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, - - fromJSON(_: any): TimedPlayback_Update_Pause { - return {}; - }, - - toJSON(_: TimedPlayback_Update_Pause): unknown { - const obj: any = {}; - return obj; - }, - - create, I>>( - base?: I, - ): TimedPlayback_Update_Pause { - return TimedPlayback_Update_Pause.fromPartial(base ?? ({} as any)); - }, - fromPartial, I>>( - _: I, - ): TimedPlayback_Update_Pause { - const message = createBaseTimedPlayback_Update_Pause(); - return message; - }, -}; - -function createBaseTimedPlayback_Update_Reset(): TimedPlayback_Update_Reset { - return {}; -} - -export const TimedPlayback_Update_Reset = { - encode( - _: TimedPlayback_Update_Reset, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - return writer; - }, - - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): TimedPlayback_Update_Reset { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseTimedPlayback_Update_Reset(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, - - fromJSON(_: any): TimedPlayback_Update_Reset { - return {}; - }, - - toJSON(_: TimedPlayback_Update_Reset): unknown { - const obj: any = {}; - return obj; - }, - - create, I>>( - base?: I, - ): TimedPlayback_Update_Reset { - return TimedPlayback_Update_Reset.fromPartial(base ?? ({} as any)); - }, - fromPartial, I>>( - _: I, - ): TimedPlayback_Update_Reset { - const message = createBaseTimedPlayback_Update_Reset(); - return message; - }, -}; - -function createBaseTimedPlayback_Update_JumpToTime(): TimedPlayback_Update_JumpToTime { - return { time: 0 }; -} - -export const TimedPlayback_Update_JumpToTime = { - encode( - message: TimedPlayback_Update_JumpToTime, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.time !== 0) { - writer.uint32(9).double(message.time); - } - return writer; - }, - - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): TimedPlayback_Update_JumpToTime { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseTimedPlayback_Update_JumpToTime(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 9) { - break; - } - - message.time = reader.double(); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, - - fromJSON(object: any): TimedPlayback_Update_JumpToTime { - return { time: isSet(object.time) ? globalThis.Number(object.time) : 0 }; - }, - - toJSON(message: TimedPlayback_Update_JumpToTime): unknown { - const obj: any = {}; - if (message.time !== 0) { - obj.time = message.time; - } - return obj; - }, - - create, I>>( - base?: I, - ): TimedPlayback_Update_JumpToTime { - return TimedPlayback_Update_JumpToTime.fromPartial(base ?? ({} as any)); - }, - fromPartial, I>>( - object: I, - ): TimedPlayback_Update_JumpToTime { - const message = createBaseTimedPlayback_Update_JumpToTime(); - message.time = object.time ?? 0; - return message; - }, -}; - -function createBaseTimedPlayback_Update_StartScrub(): TimedPlayback_Update_StartScrub { - return { time: 0 }; -} - -export const TimedPlayback_Update_StartScrub = { - encode( - message: TimedPlayback_Update_StartScrub, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.time !== 0) { - writer.uint32(9).double(message.time); - } - return writer; - }, - - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): TimedPlayback_Update_StartScrub { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseTimedPlayback_Update_StartScrub(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 9) { - break; - } - - message.time = reader.double(); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, - - fromJSON(object: any): TimedPlayback_Update_StartScrub { - return { time: isSet(object.time) ? globalThis.Number(object.time) : 0 }; - }, - - toJSON(message: TimedPlayback_Update_StartScrub): unknown { - const obj: any = {}; - if (message.time !== 0) { - obj.time = message.time; - } - return obj; - }, - - create, I>>( - base?: I, - ): TimedPlayback_Update_StartScrub { - return TimedPlayback_Update_StartScrub.fromPartial(base ?? ({} as any)); - }, - fromPartial, I>>( - object: I, - ): TimedPlayback_Update_StartScrub { - const message = createBaseTimedPlayback_Update_StartScrub(); - message.time = object.time ?? 0; - return message; - }, -}; - -function createBaseTimedPlayback_Update_EndScrub(): TimedPlayback_Update_EndScrub { - return { time: 0 }; -} - -export const TimedPlayback_Update_EndScrub = { - encode( - message: TimedPlayback_Update_EndScrub, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.time !== 0) { - writer.uint32(17).double(message.time); - } - return writer; - }, - - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): TimedPlayback_Update_EndScrub { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseTimedPlayback_Update_EndScrub(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 2: - if (tag !== 17) { - break; - } - - message.time = reader.double(); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, - - fromJSON(object: any): TimedPlayback_Update_EndScrub { - return { time: isSet(object.time) ? globalThis.Number(object.time) : 0 }; - }, - - toJSON(message: TimedPlayback_Update_EndScrub): unknown { - const obj: any = {}; - if (message.time !== 0) { - obj.time = message.time; + if (message.playlist !== undefined) { + Playlist.encode(message.playlist, writer.uint32(42).fork()).ldelim(); } - return obj; - }, - - create, I>>( - base?: I, - ): TimedPlayback_Update_EndScrub { - return TimedPlayback_Update_EndScrub.fromPartial(base ?? ({} as any)); - }, - fromPartial, I>>( - object: I, - ): TimedPlayback_Update_EndScrub { - const message = createBaseTimedPlayback_Update_EndScrub(); - message.time = object.time ?? 0; - return message; - }, -}; - -function createBaseTimedPlayback_Update_Duration(): TimedPlayback_Update_Duration { - return { duration: 0 }; -} - -export const TimedPlayback_Update_Duration = { - encode( - message: TimedPlayback_Update_Duration, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.duration !== 0) { - writer.uint32(9).double(message.duration); + if (message.clientData !== 0) { + writer.uint32(48).uint64(message.clientData); } return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): TimedPlayback_Update_Duration { + decode(input: _m0.Reader | Uint8Array, length?: number): TriggerCue { const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseTimedPlayback_Update_Duration(); + const message = createBaseTriggerCue(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { case 1: - if (tag !== 9) { + if (tag !== 8) { break; } - message.duration = reader.double(); + message.triggerHandle = longToNumber(reader.uint64() as Long); continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, - - fromJSON(object: any): TimedPlayback_Update_Duration { - return { - duration: isSet(object.duration) ? globalThis.Number(object.duration) : 0, - }; - }, - - toJSON(message: TimedPlayback_Update_Duration): unknown { - const obj: any = {}; - if (message.duration !== 0) { - obj.duration = message.duration; - } - return obj; - }, + case 2: + if (tag !== 18) { + break; + } - create, I>>( - base?: I, - ): TimedPlayback_Update_Duration { - return TimedPlayback_Update_Duration.fromPartial(base ?? ({} as any)); - }, - fromPartial, I>>( - object: I, - ): TimedPlayback_Update_Duration { - const message = createBaseTimedPlayback_Update_Duration(); - message.duration = object.duration ?? 0; - return message; - }, -}; + message.triggerOptions = TriggerOptions.decode( + reader, + reader.uint32(), + ); + continue; + case 3: + if (tag !== 26) { + break; + } -function createBaseTimedPlayback_Update_Loop(): TimedPlayback_Update_Loop { - return { loop: false }; -} + message.cue = Cue.decode(reader, reader.uint32()); + continue; + case 4: + if (tag !== 34) { + break; + } -export const TimedPlayback_Update_Loop = { - encode( - message: TimedPlayback_Update_Loop, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.loop === true) { - writer.uint32(8).bool(message.loop); - } - return writer; - }, + message.presentation = TriggerCue_PresentationCue.decode( + reader, + reader.uint32(), + ); + continue; + case 5: + if (tag !== 42) { + break; + } - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): TimedPlayback_Update_Loop { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseTimedPlayback_Update_Loop(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 8) { + message.playlist = Playlist.decode(reader, reader.uint32()); + continue; + case 6: + if (tag !== 48) { break; } - message.loop = reader.bool(); + message.clientData = longToNumber(reader.uint64() as Long); continue; } if ((tag & 7) === 4 || tag === 0) { @@ -7787,45 +5616,101 @@ export const TimedPlayback_Update_Loop = { return message; }, - fromJSON(object: any): TimedPlayback_Update_Loop { + fromJSON(object: any): TriggerCue { return { - loop: isSet(object.loop) ? globalThis.Boolean(object.loop) : false, + triggerHandle: isSet(object.triggerHandle) + ? globalThis.Number(object.triggerHandle) + : 0, + triggerOptions: isSet(object.triggerOptions) + ? TriggerOptions.fromJSON(object.triggerOptions) + : undefined, + cue: isSet(object.cue) ? Cue.fromJSON(object.cue) : undefined, + presentation: isSet(object.presentation) + ? TriggerCue_PresentationCue.fromJSON(object.presentation) + : undefined, + playlist: isSet(object.playlist) + ? Playlist.fromJSON(object.playlist) + : undefined, + clientData: isSet(object.clientData) + ? globalThis.Number(object.clientData) + : 0, }; }, - toJSON(message: TimedPlayback_Update_Loop): unknown { + toJSON(message: TriggerCue): unknown { const obj: any = {}; - if (message.loop === true) { - obj.loop = message.loop; + if (message.triggerHandle !== 0) { + obj.triggerHandle = Math.round(message.triggerHandle); + } + if (message.triggerOptions !== undefined) { + obj.triggerOptions = TriggerOptions.toJSON(message.triggerOptions); + } + if (message.cue !== undefined) { + obj.cue = Cue.toJSON(message.cue); + } + if (message.presentation !== undefined) { + obj.presentation = TriggerCue_PresentationCue.toJSON( + message.presentation, + ); + } + if (message.playlist !== undefined) { + obj.playlist = Playlist.toJSON(message.playlist); + } + if (message.clientData !== 0) { + obj.clientData = Math.round(message.clientData); } return obj; }, - create, I>>( - base?: I, - ): TimedPlayback_Update_Loop { - return TimedPlayback_Update_Loop.fromPartial(base ?? ({} as any)); + create, I>>(base?: I): TriggerCue { + return TriggerCue.fromPartial(base ?? ({} as any)); }, - fromPartial, I>>( + fromPartial, I>>( object: I, - ): TimedPlayback_Update_Loop { - const message = createBaseTimedPlayback_Update_Loop(); - message.loop = object.loop ?? false; + ): TriggerCue { + const message = createBaseTriggerCue(); + message.triggerHandle = object.triggerHandle ?? 0; + message.triggerOptions = + object.triggerOptions !== undefined && object.triggerOptions !== null + ? TriggerOptions.fromPartial(object.triggerOptions) + : undefined; + message.cue = + object.cue !== undefined && object.cue !== null + ? Cue.fromPartial(object.cue) + : undefined; + message.presentation = + object.presentation !== undefined && object.presentation !== null + ? TriggerCue_PresentationCue.fromPartial(object.presentation) + : undefined; + message.playlist = + object.playlist !== undefined && object.playlist !== null + ? Playlist.fromPartial(object.playlist) + : undefined; + message.clientData = object.clientData ?? 0; return message; }, }; -function createBaseTimedPlayback_Update_MonitorSource(): TimedPlayback_Update_MonitorSource { - return { enable: false }; +function createBaseTriggerCue_PresentationCue(): TriggerCue_PresentationCue { + return { presentation: undefined, arrangementId: undefined, cueIndex: 0 }; } -export const TimedPlayback_Update_MonitorSource = { +export const TriggerCue_PresentationCue = { encode( - message: TimedPlayback_Update_MonitorSource, + message: TriggerCue_PresentationCue, writer: _m0.Writer = _m0.Writer.create(), ): _m0.Writer { - if (message.enable === true) { - writer.uint32(8).bool(message.enable); + if (message.presentation !== undefined) { + Presentation.encode( + message.presentation, + writer.uint32(10).fork(), + ).ldelim(); + } + if (message.arrangementId !== undefined) { + UUID.encode(message.arrangementId, writer.uint32(18).fork()).ldelim(); + } + if (message.cueIndex !== 0) { + writer.uint32(24).int32(message.cueIndex); } return writer; }, @@ -7833,20 +5718,34 @@ export const TimedPlayback_Update_MonitorSource = { decode( input: _m0.Reader | Uint8Array, length?: number, - ): TimedPlayback_Update_MonitorSource { + ): TriggerCue_PresentationCue { const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseTimedPlayback_Update_MonitorSource(); + const message = createBaseTriggerCue_PresentationCue(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { case 1: - if (tag !== 8) { + if (tag !== 10) { + break; + } + + message.presentation = Presentation.decode(reader, reader.uint32()); + continue; + case 2: + if (tag !== 18) { break; } - message.enable = reader.bool(); + message.arrangementId = UUID.decode(reader, reader.uint32()); + continue; + case 3: + if (tag !== 24) { + break; + } + + message.cueIndex = reader.int32(); continue; } if ((tag & 7) === 4 || tag === 0) { @@ -7857,36 +5756,61 @@ export const TimedPlayback_Update_MonitorSource = { return message; }, - fromJSON(object: any): TimedPlayback_Update_MonitorSource { + fromJSON(object: any): TriggerCue_PresentationCue { return { - enable: isSet(object.enable) ? globalThis.Boolean(object.enable) : false, + presentation: isSet(object.presentation) + ? Presentation.fromJSON(object.presentation) + : undefined, + arrangementId: isSet(object.arrangementId) + ? UUID.fromJSON(object.arrangementId) + : undefined, + cueIndex: isSet(object.cueIndex) ? globalThis.Number(object.cueIndex) : 0, }; }, - toJSON(message: TimedPlayback_Update_MonitorSource): unknown { + toJSON(message: TriggerCue_PresentationCue): unknown { const obj: any = {}; - if (message.enable === true) { - obj.enable = message.enable; + if (message.presentation !== undefined) { + obj.presentation = Presentation.toJSON(message.presentation); + } + if (message.arrangementId !== undefined) { + obj.arrangementId = UUID.toJSON(message.arrangementId); + } + if (message.cueIndex !== 0) { + obj.cueIndex = Math.round(message.cueIndex); } return obj; }, - create, I>>( + create, I>>( base?: I, - ): TimedPlayback_Update_MonitorSource { - return TimedPlayback_Update_MonitorSource.fromPartial(base ?? ({} as any)); + ): TriggerCue_PresentationCue { + return TriggerCue_PresentationCue.fromPartial(base ?? ({} as any)); }, - fromPartial< - I extends Exact, I>, - >(object: I): TimedPlayback_Update_MonitorSource { - const message = createBaseTimedPlayback_Update_MonitorSource(); - message.enable = object.enable ?? false; + fromPartial, I>>( + object: I, + ): TriggerCue_PresentationCue { + const message = createBaseTriggerCue_PresentationCue(); + message.presentation = + object.presentation !== undefined && object.presentation !== null + ? Presentation.fromPartial(object.presentation) + : undefined; + message.arrangementId = + object.arrangementId !== undefined && object.arrangementId !== null + ? UUID.fromPartial(object.arrangementId) + : undefined; + message.cueIndex = object.cueIndex ?? 0; return message; }, }; function createBaseNetworkTriggerDataItem(): NetworkTriggerDataItem { - return { triggerOptions: undefined, action: undefined, cue: undefined }; + return { + triggerOptions: undefined, + triggerCue: undefined, + action: undefined, + cue: undefined, + }; } export const NetworkTriggerDataItem = { @@ -7900,6 +5824,9 @@ export const NetworkTriggerDataItem = { writer.uint32(26).fork(), ).ldelim(); } + if (message.triggerCue !== undefined) { + TriggerCue.encode(message.triggerCue, writer.uint32(34).fork()).ldelim(); + } if (message.action !== undefined) { Action.encode(message.action, writer.uint32(10).fork()).ldelim(); } @@ -7930,6 +5857,13 @@ export const NetworkTriggerDataItem = { reader.uint32(), ); continue; + case 4: + if (tag !== 34) { + break; + } + + message.triggerCue = TriggerCue.decode(reader, reader.uint32()); + continue; case 1: if (tag !== 10) { break; @@ -7958,6 +5892,9 @@ export const NetworkTriggerDataItem = { triggerOptions: isSet(object.triggerOptions) ? TriggerOptions.fromJSON(object.triggerOptions) : undefined, + triggerCue: isSet(object.triggerCue) + ? TriggerCue.fromJSON(object.triggerCue) + : undefined, action: isSet(object.action) ? Action.fromJSON(object.action) : undefined, cue: isSet(object.cue) ? Cue.fromJSON(object.cue) : undefined, }; @@ -7968,6 +5905,9 @@ export const NetworkTriggerDataItem = { if (message.triggerOptions !== undefined) { obj.triggerOptions = TriggerOptions.toJSON(message.triggerOptions); } + if (message.triggerCue !== undefined) { + obj.triggerCue = TriggerCue.toJSON(message.triggerCue); + } if (message.action !== undefined) { obj.action = Action.toJSON(message.action); } @@ -7990,6 +5930,10 @@ export const NetworkTriggerDataItem = { object.triggerOptions !== undefined && object.triggerOptions !== null ? TriggerOptions.fromPartial(object.triggerOptions) : undefined; + message.triggerCue = + object.triggerCue !== undefined && object.triggerCue !== null + ? TriggerCue.fromPartial(object.triggerCue) + : undefined; message.action = object.action !== undefined && object.action !== null ? Action.fromPartial(object.action) @@ -8348,277 +6292,13 @@ function createBaseValidateEncoderResponse(): ValidateEncoderResponse { return { isValid: false }; } -export const ValidateEncoderResponse = { - encode( - message: ValidateEncoderResponse, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.isValid === true) { - writer.uint32(8).bool(message.isValid); - } - return writer; - }, - - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): ValidateEncoderResponse { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseValidateEncoderResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 8) { - break; - } - - message.isValid = reader.bool(); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, - - fromJSON(object: any): ValidateEncoderResponse { - return { - isValid: isSet(object.isValid) - ? globalThis.Boolean(object.isValid) - : false, - }; - }, - - toJSON(message: ValidateEncoderResponse): unknown { - const obj: any = {}; - if (message.isValid === true) { - obj.isValid = message.isValid; - } - return obj; - }, - - create, I>>( - base?: I, - ): ValidateEncoderResponse { - return ValidateEncoderResponse.fromPartial(base ?? ({} as any)); - }, - fromPartial, I>>( - object: I, - ): ValidateEncoderResponse { - const message = createBaseValidateEncoderResponse(); - message.isValid = object.isValid ?? false; - return message; - }, -}; - -function createBaseTriggerCue(): TriggerCue { - return { - triggerHandle: 0, - triggerOptions: undefined, - cue: undefined, - presentation: undefined, - playlist: undefined, - clientData: 0, - }; -} - -export const TriggerCue = { - encode( - message: TriggerCue, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.triggerHandle !== 0) { - writer.uint32(8).uint64(message.triggerHandle); - } - if (message.triggerOptions !== undefined) { - TriggerOptions.encode( - message.triggerOptions, - writer.uint32(18).fork(), - ).ldelim(); - } - if (message.cue !== undefined) { - Cue.encode(message.cue, writer.uint32(26).fork()).ldelim(); - } - if (message.presentation !== undefined) { - TriggerCue_PresentationCue.encode( - message.presentation, - writer.uint32(34).fork(), - ).ldelim(); - } - if (message.playlist !== undefined) { - Playlist.encode(message.playlist, writer.uint32(42).fork()).ldelim(); - } - if (message.clientData !== 0) { - writer.uint32(48).uint64(message.clientData); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): TriggerCue { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseTriggerCue(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 8) { - break; - } - - message.triggerHandle = longToNumber(reader.uint64() as Long); - continue; - case 2: - if (tag !== 18) { - break; - } - - message.triggerOptions = TriggerOptions.decode( - reader, - reader.uint32(), - ); - continue; - case 3: - if (tag !== 26) { - break; - } - - message.cue = Cue.decode(reader, reader.uint32()); - continue; - case 4: - if (tag !== 34) { - break; - } - - message.presentation = TriggerCue_PresentationCue.decode( - reader, - reader.uint32(), - ); - continue; - case 5: - if (tag !== 42) { - break; - } - - message.playlist = Playlist.decode(reader, reader.uint32()); - continue; - case 6: - if (tag !== 48) { - break; - } - - message.clientData = longToNumber(reader.uint64() as Long); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, - - fromJSON(object: any): TriggerCue { - return { - triggerHandle: isSet(object.triggerHandle) - ? globalThis.Number(object.triggerHandle) - : 0, - triggerOptions: isSet(object.triggerOptions) - ? TriggerOptions.fromJSON(object.triggerOptions) - : undefined, - cue: isSet(object.cue) ? Cue.fromJSON(object.cue) : undefined, - presentation: isSet(object.presentation) - ? TriggerCue_PresentationCue.fromJSON(object.presentation) - : undefined, - playlist: isSet(object.playlist) - ? Playlist.fromJSON(object.playlist) - : undefined, - clientData: isSet(object.clientData) - ? globalThis.Number(object.clientData) - : 0, - }; - }, - - toJSON(message: TriggerCue): unknown { - const obj: any = {}; - if (message.triggerHandle !== 0) { - obj.triggerHandle = Math.round(message.triggerHandle); - } - if (message.triggerOptions !== undefined) { - obj.triggerOptions = TriggerOptions.toJSON(message.triggerOptions); - } - if (message.cue !== undefined) { - obj.cue = Cue.toJSON(message.cue); - } - if (message.presentation !== undefined) { - obj.presentation = TriggerCue_PresentationCue.toJSON( - message.presentation, - ); - } - if (message.playlist !== undefined) { - obj.playlist = Playlist.toJSON(message.playlist); - } - if (message.clientData !== 0) { - obj.clientData = Math.round(message.clientData); - } - return obj; - }, - - create, I>>(base?: I): TriggerCue { - return TriggerCue.fromPartial(base ?? ({} as any)); - }, - fromPartial, I>>( - object: I, - ): TriggerCue { - const message = createBaseTriggerCue(); - message.triggerHandle = object.triggerHandle ?? 0; - message.triggerOptions = - object.triggerOptions !== undefined && object.triggerOptions !== null - ? TriggerOptions.fromPartial(object.triggerOptions) - : undefined; - message.cue = - object.cue !== undefined && object.cue !== null - ? Cue.fromPartial(object.cue) - : undefined; - message.presentation = - object.presentation !== undefined && object.presentation !== null - ? TriggerCue_PresentationCue.fromPartial(object.presentation) - : undefined; - message.playlist = - object.playlist !== undefined && object.playlist !== null - ? Playlist.fromPartial(object.playlist) - : undefined; - message.clientData = object.clientData ?? 0; - return message; - }, -}; - -function createBaseTriggerCue_PresentationCue(): TriggerCue_PresentationCue { - return { presentation: undefined, arrangementId: undefined, cueIndex: 0 }; -} - -export const TriggerCue_PresentationCue = { +export const ValidateEncoderResponse = { encode( - message: TriggerCue_PresentationCue, + message: ValidateEncoderResponse, writer: _m0.Writer = _m0.Writer.create(), ): _m0.Writer { - if (message.presentation !== undefined) { - Presentation.encode( - message.presentation, - writer.uint32(10).fork(), - ).ldelim(); - } - if (message.arrangementId !== undefined) { - UUID.encode(message.arrangementId, writer.uint32(18).fork()).ldelim(); - } - if (message.cueIndex !== 0) { - writer.uint32(24).int32(message.cueIndex); + if (message.isValid !== false) { + writer.uint32(8).bool(message.isValid); } return writer; }, @@ -8626,34 +6306,20 @@ export const TriggerCue_PresentationCue = { decode( input: _m0.Reader | Uint8Array, length?: number, - ): TriggerCue_PresentationCue { + ): ValidateEncoderResponse { const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseTriggerCue_PresentationCue(); + const message = createBaseValidateEncoderResponse(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { case 1: - if (tag !== 10) { - break; - } - - message.presentation = Presentation.decode(reader, reader.uint32()); - continue; - case 2: - if (tag !== 18) { - break; - } - - message.arrangementId = UUID.decode(reader, reader.uint32()); - continue; - case 3: - if (tag !== 24) { + if (tag !== 8) { break; } - message.cueIndex = reader.int32(); + message.isValid = reader.bool(); continue; } if ((tag & 7) === 4 || tag === 0) { @@ -8664,50 +6330,32 @@ export const TriggerCue_PresentationCue = { return message; }, - fromJSON(object: any): TriggerCue_PresentationCue { + fromJSON(object: any): ValidateEncoderResponse { return { - presentation: isSet(object.presentation) - ? Presentation.fromJSON(object.presentation) - : undefined, - arrangementId: isSet(object.arrangementId) - ? UUID.fromJSON(object.arrangementId) - : undefined, - cueIndex: isSet(object.cueIndex) ? globalThis.Number(object.cueIndex) : 0, + isValid: isSet(object.isValid) + ? globalThis.Boolean(object.isValid) + : false, }; }, - toJSON(message: TriggerCue_PresentationCue): unknown { + toJSON(message: ValidateEncoderResponse): unknown { const obj: any = {}; - if (message.presentation !== undefined) { - obj.presentation = Presentation.toJSON(message.presentation); - } - if (message.arrangementId !== undefined) { - obj.arrangementId = UUID.toJSON(message.arrangementId); - } - if (message.cueIndex !== 0) { - obj.cueIndex = Math.round(message.cueIndex); + if (message.isValid !== false) { + obj.isValid = message.isValid; } return obj; }, - create, I>>( + create, I>>( base?: I, - ): TriggerCue_PresentationCue { - return TriggerCue_PresentationCue.fromPartial(base ?? ({} as any)); + ): ValidateEncoderResponse { + return ValidateEncoderResponse.fromPartial(base ?? ({} as any)); }, - fromPartial, I>>( + fromPartial, I>>( object: I, - ): TriggerCue_PresentationCue { - const message = createBaseTriggerCue_PresentationCue(); - message.presentation = - object.presentation !== undefined && object.presentation !== null - ? Presentation.fromPartial(object.presentation) - : undefined; - message.arrangementId = - object.arrangementId !== undefined && object.arrangementId !== null - ? UUID.fromPartial(object.arrangementId) - : undefined; - message.cueIndex = object.cueIndex ?? 0; + ): ValidateEncoderResponse { + const message = createBaseValidateEncoderResponse(); + message.isValid = object.isValid ?? false; return message; }, }; @@ -9352,33 +7000,251 @@ function createBaseCaptureActionResponse_StopCapture(): CaptureActionResponse_St export const CaptureActionResponse_StopCapture = { encode( - message: CaptureActionResponse_StopCapture, + message: CaptureActionResponse_StopCapture, + writer: _m0.Writer = _m0.Writer.create(), + ): _m0.Writer { + if (message.stopCapture !== false) { + writer.uint32(8).bool(message.stopCapture); + } + return writer; + }, + + decode( + input: _m0.Reader | Uint8Array, + length?: number, + ): CaptureActionResponse_StopCapture { + const reader = + input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseCaptureActionResponse_StopCapture(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 8) { + break; + } + + message.stopCapture = reader.bool(); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(object: any): CaptureActionResponse_StopCapture { + return { + stopCapture: isSet(object.stopCapture) + ? globalThis.Boolean(object.stopCapture) + : false, + }; + }, + + toJSON(message: CaptureActionResponse_StopCapture): unknown { + const obj: any = {}; + if (message.stopCapture !== false) { + obj.stopCapture = message.stopCapture; + } + return obj; + }, + + create, I>>( + base?: I, + ): CaptureActionResponse_StopCapture { + return CaptureActionResponse_StopCapture.fromPartial(base ?? ({} as any)); + }, + fromPartial< + I extends Exact, I>, + >(object: I): CaptureActionResponse_StopCapture { + const message = createBaseCaptureActionResponse_StopCapture(); + message.stopCapture = object.stopCapture ?? false; + return message; + }, +}; + +function createBaseMacroIcons(): MacroIcons { + return { icons: [] }; +} + +export const MacroIcons = { + encode( + message: MacroIcons, + writer: _m0.Writer = _m0.Writer.create(), + ): _m0.Writer { + for (const v of message.icons) { + MacroIcons_MacroIcon.encode(v!, writer.uint32(10).fork()).ldelim(); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): MacroIcons { + const reader = + input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseMacroIcons(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } + + message.icons.push( + MacroIcons_MacroIcon.decode(reader, reader.uint32()), + ); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(object: any): MacroIcons { + return { + icons: globalThis.Array.isArray(object?.icons) + ? object.icons.map((e: any) => MacroIcons_MacroIcon.fromJSON(e)) + : [], + }; + }, + + toJSON(message: MacroIcons): unknown { + const obj: any = {}; + if (message.icons?.length) { + obj.icons = message.icons.map((e) => MacroIcons_MacroIcon.toJSON(e)); + } + return obj; + }, + + create, I>>(base?: I): MacroIcons { + return MacroIcons.fromPartial(base ?? ({} as any)); + }, + fromPartial, I>>( + object: I, + ): MacroIcons { + const message = createBaseMacroIcons(); + message.icons = + object.icons?.map((e) => MacroIcons_MacroIcon.fromPartial(e)) || []; + return message; + }, +}; + +function createBaseMacroIcons_MacroIcon(): MacroIcons_MacroIcon { + return { imageType: 0, imageData: new Uint8Array(0) }; +} + +export const MacroIcons_MacroIcon = { + encode( + message: MacroIcons_MacroIcon, + writer: _m0.Writer = _m0.Writer.create(), + ): _m0.Writer { + if (message.imageType !== 0) { + writer.uint32(8).int32(message.imageType); + } + if (message.imageData.length !== 0) { + writer.uint32(18).bytes(message.imageData); + } + return writer; + }, + + decode( + input: _m0.Reader | Uint8Array, + length?: number, + ): MacroIcons_MacroIcon { + const reader = + input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseMacroIcons_MacroIcon(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 8) { + break; + } + + message.imageType = reader.int32() as any; + continue; + case 2: + if (tag !== 18) { + break; + } + + message.imageData = reader.bytes(); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(object: any): MacroIcons_MacroIcon { + return { + imageType: isSet(object.imageType) + ? macrosDocument_Macro_ImageTypeFromJSON(object.imageType) + : 0, + imageData: isSet(object.imageData) + ? bytesFromBase64(object.imageData) + : new Uint8Array(0), + }; + }, + + toJSON(message: MacroIcons_MacroIcon): unknown { + const obj: any = {}; + if (message.imageType !== 0) { + obj.imageType = macrosDocument_Macro_ImageTypeToJSON(message.imageType); + } + if (message.imageData.length !== 0) { + obj.imageData = base64FromBytes(message.imageData); + } + return obj; + }, + + create, I>>( + base?: I, + ): MacroIcons_MacroIcon { + return MacroIcons_MacroIcon.fromPartial(base ?? ({} as any)); + }, + fromPartial, I>>( + object: I, + ): MacroIcons_MacroIcon { + const message = createBaseMacroIcons_MacroIcon(); + message.imageType = object.imageType ?? 0; + message.imageData = object.imageData ?? new Uint8Array(0); + return message; + }, +}; + +function createBaseGenericEvent(): GenericEvent { + return {}; +} + +export const GenericEvent = { + encode( + _: GenericEvent, writer: _m0.Writer = _m0.Writer.create(), ): _m0.Writer { - if (message.stopCapture === true) { - writer.uint32(8).bool(message.stopCapture); - } return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): CaptureActionResponse_StopCapture { + decode(input: _m0.Reader | Uint8Array, length?: number): GenericEvent { const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseCaptureActionResponse_StopCapture(); + const message = createBaseGenericEvent(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if (tag !== 8) { - break; - } - - message.stopCapture = reader.bool(); - continue; } if ((tag & 7) === 4 || tag === 0) { break; @@ -9388,32 +7254,24 @@ export const CaptureActionResponse_StopCapture = { return message; }, - fromJSON(object: any): CaptureActionResponse_StopCapture { - return { - stopCapture: isSet(object.stopCapture) - ? globalThis.Boolean(object.stopCapture) - : false, - }; + fromJSON(_: any): GenericEvent { + return {}; }, - toJSON(message: CaptureActionResponse_StopCapture): unknown { + toJSON(_: GenericEvent): unknown { const obj: any = {}; - if (message.stopCapture === true) { - obj.stopCapture = message.stopCapture; - } return obj; }, - create, I>>( + create, I>>( base?: I, - ): CaptureActionResponse_StopCapture { - return CaptureActionResponse_StopCapture.fromPartial(base ?? ({} as any)); + ): GenericEvent { + return GenericEvent.fromPartial(base ?? ({} as any)); }, - fromPartial< - I extends Exact, I>, - >(object: I): CaptureActionResponse_StopCapture { - const message = createBaseCaptureActionResponse_StopCapture(); - message.stopCapture = object.stopCapture ?? false; + fromPartial, I>>( + _: I, + ): GenericEvent { + const message = createBaseGenericEvent(); return message; }, }; @@ -9437,6 +7295,22 @@ function createBaseSendData(): SendData { recordingSettingsDocument: undefined, captureActionResponse: undefined, copyrightLayout: undefined, + globalBackgroundTransition: undefined, + globalMessagesTransition: undefined, + globalForegroundTransition: undefined, + globalBibleTransition: undefined, + globalPropsTransition: undefined, + globalAudioTransition: undefined, + preferences: undefined, + testPattern: undefined, + startupComplete: undefined, + visualPlaylistDoc: undefined, + audioPlaylistDoc: undefined, + killWatchdog: undefined, + macroIcons: undefined, + debugTriggerDataDump: undefined, + libraryPlaylistDoc: undefined, + audioPlaylistFocusUuid: undefined, }; } @@ -9538,6 +7412,99 @@ export const SendData = { writer.uint32(138).fork(), ).ldelim(); } + if (message.globalBackgroundTransition !== undefined) { + Transition.encode( + message.globalBackgroundTransition, + writer.uint32(146).fork(), + ).ldelim(); + } + if (message.globalMessagesTransition !== undefined) { + Transition.encode( + message.globalMessagesTransition, + writer.uint32(154).fork(), + ).ldelim(); + } + if (message.globalForegroundTransition !== undefined) { + Transition.encode( + message.globalForegroundTransition, + writer.uint32(162).fork(), + ).ldelim(); + } + if (message.globalBibleTransition !== undefined) { + Transition.encode( + message.globalBibleTransition, + writer.uint32(170).fork(), + ).ldelim(); + } + if (message.globalPropsTransition !== undefined) { + Transition.encode( + message.globalPropsTransition, + writer.uint32(178).fork(), + ).ldelim(); + } + if (message.globalAudioTransition !== undefined) { + Transition.encode( + message.globalAudioTransition, + writer.uint32(186).fork(), + ).ldelim(); + } + if (message.preferences !== undefined) { + Preferences.encode( + message.preferences, + writer.uint32(194).fork(), + ).ldelim(); + } + if (message.testPattern !== undefined) { + TestPatternRequest.encode( + message.testPattern, + writer.uint32(202).fork(), + ).ldelim(); + } + if (message.startupComplete !== undefined) { + GenericEvent.encode( + message.startupComplete, + writer.uint32(210).fork(), + ).ldelim(); + } + if (message.visualPlaylistDoc !== undefined) { + PlaylistDocument.encode( + message.visualPlaylistDoc, + writer.uint32(218).fork(), + ).ldelim(); + } + if (message.audioPlaylistDoc !== undefined) { + PlaylistDocument.encode( + message.audioPlaylistDoc, + writer.uint32(226).fork(), + ).ldelim(); + } + if (message.killWatchdog !== undefined) { + GenericEvent.encode( + message.killWatchdog, + writer.uint32(234).fork(), + ).ldelim(); + } + if (message.macroIcons !== undefined) { + MacroIcons.encode(message.macroIcons, writer.uint32(242).fork()).ldelim(); + } + if (message.debugTriggerDataDump !== undefined) { + GenericEvent.encode( + message.debugTriggerDataDump, + writer.uint32(250).fork(), + ).ldelim(); + } + if (message.libraryPlaylistDoc !== undefined) { + PlaylistDocument.encode( + message.libraryPlaylistDoc, + writer.uint32(258).fork(), + ).ldelim(); + } + if (message.audioPlaylistFocusUuid !== undefined) { + UUID.encode( + message.audioPlaylistFocusUuid, + writer.uint32(266).fork(), + ).ldelim(); + } return writer; }, @@ -9704,6 +7671,154 @@ export const SendData = { reader.uint32(), ); continue; + case 18: + if (tag !== 146) { + break; + } + + message.globalBackgroundTransition = Transition.decode( + reader, + reader.uint32(), + ); + continue; + case 19: + if (tag !== 154) { + break; + } + + message.globalMessagesTransition = Transition.decode( + reader, + reader.uint32(), + ); + continue; + case 20: + if (tag !== 162) { + break; + } + + message.globalForegroundTransition = Transition.decode( + reader, + reader.uint32(), + ); + continue; + case 21: + if (tag !== 170) { + break; + } + + message.globalBibleTransition = Transition.decode( + reader, + reader.uint32(), + ); + continue; + case 22: + if (tag !== 178) { + break; + } + + message.globalPropsTransition = Transition.decode( + reader, + reader.uint32(), + ); + continue; + case 23: + if (tag !== 186) { + break; + } + + message.globalAudioTransition = Transition.decode( + reader, + reader.uint32(), + ); + continue; + case 24: + if (tag !== 194) { + break; + } + + message.preferences = Preferences.decode(reader, reader.uint32()); + continue; + case 25: + if (tag !== 202) { + break; + } + + message.testPattern = TestPatternRequest.decode( + reader, + reader.uint32(), + ); + continue; + case 26: + if (tag !== 210) { + break; + } + + message.startupComplete = GenericEvent.decode( + reader, + reader.uint32(), + ); + continue; + case 27: + if (tag !== 218) { + break; + } + + message.visualPlaylistDoc = PlaylistDocument.decode( + reader, + reader.uint32(), + ); + continue; + case 28: + if (tag !== 226) { + break; + } + + message.audioPlaylistDoc = PlaylistDocument.decode( + reader, + reader.uint32(), + ); + continue; + case 29: + if (tag !== 234) { + break; + } + + message.killWatchdog = GenericEvent.decode(reader, reader.uint32()); + continue; + case 30: + if (tag !== 242) { + break; + } + + message.macroIcons = MacroIcons.decode(reader, reader.uint32()); + continue; + case 31: + if (tag !== 250) { + break; + } + + message.debugTriggerDataDump = GenericEvent.decode( + reader, + reader.uint32(), + ); + continue; + case 32: + if (tag !== 258) { + break; + } + + message.libraryPlaylistDoc = PlaylistDocument.decode( + reader, + reader.uint32(), + ); + continue; + case 33: + if (tag !== 266) { + break; + } + + message.audioPlaylistFocusUuid = UUID.decode(reader, reader.uint32()); + continue; } if ((tag & 7) === 4 || tag === 0) { break; @@ -9766,6 +7881,54 @@ export const SendData = { copyrightLayout: isSet(object.copyrightLayout) ? CopyrightLayout.fromJSON(object.copyrightLayout) : undefined, + globalBackgroundTransition: isSet(object.globalBackgroundTransition) + ? Transition.fromJSON(object.globalBackgroundTransition) + : undefined, + globalMessagesTransition: isSet(object.globalMessagesTransition) + ? Transition.fromJSON(object.globalMessagesTransition) + : undefined, + globalForegroundTransition: isSet(object.globalForegroundTransition) + ? Transition.fromJSON(object.globalForegroundTransition) + : undefined, + globalBibleTransition: isSet(object.globalBibleTransition) + ? Transition.fromJSON(object.globalBibleTransition) + : undefined, + globalPropsTransition: isSet(object.globalPropsTransition) + ? Transition.fromJSON(object.globalPropsTransition) + : undefined, + globalAudioTransition: isSet(object.globalAudioTransition) + ? Transition.fromJSON(object.globalAudioTransition) + : undefined, + preferences: isSet(object.preferences) + ? Preferences.fromJSON(object.preferences) + : undefined, + testPattern: isSet(object.testPattern) + ? TestPatternRequest.fromJSON(object.testPattern) + : undefined, + startupComplete: isSet(object.startupComplete) + ? GenericEvent.fromJSON(object.startupComplete) + : undefined, + visualPlaylistDoc: isSet(object.visualPlaylistDoc) + ? PlaylistDocument.fromJSON(object.visualPlaylistDoc) + : undefined, + audioPlaylistDoc: isSet(object.audioPlaylistDoc) + ? PlaylistDocument.fromJSON(object.audioPlaylistDoc) + : undefined, + killWatchdog: isSet(object.killWatchdog) + ? GenericEvent.fromJSON(object.killWatchdog) + : undefined, + macroIcons: isSet(object.macroIcons) + ? MacroIcons.fromJSON(object.macroIcons) + : undefined, + debugTriggerDataDump: isSet(object.debugTriggerDataDump) + ? GenericEvent.fromJSON(object.debugTriggerDataDump) + : undefined, + libraryPlaylistDoc: isSet(object.libraryPlaylistDoc) + ? PlaylistDocument.fromJSON(object.libraryPlaylistDoc) + : undefined, + audioPlaylistFocusUuid: isSet(object.audioPlaylistFocusUuid) + ? UUID.fromJSON(object.audioPlaylistFocusUuid) + : undefined, }; }, @@ -9830,6 +7993,72 @@ export const SendData = { if (message.copyrightLayout !== undefined) { obj.copyrightLayout = CopyrightLayout.toJSON(message.copyrightLayout); } + if (message.globalBackgroundTransition !== undefined) { + obj.globalBackgroundTransition = Transition.toJSON( + message.globalBackgroundTransition, + ); + } + if (message.globalMessagesTransition !== undefined) { + obj.globalMessagesTransition = Transition.toJSON( + message.globalMessagesTransition, + ); + } + if (message.globalForegroundTransition !== undefined) { + obj.globalForegroundTransition = Transition.toJSON( + message.globalForegroundTransition, + ); + } + if (message.globalBibleTransition !== undefined) { + obj.globalBibleTransition = Transition.toJSON( + message.globalBibleTransition, + ); + } + if (message.globalPropsTransition !== undefined) { + obj.globalPropsTransition = Transition.toJSON( + message.globalPropsTransition, + ); + } + if (message.globalAudioTransition !== undefined) { + obj.globalAudioTransition = Transition.toJSON( + message.globalAudioTransition, + ); + } + if (message.preferences !== undefined) { + obj.preferences = Preferences.toJSON(message.preferences); + } + if (message.testPattern !== undefined) { + obj.testPattern = TestPatternRequest.toJSON(message.testPattern); + } + if (message.startupComplete !== undefined) { + obj.startupComplete = GenericEvent.toJSON(message.startupComplete); + } + if (message.visualPlaylistDoc !== undefined) { + obj.visualPlaylistDoc = PlaylistDocument.toJSON( + message.visualPlaylistDoc, + ); + } + if (message.audioPlaylistDoc !== undefined) { + obj.audioPlaylistDoc = PlaylistDocument.toJSON(message.audioPlaylistDoc); + } + if (message.killWatchdog !== undefined) { + obj.killWatchdog = GenericEvent.toJSON(message.killWatchdog); + } + if (message.macroIcons !== undefined) { + obj.macroIcons = MacroIcons.toJSON(message.macroIcons); + } + if (message.debugTriggerDataDump !== undefined) { + obj.debugTriggerDataDump = GenericEvent.toJSON( + message.debugTriggerDataDump, + ); + } + if (message.libraryPlaylistDoc !== undefined) { + obj.libraryPlaylistDoc = PlaylistDocument.toJSON( + message.libraryPlaylistDoc, + ); + } + if (message.audioPlaylistFocusUuid !== undefined) { + obj.audioPlaylistFocusUuid = UUID.toJSON(message.audioPlaylistFocusUuid); + } return obj; }, @@ -9905,9 +8134,83 @@ export const SendData = { object.captureActionResponse !== null ? CaptureActionResponse.fromPartial(object.captureActionResponse) : undefined; - message.copyrightLayout = - object.copyrightLayout !== undefined && object.copyrightLayout !== null - ? CopyrightLayout.fromPartial(object.copyrightLayout) + message.copyrightLayout = + object.copyrightLayout !== undefined && object.copyrightLayout !== null + ? CopyrightLayout.fromPartial(object.copyrightLayout) + : undefined; + message.globalBackgroundTransition = + object.globalBackgroundTransition !== undefined && + object.globalBackgroundTransition !== null + ? Transition.fromPartial(object.globalBackgroundTransition) + : undefined; + message.globalMessagesTransition = + object.globalMessagesTransition !== undefined && + object.globalMessagesTransition !== null + ? Transition.fromPartial(object.globalMessagesTransition) + : undefined; + message.globalForegroundTransition = + object.globalForegroundTransition !== undefined && + object.globalForegroundTransition !== null + ? Transition.fromPartial(object.globalForegroundTransition) + : undefined; + message.globalBibleTransition = + object.globalBibleTransition !== undefined && + object.globalBibleTransition !== null + ? Transition.fromPartial(object.globalBibleTransition) + : undefined; + message.globalPropsTransition = + object.globalPropsTransition !== undefined && + object.globalPropsTransition !== null + ? Transition.fromPartial(object.globalPropsTransition) + : undefined; + message.globalAudioTransition = + object.globalAudioTransition !== undefined && + object.globalAudioTransition !== null + ? Transition.fromPartial(object.globalAudioTransition) + : undefined; + message.preferences = + object.preferences !== undefined && object.preferences !== null + ? Preferences.fromPartial(object.preferences) + : undefined; + message.testPattern = + object.testPattern !== undefined && object.testPattern !== null + ? TestPatternRequest.fromPartial(object.testPattern) + : undefined; + message.startupComplete = + object.startupComplete !== undefined && object.startupComplete !== null + ? GenericEvent.fromPartial(object.startupComplete) + : undefined; + message.visualPlaylistDoc = + object.visualPlaylistDoc !== undefined && + object.visualPlaylistDoc !== null + ? PlaylistDocument.fromPartial(object.visualPlaylistDoc) + : undefined; + message.audioPlaylistDoc = + object.audioPlaylistDoc !== undefined && object.audioPlaylistDoc !== null + ? PlaylistDocument.fromPartial(object.audioPlaylistDoc) + : undefined; + message.killWatchdog = + object.killWatchdog !== undefined && object.killWatchdog !== null + ? GenericEvent.fromPartial(object.killWatchdog) + : undefined; + message.macroIcons = + object.macroIcons !== undefined && object.macroIcons !== null + ? MacroIcons.fromPartial(object.macroIcons) + : undefined; + message.debugTriggerDataDump = + object.debugTriggerDataDump !== undefined && + object.debugTriggerDataDump !== null + ? GenericEvent.fromPartial(object.debugTriggerDataDump) + : undefined; + message.libraryPlaylistDoc = + object.libraryPlaylistDoc !== undefined && + object.libraryPlaylistDoc !== null + ? PlaylistDocument.fromPartial(object.libraryPlaylistDoc) + : undefined; + message.audioPlaylistFocusUuid = + object.audioPlaylistFocusUuid !== undefined && + object.audioPlaylistFocusUuid !== null + ? UUID.fromPartial(object.audioPlaylistFocusUuid) : undefined; return message; }, @@ -9921,6 +8224,7 @@ function createBaseTimerRuntimeState(): TimerRuntimeState { isRunning: false, hasOverrun: false, state: 0, + currentTime: 0, }; } @@ -9941,15 +8245,18 @@ export const TimerRuntimeState = { writer.uint32(26).fork(), ).ldelim(); } - if (message.isRunning === true) { + if (message.isRunning !== false) { writer.uint32(32).bool(message.isRunning); } - if (message.hasOverrun === true) { + if (message.hasOverrun !== false) { writer.uint32(40).bool(message.hasOverrun); } if (message.state !== 0) { writer.uint32(48).int32(message.state); } + if (message.currentTime !== 0) { + writer.uint32(57).double(message.currentTime); + } return writer; }, @@ -10003,6 +8310,13 @@ export const TimerRuntimeState = { message.state = reader.int32() as any; continue; + case 7: + if (tag !== 57) { + break; + } + + message.currentTime = reader.double(); + continue; } if ((tag & 7) === 4 || tag === 0) { break; @@ -10032,6 +8346,9 @@ export const TimerRuntimeState = { state: isSet(object.state) ? timerRuntimeState_ResourceStateFromJSON(object.state) : 0, + currentTime: isSet(object.currentTime) + ? globalThis.Number(object.currentTime) + : 0, }; }, @@ -10046,15 +8363,18 @@ export const TimerRuntimeState = { if (message.actionType !== undefined) { obj.actionType = Action_TimerType.toJSON(message.actionType); } - if (message.isRunning === true) { + if (message.isRunning !== false) { obj.isRunning = message.isRunning; } - if (message.hasOverrun === true) { + if (message.hasOverrun !== false) { obj.hasOverrun = message.hasOverrun; } if (message.state !== 0) { obj.state = timerRuntimeState_ResourceStateToJSON(message.state); } + if (message.currentTime !== 0) { + obj.currentTime = message.currentTime; + } return obj; }, @@ -10079,6 +8399,7 @@ export const TimerRuntimeState = { message.isRunning = object.isRunning ?? false; message.hasOverrun = object.hasOverrun ?? false; message.state = object.state ?? 0; + message.currentTime = object.currentTime ?? 0; return message; }, }; @@ -10176,12 +8497,158 @@ export const TimerStateUpdate = { }, }; +function createBaseHandledException(): HandledException { + return { description: '' }; +} + +export const HandledException = { + encode( + message: HandledException, + writer: _m0.Writer = _m0.Writer.create(), + ): _m0.Writer { + if (message.description !== '') { + writer.uint32(10).string(message.description); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): HandledException { + const reader = + input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseHandledException(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } + + message.description = reader.string(); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(object: any): HandledException { + return { + description: isSet(object.description) + ? globalThis.String(object.description) + : '', + }; + }, + + toJSON(message: HandledException): unknown { + const obj: any = {}; + if (message.description !== '') { + obj.description = message.description; + } + return obj; + }, + + create, I>>( + base?: I, + ): HandledException { + return HandledException.fromPartial(base ?? ({} as any)); + }, + fromPartial, I>>( + object: I, + ): HandledException { + const message = createBaseHandledException(); + message.description = object.description ?? ''; + return message; + }, +}; + +function createBaseCoreDataStateDump(): CoreDataStateDump { + return { macros: undefined }; +} + +export const CoreDataStateDump = { + encode( + message: CoreDataStateDump, + writer: _m0.Writer = _m0.Writer.create(), + ): _m0.Writer { + if (message.macros !== undefined) { + MacrosDocument.encode(message.macros, writer.uint32(10).fork()).ldelim(); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): CoreDataStateDump { + const reader = + input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseCoreDataStateDump(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } + + message.macros = MacrosDocument.decode(reader, reader.uint32()); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(object: any): CoreDataStateDump { + return { + macros: isSet(object.macros) + ? MacrosDocument.fromJSON(object.macros) + : undefined, + }; + }, + + toJSON(message: CoreDataStateDump): unknown { + const obj: any = {}; + if (message.macros !== undefined) { + obj.macros = MacrosDocument.toJSON(message.macros); + } + return obj; + }, + + create, I>>( + base?: I, + ): CoreDataStateDump { + return CoreDataStateDump.fromPartial(base ?? ({} as any)); + }, + fromPartial, I>>( + object: I, + ): CoreDataStateDump { + const message = createBaseCoreDataStateDump(); + message.macros = + object.macros !== undefined && object.macros !== null + ? MacrosDocument.fromPartial(object.macros) + : undefined; + return message; + }, +}; + function createBaseSendDataResponse(): SendDataResponse { return { messageId: 0, validateEncoderResponse: undefined, timerState: undefined, captureActionRequest: undefined, + testPattern: undefined, + handledException: undefined, + testStateDump: undefined, + audioPlaylistFocusUuid: undefined, + audioPlaylistItemTriggeredUuid: undefined, }; } @@ -10211,6 +8678,36 @@ export const SendDataResponse = { writer.uint32(34).fork(), ).ldelim(); } + if (message.testPattern !== undefined) { + TestPatternResponse.encode( + message.testPattern, + writer.uint32(42).fork(), + ).ldelim(); + } + if (message.handledException !== undefined) { + HandledException.encode( + message.handledException, + writer.uint32(50).fork(), + ).ldelim(); + } + if (message.testStateDump !== undefined) { + CoreDataStateDump.encode( + message.testStateDump, + writer.uint32(58).fork(), + ).ldelim(); + } + if (message.audioPlaylistFocusUuid !== undefined) { + UUID.encode( + message.audioPlaylistFocusUuid, + writer.uint32(66).fork(), + ).ldelim(); + } + if (message.audioPlaylistItemTriggeredUuid !== undefined) { + UUID.encode( + message.audioPlaylistItemTriggeredUuid, + writer.uint32(74).fork(), + ).ldelim(); + } return writer; }, @@ -10256,6 +8753,53 @@ export const SendDataResponse = { reader.uint32(), ); continue; + case 5: + if (tag !== 42) { + break; + } + + message.testPattern = TestPatternResponse.decode( + reader, + reader.uint32(), + ); + continue; + case 6: + if (tag !== 50) { + break; + } + + message.handledException = HandledException.decode( + reader, + reader.uint32(), + ); + continue; + case 7: + if (tag !== 58) { + break; + } + + message.testStateDump = CoreDataStateDump.decode( + reader, + reader.uint32(), + ); + continue; + case 8: + if (tag !== 66) { + break; + } + + message.audioPlaylistFocusUuid = UUID.decode(reader, reader.uint32()); + continue; + case 9: + if (tag !== 74) { + break; + } + + message.audioPlaylistItemTriggeredUuid = UUID.decode( + reader, + reader.uint32(), + ); + continue; } if ((tag & 7) === 4 || tag === 0) { break; @@ -10279,6 +8823,23 @@ export const SendDataResponse = { captureActionRequest: isSet(object.captureActionRequest) ? CaptureActionRequest.fromJSON(object.captureActionRequest) : undefined, + testPattern: isSet(object.testPattern) + ? TestPatternResponse.fromJSON(object.testPattern) + : undefined, + handledException: isSet(object.handledException) + ? HandledException.fromJSON(object.handledException) + : undefined, + testStateDump: isSet(object.testStateDump) + ? CoreDataStateDump.fromJSON(object.testStateDump) + : undefined, + audioPlaylistFocusUuid: isSet(object.audioPlaylistFocusUuid) + ? UUID.fromJSON(object.audioPlaylistFocusUuid) + : undefined, + audioPlaylistItemTriggeredUuid: isSet( + object.audioPlaylistItemTriggeredUuid, + ) + ? UUID.fromJSON(object.audioPlaylistItemTriggeredUuid) + : undefined, }; }, @@ -10300,6 +8861,23 @@ export const SendDataResponse = { message.captureActionRequest, ); } + if (message.testPattern !== undefined) { + obj.testPattern = TestPatternResponse.toJSON(message.testPattern); + } + if (message.handledException !== undefined) { + obj.handledException = HandledException.toJSON(message.handledException); + } + if (message.testStateDump !== undefined) { + obj.testStateDump = CoreDataStateDump.toJSON(message.testStateDump); + } + if (message.audioPlaylistFocusUuid !== undefined) { + obj.audioPlaylistFocusUuid = UUID.toJSON(message.audioPlaylistFocusUuid); + } + if (message.audioPlaylistItemTriggeredUuid !== undefined) { + obj.audioPlaylistItemTriggeredUuid = UUID.toJSON( + message.audioPlaylistItemTriggeredUuid, + ); + } return obj; }, @@ -10327,6 +8905,28 @@ export const SendDataResponse = { object.captureActionRequest !== null ? CaptureActionRequest.fromPartial(object.captureActionRequest) : undefined; + message.testPattern = + object.testPattern !== undefined && object.testPattern !== null + ? TestPatternResponse.fromPartial(object.testPattern) + : undefined; + message.handledException = + object.handledException !== undefined && object.handledException !== null + ? HandledException.fromPartial(object.handledException) + : undefined; + message.testStateDump = + object.testStateDump !== undefined && object.testStateDump !== null + ? CoreDataStateDump.fromPartial(object.testStateDump) + : undefined; + message.audioPlaylistFocusUuid = + object.audioPlaylistFocusUuid !== undefined && + object.audioPlaylistFocusUuid !== null + ? UUID.fromPartial(object.audioPlaylistFocusUuid) + : undefined; + message.audioPlaylistItemTriggeredUuid = + object.audioPlaylistItemTriggeredUuid !== undefined && + object.audioPlaylistItemTriggeredUuid !== null + ? UUID.fromPartial(object.audioPlaylistItemTriggeredUuid) + : undefined; return message; }, }; @@ -10723,10 +9323,10 @@ export const TriggerTransferRenderState_TimerState = { if (message.timer !== undefined) { Timer.encode(message.timer, writer.uint32(10).fork()).ldelim(); } - if (message.isRunning === true) { + if (message.isRunning !== false) { writer.uint32(16).bool(message.isRunning); } - if (message.hasOverrun === true) { + if (message.hasOverrun !== false) { writer.uint32(24).bool(message.hasOverrun); } if (message.value !== 0) { @@ -10801,10 +9401,10 @@ export const TriggerTransferRenderState_TimerState = { if (message.timer !== undefined) { obj.timer = Timer.toJSON(message.timer); } - if (message.isRunning === true) { + if (message.isRunning !== false) { obj.isRunning = message.isRunning; } - if (message.hasOverrun === true) { + if (message.hasOverrun !== false) { obj.hasOverrun = message.hasOverrun; } if (message.value !== 0) { @@ -10856,10 +9456,10 @@ export const TriggerTransferRenderState_MediaState = { if (message.currentMedia !== undefined) { Media.encode(message.currentMedia, writer.uint32(10).fork()).ldelim(); } - if (message.isPlaying === true) { + if (message.isPlaying !== false) { writer.uint32(16).bool(message.isPlaying); } - if (message.isLooping === true) { + if (message.isLooping !== false) { writer.uint32(24).bool(message.isLooping); } if (message.currentTime !== 0) { @@ -10997,10 +9597,10 @@ export const TriggerTransferRenderState_MediaState = { if (message.currentMedia !== undefined) { obj.currentMedia = Media.toJSON(message.currentMedia); } - if (message.isPlaying === true) { + if (message.isPlaying !== false) { obj.isPlaying = message.isPlaying; } - if (message.isLooping === true) { + if (message.isLooping !== false) { obj.isLooping = message.isLooping; } if (message.currentTime !== 0) { @@ -11155,7 +9755,7 @@ export const TriggerTransferRenderState_AutoAdvanceState = { message: TriggerTransferRenderState_AutoAdvanceState, writer: _m0.Writer = _m0.Writer.create(), ): _m0.Writer { - if (message.active === true) { + if (message.active !== false) { writer.uint32(8).bool(message.active); } if (message.remainingTime !== 0) { @@ -11209,7 +9809,7 @@ export const TriggerTransferRenderState_AutoAdvanceState = { toJSON(message: TriggerTransferRenderState_AutoAdvanceState): unknown { const obj: any = {}; - if (message.active === true) { + if (message.active !== false) { obj.active = message.active; } if (message.remainingTime !== 0) { @@ -11250,7 +9850,7 @@ export const TriggerTransferRenderState_TimelineState = { message: TriggerTransferRenderState_TimelineState, writer: _m0.Writer = _m0.Writer.create(), ): _m0.Writer { - if (message.active === true) { + if (message.active !== false) { writer.uint32(8).bool(message.active); } if (message.currentTime !== 0) { @@ -11317,7 +9917,7 @@ export const TriggerTransferRenderState_TimelineState = { toJSON(message: TriggerTransferRenderState_TimelineState): unknown { const obj: any = {}; - if (message.active === true) { + if (message.active !== false) { obj.active = message.active; } if (message.currentTime !== 0) { @@ -11350,13 +9950,13 @@ export const TriggerTransferRenderState_TimelineState = { function createBaseTriggerTransferRenderState_SlideState(): TriggerTransferRenderState_SlideState { return { presentation: undefined, - playlistUuid: undefined, - playlistName: '', + playlist: undefined, currentCue: undefined, nextCue: undefined, autoAdvance: undefined, timelineState: undefined, currentCueIndex: 0, + currentPlaylistIndex: 0, }; } @@ -11371,32 +9971,32 @@ export const TriggerTransferRenderState_SlideState = { writer.uint32(10).fork(), ).ldelim(); } - if (message.playlistUuid !== undefined) { - UUID.encode(message.playlistUuid, writer.uint32(18).fork()).ldelim(); - } - if (message.playlistName !== '') { - writer.uint32(26).string(message.playlistName); + if (message.playlist !== undefined) { + Playlist.encode(message.playlist, writer.uint32(18).fork()).ldelim(); } if (message.currentCue !== undefined) { - UUID.encode(message.currentCue, writer.uint32(34).fork()).ldelim(); + UUID.encode(message.currentCue, writer.uint32(26).fork()).ldelim(); } if (message.nextCue !== undefined) { - UUID.encode(message.nextCue, writer.uint32(42).fork()).ldelim(); + UUID.encode(message.nextCue, writer.uint32(34).fork()).ldelim(); } if (message.autoAdvance !== undefined) { TriggerTransferRenderState_AutoAdvanceState.encode( message.autoAdvance, - writer.uint32(50).fork(), + writer.uint32(42).fork(), ).ldelim(); } if (message.timelineState !== undefined) { TriggerTransferRenderState_TimelineState.encode( message.timelineState, - writer.uint32(58).fork(), + writer.uint32(50).fork(), ).ldelim(); } if (message.currentCueIndex !== 0) { - writer.uint32(64).int32(message.currentCueIndex); + writer.uint32(56).int32(message.currentCueIndex); + } + if (message.currentPlaylistIndex !== 0) { + writer.uint32(64).int32(message.currentPlaylistIndex); } return writer; }, @@ -11424,42 +10024,35 @@ export const TriggerTransferRenderState_SlideState = { break; } - message.playlistUuid = UUID.decode(reader, reader.uint32()); + message.playlist = Playlist.decode(reader, reader.uint32()); continue; case 3: if (tag !== 26) { break; } - message.playlistName = reader.string(); + message.currentCue = UUID.decode(reader, reader.uint32()); continue; case 4: if (tag !== 34) { break; } - message.currentCue = UUID.decode(reader, reader.uint32()); + message.nextCue = UUID.decode(reader, reader.uint32()); continue; case 5: if (tag !== 42) { break; } - message.nextCue = UUID.decode(reader, reader.uint32()); - continue; - case 6: - if (tag !== 50) { - break; - } - message.autoAdvance = TriggerTransferRenderState_AutoAdvanceState.decode( reader, reader.uint32(), ); continue; - case 7: - if (tag !== 58) { + case 6: + if (tag !== 50) { break; } @@ -11469,12 +10062,19 @@ export const TriggerTransferRenderState_SlideState = { reader.uint32(), ); continue; + case 7: + if (tag !== 56) { + break; + } + + message.currentCueIndex = reader.int32(); + continue; case 8: if (tag !== 64) { break; } - message.currentCueIndex = reader.int32(); + message.currentPlaylistIndex = reader.int32(); continue; } if ((tag & 7) === 4 || tag === 0) { @@ -11490,12 +10090,9 @@ export const TriggerTransferRenderState_SlideState = { presentation: isSet(object.presentation) ? Presentation.fromJSON(object.presentation) : undefined, - playlistUuid: isSet(object.playlistUuid) - ? UUID.fromJSON(object.playlistUuid) + playlist: isSet(object.playlist) + ? Playlist.fromJSON(object.playlist) : undefined, - playlistName: isSet(object.playlistName) - ? globalThis.String(object.playlistName) - : '', currentCue: isSet(object.currentCue) ? UUID.fromJSON(object.currentCue) : undefined, @@ -11515,6 +10112,9 @@ export const TriggerTransferRenderState_SlideState = { currentCueIndex: isSet(object.currentCueIndex) ? globalThis.Number(object.currentCueIndex) : 0, + currentPlaylistIndex: isSet(object.currentPlaylistIndex) + ? globalThis.Number(object.currentPlaylistIndex) + : 0, }; }, @@ -11523,11 +10123,8 @@ export const TriggerTransferRenderState_SlideState = { if (message.presentation !== undefined) { obj.presentation = Presentation.toJSON(message.presentation); } - if (message.playlistUuid !== undefined) { - obj.playlistUuid = UUID.toJSON(message.playlistUuid); - } - if (message.playlistName !== '') { - obj.playlistName = message.playlistName; + if (message.playlist !== undefined) { + obj.playlist = Playlist.toJSON(message.playlist); } if (message.currentCue !== undefined) { obj.currentCue = UUID.toJSON(message.currentCue); @@ -11548,6 +10145,9 @@ export const TriggerTransferRenderState_SlideState = { if (message.currentCueIndex !== 0) { obj.currentCueIndex = Math.round(message.currentCueIndex); } + if (message.currentPlaylistIndex !== 0) { + obj.currentPlaylistIndex = Math.round(message.currentPlaylistIndex); + } return obj; }, @@ -11566,11 +10166,10 @@ export const TriggerTransferRenderState_SlideState = { object.presentation !== undefined && object.presentation !== null ? Presentation.fromPartial(object.presentation) : undefined; - message.playlistUuid = - object.playlistUuid !== undefined && object.playlistUuid !== null - ? UUID.fromPartial(object.playlistUuid) + message.playlist = + object.playlist !== undefined && object.playlist !== null + ? Playlist.fromPartial(object.playlist) : undefined; - message.playlistName = object.playlistName ?? ''; message.currentCue = object.currentCue !== undefined && object.currentCue !== null ? UUID.fromPartial(object.currentCue) @@ -11592,6 +10191,7 @@ export const TriggerTransferRenderState_SlideState = { ) : undefined; message.currentCueIndex = object.currentCueIndex ?? 0; + message.currentPlaylistIndex = object.currentPlaylistIndex ?? 0; return message; }, }; @@ -11687,6 +10287,31 @@ export const TriggerTransferRenderState_TimecodeState = { }, }; +function bytesFromBase64(b64: string): Uint8Array { + if ((globalThis as any).Buffer) { + return Uint8Array.from(globalThis.Buffer.from(b64, 'base64')); + } else { + const bin = globalThis.atob(b64); + const arr = new Uint8Array(bin.length); + for (let i = 0; i < bin.length; ++i) { + arr[i] = bin.charCodeAt(i); + } + return arr; + } +} + +function base64FromBytes(arr: Uint8Array): string { + if ((globalThis as any).Buffer) { + return globalThis.Buffer.from(arr).toString('base64'); + } else { + const bin: string[] = []; + arr.forEach((byte) => { + bin.push(globalThis.String.fromCharCode(byte)); + }); + return globalThis.btoa(bin.join('')); + } +} + type Builtin = | Date | Function diff --git a/proto/proCoreTestPatterns.proto b/proto/proCoreTestPatterns.proto new file mode 100755 index 0000000..3cd696c --- /dev/null +++ b/proto/proCoreTestPatterns.proto @@ -0,0 +1,49 @@ +syntax = "proto3"; + +package rv.data; + +option cc_enable_arenas = true; +option csharp_namespace = "Pro.SerializationInterop.RVProtoData"; +option swift_prefix = "RVData_"; + +import "testPattern.proto"; +import "uuid.proto"; + +message TestPatternRequest { + message GetDefinitions { + } + + message GetCurrentState { + } + + message GetThumbnail { + .rv.data.TestPatternDefinition pattern = 1; + int32 width = 2; + int32 height = 3; + } + + oneof Request { + .rv.data.TestPatternRequest.GetDefinitions get_definitions = 1; + .rv.data.TestPatternState set_current_state = 2; + .rv.data.TestPatternRequest.GetCurrentState get_current_state = 3; + .rv.data.TestPatternRequest.GetThumbnail get_thumbnail = 4; + } +} + +message TestPatternResponse { + message GetDefinitions { + repeated .rv.data.TestPatternDefinition patterns = 1; + } + + message GetThumbnail { + .rv.data.UUID pattern = 1; + bytes image = 2; + } + + oneof Response { + .rv.data.TestPatternResponse.GetDefinitions get_definitions = 1; + .rv.data.TestPatternState get_current_state = 2; + .rv.data.TestPatternResponse.GetThumbnail get_thumbnail = 3; + } +} + diff --git a/proto/proCoreTestPatterns.ts b/proto/proCoreTestPatterns.ts new file mode 100644 index 0000000..aaabf40 --- /dev/null +++ b/proto/proCoreTestPatterns.ts @@ -0,0 +1,630 @@ +/* eslint-disable */ +import _m0 from "protobufjs/minimal"; +import { TestPatternDefinition, TestPatternState } from "./testPattern"; +import { UUID } from "./uuid"; + +export const protobufPackage = "rv.data"; + +export interface TestPatternRequest { + getDefinitions?: TestPatternRequest_GetDefinitions | undefined; + setCurrentState?: TestPatternState | undefined; + getCurrentState?: TestPatternRequest_GetCurrentState | undefined; + getThumbnail?: TestPatternRequest_GetThumbnail | undefined; +} + +export interface TestPatternRequest_GetDefinitions { +} + +export interface TestPatternRequest_GetCurrentState { +} + +export interface TestPatternRequest_GetThumbnail { + pattern: TestPatternDefinition | undefined; + width: number; + height: number; +} + +export interface TestPatternResponse { + getDefinitions?: TestPatternResponse_GetDefinitions | undefined; + getCurrentState?: TestPatternState | undefined; + getThumbnail?: TestPatternResponse_GetThumbnail | undefined; +} + +export interface TestPatternResponse_GetDefinitions { + patterns: TestPatternDefinition[]; +} + +export interface TestPatternResponse_GetThumbnail { + pattern: UUID | undefined; + image: Uint8Array; +} + +function createBaseTestPatternRequest(): TestPatternRequest { + return { getDefinitions: undefined, setCurrentState: undefined, getCurrentState: undefined, getThumbnail: undefined }; +} + +export const TestPatternRequest = { + encode(message: TestPatternRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.getDefinitions !== undefined) { + TestPatternRequest_GetDefinitions.encode(message.getDefinitions, writer.uint32(10).fork()).ldelim(); + } + if (message.setCurrentState !== undefined) { + TestPatternState.encode(message.setCurrentState, writer.uint32(18).fork()).ldelim(); + } + if (message.getCurrentState !== undefined) { + TestPatternRequest_GetCurrentState.encode(message.getCurrentState, writer.uint32(26).fork()).ldelim(); + } + if (message.getThumbnail !== undefined) { + TestPatternRequest_GetThumbnail.encode(message.getThumbnail, writer.uint32(34).fork()).ldelim(); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): TestPatternRequest { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseTestPatternRequest(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } + + message.getDefinitions = TestPatternRequest_GetDefinitions.decode(reader, reader.uint32()); + continue; + case 2: + if (tag !== 18) { + break; + } + + message.setCurrentState = TestPatternState.decode(reader, reader.uint32()); + continue; + case 3: + if (tag !== 26) { + break; + } + + message.getCurrentState = TestPatternRequest_GetCurrentState.decode(reader, reader.uint32()); + continue; + case 4: + if (tag !== 34) { + break; + } + + message.getThumbnail = TestPatternRequest_GetThumbnail.decode(reader, reader.uint32()); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(object: any): TestPatternRequest { + return { + getDefinitions: isSet(object.getDefinitions) + ? TestPatternRequest_GetDefinitions.fromJSON(object.getDefinitions) + : undefined, + setCurrentState: isSet(object.setCurrentState) ? TestPatternState.fromJSON(object.setCurrentState) : undefined, + getCurrentState: isSet(object.getCurrentState) + ? TestPatternRequest_GetCurrentState.fromJSON(object.getCurrentState) + : undefined, + getThumbnail: isSet(object.getThumbnail) + ? TestPatternRequest_GetThumbnail.fromJSON(object.getThumbnail) + : undefined, + }; + }, + + toJSON(message: TestPatternRequest): unknown { + const obj: any = {}; + if (message.getDefinitions !== undefined) { + obj.getDefinitions = TestPatternRequest_GetDefinitions.toJSON(message.getDefinitions); + } + if (message.setCurrentState !== undefined) { + obj.setCurrentState = TestPatternState.toJSON(message.setCurrentState); + } + if (message.getCurrentState !== undefined) { + obj.getCurrentState = TestPatternRequest_GetCurrentState.toJSON(message.getCurrentState); + } + if (message.getThumbnail !== undefined) { + obj.getThumbnail = TestPatternRequest_GetThumbnail.toJSON(message.getThumbnail); + } + return obj; + }, + + create, I>>(base?: I): TestPatternRequest { + return TestPatternRequest.fromPartial(base ?? ({} as any)); + }, + fromPartial, I>>(object: I): TestPatternRequest { + const message = createBaseTestPatternRequest(); + message.getDefinitions = (object.getDefinitions !== undefined && object.getDefinitions !== null) + ? TestPatternRequest_GetDefinitions.fromPartial(object.getDefinitions) + : undefined; + message.setCurrentState = (object.setCurrentState !== undefined && object.setCurrentState !== null) + ? TestPatternState.fromPartial(object.setCurrentState) + : undefined; + message.getCurrentState = (object.getCurrentState !== undefined && object.getCurrentState !== null) + ? TestPatternRequest_GetCurrentState.fromPartial(object.getCurrentState) + : undefined; + message.getThumbnail = (object.getThumbnail !== undefined && object.getThumbnail !== null) + ? TestPatternRequest_GetThumbnail.fromPartial(object.getThumbnail) + : undefined; + return message; + }, +}; + +function createBaseTestPatternRequest_GetDefinitions(): TestPatternRequest_GetDefinitions { + return {}; +} + +export const TestPatternRequest_GetDefinitions = { + encode(_: TestPatternRequest_GetDefinitions, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): TestPatternRequest_GetDefinitions { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseTestPatternRequest_GetDefinitions(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(_: any): TestPatternRequest_GetDefinitions { + return {}; + }, + + toJSON(_: TestPatternRequest_GetDefinitions): unknown { + const obj: any = {}; + return obj; + }, + + create, I>>( + base?: I, + ): TestPatternRequest_GetDefinitions { + return TestPatternRequest_GetDefinitions.fromPartial(base ?? ({} as any)); + }, + fromPartial, I>>( + _: I, + ): TestPatternRequest_GetDefinitions { + const message = createBaseTestPatternRequest_GetDefinitions(); + return message; + }, +}; + +function createBaseTestPatternRequest_GetCurrentState(): TestPatternRequest_GetCurrentState { + return {}; +} + +export const TestPatternRequest_GetCurrentState = { + encode(_: TestPatternRequest_GetCurrentState, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): TestPatternRequest_GetCurrentState { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseTestPatternRequest_GetCurrentState(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(_: any): TestPatternRequest_GetCurrentState { + return {}; + }, + + toJSON(_: TestPatternRequest_GetCurrentState): unknown { + const obj: any = {}; + return obj; + }, + + create, I>>( + base?: I, + ): TestPatternRequest_GetCurrentState { + return TestPatternRequest_GetCurrentState.fromPartial(base ?? ({} as any)); + }, + fromPartial, I>>( + _: I, + ): TestPatternRequest_GetCurrentState { + const message = createBaseTestPatternRequest_GetCurrentState(); + return message; + }, +}; + +function createBaseTestPatternRequest_GetThumbnail(): TestPatternRequest_GetThumbnail { + return { pattern: undefined, width: 0, height: 0 }; +} + +export const TestPatternRequest_GetThumbnail = { + encode(message: TestPatternRequest_GetThumbnail, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.pattern !== undefined) { + TestPatternDefinition.encode(message.pattern, writer.uint32(10).fork()).ldelim(); + } + if (message.width !== 0) { + writer.uint32(16).int32(message.width); + } + if (message.height !== 0) { + writer.uint32(24).int32(message.height); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): TestPatternRequest_GetThumbnail { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseTestPatternRequest_GetThumbnail(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } + + message.pattern = TestPatternDefinition.decode(reader, reader.uint32()); + continue; + case 2: + if (tag !== 16) { + break; + } + + message.width = reader.int32(); + continue; + case 3: + if (tag !== 24) { + break; + } + + message.height = reader.int32(); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(object: any): TestPatternRequest_GetThumbnail { + return { + pattern: isSet(object.pattern) ? TestPatternDefinition.fromJSON(object.pattern) : undefined, + width: isSet(object.width) ? globalThis.Number(object.width) : 0, + height: isSet(object.height) ? globalThis.Number(object.height) : 0, + }; + }, + + toJSON(message: TestPatternRequest_GetThumbnail): unknown { + const obj: any = {}; + if (message.pattern !== undefined) { + obj.pattern = TestPatternDefinition.toJSON(message.pattern); + } + if (message.width !== 0) { + obj.width = Math.round(message.width); + } + if (message.height !== 0) { + obj.height = Math.round(message.height); + } + return obj; + }, + + create, I>>(base?: I): TestPatternRequest_GetThumbnail { + return TestPatternRequest_GetThumbnail.fromPartial(base ?? ({} as any)); + }, + fromPartial, I>>( + object: I, + ): TestPatternRequest_GetThumbnail { + const message = createBaseTestPatternRequest_GetThumbnail(); + message.pattern = (object.pattern !== undefined && object.pattern !== null) + ? TestPatternDefinition.fromPartial(object.pattern) + : undefined; + message.width = object.width ?? 0; + message.height = object.height ?? 0; + return message; + }, +}; + +function createBaseTestPatternResponse(): TestPatternResponse { + return { getDefinitions: undefined, getCurrentState: undefined, getThumbnail: undefined }; +} + +export const TestPatternResponse = { + encode(message: TestPatternResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.getDefinitions !== undefined) { + TestPatternResponse_GetDefinitions.encode(message.getDefinitions, writer.uint32(10).fork()).ldelim(); + } + if (message.getCurrentState !== undefined) { + TestPatternState.encode(message.getCurrentState, writer.uint32(18).fork()).ldelim(); + } + if (message.getThumbnail !== undefined) { + TestPatternResponse_GetThumbnail.encode(message.getThumbnail, writer.uint32(26).fork()).ldelim(); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): TestPatternResponse { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseTestPatternResponse(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } + + message.getDefinitions = TestPatternResponse_GetDefinitions.decode(reader, reader.uint32()); + continue; + case 2: + if (tag !== 18) { + break; + } + + message.getCurrentState = TestPatternState.decode(reader, reader.uint32()); + continue; + case 3: + if (tag !== 26) { + break; + } + + message.getThumbnail = TestPatternResponse_GetThumbnail.decode(reader, reader.uint32()); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(object: any): TestPatternResponse { + return { + getDefinitions: isSet(object.getDefinitions) + ? TestPatternResponse_GetDefinitions.fromJSON(object.getDefinitions) + : undefined, + getCurrentState: isSet(object.getCurrentState) ? TestPatternState.fromJSON(object.getCurrentState) : undefined, + getThumbnail: isSet(object.getThumbnail) + ? TestPatternResponse_GetThumbnail.fromJSON(object.getThumbnail) + : undefined, + }; + }, + + toJSON(message: TestPatternResponse): unknown { + const obj: any = {}; + if (message.getDefinitions !== undefined) { + obj.getDefinitions = TestPatternResponse_GetDefinitions.toJSON(message.getDefinitions); + } + if (message.getCurrentState !== undefined) { + obj.getCurrentState = TestPatternState.toJSON(message.getCurrentState); + } + if (message.getThumbnail !== undefined) { + obj.getThumbnail = TestPatternResponse_GetThumbnail.toJSON(message.getThumbnail); + } + return obj; + }, + + create, I>>(base?: I): TestPatternResponse { + return TestPatternResponse.fromPartial(base ?? ({} as any)); + }, + fromPartial, I>>(object: I): TestPatternResponse { + const message = createBaseTestPatternResponse(); + message.getDefinitions = (object.getDefinitions !== undefined && object.getDefinitions !== null) + ? TestPatternResponse_GetDefinitions.fromPartial(object.getDefinitions) + : undefined; + message.getCurrentState = (object.getCurrentState !== undefined && object.getCurrentState !== null) + ? TestPatternState.fromPartial(object.getCurrentState) + : undefined; + message.getThumbnail = (object.getThumbnail !== undefined && object.getThumbnail !== null) + ? TestPatternResponse_GetThumbnail.fromPartial(object.getThumbnail) + : undefined; + return message; + }, +}; + +function createBaseTestPatternResponse_GetDefinitions(): TestPatternResponse_GetDefinitions { + return { patterns: [] }; +} + +export const TestPatternResponse_GetDefinitions = { + encode(message: TestPatternResponse_GetDefinitions, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + for (const v of message.patterns) { + TestPatternDefinition.encode(v!, writer.uint32(10).fork()).ldelim(); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): TestPatternResponse_GetDefinitions { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseTestPatternResponse_GetDefinitions(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } + + message.patterns.push(TestPatternDefinition.decode(reader, reader.uint32())); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(object: any): TestPatternResponse_GetDefinitions { + return { + patterns: globalThis.Array.isArray(object?.patterns) + ? object.patterns.map((e: any) => TestPatternDefinition.fromJSON(e)) + : [], + }; + }, + + toJSON(message: TestPatternResponse_GetDefinitions): unknown { + const obj: any = {}; + if (message.patterns?.length) { + obj.patterns = message.patterns.map((e) => TestPatternDefinition.toJSON(e)); + } + return obj; + }, + + create, I>>( + base?: I, + ): TestPatternResponse_GetDefinitions { + return TestPatternResponse_GetDefinitions.fromPartial(base ?? ({} as any)); + }, + fromPartial, I>>( + object: I, + ): TestPatternResponse_GetDefinitions { + const message = createBaseTestPatternResponse_GetDefinitions(); + message.patterns = object.patterns?.map((e) => TestPatternDefinition.fromPartial(e)) || []; + return message; + }, +}; + +function createBaseTestPatternResponse_GetThumbnail(): TestPatternResponse_GetThumbnail { + return { pattern: undefined, image: new Uint8Array(0) }; +} + +export const TestPatternResponse_GetThumbnail = { + encode(message: TestPatternResponse_GetThumbnail, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.pattern !== undefined) { + UUID.encode(message.pattern, writer.uint32(10).fork()).ldelim(); + } + if (message.image.length !== 0) { + writer.uint32(18).bytes(message.image); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): TestPatternResponse_GetThumbnail { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseTestPatternResponse_GetThumbnail(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } + + message.pattern = UUID.decode(reader, reader.uint32()); + continue; + case 2: + if (tag !== 18) { + break; + } + + message.image = reader.bytes(); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(object: any): TestPatternResponse_GetThumbnail { + return { + pattern: isSet(object.pattern) ? UUID.fromJSON(object.pattern) : undefined, + image: isSet(object.image) ? bytesFromBase64(object.image) : new Uint8Array(0), + }; + }, + + toJSON(message: TestPatternResponse_GetThumbnail): unknown { + const obj: any = {}; + if (message.pattern !== undefined) { + obj.pattern = UUID.toJSON(message.pattern); + } + if (message.image.length !== 0) { + obj.image = base64FromBytes(message.image); + } + return obj; + }, + + create, I>>( + base?: I, + ): TestPatternResponse_GetThumbnail { + return TestPatternResponse_GetThumbnail.fromPartial(base ?? ({} as any)); + }, + fromPartial, I>>( + object: I, + ): TestPatternResponse_GetThumbnail { + const message = createBaseTestPatternResponse_GetThumbnail(); + message.pattern = (object.pattern !== undefined && object.pattern !== null) + ? UUID.fromPartial(object.pattern) + : undefined; + message.image = object.image ?? new Uint8Array(0); + return message; + }, +}; + +function bytesFromBase64(b64: string): Uint8Array { + if ((globalThis as any).Buffer) { + return Uint8Array.from(globalThis.Buffer.from(b64, "base64")); + } else { + const bin = globalThis.atob(b64); + const arr = new Uint8Array(bin.length); + for (let i = 0; i < bin.length; ++i) { + arr[i] = bin.charCodeAt(i); + } + return arr; + } +} + +function base64FromBytes(arr: Uint8Array): string { + if ((globalThis as any).Buffer) { + return globalThis.Buffer.from(arr).toString("base64"); + } else { + const bin: string[] = []; + arr.forEach((byte) => { + bin.push(globalThis.String.fromCharCode(byte)); + }); + return globalThis.btoa(bin.join("")); + } +} + +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; + +export type DeepPartial = T extends Builtin ? T + : T extends globalThis.Array ? globalThis.Array> + : T extends ReadonlyArray ? ReadonlyArray> + : T extends {} ? { [K in keyof T]?: DeepPartial } + : Partial; + +type KeysOfUnion = T extends T ? keyof T : never; +export type Exact = P extends Builtin ? P + : P & { [K in keyof P]: Exact } & { [K in Exclude>]: never }; + +function isSet(value: any): boolean { + return value !== null && value !== undefined; +} diff --git a/proto/proscreen.ts b/proto/proscreen.ts index 2bb86b6..39387c3 100644 --- a/proto/proscreen.ts +++ b/proto/proscreen.ts @@ -106,7 +106,7 @@ export const ProPresenterScreen = { if (message.uuid !== undefined) { UUID.encode(message.uuid, writer.uint32(58).fork()).ldelim(); } - if (message.backgroundColorEnabled === true) { + if (message.backgroundColorEnabled !== false) { writer.uint32(64).bool(message.backgroundColorEnabled); } if (message.arrangementSingle !== undefined) { @@ -260,7 +260,7 @@ export const ProPresenterScreen = { if (message.uuid !== undefined) { obj.uuid = UUID.toJSON(message.uuid); } - if (message.backgroundColorEnabled === true) { + if (message.backgroundColorEnabled !== false) { obj.backgroundColorEnabled = message.backgroundColorEnabled; } if (message.arrangementSingle !== undefined) { diff --git a/proto/recording.ts b/proto/recording.ts index cc69c77..82dde54 100644 --- a/proto/recording.ts +++ b/proto/recording.ts @@ -606,7 +606,7 @@ export const Recording_Stream = { for (const v of message.audioMap) { DigitalAudio_Device_Map.encode(v!, writer.uint32(42).fork()).ldelim(); } - if (message.isAudioCustomMapped === true) { + if (message.isAudioCustomMapped !== false) { writer.uint32(48).bool(message.isAudioCustomMapped); } if (message.outputScreen !== undefined) { @@ -728,7 +728,7 @@ export const Recording_Stream = { DigitalAudio_Device_Map.toJSON(e), ); } - if (message.isAudioCustomMapped === true) { + if (message.isAudioCustomMapped !== false) { obj.isAudioCustomMapped = message.isAudioCustomMapped; } if (message.outputScreen !== undefined) { @@ -797,7 +797,7 @@ export const Recording_Stream_Encoder = { if (message.videoHeight !== 0) { writer.uint32(24).uint32(message.videoHeight); } - if (message.isInterlaced === true) { + if (message.isInterlaced !== false) { writer.uint32(32).bool(message.isInterlaced); } if (message.frameRate !== 0) { @@ -918,7 +918,7 @@ export const Recording_Stream_Encoder = { if (message.videoHeight !== 0) { obj.videoHeight = Math.round(message.videoHeight); } - if (message.isInterlaced === true) { + if (message.isInterlaced !== false) { obj.isInterlaced = message.isInterlaced; } if (message.frameRate !== 0) { diff --git a/proto/registration.proto b/proto/registration.proto new file mode 100755 index 0000000..9bf9e5f --- /dev/null +++ b/proto/registration.proto @@ -0,0 +1,448 @@ +syntax = "proto3"; + +package registration.core; + +option csharp_namespace = "Pro.SerializationInterop.RVProtoData.Registration"; +option swift_prefix = "RVData_Registration_"; + +message Request { + oneof request { + .registration.core.Register register = 1; + .registration.core.Unregister unregister = 2; + .registration.core.ChangeSeatType change_seat_type = 3; + .registration.core.GetFreeBibles get_free_bibles = 4; + .registration.core.GetPurchasedBibles get_purchased_bibles = 5; + .registration.core.ActivateBible activate_bible = 6; + .registration.core.DeactivateBible deactivate_bible = 7; + .registration.core.DownloadBible download_bible = 8; + .registration.core.RegistrationData registration_data = 9; + .registration.core.ProductInformation product_information = 10; + .registration.core.GetAvailableVersion get_upgrades_available = 11; + .registration.core.GetAvailableVersion get_downgrade_available = 12; + .registration.core.DownloadNewVersion download_new_version = 13; + .registration.core.Refresh refresh = 14; + .registration.core.ActivateLink activate_link = 15; + .registration.core.UpdateToken update_token = 16; + .registration.core.OldTokenData old_token_data = 17; + } +} + +message Callback { + oneof callback { + .registration.core.SetWatermark set_watermark = 1; + .registration.core.DeactivationComplete deactivation_complete = 2; + .registration.core.FreeBibles free_bibles = 3; + .registration.core.PurchasedBibles purchased_bibles = 4; + .registration.core.BibleActivationComplete bible_activation_complete = 5; + .registration.core.BibleDeactivationComplete bible_deactivation_complete = 6; + .registration.core.BibleDownloadProgress bible_download_progress = 7; + .registration.core.HardExit hard_exit = 8; + .registration.core.ReadRegistrationData read_registration_data = 9; + .registration.core.WriteRegistrationData write_registration_data = 10; + .registration.core.GetProductInformation get_product_information = 11; + .registration.core.Log log = 12; + .registration.core.UpgradesAvailable upgrades_available = 13; + .registration.core.DowngradeAvailable downgrade_available = 14; + .registration.core.DownloadProgress download_progress = 15; + .registration.core.Alerts alerts = 16; + .registration.core.ShowExpirationDialog show_expiration_dialog = 17; + .registration.core.ReadOldToken read_old_token = 18; + .registration.core.Token token = 19; + .registration.core.VerificationComplete verification_complete = 20; + } +} + +message Register { + string user_name = 1; + string registration_key = 2; + string display_name = 3; + .registration.core.SeatType seat_type = 4; + .registration.core.UpdateChannel channel = 5; +} + +message ActivateLink { + string identifier = 1; +} + +message Unregister { +} + +message ChangeSeatType { + .registration.core.SeatType seat_type = 1; + .registration.core.UpdateChannel channel = 2; +} + +message GetFreeBibles { +} + +message GetPurchasedBibles { +} + +message ActivateBible { + string bible_id = 1; +} + +message DeactivateBible { + string bible_id = 1; +} + +message DownloadBible { + string bible_id = 1; + string filename = 2; +} + +message RegistrationData { + bytes data = 1; + .registration.core.UpdateChannel channel = 2; +} + +message ProductInformation { + string product_name = 1; + string major_version = 2; + string minor_version = 3; + string patch_version = 4; + string build_number = 5; + int64 build_date = 6; +} + +message GetAvailableVersion { + bool include_notes = 1; + string channel = 2; + string format = 3; +} + +message DownloadNewVersion { + string url = 1; + string filename = 2; +} + +message Refresh { + .registration.core.UpdateChannel channel = 1; +} + +message UpdateToken { + .registration.core.TokenMetadata token_metadata = 1; +} + +message OldTokenData { + .registration.core.ReadTokenStatus status = 1; + .registration.core.TokenMetadata token = 2; +} + +message Token { + .registration.core.TokenMetadata token_metadata = 1; +} + +message SetWatermark { + bool is_registered = 1; + bool active_seat = 2; +} + +message ActivationComplete { + .registration.core.Status result = 1; + .registration.core.RegistrationInfo registration_info = 2; + .registration.core.Seats available_seats = 3; + .registration.core.Seats total_seats = 4; +} + +message DeactivationComplete { + .registration.core.Status result = 1; +} + +message ChangeSeatTypeComplete { + .registration.core.Status result = 1; + .registration.core.Seats available_seats = 2; + .registration.core.Seats total_seats = 3; + .registration.core.SeatType seat_type = 4; +} + +message FreeBibles { + .registration.core.Status status = 1; + repeated .registration.core.Bible bibles = 2; +} + +message PurchasedBibles { + .registration.core.Status status = 1; + repeated .registration.core.PurchasedBible bibles = 2; +} + +message BibleActivationComplete { + .registration.core.Status status = 1; + string bible_id = 2; + string download_link = 3; + repeated .registration.core.PurchasedBible bibles = 4; +} + +message BibleDeactivationComplete { + .registration.core.Status status = 1; + string bible_id = 2; + repeated .registration.core.PurchasedBible bibles = 3; +} + +message BibleDownloadProgress { + .registration.core.Status status = 1; + bool complete = 2; + float progress = 3; + string bible_id = 4; + string file_name = 5; + string download_link = 6; +} + +message HardExit { + enum Reason { + HostsFile = 0; + SystemTime = 1; + } + + .registration.core.HardExit.Reason reason = 1; +} + +message ReadRegistrationData { + string fingerprint = 1; + string identifier = 2; +} + +message ReadOldToken { +} + +message WriteRegistrationData { + bytes data = 1; +} + +message GetProductInformation { +} + +message Log { + enum Level { + Debug = 0; + Info = 1; + Warning = 2; + Error = 3; + } + + .registration.core.Log.Level level = 1; + string message = 2; +} + +message UpgradesAvailable { + .registration.core.Status status = 1; + bool is_non_production_active = 2; + string active_channel = 3; + string release_notes = 4; + repeated .registration.core.BuildInformation upgrades = 5; +} + +message DowngradeAvailable { + .registration.core.Status status = 1; + .registration.core.BuildInformation downgrade = 2; + string release_notes = 3; +} + +message DownloadProgress { + .registration.core.Status status = 1; + bool complete = 2; + float progress = 3; +} + +message Alerts { + repeated .registration.core.Alert alerts = 1; +} + +message ShowExpirationDialog { + int32 days = 1; +} + +message LicenseInfo { + .registration.core.RegistrationInfo registration_info = 1; + .registration.core.Seats available_seats = 2; + .registration.core.Seats total_seats = 3; + bool legacy = 4; +} + +message VerificationComplete { + .registration.core.Status result = 1; + .registration.core.LicenseInfo license = 2; + .registration.core.Bibles bibles = 3; + .registration.core.TokenMetadata token = 4; + .registration.core.SubscriptionInfo subscription_info = 5; + .registration.core.PopupAlertMessage alert = 6; + .registration.core.BannerMessage banner = 7; +} + +message Seats { + int32 basic = 1; + int32 advanced = 2; +} + +message SupplementalInformation { + string download_link = 1; +} + +message Bible { + string id = 1; + string name = 2; + string language = 3; + string publisher = 4; + string copyright = 5; + string display_abbreviation = 6; + string internal_abbreviation = 7; + string version = 8; + oneof additional { + .registration.core.SupplementalInformation info = 9; + } +} + +message PurchasedBible { + .registration.core.Bible metadata = 1; + .registration.core.LicensingInfo licensing_info = 2; +} + +message LicensingInfo { + int32 available_copies = 1; + int32 total_copies = 2; + bool is_active_locally = 3; + repeated .registration.core.ActiveCopy other_active_copies = 4; +} + +message ActiveCopy { + string display_name = 1; + string hostname = 2; +} + +message RegistrationInfo { + string user_name = 1; + string display_key = 2; + string display_name = 3; + int64 expiration_date = 4; + string activation_key = 5; + .registration.core.LicenseType license_type = 6; + int64 registration_date = 7; + .registration.core.SeatType seat_type = 8; + uint32 latest_available_build_number = 9; + string latest_available_version = 10; + bool has_worship_house_media_subscription = 11; + int64 maintenance_expiration_date = 12; + int64 non_extended_maintenance_expiration_date = 13; + bool is_auto_renewal_active = 14; +} + +message BuildInformation { + int32 build_number = 1; + string version = 2; + string min_os_version = 3; + int64 release_date = 4; + int64 registration_date = 5; + int64 download_size = 6; + string download_url = 7; + string channel = 8; + bool is_beta = 9; + bool is_available = 10; +} + +message Alert { + .registration.core.AlertType alert_type = 1; + string title = 2; + .registration.core.AlertContentType content_type = 3; + string content = 4; +} + +message TokenMetadata { + string access_token = 1; + string refresh_token = 2; + int64 expires_at = 3; +} + +message SubscriptionInfo { + string organization_name = 1; + .registration.core.ProContentLicenseType procontent_license_type = 2; + int64 procontent_license_expiration = 3; +} + +message DownloadLink { + string id = 1; + string url = 2; +} + +message Bibles { + repeated .registration.core.Bible free_bibles = 1; + repeated .registration.core.PurchasedBible purchased_bibles = 2; +} + +message FeatureFlags { + bool use_staging = 1; + bool use_subscription = 2; +} + +enum Status { + Success = 0; + ExpiredLicense = 1; + DeactivatedLicense = 2; + DisabledLicense = 3; + NoSeats = 4; + NoCopies = 5; + MissingLicense = 6; + TimeDiscrepancy = 7; + BibleMissing = 8; + BibleNotPurchased = 9; + BibleActivationMissing = 10; + BibleDeactivated = 11; + NetworkError = 12; + IOError = 13; + NotInitialized = 14; + UnknownError = 15; +} + +enum SeatType { + Inactive = 0; + Basic = 1; + Advanced = 2; +} + +enum LicenseType { + Trial = 0; + Rental = 1; + Standard = 2; + Campus = 3; +} + +enum UpdateChannel { + Beta = 0; + Production = 1; +} + +enum AlertType { + Info = 0; + Feature = 1; + Warning = 2; +} + +enum AlertContentType { + ContentType = 0; + Text = 1; + InternalLink = 2; + ExternalLink = 3; +} + +enum ReadTokenStatus { + ReadTokenSuccess = 0; + TokenNotPresent = 1; +} + +enum ProContentLicenseType { + Free = 0; + Premium = 1; +} + +enum PopupAlertMessage { + NoPopupAlert = 0; + Activation = 1; + ActivationNoSeat = 2; + NotSignedIn = 3; + SignedInNoSubscription = 4; +} + +enum BannerMessage { + NoBanner = 0; + ActivateProPresenter = 1; +} + diff --git a/proto/registration.ts b/proto/registration.ts new file mode 100644 index 0000000..a36cd68 --- /dev/null +++ b/proto/registration.ts @@ -0,0 +1,6373 @@ +/* eslint-disable */ +import Long from "long"; +import _m0 from "protobufjs/minimal"; + +export const protobufPackage = "registration.core"; + +export enum Status { + Success = 0, + ExpiredLicense = 1, + DeactivatedLicense = 2, + DisabledLicense = 3, + NoSeats = 4, + NoCopies = 5, + MissingLicense = 6, + TimeDiscrepancy = 7, + BibleMissing = 8, + BibleNotPurchased = 9, + BibleActivationMissing = 10, + BibleDeactivated = 11, + NetworkError = 12, + IOError = 13, + NotInitialized = 14, + UnknownError = 15, + UNRECOGNIZED = -1, +} + +export function statusFromJSON(object: any): Status { + switch (object) { + case 0: + case "Success": + return Status.Success; + case 1: + case "ExpiredLicense": + return Status.ExpiredLicense; + case 2: + case "DeactivatedLicense": + return Status.DeactivatedLicense; + case 3: + case "DisabledLicense": + return Status.DisabledLicense; + case 4: + case "NoSeats": + return Status.NoSeats; + case 5: + case "NoCopies": + return Status.NoCopies; + case 6: + case "MissingLicense": + return Status.MissingLicense; + case 7: + case "TimeDiscrepancy": + return Status.TimeDiscrepancy; + case 8: + case "BibleMissing": + return Status.BibleMissing; + case 9: + case "BibleNotPurchased": + return Status.BibleNotPurchased; + case 10: + case "BibleActivationMissing": + return Status.BibleActivationMissing; + case 11: + case "BibleDeactivated": + return Status.BibleDeactivated; + case 12: + case "NetworkError": + return Status.NetworkError; + case 13: + case "IOError": + return Status.IOError; + case 14: + case "NotInitialized": + return Status.NotInitialized; + case 15: + case "UnknownError": + return Status.UnknownError; + case -1: + case "UNRECOGNIZED": + default: + return Status.UNRECOGNIZED; + } +} + +export function statusToJSON(object: Status): string { + switch (object) { + case Status.Success: + return "Success"; + case Status.ExpiredLicense: + return "ExpiredLicense"; + case Status.DeactivatedLicense: + return "DeactivatedLicense"; + case Status.DisabledLicense: + return "DisabledLicense"; + case Status.NoSeats: + return "NoSeats"; + case Status.NoCopies: + return "NoCopies"; + case Status.MissingLicense: + return "MissingLicense"; + case Status.TimeDiscrepancy: + return "TimeDiscrepancy"; + case Status.BibleMissing: + return "BibleMissing"; + case Status.BibleNotPurchased: + return "BibleNotPurchased"; + case Status.BibleActivationMissing: + return "BibleActivationMissing"; + case Status.BibleDeactivated: + return "BibleDeactivated"; + case Status.NetworkError: + return "NetworkError"; + case Status.IOError: + return "IOError"; + case Status.NotInitialized: + return "NotInitialized"; + case Status.UnknownError: + return "UnknownError"; + case Status.UNRECOGNIZED: + default: + return "UNRECOGNIZED"; + } +} + +export enum SeatType { + Inactive = 0, + Basic = 1, + Advanced = 2, + UNRECOGNIZED = -1, +} + +export function seatTypeFromJSON(object: any): SeatType { + switch (object) { + case 0: + case "Inactive": + return SeatType.Inactive; + case 1: + case "Basic": + return SeatType.Basic; + case 2: + case "Advanced": + return SeatType.Advanced; + case -1: + case "UNRECOGNIZED": + default: + return SeatType.UNRECOGNIZED; + } +} + +export function seatTypeToJSON(object: SeatType): string { + switch (object) { + case SeatType.Inactive: + return "Inactive"; + case SeatType.Basic: + return "Basic"; + case SeatType.Advanced: + return "Advanced"; + case SeatType.UNRECOGNIZED: + default: + return "UNRECOGNIZED"; + } +} + +export enum LicenseType { + Trial = 0, + Rental = 1, + Standard = 2, + Campus = 3, + UNRECOGNIZED = -1, +} + +export function licenseTypeFromJSON(object: any): LicenseType { + switch (object) { + case 0: + case "Trial": + return LicenseType.Trial; + case 1: + case "Rental": + return LicenseType.Rental; + case 2: + case "Standard": + return LicenseType.Standard; + case 3: + case "Campus": + return LicenseType.Campus; + case -1: + case "UNRECOGNIZED": + default: + return LicenseType.UNRECOGNIZED; + } +} + +export function licenseTypeToJSON(object: LicenseType): string { + switch (object) { + case LicenseType.Trial: + return "Trial"; + case LicenseType.Rental: + return "Rental"; + case LicenseType.Standard: + return "Standard"; + case LicenseType.Campus: + return "Campus"; + case LicenseType.UNRECOGNIZED: + default: + return "UNRECOGNIZED"; + } +} + +export enum UpdateChannel { + Beta = 0, + Production = 1, + UNRECOGNIZED = -1, +} + +export function updateChannelFromJSON(object: any): UpdateChannel { + switch (object) { + case 0: + case "Beta": + return UpdateChannel.Beta; + case 1: + case "Production": + return UpdateChannel.Production; + case -1: + case "UNRECOGNIZED": + default: + return UpdateChannel.UNRECOGNIZED; + } +} + +export function updateChannelToJSON(object: UpdateChannel): string { + switch (object) { + case UpdateChannel.Beta: + return "Beta"; + case UpdateChannel.Production: + return "Production"; + case UpdateChannel.UNRECOGNIZED: + default: + return "UNRECOGNIZED"; + } +} + +export enum AlertType { + Info = 0, + Feature = 1, + Warning = 2, + UNRECOGNIZED = -1, +} + +export function alertTypeFromJSON(object: any): AlertType { + switch (object) { + case 0: + case "Info": + return AlertType.Info; + case 1: + case "Feature": + return AlertType.Feature; + case 2: + case "Warning": + return AlertType.Warning; + case -1: + case "UNRECOGNIZED": + default: + return AlertType.UNRECOGNIZED; + } +} + +export function alertTypeToJSON(object: AlertType): string { + switch (object) { + case AlertType.Info: + return "Info"; + case AlertType.Feature: + return "Feature"; + case AlertType.Warning: + return "Warning"; + case AlertType.UNRECOGNIZED: + default: + return "UNRECOGNIZED"; + } +} + +export enum AlertContentType { + ContentType = 0, + Text = 1, + InternalLink = 2, + ExternalLink = 3, + UNRECOGNIZED = -1, +} + +export function alertContentTypeFromJSON(object: any): AlertContentType { + switch (object) { + case 0: + case "ContentType": + return AlertContentType.ContentType; + case 1: + case "Text": + return AlertContentType.Text; + case 2: + case "InternalLink": + return AlertContentType.InternalLink; + case 3: + case "ExternalLink": + return AlertContentType.ExternalLink; + case -1: + case "UNRECOGNIZED": + default: + return AlertContentType.UNRECOGNIZED; + } +} + +export function alertContentTypeToJSON(object: AlertContentType): string { + switch (object) { + case AlertContentType.ContentType: + return "ContentType"; + case AlertContentType.Text: + return "Text"; + case AlertContentType.InternalLink: + return "InternalLink"; + case AlertContentType.ExternalLink: + return "ExternalLink"; + case AlertContentType.UNRECOGNIZED: + default: + return "UNRECOGNIZED"; + } +} + +export enum ReadTokenStatus { + ReadTokenSuccess = 0, + TokenNotPresent = 1, + UNRECOGNIZED = -1, +} + +export function readTokenStatusFromJSON(object: any): ReadTokenStatus { + switch (object) { + case 0: + case "ReadTokenSuccess": + return ReadTokenStatus.ReadTokenSuccess; + case 1: + case "TokenNotPresent": + return ReadTokenStatus.TokenNotPresent; + case -1: + case "UNRECOGNIZED": + default: + return ReadTokenStatus.UNRECOGNIZED; + } +} + +export function readTokenStatusToJSON(object: ReadTokenStatus): string { + switch (object) { + case ReadTokenStatus.ReadTokenSuccess: + return "ReadTokenSuccess"; + case ReadTokenStatus.TokenNotPresent: + return "TokenNotPresent"; + case ReadTokenStatus.UNRECOGNIZED: + default: + return "UNRECOGNIZED"; + } +} + +export enum ProContentLicenseType { + Free = 0, + Premium = 1, + UNRECOGNIZED = -1, +} + +export function proContentLicenseTypeFromJSON(object: any): ProContentLicenseType { + switch (object) { + case 0: + case "Free": + return ProContentLicenseType.Free; + case 1: + case "Premium": + return ProContentLicenseType.Premium; + case -1: + case "UNRECOGNIZED": + default: + return ProContentLicenseType.UNRECOGNIZED; + } +} + +export function proContentLicenseTypeToJSON(object: ProContentLicenseType): string { + switch (object) { + case ProContentLicenseType.Free: + return "Free"; + case ProContentLicenseType.Premium: + return "Premium"; + case ProContentLicenseType.UNRECOGNIZED: + default: + return "UNRECOGNIZED"; + } +} + +export enum PopupAlertMessage { + NoPopupAlert = 0, + Activation = 1, + ActivationNoSeat = 2, + NotSignedIn = 3, + SignedInNoSubscription = 4, + UNRECOGNIZED = -1, +} + +export function popupAlertMessageFromJSON(object: any): PopupAlertMessage { + switch (object) { + case 0: + case "NoPopupAlert": + return PopupAlertMessage.NoPopupAlert; + case 1: + case "Activation": + return PopupAlertMessage.Activation; + case 2: + case "ActivationNoSeat": + return PopupAlertMessage.ActivationNoSeat; + case 3: + case "NotSignedIn": + return PopupAlertMessage.NotSignedIn; + case 4: + case "SignedInNoSubscription": + return PopupAlertMessage.SignedInNoSubscription; + case -1: + case "UNRECOGNIZED": + default: + return PopupAlertMessage.UNRECOGNIZED; + } +} + +export function popupAlertMessageToJSON(object: PopupAlertMessage): string { + switch (object) { + case PopupAlertMessage.NoPopupAlert: + return "NoPopupAlert"; + case PopupAlertMessage.Activation: + return "Activation"; + case PopupAlertMessage.ActivationNoSeat: + return "ActivationNoSeat"; + case PopupAlertMessage.NotSignedIn: + return "NotSignedIn"; + case PopupAlertMessage.SignedInNoSubscription: + return "SignedInNoSubscription"; + case PopupAlertMessage.UNRECOGNIZED: + default: + return "UNRECOGNIZED"; + } +} + +export enum BannerMessage { + NoBanner = 0, + ActivateProPresenter = 1, + UNRECOGNIZED = -1, +} + +export function bannerMessageFromJSON(object: any): BannerMessage { + switch (object) { + case 0: + case "NoBanner": + return BannerMessage.NoBanner; + case 1: + case "ActivateProPresenter": + return BannerMessage.ActivateProPresenter; + case -1: + case "UNRECOGNIZED": + default: + return BannerMessage.UNRECOGNIZED; + } +} + +export function bannerMessageToJSON(object: BannerMessage): string { + switch (object) { + case BannerMessage.NoBanner: + return "NoBanner"; + case BannerMessage.ActivateProPresenter: + return "ActivateProPresenter"; + case BannerMessage.UNRECOGNIZED: + default: + return "UNRECOGNIZED"; + } +} + +export interface Request { + register?: Register | undefined; + unregister?: Unregister | undefined; + changeSeatType?: ChangeSeatType | undefined; + getFreeBibles?: GetFreeBibles | undefined; + getPurchasedBibles?: GetPurchasedBibles | undefined; + activateBible?: ActivateBible | undefined; + deactivateBible?: DeactivateBible | undefined; + downloadBible?: DownloadBible | undefined; + registrationData?: RegistrationData | undefined; + productInformation?: ProductInformation | undefined; + getUpgradesAvailable?: GetAvailableVersion | undefined; + getDowngradeAvailable?: GetAvailableVersion | undefined; + downloadNewVersion?: DownloadNewVersion | undefined; + refresh?: Refresh | undefined; + activateLink?: ActivateLink | undefined; + updateToken?: UpdateToken | undefined; + oldTokenData?: OldTokenData | undefined; +} + +export interface Callback { + setWatermark?: SetWatermark | undefined; + deactivationComplete?: DeactivationComplete | undefined; + freeBibles?: FreeBibles | undefined; + purchasedBibles?: PurchasedBibles | undefined; + bibleActivationComplete?: BibleActivationComplete | undefined; + bibleDeactivationComplete?: BibleDeactivationComplete | undefined; + bibleDownloadProgress?: BibleDownloadProgress | undefined; + hardExit?: HardExit | undefined; + readRegistrationData?: ReadRegistrationData | undefined; + writeRegistrationData?: WriteRegistrationData | undefined; + getProductInformation?: GetProductInformation | undefined; + log?: Log | undefined; + upgradesAvailable?: UpgradesAvailable | undefined; + downgradeAvailable?: DowngradeAvailable | undefined; + downloadProgress?: DownloadProgress | undefined; + alerts?: Alerts | undefined; + showExpirationDialog?: ShowExpirationDialog | undefined; + readOldToken?: ReadOldToken | undefined; + token?: Token | undefined; + verificationComplete?: VerificationComplete | undefined; +} + +export interface Register { + userName: string; + registrationKey: string; + displayName: string; + seatType: SeatType; + channel: UpdateChannel; +} + +export interface ActivateLink { + identifier: string; +} + +export interface Unregister { +} + +export interface ChangeSeatType { + seatType: SeatType; + channel: UpdateChannel; +} + +export interface GetFreeBibles { +} + +export interface GetPurchasedBibles { +} + +export interface ActivateBible { + bibleId: string; +} + +export interface DeactivateBible { + bibleId: string; +} + +export interface DownloadBible { + bibleId: string; + filename: string; +} + +export interface RegistrationData { + data: Uint8Array; + channel: UpdateChannel; +} + +export interface ProductInformation { + productName: string; + majorVersion: string; + minorVersion: string; + patchVersion: string; + buildNumber: string; + buildDate: number; +} + +export interface GetAvailableVersion { + includeNotes: boolean; + channel: string; + format: string; +} + +export interface DownloadNewVersion { + url: string; + filename: string; +} + +export interface Refresh { + channel: UpdateChannel; +} + +export interface UpdateToken { + tokenMetadata: TokenMetadata | undefined; +} + +export interface OldTokenData { + status: ReadTokenStatus; + token: TokenMetadata | undefined; +} + +export interface Token { + tokenMetadata: TokenMetadata | undefined; +} + +export interface SetWatermark { + isRegistered: boolean; + activeSeat: boolean; +} + +export interface ActivationComplete { + result: Status; + registrationInfo: RegistrationInfo | undefined; + availableSeats: Seats | undefined; + totalSeats: Seats | undefined; +} + +export interface DeactivationComplete { + result: Status; +} + +export interface ChangeSeatTypeComplete { + result: Status; + availableSeats: Seats | undefined; + totalSeats: Seats | undefined; + seatType: SeatType; +} + +export interface FreeBibles { + status: Status; + bibles: Bible[]; +} + +export interface PurchasedBibles { + status: Status; + bibles: PurchasedBible[]; +} + +export interface BibleActivationComplete { + status: Status; + bibleId: string; + downloadLink: string; + bibles: PurchasedBible[]; +} + +export interface BibleDeactivationComplete { + status: Status; + bibleId: string; + bibles: PurchasedBible[]; +} + +export interface BibleDownloadProgress { + status: Status; + complete: boolean; + progress: number; + bibleId: string; + fileName: string; + downloadLink: string; +} + +export interface HardExit { + reason: HardExit_Reason; +} + +export enum HardExit_Reason { + HostsFile = 0, + SystemTime = 1, + UNRECOGNIZED = -1, +} + +export function hardExit_ReasonFromJSON(object: any): HardExit_Reason { + switch (object) { + case 0: + case "HostsFile": + return HardExit_Reason.HostsFile; + case 1: + case "SystemTime": + return HardExit_Reason.SystemTime; + case -1: + case "UNRECOGNIZED": + default: + return HardExit_Reason.UNRECOGNIZED; + } +} + +export function hardExit_ReasonToJSON(object: HardExit_Reason): string { + switch (object) { + case HardExit_Reason.HostsFile: + return "HostsFile"; + case HardExit_Reason.SystemTime: + return "SystemTime"; + case HardExit_Reason.UNRECOGNIZED: + default: + return "UNRECOGNIZED"; + } +} + +export interface ReadRegistrationData { + fingerprint: string; + identifier: string; +} + +export interface ReadOldToken { +} + +export interface WriteRegistrationData { + data: Uint8Array; +} + +export interface GetProductInformation { +} + +export interface Log { + level: Log_Level; + message: string; +} + +export enum Log_Level { + Debug = 0, + Info = 1, + Warning = 2, + Error = 3, + UNRECOGNIZED = -1, +} + +export function log_LevelFromJSON(object: any): Log_Level { + switch (object) { + case 0: + case "Debug": + return Log_Level.Debug; + case 1: + case "Info": + return Log_Level.Info; + case 2: + case "Warning": + return Log_Level.Warning; + case 3: + case "Error": + return Log_Level.Error; + case -1: + case "UNRECOGNIZED": + default: + return Log_Level.UNRECOGNIZED; + } +} + +export function log_LevelToJSON(object: Log_Level): string { + switch (object) { + case Log_Level.Debug: + return "Debug"; + case Log_Level.Info: + return "Info"; + case Log_Level.Warning: + return "Warning"; + case Log_Level.Error: + return "Error"; + case Log_Level.UNRECOGNIZED: + default: + return "UNRECOGNIZED"; + } +} + +export interface UpgradesAvailable { + status: Status; + isNonProductionActive: boolean; + activeChannel: string; + releaseNotes: string; + upgrades: BuildInformation[]; +} + +export interface DowngradeAvailable { + status: Status; + downgrade: BuildInformation | undefined; + releaseNotes: string; +} + +export interface DownloadProgress { + status: Status; + complete: boolean; + progress: number; +} + +export interface Alerts { + alerts: Alert[]; +} + +export interface ShowExpirationDialog { + days: number; +} + +export interface LicenseInfo { + registrationInfo: RegistrationInfo | undefined; + availableSeats: Seats | undefined; + totalSeats: Seats | undefined; + legacy: boolean; +} + +export interface VerificationComplete { + result: Status; + license: LicenseInfo | undefined; + bibles: Bibles | undefined; + token: TokenMetadata | undefined; + subscriptionInfo: SubscriptionInfo | undefined; + alert: PopupAlertMessage; + banner: BannerMessage; +} + +export interface Seats { + basic: number; + advanced: number; +} + +export interface SupplementalInformation { + downloadLink: string; +} + +export interface Bible { + id: string; + name: string; + language: string; + publisher: string; + copyright: string; + displayAbbreviation: string; + internalAbbreviation: string; + version: string; + info?: SupplementalInformation | undefined; +} + +export interface PurchasedBible { + metadata: Bible | undefined; + licensingInfo: LicensingInfo | undefined; +} + +export interface LicensingInfo { + availableCopies: number; + totalCopies: number; + isActiveLocally: boolean; + otherActiveCopies: ActiveCopy[]; +} + +export interface ActiveCopy { + displayName: string; + hostname: string; +} + +export interface RegistrationInfo { + userName: string; + displayKey: string; + displayName: string; + expirationDate: number; + activationKey: string; + licenseType: LicenseType; + registrationDate: number; + seatType: SeatType; + latestAvailableBuildNumber: number; + latestAvailableVersion: string; + hasWorshipHouseMediaSubscription: boolean; + maintenanceExpirationDate: number; + nonExtendedMaintenanceExpirationDate: number; + isAutoRenewalActive: boolean; +} + +export interface BuildInformation { + buildNumber: number; + version: string; + minOsVersion: string; + releaseDate: number; + registrationDate: number; + downloadSize: number; + downloadUrl: string; + channel: string; + isBeta: boolean; + isAvailable: boolean; +} + +export interface Alert { + alertType: AlertType; + title: string; + contentType: AlertContentType; + content: string; +} + +export interface TokenMetadata { + accessToken: string; + refreshToken: string; + expiresAt: number; +} + +export interface SubscriptionInfo { + organizationName: string; + procontentLicenseType: ProContentLicenseType; + procontentLicenseExpiration: number; +} + +export interface DownloadLink { + id: string; + url: string; +} + +export interface Bibles { + freeBibles: Bible[]; + purchasedBibles: PurchasedBible[]; +} + +export interface FeatureFlags { + useStaging: boolean; + useSubscription: boolean; +} + +function createBaseRequest(): Request { + return { + register: undefined, + unregister: undefined, + changeSeatType: undefined, + getFreeBibles: undefined, + getPurchasedBibles: undefined, + activateBible: undefined, + deactivateBible: undefined, + downloadBible: undefined, + registrationData: undefined, + productInformation: undefined, + getUpgradesAvailable: undefined, + getDowngradeAvailable: undefined, + downloadNewVersion: undefined, + refresh: undefined, + activateLink: undefined, + updateToken: undefined, + oldTokenData: undefined, + }; +} + +export const Request = { + encode(message: Request, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.register !== undefined) { + Register.encode(message.register, writer.uint32(10).fork()).ldelim(); + } + if (message.unregister !== undefined) { + Unregister.encode(message.unregister, writer.uint32(18).fork()).ldelim(); + } + if (message.changeSeatType !== undefined) { + ChangeSeatType.encode(message.changeSeatType, writer.uint32(26).fork()).ldelim(); + } + if (message.getFreeBibles !== undefined) { + GetFreeBibles.encode(message.getFreeBibles, writer.uint32(34).fork()).ldelim(); + } + if (message.getPurchasedBibles !== undefined) { + GetPurchasedBibles.encode(message.getPurchasedBibles, writer.uint32(42).fork()).ldelim(); + } + if (message.activateBible !== undefined) { + ActivateBible.encode(message.activateBible, writer.uint32(50).fork()).ldelim(); + } + if (message.deactivateBible !== undefined) { + DeactivateBible.encode(message.deactivateBible, writer.uint32(58).fork()).ldelim(); + } + if (message.downloadBible !== undefined) { + DownloadBible.encode(message.downloadBible, writer.uint32(66).fork()).ldelim(); + } + if (message.registrationData !== undefined) { + RegistrationData.encode(message.registrationData, writer.uint32(74).fork()).ldelim(); + } + if (message.productInformation !== undefined) { + ProductInformation.encode(message.productInformation, writer.uint32(82).fork()).ldelim(); + } + if (message.getUpgradesAvailable !== undefined) { + GetAvailableVersion.encode(message.getUpgradesAvailable, writer.uint32(90).fork()).ldelim(); + } + if (message.getDowngradeAvailable !== undefined) { + GetAvailableVersion.encode(message.getDowngradeAvailable, writer.uint32(98).fork()).ldelim(); + } + if (message.downloadNewVersion !== undefined) { + DownloadNewVersion.encode(message.downloadNewVersion, writer.uint32(106).fork()).ldelim(); + } + if (message.refresh !== undefined) { + Refresh.encode(message.refresh, writer.uint32(114).fork()).ldelim(); + } + if (message.activateLink !== undefined) { + ActivateLink.encode(message.activateLink, writer.uint32(122).fork()).ldelim(); + } + if (message.updateToken !== undefined) { + UpdateToken.encode(message.updateToken, writer.uint32(130).fork()).ldelim(); + } + if (message.oldTokenData !== undefined) { + OldTokenData.encode(message.oldTokenData, writer.uint32(138).fork()).ldelim(); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): Request { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseRequest(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } + + message.register = Register.decode(reader, reader.uint32()); + continue; + case 2: + if (tag !== 18) { + break; + } + + message.unregister = Unregister.decode(reader, reader.uint32()); + continue; + case 3: + if (tag !== 26) { + break; + } + + message.changeSeatType = ChangeSeatType.decode(reader, reader.uint32()); + continue; + case 4: + if (tag !== 34) { + break; + } + + message.getFreeBibles = GetFreeBibles.decode(reader, reader.uint32()); + continue; + case 5: + if (tag !== 42) { + break; + } + + message.getPurchasedBibles = GetPurchasedBibles.decode(reader, reader.uint32()); + continue; + case 6: + if (tag !== 50) { + break; + } + + message.activateBible = ActivateBible.decode(reader, reader.uint32()); + continue; + case 7: + if (tag !== 58) { + break; + } + + message.deactivateBible = DeactivateBible.decode(reader, reader.uint32()); + continue; + case 8: + if (tag !== 66) { + break; + } + + message.downloadBible = DownloadBible.decode(reader, reader.uint32()); + continue; + case 9: + if (tag !== 74) { + break; + } + + message.registrationData = RegistrationData.decode(reader, reader.uint32()); + continue; + case 10: + if (tag !== 82) { + break; + } + + message.productInformation = ProductInformation.decode(reader, reader.uint32()); + continue; + case 11: + if (tag !== 90) { + break; + } + + message.getUpgradesAvailable = GetAvailableVersion.decode(reader, reader.uint32()); + continue; + case 12: + if (tag !== 98) { + break; + } + + message.getDowngradeAvailable = GetAvailableVersion.decode(reader, reader.uint32()); + continue; + case 13: + if (tag !== 106) { + break; + } + + message.downloadNewVersion = DownloadNewVersion.decode(reader, reader.uint32()); + continue; + case 14: + if (tag !== 114) { + break; + } + + message.refresh = Refresh.decode(reader, reader.uint32()); + continue; + case 15: + if (tag !== 122) { + break; + } + + message.activateLink = ActivateLink.decode(reader, reader.uint32()); + continue; + case 16: + if (tag !== 130) { + break; + } + + message.updateToken = UpdateToken.decode(reader, reader.uint32()); + continue; + case 17: + if (tag !== 138) { + break; + } + + message.oldTokenData = OldTokenData.decode(reader, reader.uint32()); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(object: any): Request { + return { + register: isSet(object.register) ? Register.fromJSON(object.register) : undefined, + unregister: isSet(object.unregister) ? Unregister.fromJSON(object.unregister) : undefined, + changeSeatType: isSet(object.changeSeatType) ? ChangeSeatType.fromJSON(object.changeSeatType) : undefined, + getFreeBibles: isSet(object.getFreeBibles) ? GetFreeBibles.fromJSON(object.getFreeBibles) : undefined, + getPurchasedBibles: isSet(object.getPurchasedBibles) + ? GetPurchasedBibles.fromJSON(object.getPurchasedBibles) + : undefined, + activateBible: isSet(object.activateBible) ? ActivateBible.fromJSON(object.activateBible) : undefined, + deactivateBible: isSet(object.deactivateBible) ? DeactivateBible.fromJSON(object.deactivateBible) : undefined, + downloadBible: isSet(object.downloadBible) ? DownloadBible.fromJSON(object.downloadBible) : undefined, + registrationData: isSet(object.registrationData) ? RegistrationData.fromJSON(object.registrationData) : undefined, + productInformation: isSet(object.productInformation) + ? ProductInformation.fromJSON(object.productInformation) + : undefined, + getUpgradesAvailable: isSet(object.getUpgradesAvailable) + ? GetAvailableVersion.fromJSON(object.getUpgradesAvailable) + : undefined, + getDowngradeAvailable: isSet(object.getDowngradeAvailable) + ? GetAvailableVersion.fromJSON(object.getDowngradeAvailable) + : undefined, + downloadNewVersion: isSet(object.downloadNewVersion) + ? DownloadNewVersion.fromJSON(object.downloadNewVersion) + : undefined, + refresh: isSet(object.refresh) ? Refresh.fromJSON(object.refresh) : undefined, + activateLink: isSet(object.activateLink) ? ActivateLink.fromJSON(object.activateLink) : undefined, + updateToken: isSet(object.updateToken) ? UpdateToken.fromJSON(object.updateToken) : undefined, + oldTokenData: isSet(object.oldTokenData) ? OldTokenData.fromJSON(object.oldTokenData) : undefined, + }; + }, + + toJSON(message: Request): unknown { + const obj: any = {}; + if (message.register !== undefined) { + obj.register = Register.toJSON(message.register); + } + if (message.unregister !== undefined) { + obj.unregister = Unregister.toJSON(message.unregister); + } + if (message.changeSeatType !== undefined) { + obj.changeSeatType = ChangeSeatType.toJSON(message.changeSeatType); + } + if (message.getFreeBibles !== undefined) { + obj.getFreeBibles = GetFreeBibles.toJSON(message.getFreeBibles); + } + if (message.getPurchasedBibles !== undefined) { + obj.getPurchasedBibles = GetPurchasedBibles.toJSON(message.getPurchasedBibles); + } + if (message.activateBible !== undefined) { + obj.activateBible = ActivateBible.toJSON(message.activateBible); + } + if (message.deactivateBible !== undefined) { + obj.deactivateBible = DeactivateBible.toJSON(message.deactivateBible); + } + if (message.downloadBible !== undefined) { + obj.downloadBible = DownloadBible.toJSON(message.downloadBible); + } + if (message.registrationData !== undefined) { + obj.registrationData = RegistrationData.toJSON(message.registrationData); + } + if (message.productInformation !== undefined) { + obj.productInformation = ProductInformation.toJSON(message.productInformation); + } + if (message.getUpgradesAvailable !== undefined) { + obj.getUpgradesAvailable = GetAvailableVersion.toJSON(message.getUpgradesAvailable); + } + if (message.getDowngradeAvailable !== undefined) { + obj.getDowngradeAvailable = GetAvailableVersion.toJSON(message.getDowngradeAvailable); + } + if (message.downloadNewVersion !== undefined) { + obj.downloadNewVersion = DownloadNewVersion.toJSON(message.downloadNewVersion); + } + if (message.refresh !== undefined) { + obj.refresh = Refresh.toJSON(message.refresh); + } + if (message.activateLink !== undefined) { + obj.activateLink = ActivateLink.toJSON(message.activateLink); + } + if (message.updateToken !== undefined) { + obj.updateToken = UpdateToken.toJSON(message.updateToken); + } + if (message.oldTokenData !== undefined) { + obj.oldTokenData = OldTokenData.toJSON(message.oldTokenData); + } + return obj; + }, + + create, I>>(base?: I): Request { + return Request.fromPartial(base ?? ({} as any)); + }, + fromPartial, I>>(object: I): Request { + const message = createBaseRequest(); + message.register = (object.register !== undefined && object.register !== null) + ? Register.fromPartial(object.register) + : undefined; + message.unregister = (object.unregister !== undefined && object.unregister !== null) + ? Unregister.fromPartial(object.unregister) + : undefined; + message.changeSeatType = (object.changeSeatType !== undefined && object.changeSeatType !== null) + ? ChangeSeatType.fromPartial(object.changeSeatType) + : undefined; + message.getFreeBibles = (object.getFreeBibles !== undefined && object.getFreeBibles !== null) + ? GetFreeBibles.fromPartial(object.getFreeBibles) + : undefined; + message.getPurchasedBibles = (object.getPurchasedBibles !== undefined && object.getPurchasedBibles !== null) + ? GetPurchasedBibles.fromPartial(object.getPurchasedBibles) + : undefined; + message.activateBible = (object.activateBible !== undefined && object.activateBible !== null) + ? ActivateBible.fromPartial(object.activateBible) + : undefined; + message.deactivateBible = (object.deactivateBible !== undefined && object.deactivateBible !== null) + ? DeactivateBible.fromPartial(object.deactivateBible) + : undefined; + message.downloadBible = (object.downloadBible !== undefined && object.downloadBible !== null) + ? DownloadBible.fromPartial(object.downloadBible) + : undefined; + message.registrationData = (object.registrationData !== undefined && object.registrationData !== null) + ? RegistrationData.fromPartial(object.registrationData) + : undefined; + message.productInformation = (object.productInformation !== undefined && object.productInformation !== null) + ? ProductInformation.fromPartial(object.productInformation) + : undefined; + message.getUpgradesAvailable = (object.getUpgradesAvailable !== undefined && object.getUpgradesAvailable !== null) + ? GetAvailableVersion.fromPartial(object.getUpgradesAvailable) + : undefined; + message.getDowngradeAvailable = + (object.getDowngradeAvailable !== undefined && object.getDowngradeAvailable !== null) + ? GetAvailableVersion.fromPartial(object.getDowngradeAvailable) + : undefined; + message.downloadNewVersion = (object.downloadNewVersion !== undefined && object.downloadNewVersion !== null) + ? DownloadNewVersion.fromPartial(object.downloadNewVersion) + : undefined; + message.refresh = (object.refresh !== undefined && object.refresh !== null) + ? Refresh.fromPartial(object.refresh) + : undefined; + message.activateLink = (object.activateLink !== undefined && object.activateLink !== null) + ? ActivateLink.fromPartial(object.activateLink) + : undefined; + message.updateToken = (object.updateToken !== undefined && object.updateToken !== null) + ? UpdateToken.fromPartial(object.updateToken) + : undefined; + message.oldTokenData = (object.oldTokenData !== undefined && object.oldTokenData !== null) + ? OldTokenData.fromPartial(object.oldTokenData) + : undefined; + return message; + }, +}; + +function createBaseCallback(): Callback { + return { + setWatermark: undefined, + deactivationComplete: undefined, + freeBibles: undefined, + purchasedBibles: undefined, + bibleActivationComplete: undefined, + bibleDeactivationComplete: undefined, + bibleDownloadProgress: undefined, + hardExit: undefined, + readRegistrationData: undefined, + writeRegistrationData: undefined, + getProductInformation: undefined, + log: undefined, + upgradesAvailable: undefined, + downgradeAvailable: undefined, + downloadProgress: undefined, + alerts: undefined, + showExpirationDialog: undefined, + readOldToken: undefined, + token: undefined, + verificationComplete: undefined, + }; +} + +export const Callback = { + encode(message: Callback, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.setWatermark !== undefined) { + SetWatermark.encode(message.setWatermark, writer.uint32(10).fork()).ldelim(); + } + if (message.deactivationComplete !== undefined) { + DeactivationComplete.encode(message.deactivationComplete, writer.uint32(18).fork()).ldelim(); + } + if (message.freeBibles !== undefined) { + FreeBibles.encode(message.freeBibles, writer.uint32(26).fork()).ldelim(); + } + if (message.purchasedBibles !== undefined) { + PurchasedBibles.encode(message.purchasedBibles, writer.uint32(34).fork()).ldelim(); + } + if (message.bibleActivationComplete !== undefined) { + BibleActivationComplete.encode(message.bibleActivationComplete, writer.uint32(42).fork()).ldelim(); + } + if (message.bibleDeactivationComplete !== undefined) { + BibleDeactivationComplete.encode(message.bibleDeactivationComplete, writer.uint32(50).fork()).ldelim(); + } + if (message.bibleDownloadProgress !== undefined) { + BibleDownloadProgress.encode(message.bibleDownloadProgress, writer.uint32(58).fork()).ldelim(); + } + if (message.hardExit !== undefined) { + HardExit.encode(message.hardExit, writer.uint32(66).fork()).ldelim(); + } + if (message.readRegistrationData !== undefined) { + ReadRegistrationData.encode(message.readRegistrationData, writer.uint32(74).fork()).ldelim(); + } + if (message.writeRegistrationData !== undefined) { + WriteRegistrationData.encode(message.writeRegistrationData, writer.uint32(82).fork()).ldelim(); + } + if (message.getProductInformation !== undefined) { + GetProductInformation.encode(message.getProductInformation, writer.uint32(90).fork()).ldelim(); + } + if (message.log !== undefined) { + Log.encode(message.log, writer.uint32(98).fork()).ldelim(); + } + if (message.upgradesAvailable !== undefined) { + UpgradesAvailable.encode(message.upgradesAvailable, writer.uint32(106).fork()).ldelim(); + } + if (message.downgradeAvailable !== undefined) { + DowngradeAvailable.encode(message.downgradeAvailable, writer.uint32(114).fork()).ldelim(); + } + if (message.downloadProgress !== undefined) { + DownloadProgress.encode(message.downloadProgress, writer.uint32(122).fork()).ldelim(); + } + if (message.alerts !== undefined) { + Alerts.encode(message.alerts, writer.uint32(130).fork()).ldelim(); + } + if (message.showExpirationDialog !== undefined) { + ShowExpirationDialog.encode(message.showExpirationDialog, writer.uint32(138).fork()).ldelim(); + } + if (message.readOldToken !== undefined) { + ReadOldToken.encode(message.readOldToken, writer.uint32(146).fork()).ldelim(); + } + if (message.token !== undefined) { + Token.encode(message.token, writer.uint32(154).fork()).ldelim(); + } + if (message.verificationComplete !== undefined) { + VerificationComplete.encode(message.verificationComplete, writer.uint32(162).fork()).ldelim(); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): Callback { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseCallback(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } + + message.setWatermark = SetWatermark.decode(reader, reader.uint32()); + continue; + case 2: + if (tag !== 18) { + break; + } + + message.deactivationComplete = DeactivationComplete.decode(reader, reader.uint32()); + continue; + case 3: + if (tag !== 26) { + break; + } + + message.freeBibles = FreeBibles.decode(reader, reader.uint32()); + continue; + case 4: + if (tag !== 34) { + break; + } + + message.purchasedBibles = PurchasedBibles.decode(reader, reader.uint32()); + continue; + case 5: + if (tag !== 42) { + break; + } + + message.bibleActivationComplete = BibleActivationComplete.decode(reader, reader.uint32()); + continue; + case 6: + if (tag !== 50) { + break; + } + + message.bibleDeactivationComplete = BibleDeactivationComplete.decode(reader, reader.uint32()); + continue; + case 7: + if (tag !== 58) { + break; + } + + message.bibleDownloadProgress = BibleDownloadProgress.decode(reader, reader.uint32()); + continue; + case 8: + if (tag !== 66) { + break; + } + + message.hardExit = HardExit.decode(reader, reader.uint32()); + continue; + case 9: + if (tag !== 74) { + break; + } + + message.readRegistrationData = ReadRegistrationData.decode(reader, reader.uint32()); + continue; + case 10: + if (tag !== 82) { + break; + } + + message.writeRegistrationData = WriteRegistrationData.decode(reader, reader.uint32()); + continue; + case 11: + if (tag !== 90) { + break; + } + + message.getProductInformation = GetProductInformation.decode(reader, reader.uint32()); + continue; + case 12: + if (tag !== 98) { + break; + } + + message.log = Log.decode(reader, reader.uint32()); + continue; + case 13: + if (tag !== 106) { + break; + } + + message.upgradesAvailable = UpgradesAvailable.decode(reader, reader.uint32()); + continue; + case 14: + if (tag !== 114) { + break; + } + + message.downgradeAvailable = DowngradeAvailable.decode(reader, reader.uint32()); + continue; + case 15: + if (tag !== 122) { + break; + } + + message.downloadProgress = DownloadProgress.decode(reader, reader.uint32()); + continue; + case 16: + if (tag !== 130) { + break; + } + + message.alerts = Alerts.decode(reader, reader.uint32()); + continue; + case 17: + if (tag !== 138) { + break; + } + + message.showExpirationDialog = ShowExpirationDialog.decode(reader, reader.uint32()); + continue; + case 18: + if (tag !== 146) { + break; + } + + message.readOldToken = ReadOldToken.decode(reader, reader.uint32()); + continue; + case 19: + if (tag !== 154) { + break; + } + + message.token = Token.decode(reader, reader.uint32()); + continue; + case 20: + if (tag !== 162) { + break; + } + + message.verificationComplete = VerificationComplete.decode(reader, reader.uint32()); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(object: any): Callback { + return { + setWatermark: isSet(object.setWatermark) ? SetWatermark.fromJSON(object.setWatermark) : undefined, + deactivationComplete: isSet(object.deactivationComplete) + ? DeactivationComplete.fromJSON(object.deactivationComplete) + : undefined, + freeBibles: isSet(object.freeBibles) ? FreeBibles.fromJSON(object.freeBibles) : undefined, + purchasedBibles: isSet(object.purchasedBibles) ? PurchasedBibles.fromJSON(object.purchasedBibles) : undefined, + bibleActivationComplete: isSet(object.bibleActivationComplete) + ? BibleActivationComplete.fromJSON(object.bibleActivationComplete) + : undefined, + bibleDeactivationComplete: isSet(object.bibleDeactivationComplete) + ? BibleDeactivationComplete.fromJSON(object.bibleDeactivationComplete) + : undefined, + bibleDownloadProgress: isSet(object.bibleDownloadProgress) + ? BibleDownloadProgress.fromJSON(object.bibleDownloadProgress) + : undefined, + hardExit: isSet(object.hardExit) ? HardExit.fromJSON(object.hardExit) : undefined, + readRegistrationData: isSet(object.readRegistrationData) + ? ReadRegistrationData.fromJSON(object.readRegistrationData) + : undefined, + writeRegistrationData: isSet(object.writeRegistrationData) + ? WriteRegistrationData.fromJSON(object.writeRegistrationData) + : undefined, + getProductInformation: isSet(object.getProductInformation) + ? GetProductInformation.fromJSON(object.getProductInformation) + : undefined, + log: isSet(object.log) ? Log.fromJSON(object.log) : undefined, + upgradesAvailable: isSet(object.upgradesAvailable) + ? UpgradesAvailable.fromJSON(object.upgradesAvailable) + : undefined, + downgradeAvailable: isSet(object.downgradeAvailable) + ? DowngradeAvailable.fromJSON(object.downgradeAvailable) + : undefined, + downloadProgress: isSet(object.downloadProgress) ? DownloadProgress.fromJSON(object.downloadProgress) : undefined, + alerts: isSet(object.alerts) ? Alerts.fromJSON(object.alerts) : undefined, + showExpirationDialog: isSet(object.showExpirationDialog) + ? ShowExpirationDialog.fromJSON(object.showExpirationDialog) + : undefined, + readOldToken: isSet(object.readOldToken) ? ReadOldToken.fromJSON(object.readOldToken) : undefined, + token: isSet(object.token) ? Token.fromJSON(object.token) : undefined, + verificationComplete: isSet(object.verificationComplete) + ? VerificationComplete.fromJSON(object.verificationComplete) + : undefined, + }; + }, + + toJSON(message: Callback): unknown { + const obj: any = {}; + if (message.setWatermark !== undefined) { + obj.setWatermark = SetWatermark.toJSON(message.setWatermark); + } + if (message.deactivationComplete !== undefined) { + obj.deactivationComplete = DeactivationComplete.toJSON(message.deactivationComplete); + } + if (message.freeBibles !== undefined) { + obj.freeBibles = FreeBibles.toJSON(message.freeBibles); + } + if (message.purchasedBibles !== undefined) { + obj.purchasedBibles = PurchasedBibles.toJSON(message.purchasedBibles); + } + if (message.bibleActivationComplete !== undefined) { + obj.bibleActivationComplete = BibleActivationComplete.toJSON(message.bibleActivationComplete); + } + if (message.bibleDeactivationComplete !== undefined) { + obj.bibleDeactivationComplete = BibleDeactivationComplete.toJSON(message.bibleDeactivationComplete); + } + if (message.bibleDownloadProgress !== undefined) { + obj.bibleDownloadProgress = BibleDownloadProgress.toJSON(message.bibleDownloadProgress); + } + if (message.hardExit !== undefined) { + obj.hardExit = HardExit.toJSON(message.hardExit); + } + if (message.readRegistrationData !== undefined) { + obj.readRegistrationData = ReadRegistrationData.toJSON(message.readRegistrationData); + } + if (message.writeRegistrationData !== undefined) { + obj.writeRegistrationData = WriteRegistrationData.toJSON(message.writeRegistrationData); + } + if (message.getProductInformation !== undefined) { + obj.getProductInformation = GetProductInformation.toJSON(message.getProductInformation); + } + if (message.log !== undefined) { + obj.log = Log.toJSON(message.log); + } + if (message.upgradesAvailable !== undefined) { + obj.upgradesAvailable = UpgradesAvailable.toJSON(message.upgradesAvailable); + } + if (message.downgradeAvailable !== undefined) { + obj.downgradeAvailable = DowngradeAvailable.toJSON(message.downgradeAvailable); + } + if (message.downloadProgress !== undefined) { + obj.downloadProgress = DownloadProgress.toJSON(message.downloadProgress); + } + if (message.alerts !== undefined) { + obj.alerts = Alerts.toJSON(message.alerts); + } + if (message.showExpirationDialog !== undefined) { + obj.showExpirationDialog = ShowExpirationDialog.toJSON(message.showExpirationDialog); + } + if (message.readOldToken !== undefined) { + obj.readOldToken = ReadOldToken.toJSON(message.readOldToken); + } + if (message.token !== undefined) { + obj.token = Token.toJSON(message.token); + } + if (message.verificationComplete !== undefined) { + obj.verificationComplete = VerificationComplete.toJSON(message.verificationComplete); + } + return obj; + }, + + create, I>>(base?: I): Callback { + return Callback.fromPartial(base ?? ({} as any)); + }, + fromPartial, I>>(object: I): Callback { + const message = createBaseCallback(); + message.setWatermark = (object.setWatermark !== undefined && object.setWatermark !== null) + ? SetWatermark.fromPartial(object.setWatermark) + : undefined; + message.deactivationComplete = (object.deactivationComplete !== undefined && object.deactivationComplete !== null) + ? DeactivationComplete.fromPartial(object.deactivationComplete) + : undefined; + message.freeBibles = (object.freeBibles !== undefined && object.freeBibles !== null) + ? FreeBibles.fromPartial(object.freeBibles) + : undefined; + message.purchasedBibles = (object.purchasedBibles !== undefined && object.purchasedBibles !== null) + ? PurchasedBibles.fromPartial(object.purchasedBibles) + : undefined; + message.bibleActivationComplete = + (object.bibleActivationComplete !== undefined && object.bibleActivationComplete !== null) + ? BibleActivationComplete.fromPartial(object.bibleActivationComplete) + : undefined; + message.bibleDeactivationComplete = + (object.bibleDeactivationComplete !== undefined && object.bibleDeactivationComplete !== null) + ? BibleDeactivationComplete.fromPartial(object.bibleDeactivationComplete) + : undefined; + message.bibleDownloadProgress = + (object.bibleDownloadProgress !== undefined && object.bibleDownloadProgress !== null) + ? BibleDownloadProgress.fromPartial(object.bibleDownloadProgress) + : undefined; + message.hardExit = (object.hardExit !== undefined && object.hardExit !== null) + ? HardExit.fromPartial(object.hardExit) + : undefined; + message.readRegistrationData = (object.readRegistrationData !== undefined && object.readRegistrationData !== null) + ? ReadRegistrationData.fromPartial(object.readRegistrationData) + : undefined; + message.writeRegistrationData = + (object.writeRegistrationData !== undefined && object.writeRegistrationData !== null) + ? WriteRegistrationData.fromPartial(object.writeRegistrationData) + : undefined; + message.getProductInformation = + (object.getProductInformation !== undefined && object.getProductInformation !== null) + ? GetProductInformation.fromPartial(object.getProductInformation) + : undefined; + message.log = (object.log !== undefined && object.log !== null) ? Log.fromPartial(object.log) : undefined; + message.upgradesAvailable = (object.upgradesAvailable !== undefined && object.upgradesAvailable !== null) + ? UpgradesAvailable.fromPartial(object.upgradesAvailable) + : undefined; + message.downgradeAvailable = (object.downgradeAvailable !== undefined && object.downgradeAvailable !== null) + ? DowngradeAvailable.fromPartial(object.downgradeAvailable) + : undefined; + message.downloadProgress = (object.downloadProgress !== undefined && object.downloadProgress !== null) + ? DownloadProgress.fromPartial(object.downloadProgress) + : undefined; + message.alerts = (object.alerts !== undefined && object.alerts !== null) + ? Alerts.fromPartial(object.alerts) + : undefined; + message.showExpirationDialog = (object.showExpirationDialog !== undefined && object.showExpirationDialog !== null) + ? ShowExpirationDialog.fromPartial(object.showExpirationDialog) + : undefined; + message.readOldToken = (object.readOldToken !== undefined && object.readOldToken !== null) + ? ReadOldToken.fromPartial(object.readOldToken) + : undefined; + message.token = (object.token !== undefined && object.token !== null) ? Token.fromPartial(object.token) : undefined; + message.verificationComplete = (object.verificationComplete !== undefined && object.verificationComplete !== null) + ? VerificationComplete.fromPartial(object.verificationComplete) + : undefined; + return message; + }, +}; + +function createBaseRegister(): Register { + return { userName: "", registrationKey: "", displayName: "", seatType: 0, channel: 0 }; +} + +export const Register = { + encode(message: Register, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.userName !== "") { + writer.uint32(10).string(message.userName); + } + if (message.registrationKey !== "") { + writer.uint32(18).string(message.registrationKey); + } + if (message.displayName !== "") { + writer.uint32(26).string(message.displayName); + } + if (message.seatType !== 0) { + writer.uint32(32).int32(message.seatType); + } + if (message.channel !== 0) { + writer.uint32(40).int32(message.channel); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): Register { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseRegister(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } + + message.userName = reader.string(); + continue; + case 2: + if (tag !== 18) { + break; + } + + message.registrationKey = reader.string(); + continue; + case 3: + if (tag !== 26) { + break; + } + + message.displayName = reader.string(); + continue; + case 4: + if (tag !== 32) { + break; + } + + message.seatType = reader.int32() as any; + continue; + case 5: + if (tag !== 40) { + break; + } + + message.channel = reader.int32() as any; + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(object: any): Register { + return { + userName: isSet(object.userName) ? globalThis.String(object.userName) : "", + registrationKey: isSet(object.registrationKey) ? globalThis.String(object.registrationKey) : "", + displayName: isSet(object.displayName) ? globalThis.String(object.displayName) : "", + seatType: isSet(object.seatType) ? seatTypeFromJSON(object.seatType) : 0, + channel: isSet(object.channel) ? updateChannelFromJSON(object.channel) : 0, + }; + }, + + toJSON(message: Register): unknown { + const obj: any = {}; + if (message.userName !== "") { + obj.userName = message.userName; + } + if (message.registrationKey !== "") { + obj.registrationKey = message.registrationKey; + } + if (message.displayName !== "") { + obj.displayName = message.displayName; + } + if (message.seatType !== 0) { + obj.seatType = seatTypeToJSON(message.seatType); + } + if (message.channel !== 0) { + obj.channel = updateChannelToJSON(message.channel); + } + return obj; + }, + + create, I>>(base?: I): Register { + return Register.fromPartial(base ?? ({} as any)); + }, + fromPartial, I>>(object: I): Register { + const message = createBaseRegister(); + message.userName = object.userName ?? ""; + message.registrationKey = object.registrationKey ?? ""; + message.displayName = object.displayName ?? ""; + message.seatType = object.seatType ?? 0; + message.channel = object.channel ?? 0; + return message; + }, +}; + +function createBaseActivateLink(): ActivateLink { + return { identifier: "" }; +} + +export const ActivateLink = { + encode(message: ActivateLink, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.identifier !== "") { + writer.uint32(10).string(message.identifier); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): ActivateLink { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseActivateLink(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } + + message.identifier = reader.string(); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(object: any): ActivateLink { + return { identifier: isSet(object.identifier) ? globalThis.String(object.identifier) : "" }; + }, + + toJSON(message: ActivateLink): unknown { + const obj: any = {}; + if (message.identifier !== "") { + obj.identifier = message.identifier; + } + return obj; + }, + + create, I>>(base?: I): ActivateLink { + return ActivateLink.fromPartial(base ?? ({} as any)); + }, + fromPartial, I>>(object: I): ActivateLink { + const message = createBaseActivateLink(); + message.identifier = object.identifier ?? ""; + return message; + }, +}; + +function createBaseUnregister(): Unregister { + return {}; +} + +export const Unregister = { + encode(_: Unregister, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): Unregister { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseUnregister(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(_: any): Unregister { + return {}; + }, + + toJSON(_: Unregister): unknown { + const obj: any = {}; + return obj; + }, + + create, I>>(base?: I): Unregister { + return Unregister.fromPartial(base ?? ({} as any)); + }, + fromPartial, I>>(_: I): Unregister { + const message = createBaseUnregister(); + return message; + }, +}; + +function createBaseChangeSeatType(): ChangeSeatType { + return { seatType: 0, channel: 0 }; +} + +export const ChangeSeatType = { + encode(message: ChangeSeatType, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.seatType !== 0) { + writer.uint32(8).int32(message.seatType); + } + if (message.channel !== 0) { + writer.uint32(16).int32(message.channel); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): ChangeSeatType { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseChangeSeatType(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 8) { + break; + } + + message.seatType = reader.int32() as any; + continue; + case 2: + if (tag !== 16) { + break; + } + + message.channel = reader.int32() as any; + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(object: any): ChangeSeatType { + return { + seatType: isSet(object.seatType) ? seatTypeFromJSON(object.seatType) : 0, + channel: isSet(object.channel) ? updateChannelFromJSON(object.channel) : 0, + }; + }, + + toJSON(message: ChangeSeatType): unknown { + const obj: any = {}; + if (message.seatType !== 0) { + obj.seatType = seatTypeToJSON(message.seatType); + } + if (message.channel !== 0) { + obj.channel = updateChannelToJSON(message.channel); + } + return obj; + }, + + create, I>>(base?: I): ChangeSeatType { + return ChangeSeatType.fromPartial(base ?? ({} as any)); + }, + fromPartial, I>>(object: I): ChangeSeatType { + const message = createBaseChangeSeatType(); + message.seatType = object.seatType ?? 0; + message.channel = object.channel ?? 0; + return message; + }, +}; + +function createBaseGetFreeBibles(): GetFreeBibles { + return {}; +} + +export const GetFreeBibles = { + encode(_: GetFreeBibles, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): GetFreeBibles { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseGetFreeBibles(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(_: any): GetFreeBibles { + return {}; + }, + + toJSON(_: GetFreeBibles): unknown { + const obj: any = {}; + return obj; + }, + + create, I>>(base?: I): GetFreeBibles { + return GetFreeBibles.fromPartial(base ?? ({} as any)); + }, + fromPartial, I>>(_: I): GetFreeBibles { + const message = createBaseGetFreeBibles(); + return message; + }, +}; + +function createBaseGetPurchasedBibles(): GetPurchasedBibles { + return {}; +} + +export const GetPurchasedBibles = { + encode(_: GetPurchasedBibles, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): GetPurchasedBibles { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseGetPurchasedBibles(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(_: any): GetPurchasedBibles { + return {}; + }, + + toJSON(_: GetPurchasedBibles): unknown { + const obj: any = {}; + return obj; + }, + + create, I>>(base?: I): GetPurchasedBibles { + return GetPurchasedBibles.fromPartial(base ?? ({} as any)); + }, + fromPartial, I>>(_: I): GetPurchasedBibles { + const message = createBaseGetPurchasedBibles(); + return message; + }, +}; + +function createBaseActivateBible(): ActivateBible { + return { bibleId: "" }; +} + +export const ActivateBible = { + encode(message: ActivateBible, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.bibleId !== "") { + writer.uint32(10).string(message.bibleId); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): ActivateBible { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseActivateBible(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } + + message.bibleId = reader.string(); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(object: any): ActivateBible { + return { bibleId: isSet(object.bibleId) ? globalThis.String(object.bibleId) : "" }; + }, + + toJSON(message: ActivateBible): unknown { + const obj: any = {}; + if (message.bibleId !== "") { + obj.bibleId = message.bibleId; + } + return obj; + }, + + create, I>>(base?: I): ActivateBible { + return ActivateBible.fromPartial(base ?? ({} as any)); + }, + fromPartial, I>>(object: I): ActivateBible { + const message = createBaseActivateBible(); + message.bibleId = object.bibleId ?? ""; + return message; + }, +}; + +function createBaseDeactivateBible(): DeactivateBible { + return { bibleId: "" }; +} + +export const DeactivateBible = { + encode(message: DeactivateBible, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.bibleId !== "") { + writer.uint32(10).string(message.bibleId); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): DeactivateBible { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseDeactivateBible(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } + + message.bibleId = reader.string(); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(object: any): DeactivateBible { + return { bibleId: isSet(object.bibleId) ? globalThis.String(object.bibleId) : "" }; + }, + + toJSON(message: DeactivateBible): unknown { + const obj: any = {}; + if (message.bibleId !== "") { + obj.bibleId = message.bibleId; + } + return obj; + }, + + create, I>>(base?: I): DeactivateBible { + return DeactivateBible.fromPartial(base ?? ({} as any)); + }, + fromPartial, I>>(object: I): DeactivateBible { + const message = createBaseDeactivateBible(); + message.bibleId = object.bibleId ?? ""; + return message; + }, +}; + +function createBaseDownloadBible(): DownloadBible { + return { bibleId: "", filename: "" }; +} + +export const DownloadBible = { + encode(message: DownloadBible, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.bibleId !== "") { + writer.uint32(10).string(message.bibleId); + } + if (message.filename !== "") { + writer.uint32(18).string(message.filename); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): DownloadBible { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseDownloadBible(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } + + message.bibleId = reader.string(); + continue; + case 2: + if (tag !== 18) { + break; + } + + message.filename = reader.string(); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(object: any): DownloadBible { + return { + bibleId: isSet(object.bibleId) ? globalThis.String(object.bibleId) : "", + filename: isSet(object.filename) ? globalThis.String(object.filename) : "", + }; + }, + + toJSON(message: DownloadBible): unknown { + const obj: any = {}; + if (message.bibleId !== "") { + obj.bibleId = message.bibleId; + } + if (message.filename !== "") { + obj.filename = message.filename; + } + return obj; + }, + + create, I>>(base?: I): DownloadBible { + return DownloadBible.fromPartial(base ?? ({} as any)); + }, + fromPartial, I>>(object: I): DownloadBible { + const message = createBaseDownloadBible(); + message.bibleId = object.bibleId ?? ""; + message.filename = object.filename ?? ""; + return message; + }, +}; + +function createBaseRegistrationData(): RegistrationData { + return { data: new Uint8Array(0), channel: 0 }; +} + +export const RegistrationData = { + encode(message: RegistrationData, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.data.length !== 0) { + writer.uint32(10).bytes(message.data); + } + if (message.channel !== 0) { + writer.uint32(16).int32(message.channel); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): RegistrationData { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseRegistrationData(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } + + message.data = reader.bytes(); + continue; + case 2: + if (tag !== 16) { + break; + } + + message.channel = reader.int32() as any; + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(object: any): RegistrationData { + return { + data: isSet(object.data) ? bytesFromBase64(object.data) : new Uint8Array(0), + channel: isSet(object.channel) ? updateChannelFromJSON(object.channel) : 0, + }; + }, + + toJSON(message: RegistrationData): unknown { + const obj: any = {}; + if (message.data.length !== 0) { + obj.data = base64FromBytes(message.data); + } + if (message.channel !== 0) { + obj.channel = updateChannelToJSON(message.channel); + } + return obj; + }, + + create, I>>(base?: I): RegistrationData { + return RegistrationData.fromPartial(base ?? ({} as any)); + }, + fromPartial, I>>(object: I): RegistrationData { + const message = createBaseRegistrationData(); + message.data = object.data ?? new Uint8Array(0); + message.channel = object.channel ?? 0; + return message; + }, +}; + +function createBaseProductInformation(): ProductInformation { + return { productName: "", majorVersion: "", minorVersion: "", patchVersion: "", buildNumber: "", buildDate: 0 }; +} + +export const ProductInformation = { + encode(message: ProductInformation, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.productName !== "") { + writer.uint32(10).string(message.productName); + } + if (message.majorVersion !== "") { + writer.uint32(18).string(message.majorVersion); + } + if (message.minorVersion !== "") { + writer.uint32(26).string(message.minorVersion); + } + if (message.patchVersion !== "") { + writer.uint32(34).string(message.patchVersion); + } + if (message.buildNumber !== "") { + writer.uint32(42).string(message.buildNumber); + } + if (message.buildDate !== 0) { + writer.uint32(48).int64(message.buildDate); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): ProductInformation { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseProductInformation(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } + + message.productName = reader.string(); + continue; + case 2: + if (tag !== 18) { + break; + } + + message.majorVersion = reader.string(); + continue; + case 3: + if (tag !== 26) { + break; + } + + message.minorVersion = reader.string(); + continue; + case 4: + if (tag !== 34) { + break; + } + + message.patchVersion = reader.string(); + continue; + case 5: + if (tag !== 42) { + break; + } + + message.buildNumber = reader.string(); + continue; + case 6: + if (tag !== 48) { + break; + } + + message.buildDate = longToNumber(reader.int64() as Long); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(object: any): ProductInformation { + return { + productName: isSet(object.productName) ? globalThis.String(object.productName) : "", + majorVersion: isSet(object.majorVersion) ? globalThis.String(object.majorVersion) : "", + minorVersion: isSet(object.minorVersion) ? globalThis.String(object.minorVersion) : "", + patchVersion: isSet(object.patchVersion) ? globalThis.String(object.patchVersion) : "", + buildNumber: isSet(object.buildNumber) ? globalThis.String(object.buildNumber) : "", + buildDate: isSet(object.buildDate) ? globalThis.Number(object.buildDate) : 0, + }; + }, + + toJSON(message: ProductInformation): unknown { + const obj: any = {}; + if (message.productName !== "") { + obj.productName = message.productName; + } + if (message.majorVersion !== "") { + obj.majorVersion = message.majorVersion; + } + if (message.minorVersion !== "") { + obj.minorVersion = message.minorVersion; + } + if (message.patchVersion !== "") { + obj.patchVersion = message.patchVersion; + } + if (message.buildNumber !== "") { + obj.buildNumber = message.buildNumber; + } + if (message.buildDate !== 0) { + obj.buildDate = Math.round(message.buildDate); + } + return obj; + }, + + create, I>>(base?: I): ProductInformation { + return ProductInformation.fromPartial(base ?? ({} as any)); + }, + fromPartial, I>>(object: I): ProductInformation { + const message = createBaseProductInformation(); + message.productName = object.productName ?? ""; + message.majorVersion = object.majorVersion ?? ""; + message.minorVersion = object.minorVersion ?? ""; + message.patchVersion = object.patchVersion ?? ""; + message.buildNumber = object.buildNumber ?? ""; + message.buildDate = object.buildDate ?? 0; + return message; + }, +}; + +function createBaseGetAvailableVersion(): GetAvailableVersion { + return { includeNotes: false, channel: "", format: "" }; +} + +export const GetAvailableVersion = { + encode(message: GetAvailableVersion, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.includeNotes !== false) { + writer.uint32(8).bool(message.includeNotes); + } + if (message.channel !== "") { + writer.uint32(18).string(message.channel); + } + if (message.format !== "") { + writer.uint32(26).string(message.format); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): GetAvailableVersion { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseGetAvailableVersion(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 8) { + break; + } + + message.includeNotes = reader.bool(); + continue; + case 2: + if (tag !== 18) { + break; + } + + message.channel = reader.string(); + continue; + case 3: + if (tag !== 26) { + break; + } + + message.format = reader.string(); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(object: any): GetAvailableVersion { + return { + includeNotes: isSet(object.includeNotes) ? globalThis.Boolean(object.includeNotes) : false, + channel: isSet(object.channel) ? globalThis.String(object.channel) : "", + format: isSet(object.format) ? globalThis.String(object.format) : "", + }; + }, + + toJSON(message: GetAvailableVersion): unknown { + const obj: any = {}; + if (message.includeNotes !== false) { + obj.includeNotes = message.includeNotes; + } + if (message.channel !== "") { + obj.channel = message.channel; + } + if (message.format !== "") { + obj.format = message.format; + } + return obj; + }, + + create, I>>(base?: I): GetAvailableVersion { + return GetAvailableVersion.fromPartial(base ?? ({} as any)); + }, + fromPartial, I>>(object: I): GetAvailableVersion { + const message = createBaseGetAvailableVersion(); + message.includeNotes = object.includeNotes ?? false; + message.channel = object.channel ?? ""; + message.format = object.format ?? ""; + return message; + }, +}; + +function createBaseDownloadNewVersion(): DownloadNewVersion { + return { url: "", filename: "" }; +} + +export const DownloadNewVersion = { + encode(message: DownloadNewVersion, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.url !== "") { + writer.uint32(10).string(message.url); + } + if (message.filename !== "") { + writer.uint32(18).string(message.filename); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): DownloadNewVersion { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseDownloadNewVersion(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } + + message.url = reader.string(); + continue; + case 2: + if (tag !== 18) { + break; + } + + message.filename = reader.string(); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(object: any): DownloadNewVersion { + return { + url: isSet(object.url) ? globalThis.String(object.url) : "", + filename: isSet(object.filename) ? globalThis.String(object.filename) : "", + }; + }, + + toJSON(message: DownloadNewVersion): unknown { + const obj: any = {}; + if (message.url !== "") { + obj.url = message.url; + } + if (message.filename !== "") { + obj.filename = message.filename; + } + return obj; + }, + + create, I>>(base?: I): DownloadNewVersion { + return DownloadNewVersion.fromPartial(base ?? ({} as any)); + }, + fromPartial, I>>(object: I): DownloadNewVersion { + const message = createBaseDownloadNewVersion(); + message.url = object.url ?? ""; + message.filename = object.filename ?? ""; + return message; + }, +}; + +function createBaseRefresh(): Refresh { + return { channel: 0 }; +} + +export const Refresh = { + encode(message: Refresh, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.channel !== 0) { + writer.uint32(8).int32(message.channel); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): Refresh { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseRefresh(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 8) { + break; + } + + message.channel = reader.int32() as any; + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(object: any): Refresh { + return { channel: isSet(object.channel) ? updateChannelFromJSON(object.channel) : 0 }; + }, + + toJSON(message: Refresh): unknown { + const obj: any = {}; + if (message.channel !== 0) { + obj.channel = updateChannelToJSON(message.channel); + } + return obj; + }, + + create, I>>(base?: I): Refresh { + return Refresh.fromPartial(base ?? ({} as any)); + }, + fromPartial, I>>(object: I): Refresh { + const message = createBaseRefresh(); + message.channel = object.channel ?? 0; + return message; + }, +}; + +function createBaseUpdateToken(): UpdateToken { + return { tokenMetadata: undefined }; +} + +export const UpdateToken = { + encode(message: UpdateToken, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.tokenMetadata !== undefined) { + TokenMetadata.encode(message.tokenMetadata, writer.uint32(10).fork()).ldelim(); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): UpdateToken { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseUpdateToken(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } + + message.tokenMetadata = TokenMetadata.decode(reader, reader.uint32()); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(object: any): UpdateToken { + return { tokenMetadata: isSet(object.tokenMetadata) ? TokenMetadata.fromJSON(object.tokenMetadata) : undefined }; + }, + + toJSON(message: UpdateToken): unknown { + const obj: any = {}; + if (message.tokenMetadata !== undefined) { + obj.tokenMetadata = TokenMetadata.toJSON(message.tokenMetadata); + } + return obj; + }, + + create, I>>(base?: I): UpdateToken { + return UpdateToken.fromPartial(base ?? ({} as any)); + }, + fromPartial, I>>(object: I): UpdateToken { + const message = createBaseUpdateToken(); + message.tokenMetadata = (object.tokenMetadata !== undefined && object.tokenMetadata !== null) + ? TokenMetadata.fromPartial(object.tokenMetadata) + : undefined; + return message; + }, +}; + +function createBaseOldTokenData(): OldTokenData { + return { status: 0, token: undefined }; +} + +export const OldTokenData = { + encode(message: OldTokenData, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.status !== 0) { + writer.uint32(8).int32(message.status); + } + if (message.token !== undefined) { + TokenMetadata.encode(message.token, writer.uint32(18).fork()).ldelim(); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): OldTokenData { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseOldTokenData(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 8) { + break; + } + + message.status = reader.int32() as any; + continue; + case 2: + if (tag !== 18) { + break; + } + + message.token = TokenMetadata.decode(reader, reader.uint32()); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(object: any): OldTokenData { + return { + status: isSet(object.status) ? readTokenStatusFromJSON(object.status) : 0, + token: isSet(object.token) ? TokenMetadata.fromJSON(object.token) : undefined, + }; + }, + + toJSON(message: OldTokenData): unknown { + const obj: any = {}; + if (message.status !== 0) { + obj.status = readTokenStatusToJSON(message.status); + } + if (message.token !== undefined) { + obj.token = TokenMetadata.toJSON(message.token); + } + return obj; + }, + + create, I>>(base?: I): OldTokenData { + return OldTokenData.fromPartial(base ?? ({} as any)); + }, + fromPartial, I>>(object: I): OldTokenData { + const message = createBaseOldTokenData(); + message.status = object.status ?? 0; + message.token = (object.token !== undefined && object.token !== null) + ? TokenMetadata.fromPartial(object.token) + : undefined; + return message; + }, +}; + +function createBaseToken(): Token { + return { tokenMetadata: undefined }; +} + +export const Token = { + encode(message: Token, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.tokenMetadata !== undefined) { + TokenMetadata.encode(message.tokenMetadata, writer.uint32(10).fork()).ldelim(); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): Token { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseToken(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } + + message.tokenMetadata = TokenMetadata.decode(reader, reader.uint32()); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(object: any): Token { + return { tokenMetadata: isSet(object.tokenMetadata) ? TokenMetadata.fromJSON(object.tokenMetadata) : undefined }; + }, + + toJSON(message: Token): unknown { + const obj: any = {}; + if (message.tokenMetadata !== undefined) { + obj.tokenMetadata = TokenMetadata.toJSON(message.tokenMetadata); + } + return obj; + }, + + create, I>>(base?: I): Token { + return Token.fromPartial(base ?? ({} as any)); + }, + fromPartial, I>>(object: I): Token { + const message = createBaseToken(); + message.tokenMetadata = (object.tokenMetadata !== undefined && object.tokenMetadata !== null) + ? TokenMetadata.fromPartial(object.tokenMetadata) + : undefined; + return message; + }, +}; + +function createBaseSetWatermark(): SetWatermark { + return { isRegistered: false, activeSeat: false }; +} + +export const SetWatermark = { + encode(message: SetWatermark, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.isRegistered !== false) { + writer.uint32(8).bool(message.isRegistered); + } + if (message.activeSeat !== false) { + writer.uint32(16).bool(message.activeSeat); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): SetWatermark { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseSetWatermark(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 8) { + break; + } + + message.isRegistered = reader.bool(); + continue; + case 2: + if (tag !== 16) { + break; + } + + message.activeSeat = reader.bool(); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(object: any): SetWatermark { + return { + isRegistered: isSet(object.isRegistered) ? globalThis.Boolean(object.isRegistered) : false, + activeSeat: isSet(object.activeSeat) ? globalThis.Boolean(object.activeSeat) : false, + }; + }, + + toJSON(message: SetWatermark): unknown { + const obj: any = {}; + if (message.isRegistered !== false) { + obj.isRegistered = message.isRegistered; + } + if (message.activeSeat !== false) { + obj.activeSeat = message.activeSeat; + } + return obj; + }, + + create, I>>(base?: I): SetWatermark { + return SetWatermark.fromPartial(base ?? ({} as any)); + }, + fromPartial, I>>(object: I): SetWatermark { + const message = createBaseSetWatermark(); + message.isRegistered = object.isRegistered ?? false; + message.activeSeat = object.activeSeat ?? false; + return message; + }, +}; + +function createBaseActivationComplete(): ActivationComplete { + return { result: 0, registrationInfo: undefined, availableSeats: undefined, totalSeats: undefined }; +} + +export const ActivationComplete = { + encode(message: ActivationComplete, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.result !== 0) { + writer.uint32(8).int32(message.result); + } + if (message.registrationInfo !== undefined) { + RegistrationInfo.encode(message.registrationInfo, writer.uint32(18).fork()).ldelim(); + } + if (message.availableSeats !== undefined) { + Seats.encode(message.availableSeats, writer.uint32(26).fork()).ldelim(); + } + if (message.totalSeats !== undefined) { + Seats.encode(message.totalSeats, writer.uint32(34).fork()).ldelim(); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): ActivationComplete { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseActivationComplete(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 8) { + break; + } + + message.result = reader.int32() as any; + continue; + case 2: + if (tag !== 18) { + break; + } + + message.registrationInfo = RegistrationInfo.decode(reader, reader.uint32()); + continue; + case 3: + if (tag !== 26) { + break; + } + + message.availableSeats = Seats.decode(reader, reader.uint32()); + continue; + case 4: + if (tag !== 34) { + break; + } + + message.totalSeats = Seats.decode(reader, reader.uint32()); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(object: any): ActivationComplete { + return { + result: isSet(object.result) ? statusFromJSON(object.result) : 0, + registrationInfo: isSet(object.registrationInfo) ? RegistrationInfo.fromJSON(object.registrationInfo) : undefined, + availableSeats: isSet(object.availableSeats) ? Seats.fromJSON(object.availableSeats) : undefined, + totalSeats: isSet(object.totalSeats) ? Seats.fromJSON(object.totalSeats) : undefined, + }; + }, + + toJSON(message: ActivationComplete): unknown { + const obj: any = {}; + if (message.result !== 0) { + obj.result = statusToJSON(message.result); + } + if (message.registrationInfo !== undefined) { + obj.registrationInfo = RegistrationInfo.toJSON(message.registrationInfo); + } + if (message.availableSeats !== undefined) { + obj.availableSeats = Seats.toJSON(message.availableSeats); + } + if (message.totalSeats !== undefined) { + obj.totalSeats = Seats.toJSON(message.totalSeats); + } + return obj; + }, + + create, I>>(base?: I): ActivationComplete { + return ActivationComplete.fromPartial(base ?? ({} as any)); + }, + fromPartial, I>>(object: I): ActivationComplete { + const message = createBaseActivationComplete(); + message.result = object.result ?? 0; + message.registrationInfo = (object.registrationInfo !== undefined && object.registrationInfo !== null) + ? RegistrationInfo.fromPartial(object.registrationInfo) + : undefined; + message.availableSeats = (object.availableSeats !== undefined && object.availableSeats !== null) + ? Seats.fromPartial(object.availableSeats) + : undefined; + message.totalSeats = (object.totalSeats !== undefined && object.totalSeats !== null) + ? Seats.fromPartial(object.totalSeats) + : undefined; + return message; + }, +}; + +function createBaseDeactivationComplete(): DeactivationComplete { + return { result: 0 }; +} + +export const DeactivationComplete = { + encode(message: DeactivationComplete, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.result !== 0) { + writer.uint32(8).int32(message.result); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): DeactivationComplete { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseDeactivationComplete(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 8) { + break; + } + + message.result = reader.int32() as any; + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(object: any): DeactivationComplete { + return { result: isSet(object.result) ? statusFromJSON(object.result) : 0 }; + }, + + toJSON(message: DeactivationComplete): unknown { + const obj: any = {}; + if (message.result !== 0) { + obj.result = statusToJSON(message.result); + } + return obj; + }, + + create, I>>(base?: I): DeactivationComplete { + return DeactivationComplete.fromPartial(base ?? ({} as any)); + }, + fromPartial, I>>(object: I): DeactivationComplete { + const message = createBaseDeactivationComplete(); + message.result = object.result ?? 0; + return message; + }, +}; + +function createBaseChangeSeatTypeComplete(): ChangeSeatTypeComplete { + return { result: 0, availableSeats: undefined, totalSeats: undefined, seatType: 0 }; +} + +export const ChangeSeatTypeComplete = { + encode(message: ChangeSeatTypeComplete, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.result !== 0) { + writer.uint32(8).int32(message.result); + } + if (message.availableSeats !== undefined) { + Seats.encode(message.availableSeats, writer.uint32(18).fork()).ldelim(); + } + if (message.totalSeats !== undefined) { + Seats.encode(message.totalSeats, writer.uint32(26).fork()).ldelim(); + } + if (message.seatType !== 0) { + writer.uint32(32).int32(message.seatType); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): ChangeSeatTypeComplete { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseChangeSeatTypeComplete(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 8) { + break; + } + + message.result = reader.int32() as any; + continue; + case 2: + if (tag !== 18) { + break; + } + + message.availableSeats = Seats.decode(reader, reader.uint32()); + continue; + case 3: + if (tag !== 26) { + break; + } + + message.totalSeats = Seats.decode(reader, reader.uint32()); + continue; + case 4: + if (tag !== 32) { + break; + } + + message.seatType = reader.int32() as any; + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(object: any): ChangeSeatTypeComplete { + return { + result: isSet(object.result) ? statusFromJSON(object.result) : 0, + availableSeats: isSet(object.availableSeats) ? Seats.fromJSON(object.availableSeats) : undefined, + totalSeats: isSet(object.totalSeats) ? Seats.fromJSON(object.totalSeats) : undefined, + seatType: isSet(object.seatType) ? seatTypeFromJSON(object.seatType) : 0, + }; + }, + + toJSON(message: ChangeSeatTypeComplete): unknown { + const obj: any = {}; + if (message.result !== 0) { + obj.result = statusToJSON(message.result); + } + if (message.availableSeats !== undefined) { + obj.availableSeats = Seats.toJSON(message.availableSeats); + } + if (message.totalSeats !== undefined) { + obj.totalSeats = Seats.toJSON(message.totalSeats); + } + if (message.seatType !== 0) { + obj.seatType = seatTypeToJSON(message.seatType); + } + return obj; + }, + + create, I>>(base?: I): ChangeSeatTypeComplete { + return ChangeSeatTypeComplete.fromPartial(base ?? ({} as any)); + }, + fromPartial, I>>(object: I): ChangeSeatTypeComplete { + const message = createBaseChangeSeatTypeComplete(); + message.result = object.result ?? 0; + message.availableSeats = (object.availableSeats !== undefined && object.availableSeats !== null) + ? Seats.fromPartial(object.availableSeats) + : undefined; + message.totalSeats = (object.totalSeats !== undefined && object.totalSeats !== null) + ? Seats.fromPartial(object.totalSeats) + : undefined; + message.seatType = object.seatType ?? 0; + return message; + }, +}; + +function createBaseFreeBibles(): FreeBibles { + return { status: 0, bibles: [] }; +} + +export const FreeBibles = { + encode(message: FreeBibles, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.status !== 0) { + writer.uint32(8).int32(message.status); + } + for (const v of message.bibles) { + Bible.encode(v!, writer.uint32(18).fork()).ldelim(); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): FreeBibles { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseFreeBibles(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 8) { + break; + } + + message.status = reader.int32() as any; + continue; + case 2: + if (tag !== 18) { + break; + } + + message.bibles.push(Bible.decode(reader, reader.uint32())); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(object: any): FreeBibles { + return { + status: isSet(object.status) ? statusFromJSON(object.status) : 0, + bibles: globalThis.Array.isArray(object?.bibles) ? object.bibles.map((e: any) => Bible.fromJSON(e)) : [], + }; + }, + + toJSON(message: FreeBibles): unknown { + const obj: any = {}; + if (message.status !== 0) { + obj.status = statusToJSON(message.status); + } + if (message.bibles?.length) { + obj.bibles = message.bibles.map((e) => Bible.toJSON(e)); + } + return obj; + }, + + create, I>>(base?: I): FreeBibles { + return FreeBibles.fromPartial(base ?? ({} as any)); + }, + fromPartial, I>>(object: I): FreeBibles { + const message = createBaseFreeBibles(); + message.status = object.status ?? 0; + message.bibles = object.bibles?.map((e) => Bible.fromPartial(e)) || []; + return message; + }, +}; + +function createBasePurchasedBibles(): PurchasedBibles { + return { status: 0, bibles: [] }; +} + +export const PurchasedBibles = { + encode(message: PurchasedBibles, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.status !== 0) { + writer.uint32(8).int32(message.status); + } + for (const v of message.bibles) { + PurchasedBible.encode(v!, writer.uint32(18).fork()).ldelim(); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): PurchasedBibles { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBasePurchasedBibles(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 8) { + break; + } + + message.status = reader.int32() as any; + continue; + case 2: + if (tag !== 18) { + break; + } + + message.bibles.push(PurchasedBible.decode(reader, reader.uint32())); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(object: any): PurchasedBibles { + return { + status: isSet(object.status) ? statusFromJSON(object.status) : 0, + bibles: globalThis.Array.isArray(object?.bibles) ? object.bibles.map((e: any) => PurchasedBible.fromJSON(e)) : [], + }; + }, + + toJSON(message: PurchasedBibles): unknown { + const obj: any = {}; + if (message.status !== 0) { + obj.status = statusToJSON(message.status); + } + if (message.bibles?.length) { + obj.bibles = message.bibles.map((e) => PurchasedBible.toJSON(e)); + } + return obj; + }, + + create, I>>(base?: I): PurchasedBibles { + return PurchasedBibles.fromPartial(base ?? ({} as any)); + }, + fromPartial, I>>(object: I): PurchasedBibles { + const message = createBasePurchasedBibles(); + message.status = object.status ?? 0; + message.bibles = object.bibles?.map((e) => PurchasedBible.fromPartial(e)) || []; + return message; + }, +}; + +function createBaseBibleActivationComplete(): BibleActivationComplete { + return { status: 0, bibleId: "", downloadLink: "", bibles: [] }; +} + +export const BibleActivationComplete = { + encode(message: BibleActivationComplete, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.status !== 0) { + writer.uint32(8).int32(message.status); + } + if (message.bibleId !== "") { + writer.uint32(18).string(message.bibleId); + } + if (message.downloadLink !== "") { + writer.uint32(26).string(message.downloadLink); + } + for (const v of message.bibles) { + PurchasedBible.encode(v!, writer.uint32(34).fork()).ldelim(); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): BibleActivationComplete { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseBibleActivationComplete(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 8) { + break; + } + + message.status = reader.int32() as any; + continue; + case 2: + if (tag !== 18) { + break; + } + + message.bibleId = reader.string(); + continue; + case 3: + if (tag !== 26) { + break; + } + + message.downloadLink = reader.string(); + continue; + case 4: + if (tag !== 34) { + break; + } + + message.bibles.push(PurchasedBible.decode(reader, reader.uint32())); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(object: any): BibleActivationComplete { + return { + status: isSet(object.status) ? statusFromJSON(object.status) : 0, + bibleId: isSet(object.bibleId) ? globalThis.String(object.bibleId) : "", + downloadLink: isSet(object.downloadLink) ? globalThis.String(object.downloadLink) : "", + bibles: globalThis.Array.isArray(object?.bibles) ? object.bibles.map((e: any) => PurchasedBible.fromJSON(e)) : [], + }; + }, + + toJSON(message: BibleActivationComplete): unknown { + const obj: any = {}; + if (message.status !== 0) { + obj.status = statusToJSON(message.status); + } + if (message.bibleId !== "") { + obj.bibleId = message.bibleId; + } + if (message.downloadLink !== "") { + obj.downloadLink = message.downloadLink; + } + if (message.bibles?.length) { + obj.bibles = message.bibles.map((e) => PurchasedBible.toJSON(e)); + } + return obj; + }, + + create, I>>(base?: I): BibleActivationComplete { + return BibleActivationComplete.fromPartial(base ?? ({} as any)); + }, + fromPartial, I>>(object: I): BibleActivationComplete { + const message = createBaseBibleActivationComplete(); + message.status = object.status ?? 0; + message.bibleId = object.bibleId ?? ""; + message.downloadLink = object.downloadLink ?? ""; + message.bibles = object.bibles?.map((e) => PurchasedBible.fromPartial(e)) || []; + return message; + }, +}; + +function createBaseBibleDeactivationComplete(): BibleDeactivationComplete { + return { status: 0, bibleId: "", bibles: [] }; +} + +export const BibleDeactivationComplete = { + encode(message: BibleDeactivationComplete, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.status !== 0) { + writer.uint32(8).int32(message.status); + } + if (message.bibleId !== "") { + writer.uint32(18).string(message.bibleId); + } + for (const v of message.bibles) { + PurchasedBible.encode(v!, writer.uint32(26).fork()).ldelim(); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): BibleDeactivationComplete { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseBibleDeactivationComplete(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 8) { + break; + } + + message.status = reader.int32() as any; + continue; + case 2: + if (tag !== 18) { + break; + } + + message.bibleId = reader.string(); + continue; + case 3: + if (tag !== 26) { + break; + } + + message.bibles.push(PurchasedBible.decode(reader, reader.uint32())); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(object: any): BibleDeactivationComplete { + return { + status: isSet(object.status) ? statusFromJSON(object.status) : 0, + bibleId: isSet(object.bibleId) ? globalThis.String(object.bibleId) : "", + bibles: globalThis.Array.isArray(object?.bibles) ? object.bibles.map((e: any) => PurchasedBible.fromJSON(e)) : [], + }; + }, + + toJSON(message: BibleDeactivationComplete): unknown { + const obj: any = {}; + if (message.status !== 0) { + obj.status = statusToJSON(message.status); + } + if (message.bibleId !== "") { + obj.bibleId = message.bibleId; + } + if (message.bibles?.length) { + obj.bibles = message.bibles.map((e) => PurchasedBible.toJSON(e)); + } + return obj; + }, + + create, I>>(base?: I): BibleDeactivationComplete { + return BibleDeactivationComplete.fromPartial(base ?? ({} as any)); + }, + fromPartial, I>>(object: I): BibleDeactivationComplete { + const message = createBaseBibleDeactivationComplete(); + message.status = object.status ?? 0; + message.bibleId = object.bibleId ?? ""; + message.bibles = object.bibles?.map((e) => PurchasedBible.fromPartial(e)) || []; + return message; + }, +}; + +function createBaseBibleDownloadProgress(): BibleDownloadProgress { + return { status: 0, complete: false, progress: 0, bibleId: "", fileName: "", downloadLink: "" }; +} + +export const BibleDownloadProgress = { + encode(message: BibleDownloadProgress, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.status !== 0) { + writer.uint32(8).int32(message.status); + } + if (message.complete !== false) { + writer.uint32(16).bool(message.complete); + } + if (message.progress !== 0) { + writer.uint32(29).float(message.progress); + } + if (message.bibleId !== "") { + writer.uint32(34).string(message.bibleId); + } + if (message.fileName !== "") { + writer.uint32(42).string(message.fileName); + } + if (message.downloadLink !== "") { + writer.uint32(50).string(message.downloadLink); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): BibleDownloadProgress { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseBibleDownloadProgress(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 8) { + break; + } + + message.status = reader.int32() as any; + continue; + case 2: + if (tag !== 16) { + break; + } + + message.complete = reader.bool(); + continue; + case 3: + if (tag !== 29) { + break; + } + + message.progress = reader.float(); + continue; + case 4: + if (tag !== 34) { + break; + } + + message.bibleId = reader.string(); + continue; + case 5: + if (tag !== 42) { + break; + } + + message.fileName = reader.string(); + continue; + case 6: + if (tag !== 50) { + break; + } + + message.downloadLink = reader.string(); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(object: any): BibleDownloadProgress { + return { + status: isSet(object.status) ? statusFromJSON(object.status) : 0, + complete: isSet(object.complete) ? globalThis.Boolean(object.complete) : false, + progress: isSet(object.progress) ? globalThis.Number(object.progress) : 0, + bibleId: isSet(object.bibleId) ? globalThis.String(object.bibleId) : "", + fileName: isSet(object.fileName) ? globalThis.String(object.fileName) : "", + downloadLink: isSet(object.downloadLink) ? globalThis.String(object.downloadLink) : "", + }; + }, + + toJSON(message: BibleDownloadProgress): unknown { + const obj: any = {}; + if (message.status !== 0) { + obj.status = statusToJSON(message.status); + } + if (message.complete !== false) { + obj.complete = message.complete; + } + if (message.progress !== 0) { + obj.progress = message.progress; + } + if (message.bibleId !== "") { + obj.bibleId = message.bibleId; + } + if (message.fileName !== "") { + obj.fileName = message.fileName; + } + if (message.downloadLink !== "") { + obj.downloadLink = message.downloadLink; + } + return obj; + }, + + create, I>>(base?: I): BibleDownloadProgress { + return BibleDownloadProgress.fromPartial(base ?? ({} as any)); + }, + fromPartial, I>>(object: I): BibleDownloadProgress { + const message = createBaseBibleDownloadProgress(); + message.status = object.status ?? 0; + message.complete = object.complete ?? false; + message.progress = object.progress ?? 0; + message.bibleId = object.bibleId ?? ""; + message.fileName = object.fileName ?? ""; + message.downloadLink = object.downloadLink ?? ""; + return message; + }, +}; + +function createBaseHardExit(): HardExit { + return { reason: 0 }; +} + +export const HardExit = { + encode(message: HardExit, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.reason !== 0) { + writer.uint32(8).int32(message.reason); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): HardExit { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseHardExit(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 8) { + break; + } + + message.reason = reader.int32() as any; + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(object: any): HardExit { + return { reason: isSet(object.reason) ? hardExit_ReasonFromJSON(object.reason) : 0 }; + }, + + toJSON(message: HardExit): unknown { + const obj: any = {}; + if (message.reason !== 0) { + obj.reason = hardExit_ReasonToJSON(message.reason); + } + return obj; + }, + + create, I>>(base?: I): HardExit { + return HardExit.fromPartial(base ?? ({} as any)); + }, + fromPartial, I>>(object: I): HardExit { + const message = createBaseHardExit(); + message.reason = object.reason ?? 0; + return message; + }, +}; + +function createBaseReadRegistrationData(): ReadRegistrationData { + return { fingerprint: "", identifier: "" }; +} + +export const ReadRegistrationData = { + encode(message: ReadRegistrationData, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.fingerprint !== "") { + writer.uint32(10).string(message.fingerprint); + } + if (message.identifier !== "") { + writer.uint32(18).string(message.identifier); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): ReadRegistrationData { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseReadRegistrationData(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } + + message.fingerprint = reader.string(); + continue; + case 2: + if (tag !== 18) { + break; + } + + message.identifier = reader.string(); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(object: any): ReadRegistrationData { + return { + fingerprint: isSet(object.fingerprint) ? globalThis.String(object.fingerprint) : "", + identifier: isSet(object.identifier) ? globalThis.String(object.identifier) : "", + }; + }, + + toJSON(message: ReadRegistrationData): unknown { + const obj: any = {}; + if (message.fingerprint !== "") { + obj.fingerprint = message.fingerprint; + } + if (message.identifier !== "") { + obj.identifier = message.identifier; + } + return obj; + }, + + create, I>>(base?: I): ReadRegistrationData { + return ReadRegistrationData.fromPartial(base ?? ({} as any)); + }, + fromPartial, I>>(object: I): ReadRegistrationData { + const message = createBaseReadRegistrationData(); + message.fingerprint = object.fingerprint ?? ""; + message.identifier = object.identifier ?? ""; + return message; + }, +}; + +function createBaseReadOldToken(): ReadOldToken { + return {}; +} + +export const ReadOldToken = { + encode(_: ReadOldToken, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): ReadOldToken { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseReadOldToken(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(_: any): ReadOldToken { + return {}; + }, + + toJSON(_: ReadOldToken): unknown { + const obj: any = {}; + return obj; + }, + + create, I>>(base?: I): ReadOldToken { + return ReadOldToken.fromPartial(base ?? ({} as any)); + }, + fromPartial, I>>(_: I): ReadOldToken { + const message = createBaseReadOldToken(); + return message; + }, +}; + +function createBaseWriteRegistrationData(): WriteRegistrationData { + return { data: new Uint8Array(0) }; +} + +export const WriteRegistrationData = { + encode(message: WriteRegistrationData, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.data.length !== 0) { + writer.uint32(10).bytes(message.data); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): WriteRegistrationData { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseWriteRegistrationData(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } + + message.data = reader.bytes(); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(object: any): WriteRegistrationData { + return { data: isSet(object.data) ? bytesFromBase64(object.data) : new Uint8Array(0) }; + }, + + toJSON(message: WriteRegistrationData): unknown { + const obj: any = {}; + if (message.data.length !== 0) { + obj.data = base64FromBytes(message.data); + } + return obj; + }, + + create, I>>(base?: I): WriteRegistrationData { + return WriteRegistrationData.fromPartial(base ?? ({} as any)); + }, + fromPartial, I>>(object: I): WriteRegistrationData { + const message = createBaseWriteRegistrationData(); + message.data = object.data ?? new Uint8Array(0); + return message; + }, +}; + +function createBaseGetProductInformation(): GetProductInformation { + return {}; +} + +export const GetProductInformation = { + encode(_: GetProductInformation, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): GetProductInformation { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseGetProductInformation(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(_: any): GetProductInformation { + return {}; + }, + + toJSON(_: GetProductInformation): unknown { + const obj: any = {}; + return obj; + }, + + create, I>>(base?: I): GetProductInformation { + return GetProductInformation.fromPartial(base ?? ({} as any)); + }, + fromPartial, I>>(_: I): GetProductInformation { + const message = createBaseGetProductInformation(); + return message; + }, +}; + +function createBaseLog(): Log { + return { level: 0, message: "" }; +} + +export const Log = { + encode(message: Log, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.level !== 0) { + writer.uint32(8).int32(message.level); + } + if (message.message !== "") { + writer.uint32(18).string(message.message); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): Log { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseLog(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 8) { + break; + } + + message.level = reader.int32() as any; + continue; + case 2: + if (tag !== 18) { + break; + } + + message.message = reader.string(); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(object: any): Log { + return { + level: isSet(object.level) ? log_LevelFromJSON(object.level) : 0, + message: isSet(object.message) ? globalThis.String(object.message) : "", + }; + }, + + toJSON(message: Log): unknown { + const obj: any = {}; + if (message.level !== 0) { + obj.level = log_LevelToJSON(message.level); + } + if (message.message !== "") { + obj.message = message.message; + } + return obj; + }, + + create, I>>(base?: I): Log { + return Log.fromPartial(base ?? ({} as any)); + }, + fromPartial, I>>(object: I): Log { + const message = createBaseLog(); + message.level = object.level ?? 0; + message.message = object.message ?? ""; + return message; + }, +}; + +function createBaseUpgradesAvailable(): UpgradesAvailable { + return { status: 0, isNonProductionActive: false, activeChannel: "", releaseNotes: "", upgrades: [] }; +} + +export const UpgradesAvailable = { + encode(message: UpgradesAvailable, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.status !== 0) { + writer.uint32(8).int32(message.status); + } + if (message.isNonProductionActive !== false) { + writer.uint32(16).bool(message.isNonProductionActive); + } + if (message.activeChannel !== "") { + writer.uint32(26).string(message.activeChannel); + } + if (message.releaseNotes !== "") { + writer.uint32(34).string(message.releaseNotes); + } + for (const v of message.upgrades) { + BuildInformation.encode(v!, writer.uint32(42).fork()).ldelim(); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): UpgradesAvailable { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseUpgradesAvailable(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 8) { + break; + } + + message.status = reader.int32() as any; + continue; + case 2: + if (tag !== 16) { + break; + } + + message.isNonProductionActive = reader.bool(); + continue; + case 3: + if (tag !== 26) { + break; + } + + message.activeChannel = reader.string(); + continue; + case 4: + if (tag !== 34) { + break; + } + + message.releaseNotes = reader.string(); + continue; + case 5: + if (tag !== 42) { + break; + } + + message.upgrades.push(BuildInformation.decode(reader, reader.uint32())); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(object: any): UpgradesAvailable { + return { + status: isSet(object.status) ? statusFromJSON(object.status) : 0, + isNonProductionActive: isSet(object.isNonProductionActive) + ? globalThis.Boolean(object.isNonProductionActive) + : false, + activeChannel: isSet(object.activeChannel) ? globalThis.String(object.activeChannel) : "", + releaseNotes: isSet(object.releaseNotes) ? globalThis.String(object.releaseNotes) : "", + upgrades: globalThis.Array.isArray(object?.upgrades) + ? object.upgrades.map((e: any) => BuildInformation.fromJSON(e)) + : [], + }; + }, + + toJSON(message: UpgradesAvailable): unknown { + const obj: any = {}; + if (message.status !== 0) { + obj.status = statusToJSON(message.status); + } + if (message.isNonProductionActive !== false) { + obj.isNonProductionActive = message.isNonProductionActive; + } + if (message.activeChannel !== "") { + obj.activeChannel = message.activeChannel; + } + if (message.releaseNotes !== "") { + obj.releaseNotes = message.releaseNotes; + } + if (message.upgrades?.length) { + obj.upgrades = message.upgrades.map((e) => BuildInformation.toJSON(e)); + } + return obj; + }, + + create, I>>(base?: I): UpgradesAvailable { + return UpgradesAvailable.fromPartial(base ?? ({} as any)); + }, + fromPartial, I>>(object: I): UpgradesAvailable { + const message = createBaseUpgradesAvailable(); + message.status = object.status ?? 0; + message.isNonProductionActive = object.isNonProductionActive ?? false; + message.activeChannel = object.activeChannel ?? ""; + message.releaseNotes = object.releaseNotes ?? ""; + message.upgrades = object.upgrades?.map((e) => BuildInformation.fromPartial(e)) || []; + return message; + }, +}; + +function createBaseDowngradeAvailable(): DowngradeAvailable { + return { status: 0, downgrade: undefined, releaseNotes: "" }; +} + +export const DowngradeAvailable = { + encode(message: DowngradeAvailable, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.status !== 0) { + writer.uint32(8).int32(message.status); + } + if (message.downgrade !== undefined) { + BuildInformation.encode(message.downgrade, writer.uint32(18).fork()).ldelim(); + } + if (message.releaseNotes !== "") { + writer.uint32(26).string(message.releaseNotes); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): DowngradeAvailable { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseDowngradeAvailable(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 8) { + break; + } + + message.status = reader.int32() as any; + continue; + case 2: + if (tag !== 18) { + break; + } + + message.downgrade = BuildInformation.decode(reader, reader.uint32()); + continue; + case 3: + if (tag !== 26) { + break; + } + + message.releaseNotes = reader.string(); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(object: any): DowngradeAvailable { + return { + status: isSet(object.status) ? statusFromJSON(object.status) : 0, + downgrade: isSet(object.downgrade) ? BuildInformation.fromJSON(object.downgrade) : undefined, + releaseNotes: isSet(object.releaseNotes) ? globalThis.String(object.releaseNotes) : "", + }; + }, + + toJSON(message: DowngradeAvailable): unknown { + const obj: any = {}; + if (message.status !== 0) { + obj.status = statusToJSON(message.status); + } + if (message.downgrade !== undefined) { + obj.downgrade = BuildInformation.toJSON(message.downgrade); + } + if (message.releaseNotes !== "") { + obj.releaseNotes = message.releaseNotes; + } + return obj; + }, + + create, I>>(base?: I): DowngradeAvailable { + return DowngradeAvailable.fromPartial(base ?? ({} as any)); + }, + fromPartial, I>>(object: I): DowngradeAvailable { + const message = createBaseDowngradeAvailable(); + message.status = object.status ?? 0; + message.downgrade = (object.downgrade !== undefined && object.downgrade !== null) + ? BuildInformation.fromPartial(object.downgrade) + : undefined; + message.releaseNotes = object.releaseNotes ?? ""; + return message; + }, +}; + +function createBaseDownloadProgress(): DownloadProgress { + return { status: 0, complete: false, progress: 0 }; +} + +export const DownloadProgress = { + encode(message: DownloadProgress, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.status !== 0) { + writer.uint32(8).int32(message.status); + } + if (message.complete !== false) { + writer.uint32(16).bool(message.complete); + } + if (message.progress !== 0) { + writer.uint32(29).float(message.progress); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): DownloadProgress { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseDownloadProgress(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 8) { + break; + } + + message.status = reader.int32() as any; + continue; + case 2: + if (tag !== 16) { + break; + } + + message.complete = reader.bool(); + continue; + case 3: + if (tag !== 29) { + break; + } + + message.progress = reader.float(); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(object: any): DownloadProgress { + return { + status: isSet(object.status) ? statusFromJSON(object.status) : 0, + complete: isSet(object.complete) ? globalThis.Boolean(object.complete) : false, + progress: isSet(object.progress) ? globalThis.Number(object.progress) : 0, + }; + }, + + toJSON(message: DownloadProgress): unknown { + const obj: any = {}; + if (message.status !== 0) { + obj.status = statusToJSON(message.status); + } + if (message.complete !== false) { + obj.complete = message.complete; + } + if (message.progress !== 0) { + obj.progress = message.progress; + } + return obj; + }, + + create, I>>(base?: I): DownloadProgress { + return DownloadProgress.fromPartial(base ?? ({} as any)); + }, + fromPartial, I>>(object: I): DownloadProgress { + const message = createBaseDownloadProgress(); + message.status = object.status ?? 0; + message.complete = object.complete ?? false; + message.progress = object.progress ?? 0; + return message; + }, +}; + +function createBaseAlerts(): Alerts { + return { alerts: [] }; +} + +export const Alerts = { + encode(message: Alerts, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + for (const v of message.alerts) { + Alert.encode(v!, writer.uint32(10).fork()).ldelim(); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): Alerts { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseAlerts(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } + + message.alerts.push(Alert.decode(reader, reader.uint32())); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(object: any): Alerts { + return { alerts: globalThis.Array.isArray(object?.alerts) ? object.alerts.map((e: any) => Alert.fromJSON(e)) : [] }; + }, + + toJSON(message: Alerts): unknown { + const obj: any = {}; + if (message.alerts?.length) { + obj.alerts = message.alerts.map((e) => Alert.toJSON(e)); + } + return obj; + }, + + create, I>>(base?: I): Alerts { + return Alerts.fromPartial(base ?? ({} as any)); + }, + fromPartial, I>>(object: I): Alerts { + const message = createBaseAlerts(); + message.alerts = object.alerts?.map((e) => Alert.fromPartial(e)) || []; + return message; + }, +}; + +function createBaseShowExpirationDialog(): ShowExpirationDialog { + return { days: 0 }; +} + +export const ShowExpirationDialog = { + encode(message: ShowExpirationDialog, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.days !== 0) { + writer.uint32(8).int32(message.days); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): ShowExpirationDialog { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseShowExpirationDialog(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 8) { + break; + } + + message.days = reader.int32(); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(object: any): ShowExpirationDialog { + return { days: isSet(object.days) ? globalThis.Number(object.days) : 0 }; + }, + + toJSON(message: ShowExpirationDialog): unknown { + const obj: any = {}; + if (message.days !== 0) { + obj.days = Math.round(message.days); + } + return obj; + }, + + create, I>>(base?: I): ShowExpirationDialog { + return ShowExpirationDialog.fromPartial(base ?? ({} as any)); + }, + fromPartial, I>>(object: I): ShowExpirationDialog { + const message = createBaseShowExpirationDialog(); + message.days = object.days ?? 0; + return message; + }, +}; + +function createBaseLicenseInfo(): LicenseInfo { + return { registrationInfo: undefined, availableSeats: undefined, totalSeats: undefined, legacy: false }; +} + +export const LicenseInfo = { + encode(message: LicenseInfo, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.registrationInfo !== undefined) { + RegistrationInfo.encode(message.registrationInfo, writer.uint32(10).fork()).ldelim(); + } + if (message.availableSeats !== undefined) { + Seats.encode(message.availableSeats, writer.uint32(18).fork()).ldelim(); + } + if (message.totalSeats !== undefined) { + Seats.encode(message.totalSeats, writer.uint32(26).fork()).ldelim(); + } + if (message.legacy !== false) { + writer.uint32(32).bool(message.legacy); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): LicenseInfo { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseLicenseInfo(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } + + message.registrationInfo = RegistrationInfo.decode(reader, reader.uint32()); + continue; + case 2: + if (tag !== 18) { + break; + } + + message.availableSeats = Seats.decode(reader, reader.uint32()); + continue; + case 3: + if (tag !== 26) { + break; + } + + message.totalSeats = Seats.decode(reader, reader.uint32()); + continue; + case 4: + if (tag !== 32) { + break; + } + + message.legacy = reader.bool(); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(object: any): LicenseInfo { + return { + registrationInfo: isSet(object.registrationInfo) ? RegistrationInfo.fromJSON(object.registrationInfo) : undefined, + availableSeats: isSet(object.availableSeats) ? Seats.fromJSON(object.availableSeats) : undefined, + totalSeats: isSet(object.totalSeats) ? Seats.fromJSON(object.totalSeats) : undefined, + legacy: isSet(object.legacy) ? globalThis.Boolean(object.legacy) : false, + }; + }, + + toJSON(message: LicenseInfo): unknown { + const obj: any = {}; + if (message.registrationInfo !== undefined) { + obj.registrationInfo = RegistrationInfo.toJSON(message.registrationInfo); + } + if (message.availableSeats !== undefined) { + obj.availableSeats = Seats.toJSON(message.availableSeats); + } + if (message.totalSeats !== undefined) { + obj.totalSeats = Seats.toJSON(message.totalSeats); + } + if (message.legacy !== false) { + obj.legacy = message.legacy; + } + return obj; + }, + + create, I>>(base?: I): LicenseInfo { + return LicenseInfo.fromPartial(base ?? ({} as any)); + }, + fromPartial, I>>(object: I): LicenseInfo { + const message = createBaseLicenseInfo(); + message.registrationInfo = (object.registrationInfo !== undefined && object.registrationInfo !== null) + ? RegistrationInfo.fromPartial(object.registrationInfo) + : undefined; + message.availableSeats = (object.availableSeats !== undefined && object.availableSeats !== null) + ? Seats.fromPartial(object.availableSeats) + : undefined; + message.totalSeats = (object.totalSeats !== undefined && object.totalSeats !== null) + ? Seats.fromPartial(object.totalSeats) + : undefined; + message.legacy = object.legacy ?? false; + return message; + }, +}; + +function createBaseVerificationComplete(): VerificationComplete { + return { + result: 0, + license: undefined, + bibles: undefined, + token: undefined, + subscriptionInfo: undefined, + alert: 0, + banner: 0, + }; +} + +export const VerificationComplete = { + encode(message: VerificationComplete, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.result !== 0) { + writer.uint32(8).int32(message.result); + } + if (message.license !== undefined) { + LicenseInfo.encode(message.license, writer.uint32(18).fork()).ldelim(); + } + if (message.bibles !== undefined) { + Bibles.encode(message.bibles, writer.uint32(26).fork()).ldelim(); + } + if (message.token !== undefined) { + TokenMetadata.encode(message.token, writer.uint32(34).fork()).ldelim(); + } + if (message.subscriptionInfo !== undefined) { + SubscriptionInfo.encode(message.subscriptionInfo, writer.uint32(42).fork()).ldelim(); + } + if (message.alert !== 0) { + writer.uint32(48).int32(message.alert); + } + if (message.banner !== 0) { + writer.uint32(56).int32(message.banner); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): VerificationComplete { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseVerificationComplete(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 8) { + break; + } + + message.result = reader.int32() as any; + continue; + case 2: + if (tag !== 18) { + break; + } + + message.license = LicenseInfo.decode(reader, reader.uint32()); + continue; + case 3: + if (tag !== 26) { + break; + } + + message.bibles = Bibles.decode(reader, reader.uint32()); + continue; + case 4: + if (tag !== 34) { + break; + } + + message.token = TokenMetadata.decode(reader, reader.uint32()); + continue; + case 5: + if (tag !== 42) { + break; + } + + message.subscriptionInfo = SubscriptionInfo.decode(reader, reader.uint32()); + continue; + case 6: + if (tag !== 48) { + break; + } + + message.alert = reader.int32() as any; + continue; + case 7: + if (tag !== 56) { + break; + } + + message.banner = reader.int32() as any; + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(object: any): VerificationComplete { + return { + result: isSet(object.result) ? statusFromJSON(object.result) : 0, + license: isSet(object.license) ? LicenseInfo.fromJSON(object.license) : undefined, + bibles: isSet(object.bibles) ? Bibles.fromJSON(object.bibles) : undefined, + token: isSet(object.token) ? TokenMetadata.fromJSON(object.token) : undefined, + subscriptionInfo: isSet(object.subscriptionInfo) ? SubscriptionInfo.fromJSON(object.subscriptionInfo) : undefined, + alert: isSet(object.alert) ? popupAlertMessageFromJSON(object.alert) : 0, + banner: isSet(object.banner) ? bannerMessageFromJSON(object.banner) : 0, + }; + }, + + toJSON(message: VerificationComplete): unknown { + const obj: any = {}; + if (message.result !== 0) { + obj.result = statusToJSON(message.result); + } + if (message.license !== undefined) { + obj.license = LicenseInfo.toJSON(message.license); + } + if (message.bibles !== undefined) { + obj.bibles = Bibles.toJSON(message.bibles); + } + if (message.token !== undefined) { + obj.token = TokenMetadata.toJSON(message.token); + } + if (message.subscriptionInfo !== undefined) { + obj.subscriptionInfo = SubscriptionInfo.toJSON(message.subscriptionInfo); + } + if (message.alert !== 0) { + obj.alert = popupAlertMessageToJSON(message.alert); + } + if (message.banner !== 0) { + obj.banner = bannerMessageToJSON(message.banner); + } + return obj; + }, + + create, I>>(base?: I): VerificationComplete { + return VerificationComplete.fromPartial(base ?? ({} as any)); + }, + fromPartial, I>>(object: I): VerificationComplete { + const message = createBaseVerificationComplete(); + message.result = object.result ?? 0; + message.license = (object.license !== undefined && object.license !== null) + ? LicenseInfo.fromPartial(object.license) + : undefined; + message.bibles = (object.bibles !== undefined && object.bibles !== null) + ? Bibles.fromPartial(object.bibles) + : undefined; + message.token = (object.token !== undefined && object.token !== null) + ? TokenMetadata.fromPartial(object.token) + : undefined; + message.subscriptionInfo = (object.subscriptionInfo !== undefined && object.subscriptionInfo !== null) + ? SubscriptionInfo.fromPartial(object.subscriptionInfo) + : undefined; + message.alert = object.alert ?? 0; + message.banner = object.banner ?? 0; + return message; + }, +}; + +function createBaseSeats(): Seats { + return { basic: 0, advanced: 0 }; +} + +export const Seats = { + encode(message: Seats, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.basic !== 0) { + writer.uint32(8).int32(message.basic); + } + if (message.advanced !== 0) { + writer.uint32(16).int32(message.advanced); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): Seats { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseSeats(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 8) { + break; + } + + message.basic = reader.int32(); + continue; + case 2: + if (tag !== 16) { + break; + } + + message.advanced = reader.int32(); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(object: any): Seats { + return { + basic: isSet(object.basic) ? globalThis.Number(object.basic) : 0, + advanced: isSet(object.advanced) ? globalThis.Number(object.advanced) : 0, + }; + }, + + toJSON(message: Seats): unknown { + const obj: any = {}; + if (message.basic !== 0) { + obj.basic = Math.round(message.basic); + } + if (message.advanced !== 0) { + obj.advanced = Math.round(message.advanced); + } + return obj; + }, + + create, I>>(base?: I): Seats { + return Seats.fromPartial(base ?? ({} as any)); + }, + fromPartial, I>>(object: I): Seats { + const message = createBaseSeats(); + message.basic = object.basic ?? 0; + message.advanced = object.advanced ?? 0; + return message; + }, +}; + +function createBaseSupplementalInformation(): SupplementalInformation { + return { downloadLink: "" }; +} + +export const SupplementalInformation = { + encode(message: SupplementalInformation, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.downloadLink !== "") { + writer.uint32(10).string(message.downloadLink); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): SupplementalInformation { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseSupplementalInformation(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } + + message.downloadLink = reader.string(); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(object: any): SupplementalInformation { + return { downloadLink: isSet(object.downloadLink) ? globalThis.String(object.downloadLink) : "" }; + }, + + toJSON(message: SupplementalInformation): unknown { + const obj: any = {}; + if (message.downloadLink !== "") { + obj.downloadLink = message.downloadLink; + } + return obj; + }, + + create, I>>(base?: I): SupplementalInformation { + return SupplementalInformation.fromPartial(base ?? ({} as any)); + }, + fromPartial, I>>(object: I): SupplementalInformation { + const message = createBaseSupplementalInformation(); + message.downloadLink = object.downloadLink ?? ""; + return message; + }, +}; + +function createBaseBible(): Bible { + return { + id: "", + name: "", + language: "", + publisher: "", + copyright: "", + displayAbbreviation: "", + internalAbbreviation: "", + version: "", + info: undefined, + }; +} + +export const Bible = { + encode(message: Bible, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.id !== "") { + writer.uint32(10).string(message.id); + } + if (message.name !== "") { + writer.uint32(18).string(message.name); + } + if (message.language !== "") { + writer.uint32(26).string(message.language); + } + if (message.publisher !== "") { + writer.uint32(34).string(message.publisher); + } + if (message.copyright !== "") { + writer.uint32(42).string(message.copyright); + } + if (message.displayAbbreviation !== "") { + writer.uint32(50).string(message.displayAbbreviation); + } + if (message.internalAbbreviation !== "") { + writer.uint32(58).string(message.internalAbbreviation); + } + if (message.version !== "") { + writer.uint32(66).string(message.version); + } + if (message.info !== undefined) { + SupplementalInformation.encode(message.info, writer.uint32(74).fork()).ldelim(); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): Bible { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseBible(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } + + message.id = reader.string(); + continue; + case 2: + if (tag !== 18) { + break; + } + + message.name = reader.string(); + continue; + case 3: + if (tag !== 26) { + break; + } + + message.language = reader.string(); + continue; + case 4: + if (tag !== 34) { + break; + } + + message.publisher = reader.string(); + continue; + case 5: + if (tag !== 42) { + break; + } + + message.copyright = reader.string(); + continue; + case 6: + if (tag !== 50) { + break; + } + + message.displayAbbreviation = reader.string(); + continue; + case 7: + if (tag !== 58) { + break; + } + + message.internalAbbreviation = reader.string(); + continue; + case 8: + if (tag !== 66) { + break; + } + + message.version = reader.string(); + continue; + case 9: + if (tag !== 74) { + break; + } + + message.info = SupplementalInformation.decode(reader, reader.uint32()); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(object: any): Bible { + return { + id: isSet(object.id) ? globalThis.String(object.id) : "", + name: isSet(object.name) ? globalThis.String(object.name) : "", + language: isSet(object.language) ? globalThis.String(object.language) : "", + publisher: isSet(object.publisher) ? globalThis.String(object.publisher) : "", + copyright: isSet(object.copyright) ? globalThis.String(object.copyright) : "", + displayAbbreviation: isSet(object.displayAbbreviation) ? globalThis.String(object.displayAbbreviation) : "", + internalAbbreviation: isSet(object.internalAbbreviation) ? globalThis.String(object.internalAbbreviation) : "", + version: isSet(object.version) ? globalThis.String(object.version) : "", + info: isSet(object.info) ? SupplementalInformation.fromJSON(object.info) : undefined, + }; + }, + + toJSON(message: Bible): unknown { + const obj: any = {}; + if (message.id !== "") { + obj.id = message.id; + } + if (message.name !== "") { + obj.name = message.name; + } + if (message.language !== "") { + obj.language = message.language; + } + if (message.publisher !== "") { + obj.publisher = message.publisher; + } + if (message.copyright !== "") { + obj.copyright = message.copyright; + } + if (message.displayAbbreviation !== "") { + obj.displayAbbreviation = message.displayAbbreviation; + } + if (message.internalAbbreviation !== "") { + obj.internalAbbreviation = message.internalAbbreviation; + } + if (message.version !== "") { + obj.version = message.version; + } + if (message.info !== undefined) { + obj.info = SupplementalInformation.toJSON(message.info); + } + return obj; + }, + + create, I>>(base?: I): Bible { + return Bible.fromPartial(base ?? ({} as any)); + }, + fromPartial, I>>(object: I): Bible { + const message = createBaseBible(); + message.id = object.id ?? ""; + message.name = object.name ?? ""; + message.language = object.language ?? ""; + message.publisher = object.publisher ?? ""; + message.copyright = object.copyright ?? ""; + message.displayAbbreviation = object.displayAbbreviation ?? ""; + message.internalAbbreviation = object.internalAbbreviation ?? ""; + message.version = object.version ?? ""; + message.info = (object.info !== undefined && object.info !== null) + ? SupplementalInformation.fromPartial(object.info) + : undefined; + return message; + }, +}; + +function createBasePurchasedBible(): PurchasedBible { + return { metadata: undefined, licensingInfo: undefined }; +} + +export const PurchasedBible = { + encode(message: PurchasedBible, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.metadata !== undefined) { + Bible.encode(message.metadata, writer.uint32(10).fork()).ldelim(); + } + if (message.licensingInfo !== undefined) { + LicensingInfo.encode(message.licensingInfo, writer.uint32(18).fork()).ldelim(); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): PurchasedBible { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBasePurchasedBible(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } + + message.metadata = Bible.decode(reader, reader.uint32()); + continue; + case 2: + if (tag !== 18) { + break; + } + + message.licensingInfo = LicensingInfo.decode(reader, reader.uint32()); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(object: any): PurchasedBible { + return { + metadata: isSet(object.metadata) ? Bible.fromJSON(object.metadata) : undefined, + licensingInfo: isSet(object.licensingInfo) ? LicensingInfo.fromJSON(object.licensingInfo) : undefined, + }; + }, + + toJSON(message: PurchasedBible): unknown { + const obj: any = {}; + if (message.metadata !== undefined) { + obj.metadata = Bible.toJSON(message.metadata); + } + if (message.licensingInfo !== undefined) { + obj.licensingInfo = LicensingInfo.toJSON(message.licensingInfo); + } + return obj; + }, + + create, I>>(base?: I): PurchasedBible { + return PurchasedBible.fromPartial(base ?? ({} as any)); + }, + fromPartial, I>>(object: I): PurchasedBible { + const message = createBasePurchasedBible(); + message.metadata = (object.metadata !== undefined && object.metadata !== null) + ? Bible.fromPartial(object.metadata) + : undefined; + message.licensingInfo = (object.licensingInfo !== undefined && object.licensingInfo !== null) + ? LicensingInfo.fromPartial(object.licensingInfo) + : undefined; + return message; + }, +}; + +function createBaseLicensingInfo(): LicensingInfo { + return { availableCopies: 0, totalCopies: 0, isActiveLocally: false, otherActiveCopies: [] }; +} + +export const LicensingInfo = { + encode(message: LicensingInfo, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.availableCopies !== 0) { + writer.uint32(8).int32(message.availableCopies); + } + if (message.totalCopies !== 0) { + writer.uint32(16).int32(message.totalCopies); + } + if (message.isActiveLocally !== false) { + writer.uint32(24).bool(message.isActiveLocally); + } + for (const v of message.otherActiveCopies) { + ActiveCopy.encode(v!, writer.uint32(34).fork()).ldelim(); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): LicensingInfo { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseLicensingInfo(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 8) { + break; + } + + message.availableCopies = reader.int32(); + continue; + case 2: + if (tag !== 16) { + break; + } + + message.totalCopies = reader.int32(); + continue; + case 3: + if (tag !== 24) { + break; + } + + message.isActiveLocally = reader.bool(); + continue; + case 4: + if (tag !== 34) { + break; + } + + message.otherActiveCopies.push(ActiveCopy.decode(reader, reader.uint32())); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(object: any): LicensingInfo { + return { + availableCopies: isSet(object.availableCopies) ? globalThis.Number(object.availableCopies) : 0, + totalCopies: isSet(object.totalCopies) ? globalThis.Number(object.totalCopies) : 0, + isActiveLocally: isSet(object.isActiveLocally) ? globalThis.Boolean(object.isActiveLocally) : false, + otherActiveCopies: globalThis.Array.isArray(object?.otherActiveCopies) + ? object.otherActiveCopies.map((e: any) => ActiveCopy.fromJSON(e)) + : [], + }; + }, + + toJSON(message: LicensingInfo): unknown { + const obj: any = {}; + if (message.availableCopies !== 0) { + obj.availableCopies = Math.round(message.availableCopies); + } + if (message.totalCopies !== 0) { + obj.totalCopies = Math.round(message.totalCopies); + } + if (message.isActiveLocally !== false) { + obj.isActiveLocally = message.isActiveLocally; + } + if (message.otherActiveCopies?.length) { + obj.otherActiveCopies = message.otherActiveCopies.map((e) => ActiveCopy.toJSON(e)); + } + return obj; + }, + + create, I>>(base?: I): LicensingInfo { + return LicensingInfo.fromPartial(base ?? ({} as any)); + }, + fromPartial, I>>(object: I): LicensingInfo { + const message = createBaseLicensingInfo(); + message.availableCopies = object.availableCopies ?? 0; + message.totalCopies = object.totalCopies ?? 0; + message.isActiveLocally = object.isActiveLocally ?? false; + message.otherActiveCopies = object.otherActiveCopies?.map((e) => ActiveCopy.fromPartial(e)) || []; + return message; + }, +}; + +function createBaseActiveCopy(): ActiveCopy { + return { displayName: "", hostname: "" }; +} + +export const ActiveCopy = { + encode(message: ActiveCopy, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.displayName !== "") { + writer.uint32(10).string(message.displayName); + } + if (message.hostname !== "") { + writer.uint32(18).string(message.hostname); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): ActiveCopy { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseActiveCopy(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } + + message.displayName = reader.string(); + continue; + case 2: + if (tag !== 18) { + break; + } + + message.hostname = reader.string(); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(object: any): ActiveCopy { + return { + displayName: isSet(object.displayName) ? globalThis.String(object.displayName) : "", + hostname: isSet(object.hostname) ? globalThis.String(object.hostname) : "", + }; + }, + + toJSON(message: ActiveCopy): unknown { + const obj: any = {}; + if (message.displayName !== "") { + obj.displayName = message.displayName; + } + if (message.hostname !== "") { + obj.hostname = message.hostname; + } + return obj; + }, + + create, I>>(base?: I): ActiveCopy { + return ActiveCopy.fromPartial(base ?? ({} as any)); + }, + fromPartial, I>>(object: I): ActiveCopy { + const message = createBaseActiveCopy(); + message.displayName = object.displayName ?? ""; + message.hostname = object.hostname ?? ""; + return message; + }, +}; + +function createBaseRegistrationInfo(): RegistrationInfo { + return { + userName: "", + displayKey: "", + displayName: "", + expirationDate: 0, + activationKey: "", + licenseType: 0, + registrationDate: 0, + seatType: 0, + latestAvailableBuildNumber: 0, + latestAvailableVersion: "", + hasWorshipHouseMediaSubscription: false, + maintenanceExpirationDate: 0, + nonExtendedMaintenanceExpirationDate: 0, + isAutoRenewalActive: false, + }; +} + +export const RegistrationInfo = { + encode(message: RegistrationInfo, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.userName !== "") { + writer.uint32(10).string(message.userName); + } + if (message.displayKey !== "") { + writer.uint32(18).string(message.displayKey); + } + if (message.displayName !== "") { + writer.uint32(26).string(message.displayName); + } + if (message.expirationDate !== 0) { + writer.uint32(32).int64(message.expirationDate); + } + if (message.activationKey !== "") { + writer.uint32(42).string(message.activationKey); + } + if (message.licenseType !== 0) { + writer.uint32(48).int32(message.licenseType); + } + if (message.registrationDate !== 0) { + writer.uint32(56).int64(message.registrationDate); + } + if (message.seatType !== 0) { + writer.uint32(64).int32(message.seatType); + } + if (message.latestAvailableBuildNumber !== 0) { + writer.uint32(72).uint32(message.latestAvailableBuildNumber); + } + if (message.latestAvailableVersion !== "") { + writer.uint32(82).string(message.latestAvailableVersion); + } + if (message.hasWorshipHouseMediaSubscription !== false) { + writer.uint32(88).bool(message.hasWorshipHouseMediaSubscription); + } + if (message.maintenanceExpirationDate !== 0) { + writer.uint32(96).int64(message.maintenanceExpirationDate); + } + if (message.nonExtendedMaintenanceExpirationDate !== 0) { + writer.uint32(104).int64(message.nonExtendedMaintenanceExpirationDate); + } + if (message.isAutoRenewalActive !== false) { + writer.uint32(112).bool(message.isAutoRenewalActive); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): RegistrationInfo { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseRegistrationInfo(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } + + message.userName = reader.string(); + continue; + case 2: + if (tag !== 18) { + break; + } + + message.displayKey = reader.string(); + continue; + case 3: + if (tag !== 26) { + break; + } + + message.displayName = reader.string(); + continue; + case 4: + if (tag !== 32) { + break; + } + + message.expirationDate = longToNumber(reader.int64() as Long); + continue; + case 5: + if (tag !== 42) { + break; + } + + message.activationKey = reader.string(); + continue; + case 6: + if (tag !== 48) { + break; + } + + message.licenseType = reader.int32() as any; + continue; + case 7: + if (tag !== 56) { + break; + } + + message.registrationDate = longToNumber(reader.int64() as Long); + continue; + case 8: + if (tag !== 64) { + break; + } + + message.seatType = reader.int32() as any; + continue; + case 9: + if (tag !== 72) { + break; + } + + message.latestAvailableBuildNumber = reader.uint32(); + continue; + case 10: + if (tag !== 82) { + break; + } + + message.latestAvailableVersion = reader.string(); + continue; + case 11: + if (tag !== 88) { + break; + } + + message.hasWorshipHouseMediaSubscription = reader.bool(); + continue; + case 12: + if (tag !== 96) { + break; + } + + message.maintenanceExpirationDate = longToNumber(reader.int64() as Long); + continue; + case 13: + if (tag !== 104) { + break; + } + + message.nonExtendedMaintenanceExpirationDate = longToNumber(reader.int64() as Long); + continue; + case 14: + if (tag !== 112) { + break; + } + + message.isAutoRenewalActive = reader.bool(); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(object: any): RegistrationInfo { + return { + userName: isSet(object.userName) ? globalThis.String(object.userName) : "", + displayKey: isSet(object.displayKey) ? globalThis.String(object.displayKey) : "", + displayName: isSet(object.displayName) ? globalThis.String(object.displayName) : "", + expirationDate: isSet(object.expirationDate) ? globalThis.Number(object.expirationDate) : 0, + activationKey: isSet(object.activationKey) ? globalThis.String(object.activationKey) : "", + licenseType: isSet(object.licenseType) ? licenseTypeFromJSON(object.licenseType) : 0, + registrationDate: isSet(object.registrationDate) ? globalThis.Number(object.registrationDate) : 0, + seatType: isSet(object.seatType) ? seatTypeFromJSON(object.seatType) : 0, + latestAvailableBuildNumber: isSet(object.latestAvailableBuildNumber) + ? globalThis.Number(object.latestAvailableBuildNumber) + : 0, + latestAvailableVersion: isSet(object.latestAvailableVersion) + ? globalThis.String(object.latestAvailableVersion) + : "", + hasWorshipHouseMediaSubscription: isSet(object.hasWorshipHouseMediaSubscription) + ? globalThis.Boolean(object.hasWorshipHouseMediaSubscription) + : false, + maintenanceExpirationDate: isSet(object.maintenanceExpirationDate) + ? globalThis.Number(object.maintenanceExpirationDate) + : 0, + nonExtendedMaintenanceExpirationDate: isSet(object.nonExtendedMaintenanceExpirationDate) + ? globalThis.Number(object.nonExtendedMaintenanceExpirationDate) + : 0, + isAutoRenewalActive: isSet(object.isAutoRenewalActive) ? globalThis.Boolean(object.isAutoRenewalActive) : false, + }; + }, + + toJSON(message: RegistrationInfo): unknown { + const obj: any = {}; + if (message.userName !== "") { + obj.userName = message.userName; + } + if (message.displayKey !== "") { + obj.displayKey = message.displayKey; + } + if (message.displayName !== "") { + obj.displayName = message.displayName; + } + if (message.expirationDate !== 0) { + obj.expirationDate = Math.round(message.expirationDate); + } + if (message.activationKey !== "") { + obj.activationKey = message.activationKey; + } + if (message.licenseType !== 0) { + obj.licenseType = licenseTypeToJSON(message.licenseType); + } + if (message.registrationDate !== 0) { + obj.registrationDate = Math.round(message.registrationDate); + } + if (message.seatType !== 0) { + obj.seatType = seatTypeToJSON(message.seatType); + } + if (message.latestAvailableBuildNumber !== 0) { + obj.latestAvailableBuildNumber = Math.round(message.latestAvailableBuildNumber); + } + if (message.latestAvailableVersion !== "") { + obj.latestAvailableVersion = message.latestAvailableVersion; + } + if (message.hasWorshipHouseMediaSubscription !== false) { + obj.hasWorshipHouseMediaSubscription = message.hasWorshipHouseMediaSubscription; + } + if (message.maintenanceExpirationDate !== 0) { + obj.maintenanceExpirationDate = Math.round(message.maintenanceExpirationDate); + } + if (message.nonExtendedMaintenanceExpirationDate !== 0) { + obj.nonExtendedMaintenanceExpirationDate = Math.round(message.nonExtendedMaintenanceExpirationDate); + } + if (message.isAutoRenewalActive !== false) { + obj.isAutoRenewalActive = message.isAutoRenewalActive; + } + return obj; + }, + + create, I>>(base?: I): RegistrationInfo { + return RegistrationInfo.fromPartial(base ?? ({} as any)); + }, + fromPartial, I>>(object: I): RegistrationInfo { + const message = createBaseRegistrationInfo(); + message.userName = object.userName ?? ""; + message.displayKey = object.displayKey ?? ""; + message.displayName = object.displayName ?? ""; + message.expirationDate = object.expirationDate ?? 0; + message.activationKey = object.activationKey ?? ""; + message.licenseType = object.licenseType ?? 0; + message.registrationDate = object.registrationDate ?? 0; + message.seatType = object.seatType ?? 0; + message.latestAvailableBuildNumber = object.latestAvailableBuildNumber ?? 0; + message.latestAvailableVersion = object.latestAvailableVersion ?? ""; + message.hasWorshipHouseMediaSubscription = object.hasWorshipHouseMediaSubscription ?? false; + message.maintenanceExpirationDate = object.maintenanceExpirationDate ?? 0; + message.nonExtendedMaintenanceExpirationDate = object.nonExtendedMaintenanceExpirationDate ?? 0; + message.isAutoRenewalActive = object.isAutoRenewalActive ?? false; + return message; + }, +}; + +function createBaseBuildInformation(): BuildInformation { + return { + buildNumber: 0, + version: "", + minOsVersion: "", + releaseDate: 0, + registrationDate: 0, + downloadSize: 0, + downloadUrl: "", + channel: "", + isBeta: false, + isAvailable: false, + }; +} + +export const BuildInformation = { + encode(message: BuildInformation, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.buildNumber !== 0) { + writer.uint32(8).int32(message.buildNumber); + } + if (message.version !== "") { + writer.uint32(18).string(message.version); + } + if (message.minOsVersion !== "") { + writer.uint32(26).string(message.minOsVersion); + } + if (message.releaseDate !== 0) { + writer.uint32(32).int64(message.releaseDate); + } + if (message.registrationDate !== 0) { + writer.uint32(40).int64(message.registrationDate); + } + if (message.downloadSize !== 0) { + writer.uint32(48).int64(message.downloadSize); + } + if (message.downloadUrl !== "") { + writer.uint32(58).string(message.downloadUrl); + } + if (message.channel !== "") { + writer.uint32(66).string(message.channel); + } + if (message.isBeta !== false) { + writer.uint32(72).bool(message.isBeta); + } + if (message.isAvailable !== false) { + writer.uint32(80).bool(message.isAvailable); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): BuildInformation { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseBuildInformation(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 8) { + break; + } + + message.buildNumber = reader.int32(); + continue; + case 2: + if (tag !== 18) { + break; + } + + message.version = reader.string(); + continue; + case 3: + if (tag !== 26) { + break; + } + + message.minOsVersion = reader.string(); + continue; + case 4: + if (tag !== 32) { + break; + } + + message.releaseDate = longToNumber(reader.int64() as Long); + continue; + case 5: + if (tag !== 40) { + break; + } + + message.registrationDate = longToNumber(reader.int64() as Long); + continue; + case 6: + if (tag !== 48) { + break; + } + + message.downloadSize = longToNumber(reader.int64() as Long); + continue; + case 7: + if (tag !== 58) { + break; + } + + message.downloadUrl = reader.string(); + continue; + case 8: + if (tag !== 66) { + break; + } + + message.channel = reader.string(); + continue; + case 9: + if (tag !== 72) { + break; + } + + message.isBeta = reader.bool(); + continue; + case 10: + if (tag !== 80) { + break; + } + + message.isAvailable = reader.bool(); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(object: any): BuildInformation { + return { + buildNumber: isSet(object.buildNumber) ? globalThis.Number(object.buildNumber) : 0, + version: isSet(object.version) ? globalThis.String(object.version) : "", + minOsVersion: isSet(object.minOsVersion) ? globalThis.String(object.minOsVersion) : "", + releaseDate: isSet(object.releaseDate) ? globalThis.Number(object.releaseDate) : 0, + registrationDate: isSet(object.registrationDate) ? globalThis.Number(object.registrationDate) : 0, + downloadSize: isSet(object.downloadSize) ? globalThis.Number(object.downloadSize) : 0, + downloadUrl: isSet(object.downloadUrl) ? globalThis.String(object.downloadUrl) : "", + channel: isSet(object.channel) ? globalThis.String(object.channel) : "", + isBeta: isSet(object.isBeta) ? globalThis.Boolean(object.isBeta) : false, + isAvailable: isSet(object.isAvailable) ? globalThis.Boolean(object.isAvailable) : false, + }; + }, + + toJSON(message: BuildInformation): unknown { + const obj: any = {}; + if (message.buildNumber !== 0) { + obj.buildNumber = Math.round(message.buildNumber); + } + if (message.version !== "") { + obj.version = message.version; + } + if (message.minOsVersion !== "") { + obj.minOsVersion = message.minOsVersion; + } + if (message.releaseDate !== 0) { + obj.releaseDate = Math.round(message.releaseDate); + } + if (message.registrationDate !== 0) { + obj.registrationDate = Math.round(message.registrationDate); + } + if (message.downloadSize !== 0) { + obj.downloadSize = Math.round(message.downloadSize); + } + if (message.downloadUrl !== "") { + obj.downloadUrl = message.downloadUrl; + } + if (message.channel !== "") { + obj.channel = message.channel; + } + if (message.isBeta !== false) { + obj.isBeta = message.isBeta; + } + if (message.isAvailable !== false) { + obj.isAvailable = message.isAvailable; + } + return obj; + }, + + create, I>>(base?: I): BuildInformation { + return BuildInformation.fromPartial(base ?? ({} as any)); + }, + fromPartial, I>>(object: I): BuildInformation { + const message = createBaseBuildInformation(); + message.buildNumber = object.buildNumber ?? 0; + message.version = object.version ?? ""; + message.minOsVersion = object.minOsVersion ?? ""; + message.releaseDate = object.releaseDate ?? 0; + message.registrationDate = object.registrationDate ?? 0; + message.downloadSize = object.downloadSize ?? 0; + message.downloadUrl = object.downloadUrl ?? ""; + message.channel = object.channel ?? ""; + message.isBeta = object.isBeta ?? false; + message.isAvailable = object.isAvailable ?? false; + return message; + }, +}; + +function createBaseAlert(): Alert { + return { alertType: 0, title: "", contentType: 0, content: "" }; +} + +export const Alert = { + encode(message: Alert, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.alertType !== 0) { + writer.uint32(8).int32(message.alertType); + } + if (message.title !== "") { + writer.uint32(18).string(message.title); + } + if (message.contentType !== 0) { + writer.uint32(24).int32(message.contentType); + } + if (message.content !== "") { + writer.uint32(34).string(message.content); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): Alert { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseAlert(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 8) { + break; + } + + message.alertType = reader.int32() as any; + continue; + case 2: + if (tag !== 18) { + break; + } + + message.title = reader.string(); + continue; + case 3: + if (tag !== 24) { + break; + } + + message.contentType = reader.int32() as any; + continue; + case 4: + if (tag !== 34) { + break; + } + + message.content = reader.string(); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(object: any): Alert { + return { + alertType: isSet(object.alertType) ? alertTypeFromJSON(object.alertType) : 0, + title: isSet(object.title) ? globalThis.String(object.title) : "", + contentType: isSet(object.contentType) ? alertContentTypeFromJSON(object.contentType) : 0, + content: isSet(object.content) ? globalThis.String(object.content) : "", + }; + }, + + toJSON(message: Alert): unknown { + const obj: any = {}; + if (message.alertType !== 0) { + obj.alertType = alertTypeToJSON(message.alertType); + } + if (message.title !== "") { + obj.title = message.title; + } + if (message.contentType !== 0) { + obj.contentType = alertContentTypeToJSON(message.contentType); + } + if (message.content !== "") { + obj.content = message.content; + } + return obj; + }, + + create, I>>(base?: I): Alert { + return Alert.fromPartial(base ?? ({} as any)); + }, + fromPartial, I>>(object: I): Alert { + const message = createBaseAlert(); + message.alertType = object.alertType ?? 0; + message.title = object.title ?? ""; + message.contentType = object.contentType ?? 0; + message.content = object.content ?? ""; + return message; + }, +}; + +function createBaseTokenMetadata(): TokenMetadata { + return { accessToken: "", refreshToken: "", expiresAt: 0 }; +} + +export const TokenMetadata = { + encode(message: TokenMetadata, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.accessToken !== "") { + writer.uint32(10).string(message.accessToken); + } + if (message.refreshToken !== "") { + writer.uint32(18).string(message.refreshToken); + } + if (message.expiresAt !== 0) { + writer.uint32(24).int64(message.expiresAt); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): TokenMetadata { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseTokenMetadata(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } + + message.accessToken = reader.string(); + continue; + case 2: + if (tag !== 18) { + break; + } + + message.refreshToken = reader.string(); + continue; + case 3: + if (tag !== 24) { + break; + } + + message.expiresAt = longToNumber(reader.int64() as Long); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(object: any): TokenMetadata { + return { + accessToken: isSet(object.accessToken) ? globalThis.String(object.accessToken) : "", + refreshToken: isSet(object.refreshToken) ? globalThis.String(object.refreshToken) : "", + expiresAt: isSet(object.expiresAt) ? globalThis.Number(object.expiresAt) : 0, + }; + }, + + toJSON(message: TokenMetadata): unknown { + const obj: any = {}; + if (message.accessToken !== "") { + obj.accessToken = message.accessToken; + } + if (message.refreshToken !== "") { + obj.refreshToken = message.refreshToken; + } + if (message.expiresAt !== 0) { + obj.expiresAt = Math.round(message.expiresAt); + } + return obj; + }, + + create, I>>(base?: I): TokenMetadata { + return TokenMetadata.fromPartial(base ?? ({} as any)); + }, + fromPartial, I>>(object: I): TokenMetadata { + const message = createBaseTokenMetadata(); + message.accessToken = object.accessToken ?? ""; + message.refreshToken = object.refreshToken ?? ""; + message.expiresAt = object.expiresAt ?? 0; + return message; + }, +}; + +function createBaseSubscriptionInfo(): SubscriptionInfo { + return { organizationName: "", procontentLicenseType: 0, procontentLicenseExpiration: 0 }; +} + +export const SubscriptionInfo = { + encode(message: SubscriptionInfo, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.organizationName !== "") { + writer.uint32(10).string(message.organizationName); + } + if (message.procontentLicenseType !== 0) { + writer.uint32(16).int32(message.procontentLicenseType); + } + if (message.procontentLicenseExpiration !== 0) { + writer.uint32(24).int64(message.procontentLicenseExpiration); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): SubscriptionInfo { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseSubscriptionInfo(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } + + message.organizationName = reader.string(); + continue; + case 2: + if (tag !== 16) { + break; + } + + message.procontentLicenseType = reader.int32() as any; + continue; + case 3: + if (tag !== 24) { + break; + } + + message.procontentLicenseExpiration = longToNumber(reader.int64() as Long); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(object: any): SubscriptionInfo { + return { + organizationName: isSet(object.organizationName) ? globalThis.String(object.organizationName) : "", + procontentLicenseType: isSet(object.procontentLicenseType) + ? proContentLicenseTypeFromJSON(object.procontentLicenseType) + : 0, + procontentLicenseExpiration: isSet(object.procontentLicenseExpiration) + ? globalThis.Number(object.procontentLicenseExpiration) + : 0, + }; + }, + + toJSON(message: SubscriptionInfo): unknown { + const obj: any = {}; + if (message.organizationName !== "") { + obj.organizationName = message.organizationName; + } + if (message.procontentLicenseType !== 0) { + obj.procontentLicenseType = proContentLicenseTypeToJSON(message.procontentLicenseType); + } + if (message.procontentLicenseExpiration !== 0) { + obj.procontentLicenseExpiration = Math.round(message.procontentLicenseExpiration); + } + return obj; + }, + + create, I>>(base?: I): SubscriptionInfo { + return SubscriptionInfo.fromPartial(base ?? ({} as any)); + }, + fromPartial, I>>(object: I): SubscriptionInfo { + const message = createBaseSubscriptionInfo(); + message.organizationName = object.organizationName ?? ""; + message.procontentLicenseType = object.procontentLicenseType ?? 0; + message.procontentLicenseExpiration = object.procontentLicenseExpiration ?? 0; + return message; + }, +}; + +function createBaseDownloadLink(): DownloadLink { + return { id: "", url: "" }; +} + +export const DownloadLink = { + encode(message: DownloadLink, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.id !== "") { + writer.uint32(10).string(message.id); + } + if (message.url !== "") { + writer.uint32(18).string(message.url); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): DownloadLink { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseDownloadLink(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } + + message.id = reader.string(); + continue; + case 2: + if (tag !== 18) { + break; + } + + message.url = reader.string(); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(object: any): DownloadLink { + return { + id: isSet(object.id) ? globalThis.String(object.id) : "", + url: isSet(object.url) ? globalThis.String(object.url) : "", + }; + }, + + toJSON(message: DownloadLink): unknown { + const obj: any = {}; + if (message.id !== "") { + obj.id = message.id; + } + if (message.url !== "") { + obj.url = message.url; + } + return obj; + }, + + create, I>>(base?: I): DownloadLink { + return DownloadLink.fromPartial(base ?? ({} as any)); + }, + fromPartial, I>>(object: I): DownloadLink { + const message = createBaseDownloadLink(); + message.id = object.id ?? ""; + message.url = object.url ?? ""; + return message; + }, +}; + +function createBaseBibles(): Bibles { + return { freeBibles: [], purchasedBibles: [] }; +} + +export const Bibles = { + encode(message: Bibles, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + for (const v of message.freeBibles) { + Bible.encode(v!, writer.uint32(10).fork()).ldelim(); + } + for (const v of message.purchasedBibles) { + PurchasedBible.encode(v!, writer.uint32(18).fork()).ldelim(); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): Bibles { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseBibles(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } + + message.freeBibles.push(Bible.decode(reader, reader.uint32())); + continue; + case 2: + if (tag !== 18) { + break; + } + + message.purchasedBibles.push(PurchasedBible.decode(reader, reader.uint32())); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(object: any): Bibles { + return { + freeBibles: globalThis.Array.isArray(object?.freeBibles) + ? object.freeBibles.map((e: any) => Bible.fromJSON(e)) + : [], + purchasedBibles: globalThis.Array.isArray(object?.purchasedBibles) + ? object.purchasedBibles.map((e: any) => PurchasedBible.fromJSON(e)) + : [], + }; + }, + + toJSON(message: Bibles): unknown { + const obj: any = {}; + if (message.freeBibles?.length) { + obj.freeBibles = message.freeBibles.map((e) => Bible.toJSON(e)); + } + if (message.purchasedBibles?.length) { + obj.purchasedBibles = message.purchasedBibles.map((e) => PurchasedBible.toJSON(e)); + } + return obj; + }, + + create, I>>(base?: I): Bibles { + return Bibles.fromPartial(base ?? ({} as any)); + }, + fromPartial, I>>(object: I): Bibles { + const message = createBaseBibles(); + message.freeBibles = object.freeBibles?.map((e) => Bible.fromPartial(e)) || []; + message.purchasedBibles = object.purchasedBibles?.map((e) => PurchasedBible.fromPartial(e)) || []; + return message; + }, +}; + +function createBaseFeatureFlags(): FeatureFlags { + return { useStaging: false, useSubscription: false }; +} + +export const FeatureFlags = { + encode(message: FeatureFlags, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.useStaging !== false) { + writer.uint32(8).bool(message.useStaging); + } + if (message.useSubscription !== false) { + writer.uint32(16).bool(message.useSubscription); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): FeatureFlags { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseFeatureFlags(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 8) { + break; + } + + message.useStaging = reader.bool(); + continue; + case 2: + if (tag !== 16) { + break; + } + + message.useSubscription = reader.bool(); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(object: any): FeatureFlags { + return { + useStaging: isSet(object.useStaging) ? globalThis.Boolean(object.useStaging) : false, + useSubscription: isSet(object.useSubscription) ? globalThis.Boolean(object.useSubscription) : false, + }; + }, + + toJSON(message: FeatureFlags): unknown { + const obj: any = {}; + if (message.useStaging !== false) { + obj.useStaging = message.useStaging; + } + if (message.useSubscription !== false) { + obj.useSubscription = message.useSubscription; + } + return obj; + }, + + create, I>>(base?: I): FeatureFlags { + return FeatureFlags.fromPartial(base ?? ({} as any)); + }, + fromPartial, I>>(object: I): FeatureFlags { + const message = createBaseFeatureFlags(); + message.useStaging = object.useStaging ?? false; + message.useSubscription = object.useSubscription ?? false; + return message; + }, +}; + +function bytesFromBase64(b64: string): Uint8Array { + if ((globalThis as any).Buffer) { + return Uint8Array.from(globalThis.Buffer.from(b64, "base64")); + } else { + const bin = globalThis.atob(b64); + const arr = new Uint8Array(bin.length); + for (let i = 0; i < bin.length; ++i) { + arr[i] = bin.charCodeAt(i); + } + return arr; + } +} + +function base64FromBytes(arr: Uint8Array): string { + if ((globalThis as any).Buffer) { + return globalThis.Buffer.from(arr).toString("base64"); + } else { + const bin: string[] = []; + arr.forEach((byte) => { + bin.push(globalThis.String.fromCharCode(byte)); + }); + return globalThis.btoa(bin.join("")); + } +} + +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; + +export type DeepPartial = T extends Builtin ? T + : T extends globalThis.Array ? globalThis.Array> + : T extends ReadonlyArray ? ReadonlyArray> + : T extends {} ? { [K in keyof T]?: DeepPartial } + : Partial; + +type KeysOfUnion = T extends T ? keyof T : never; +export type Exact = P extends Builtin ? P + : P & { [K in keyof P]: Exact } & { [K in Exclude>]: never }; + +function longToNumber(long: Long): number { + if (long.gt(globalThis.Number.MAX_SAFE_INTEGER)) { + throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); + } + return long.toNumber(); +} + +if (_m0.util.Long !== Long) { + _m0.util.Long = Long as any; + _m0.configure(); +} + +function isSet(value: any): boolean { + return value !== null && value !== undefined; +} diff --git a/proto/rv2d.proto b/proto/rv2d.proto new file mode 100755 index 0000000..8baaf73 --- /dev/null +++ b/proto/rv2d.proto @@ -0,0 +1,50 @@ +syntax = "proto3"; + +package rv.data; + +option cc_enable_arenas = true; +option csharp_namespace = "Pro.SerializationInterop.RVProtoData"; +option swift_prefix = "RVData_"; + +import "graphicsData.proto"; + +message IdentificationOverlay { + message Output { + int32 x = 1; + int32 y = 2; + int32 width = 3; + int32 height = 4; + string name = 5; + double frame_rate = 6; + } + + string screen_name = 3; + repeated .rv.data.IdentificationOverlay.Output outputs = 1; +} + +message LayerIdentificationOverlay { + enum Layer { + LAYER_VIDEO_INPUT = 0; + LAYER_MEDIA = 1; + LAYER_PRESENTATION = 2; + LAYER_ANNOUNCEMENTS = 3; + LAYER_PROPS = 4; + LAYER_MESSAGES = 5; + } + + .rv.data.LayerIdentificationOverlay.Layer layer = 1; + string layer_name = 2; +} + +message TextLayer { + message Composite { + } + + oneof LayerType { + .rv.data.TextLayer.Composite composite = 1; + .rv.data.Media media = 2; + .rv.data.Graphics.Text.CutOutFill cut_out = 3; + .rv.data.Graphics.BackgroundEffect background_effect = 4; + } +} + diff --git a/proto/rv2d.ts b/proto/rv2d.ts new file mode 100644 index 0000000..a9ab091 --- /dev/null +++ b/proto/rv2d.ts @@ -0,0 +1,546 @@ +/* eslint-disable */ +import _m0 from "protobufjs/minimal"; +import { Graphics_BackgroundEffect, Graphics_Text_CutOutFill, Media } from "./graphicsData"; + +export const protobufPackage = "rv.data"; + +export interface IdentificationOverlay { + screenName: string; + outputs: IdentificationOverlay_Output[]; +} + +export interface IdentificationOverlay_Output { + x: number; + y: number; + width: number; + height: number; + name: string; + frameRate: number; +} + +export interface LayerIdentificationOverlay { + layer: LayerIdentificationOverlay_Layer; + layerName: string; +} + +export enum LayerIdentificationOverlay_Layer { + LAYER_VIDEO_INPUT = 0, + LAYER_MEDIA = 1, + LAYER_PRESENTATION = 2, + LAYER_ANNOUNCEMENTS = 3, + LAYER_PROPS = 4, + LAYER_MESSAGES = 5, + UNRECOGNIZED = -1, +} + +export function layerIdentificationOverlay_LayerFromJSON(object: any): LayerIdentificationOverlay_Layer { + switch (object) { + case 0: + case "LAYER_VIDEO_INPUT": + return LayerIdentificationOverlay_Layer.LAYER_VIDEO_INPUT; + case 1: + case "LAYER_MEDIA": + return LayerIdentificationOverlay_Layer.LAYER_MEDIA; + case 2: + case "LAYER_PRESENTATION": + return LayerIdentificationOverlay_Layer.LAYER_PRESENTATION; + case 3: + case "LAYER_ANNOUNCEMENTS": + return LayerIdentificationOverlay_Layer.LAYER_ANNOUNCEMENTS; + case 4: + case "LAYER_PROPS": + return LayerIdentificationOverlay_Layer.LAYER_PROPS; + case 5: + case "LAYER_MESSAGES": + return LayerIdentificationOverlay_Layer.LAYER_MESSAGES; + case -1: + case "UNRECOGNIZED": + default: + return LayerIdentificationOverlay_Layer.UNRECOGNIZED; + } +} + +export function layerIdentificationOverlay_LayerToJSON(object: LayerIdentificationOverlay_Layer): string { + switch (object) { + case LayerIdentificationOverlay_Layer.LAYER_VIDEO_INPUT: + return "LAYER_VIDEO_INPUT"; + case LayerIdentificationOverlay_Layer.LAYER_MEDIA: + return "LAYER_MEDIA"; + case LayerIdentificationOverlay_Layer.LAYER_PRESENTATION: + return "LAYER_PRESENTATION"; + case LayerIdentificationOverlay_Layer.LAYER_ANNOUNCEMENTS: + return "LAYER_ANNOUNCEMENTS"; + case LayerIdentificationOverlay_Layer.LAYER_PROPS: + return "LAYER_PROPS"; + case LayerIdentificationOverlay_Layer.LAYER_MESSAGES: + return "LAYER_MESSAGES"; + case LayerIdentificationOverlay_Layer.UNRECOGNIZED: + default: + return "UNRECOGNIZED"; + } +} + +export interface TextLayer { + composite?: TextLayer_Composite | undefined; + media?: Media | undefined; + cutOut?: Graphics_Text_CutOutFill | undefined; + backgroundEffect?: Graphics_BackgroundEffect | undefined; +} + +export interface TextLayer_Composite { +} + +function createBaseIdentificationOverlay(): IdentificationOverlay { + return { screenName: "", outputs: [] }; +} + +export const IdentificationOverlay = { + encode(message: IdentificationOverlay, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.screenName !== "") { + writer.uint32(26).string(message.screenName); + } + for (const v of message.outputs) { + IdentificationOverlay_Output.encode(v!, writer.uint32(10).fork()).ldelim(); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): IdentificationOverlay { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseIdentificationOverlay(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 3: + if (tag !== 26) { + break; + } + + message.screenName = reader.string(); + continue; + case 1: + if (tag !== 10) { + break; + } + + message.outputs.push(IdentificationOverlay_Output.decode(reader, reader.uint32())); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(object: any): IdentificationOverlay { + return { + screenName: isSet(object.screenName) ? globalThis.String(object.screenName) : "", + outputs: globalThis.Array.isArray(object?.outputs) + ? object.outputs.map((e: any) => IdentificationOverlay_Output.fromJSON(e)) + : [], + }; + }, + + toJSON(message: IdentificationOverlay): unknown { + const obj: any = {}; + if (message.screenName !== "") { + obj.screenName = message.screenName; + } + if (message.outputs?.length) { + obj.outputs = message.outputs.map((e) => IdentificationOverlay_Output.toJSON(e)); + } + return obj; + }, + + create, I>>(base?: I): IdentificationOverlay { + return IdentificationOverlay.fromPartial(base ?? ({} as any)); + }, + fromPartial, I>>(object: I): IdentificationOverlay { + const message = createBaseIdentificationOverlay(); + message.screenName = object.screenName ?? ""; + message.outputs = object.outputs?.map((e) => IdentificationOverlay_Output.fromPartial(e)) || []; + return message; + }, +}; + +function createBaseIdentificationOverlay_Output(): IdentificationOverlay_Output { + return { x: 0, y: 0, width: 0, height: 0, name: "", frameRate: 0 }; +} + +export const IdentificationOverlay_Output = { + encode(message: IdentificationOverlay_Output, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.x !== 0) { + writer.uint32(8).int32(message.x); + } + if (message.y !== 0) { + writer.uint32(16).int32(message.y); + } + if (message.width !== 0) { + writer.uint32(24).int32(message.width); + } + if (message.height !== 0) { + writer.uint32(32).int32(message.height); + } + if (message.name !== "") { + writer.uint32(42).string(message.name); + } + if (message.frameRate !== 0) { + writer.uint32(49).double(message.frameRate); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): IdentificationOverlay_Output { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseIdentificationOverlay_Output(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 8) { + break; + } + + message.x = reader.int32(); + continue; + case 2: + if (tag !== 16) { + break; + } + + message.y = reader.int32(); + continue; + case 3: + if (tag !== 24) { + break; + } + + message.width = reader.int32(); + continue; + case 4: + if (tag !== 32) { + break; + } + + message.height = reader.int32(); + continue; + case 5: + if (tag !== 42) { + break; + } + + message.name = reader.string(); + continue; + case 6: + if (tag !== 49) { + break; + } + + message.frameRate = reader.double(); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(object: any): IdentificationOverlay_Output { + return { + x: isSet(object.x) ? globalThis.Number(object.x) : 0, + y: isSet(object.y) ? globalThis.Number(object.y) : 0, + width: isSet(object.width) ? globalThis.Number(object.width) : 0, + height: isSet(object.height) ? globalThis.Number(object.height) : 0, + name: isSet(object.name) ? globalThis.String(object.name) : "", + frameRate: isSet(object.frameRate) ? globalThis.Number(object.frameRate) : 0, + }; + }, + + toJSON(message: IdentificationOverlay_Output): unknown { + const obj: any = {}; + if (message.x !== 0) { + obj.x = Math.round(message.x); + } + if (message.y !== 0) { + obj.y = Math.round(message.y); + } + if (message.width !== 0) { + obj.width = Math.round(message.width); + } + if (message.height !== 0) { + obj.height = Math.round(message.height); + } + if (message.name !== "") { + obj.name = message.name; + } + if (message.frameRate !== 0) { + obj.frameRate = message.frameRate; + } + return obj; + }, + + create, I>>(base?: I): IdentificationOverlay_Output { + return IdentificationOverlay_Output.fromPartial(base ?? ({} as any)); + }, + fromPartial, I>>(object: I): IdentificationOverlay_Output { + const message = createBaseIdentificationOverlay_Output(); + message.x = object.x ?? 0; + message.y = object.y ?? 0; + message.width = object.width ?? 0; + message.height = object.height ?? 0; + message.name = object.name ?? ""; + message.frameRate = object.frameRate ?? 0; + return message; + }, +}; + +function createBaseLayerIdentificationOverlay(): LayerIdentificationOverlay { + return { layer: 0, layerName: "" }; +} + +export const LayerIdentificationOverlay = { + encode(message: LayerIdentificationOverlay, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.layer !== 0) { + writer.uint32(8).int32(message.layer); + } + if (message.layerName !== "") { + writer.uint32(18).string(message.layerName); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): LayerIdentificationOverlay { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseLayerIdentificationOverlay(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 8) { + break; + } + + message.layer = reader.int32() as any; + continue; + case 2: + if (tag !== 18) { + break; + } + + message.layerName = reader.string(); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(object: any): LayerIdentificationOverlay { + return { + layer: isSet(object.layer) ? layerIdentificationOverlay_LayerFromJSON(object.layer) : 0, + layerName: isSet(object.layerName) ? globalThis.String(object.layerName) : "", + }; + }, + + toJSON(message: LayerIdentificationOverlay): unknown { + const obj: any = {}; + if (message.layer !== 0) { + obj.layer = layerIdentificationOverlay_LayerToJSON(message.layer); + } + if (message.layerName !== "") { + obj.layerName = message.layerName; + } + return obj; + }, + + create, I>>(base?: I): LayerIdentificationOverlay { + return LayerIdentificationOverlay.fromPartial(base ?? ({} as any)); + }, + fromPartial, I>>(object: I): LayerIdentificationOverlay { + const message = createBaseLayerIdentificationOverlay(); + message.layer = object.layer ?? 0; + message.layerName = object.layerName ?? ""; + return message; + }, +}; + +function createBaseTextLayer(): TextLayer { + return { composite: undefined, media: undefined, cutOut: undefined, backgroundEffect: undefined }; +} + +export const TextLayer = { + encode(message: TextLayer, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.composite !== undefined) { + TextLayer_Composite.encode(message.composite, writer.uint32(10).fork()).ldelim(); + } + if (message.media !== undefined) { + Media.encode(message.media, writer.uint32(18).fork()).ldelim(); + } + if (message.cutOut !== undefined) { + Graphics_Text_CutOutFill.encode(message.cutOut, writer.uint32(26).fork()).ldelim(); + } + if (message.backgroundEffect !== undefined) { + Graphics_BackgroundEffect.encode(message.backgroundEffect, writer.uint32(34).fork()).ldelim(); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): TextLayer { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseTextLayer(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } + + message.composite = TextLayer_Composite.decode(reader, reader.uint32()); + continue; + case 2: + if (tag !== 18) { + break; + } + + message.media = Media.decode(reader, reader.uint32()); + continue; + case 3: + if (tag !== 26) { + break; + } + + message.cutOut = Graphics_Text_CutOutFill.decode(reader, reader.uint32()); + continue; + case 4: + if (tag !== 34) { + break; + } + + message.backgroundEffect = Graphics_BackgroundEffect.decode(reader, reader.uint32()); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(object: any): TextLayer { + return { + composite: isSet(object.composite) ? TextLayer_Composite.fromJSON(object.composite) : undefined, + media: isSet(object.media) ? Media.fromJSON(object.media) : undefined, + cutOut: isSet(object.cutOut) ? Graphics_Text_CutOutFill.fromJSON(object.cutOut) : undefined, + backgroundEffect: isSet(object.backgroundEffect) + ? Graphics_BackgroundEffect.fromJSON(object.backgroundEffect) + : undefined, + }; + }, + + toJSON(message: TextLayer): unknown { + const obj: any = {}; + if (message.composite !== undefined) { + obj.composite = TextLayer_Composite.toJSON(message.composite); + } + if (message.media !== undefined) { + obj.media = Media.toJSON(message.media); + } + if (message.cutOut !== undefined) { + obj.cutOut = Graphics_Text_CutOutFill.toJSON(message.cutOut); + } + if (message.backgroundEffect !== undefined) { + obj.backgroundEffect = Graphics_BackgroundEffect.toJSON(message.backgroundEffect); + } + return obj; + }, + + create, I>>(base?: I): TextLayer { + return TextLayer.fromPartial(base ?? ({} as any)); + }, + fromPartial, I>>(object: I): TextLayer { + const message = createBaseTextLayer(); + message.composite = (object.composite !== undefined && object.composite !== null) + ? TextLayer_Composite.fromPartial(object.composite) + : undefined; + message.media = (object.media !== undefined && object.media !== null) ? Media.fromPartial(object.media) : undefined; + message.cutOut = (object.cutOut !== undefined && object.cutOut !== null) + ? Graphics_Text_CutOutFill.fromPartial(object.cutOut) + : undefined; + message.backgroundEffect = (object.backgroundEffect !== undefined && object.backgroundEffect !== null) + ? Graphics_BackgroundEffect.fromPartial(object.backgroundEffect) + : undefined; + return message; + }, +}; + +function createBaseTextLayer_Composite(): TextLayer_Composite { + return {}; +} + +export const TextLayer_Composite = { + encode(_: TextLayer_Composite, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): TextLayer_Composite { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseTextLayer_Composite(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(_: any): TextLayer_Composite { + return {}; + }, + + toJSON(_: TextLayer_Composite): unknown { + const obj: any = {}; + return obj; + }, + + create, I>>(base?: I): TextLayer_Composite { + return TextLayer_Composite.fromPartial(base ?? ({} as any)); + }, + fromPartial, I>>(_: I): TextLayer_Composite { + const message = createBaseTextLayer_Composite(); + return message; + }, +}; + +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; + +export type DeepPartial = T extends Builtin ? T + : T extends globalThis.Array ? globalThis.Array> + : T extends ReadonlyArray ? ReadonlyArray> + : T extends {} ? { [K in keyof T]?: DeepPartial } + : Partial; + +type KeysOfUnion = T extends T ? keyof T : never; +export type Exact = P extends Builtin ? P + : P & { [K in keyof P]: Exact } & { [K in Exclude>]: never }; + +function isSet(value: any): boolean { + return value !== null && value !== undefined; +} diff --git a/proto/screens.proto b/proto/screens.proto index cfc28f8..fbf94e5 100644 --- a/proto/screens.proto +++ b/proto/screens.proto @@ -108,6 +108,7 @@ message OutputDisplay { .rv.data.OutputDisplay.Type type = 8; .rv.data.DisplayMode mode = 9; string render_id = 10; + int32 video_delay = 12; oneof HardwareOptions { .rv.data.OutputDisplay.Blackmagic blackmagic = 11; } diff --git a/proto/screens.ts b/proto/screens.ts index ee1d5b2..e272845 100644 --- a/proto/screens.ts +++ b/proto/screens.ts @@ -126,6 +126,7 @@ export interface OutputDisplay { type: OutputDisplay_Type; mode: DisplayMode | undefined; renderId: string; + videoDelay: number; blackmagic?: OutputDisplay_Blackmagic | undefined; } @@ -386,13 +387,13 @@ export const Screen = { if (message.bounds !== undefined) { Graphics_Rect.encode(message.bounds, writer.uint32(34).fork()).ldelim(); } - if (message.aspectRatioLocked === true) { + if (message.aspectRatioLocked !== false) { writer.uint32(40).bool(message.aspectRatioLocked); } - if (message.outputBoundsAspectRatioLocked === true) { + if (message.outputBoundsAspectRatioLocked !== false) { writer.uint32(48).bool(message.outputBoundsAspectRatioLocked); } - if (message.cornerPinningEnabled === true) { + if (message.cornerPinningEnabled !== false) { writer.uint32(56).bool(message.cornerPinningEnabled); } if (message.subscreenUnitRect !== undefined) { @@ -425,7 +426,7 @@ export const Screen = { writer.uint32(114).fork(), ).ldelim(); } - if (message.colorEnabled === true) { + if (message.colorEnabled !== false) { writer.uint32(120).bool(message.colorEnabled); } if (message.colorAdjustment !== undefined) { @@ -667,13 +668,13 @@ export const Screen = { if (message.bounds !== undefined) { obj.bounds = Graphics_Rect.toJSON(message.bounds); } - if (message.aspectRatioLocked === true) { + if (message.aspectRatioLocked !== false) { obj.aspectRatioLocked = message.aspectRatioLocked; } - if (message.outputBoundsAspectRatioLocked === true) { + if (message.outputBoundsAspectRatioLocked !== false) { obj.outputBoundsAspectRatioLocked = message.outputBoundsAspectRatioLocked; } - if (message.cornerPinningEnabled === true) { + if (message.cornerPinningEnabled !== false) { obj.cornerPinningEnabled = message.cornerPinningEnabled; } if (message.subscreenUnitRect !== undefined) { @@ -697,7 +698,7 @@ export const Screen = { if (message.outputDisplay !== undefined) { obj.outputDisplay = OutputDisplay.toJSON(message.outputDisplay); } - if (message.colorEnabled === true) { + if (message.colorEnabled !== false) { obj.colorEnabled = message.colorEnabled; } if (message.colorAdjustment !== undefined) { @@ -1390,7 +1391,7 @@ export const DisplayMode = { if (message.refreshRate !== 0) { writer.uint32(33).double(message.refreshRate); } - if (message.interlaced === true) { + if (message.interlaced !== false) { writer.uint32(40).bool(message.interlaced); } return writer; @@ -1476,7 +1477,7 @@ export const DisplayMode = { if (message.refreshRate !== 0) { obj.refreshRate = message.refreshRate; } - if (message.interlaced === true) { + if (message.interlaced !== false) { obj.interlaced = message.interlaced; } return obj; @@ -1510,6 +1511,7 @@ function createBaseOutputDisplay(): OutputDisplay { type: 0, mode: undefined, renderId: '', + videoDelay: 0, blackmagic: undefined, }; } @@ -1549,6 +1551,9 @@ export const OutputDisplay = { if (message.renderId !== '') { writer.uint32(82).string(message.renderId); } + if (message.videoDelay !== 0) { + writer.uint32(96).int32(message.videoDelay); + } if (message.blackmagic !== undefined) { OutputDisplay_Blackmagic.encode( message.blackmagic, @@ -1636,6 +1641,13 @@ export const OutputDisplay = { message.renderId = reader.string(); continue; + case 12: + if (tag !== 96) { + break; + } + + message.videoDelay = reader.int32(); + continue; case 11: if (tag !== 90) { break; @@ -1675,6 +1687,9 @@ export const OutputDisplay = { renderId: isSet(object.renderId) ? globalThis.String(object.renderId) : '', + videoDelay: isSet(object.videoDelay) + ? globalThis.Number(object.videoDelay) + : 0, blackmagic: isSet(object.blackmagic) ? OutputDisplay_Blackmagic.fromJSON(object.blackmagic) : undefined, @@ -1713,6 +1728,9 @@ export const OutputDisplay = { if (message.renderId !== '') { obj.renderId = message.renderId; } + if (message.videoDelay !== 0) { + obj.videoDelay = Math.round(message.videoDelay); + } if (message.blackmagic !== undefined) { obj.blackmagic = OutputDisplay_Blackmagic.toJSON(message.blackmagic); } @@ -1744,6 +1762,7 @@ export const OutputDisplay = { ? DisplayMode.fromPartial(object.mode) : undefined; message.renderId = object.renderId ?? ''; + message.videoDelay = object.videoDelay ?? 0; message.blackmagic = object.blackmagic !== undefined && object.blackmagic !== null ? OutputDisplay_Blackmagic.fromPartial(object.blackmagic) @@ -1761,7 +1780,7 @@ export const OutputDisplay_Blackmagic = { message: OutputDisplay_Blackmagic, writer: _m0.Writer = _m0.Writer.create(), ): _m0.Writer { - if (message.enabled === true) { + if (message.enabled !== false) { writer.uint32(8).bool(message.enabled); } if (message.keyMode !== 0) { @@ -1830,7 +1849,7 @@ export const OutputDisplay_Blackmagic = { toJSON(message: OutputDisplay_Blackmagic): unknown { const obj: any = {}; - if (message.enabled === true) { + if (message.enabled !== false) { obj.enabled = message.enabled; } if (message.keyMode !== 0) { diff --git a/proto/slide.ts b/proto/slide.ts index adaf9bb..7114ca1 100644 --- a/proto/slide.ts +++ b/proto/slide.ts @@ -1542,7 +1542,7 @@ export const Slide = { for (const v of message.guidelines) { AlignmentGuide.encode(v!, writer.uint32(26).fork()).ldelim(); } - if (message.drawsBackgroundColor === true) { + if (message.drawsBackgroundColor !== false) { writer.uint32(32).bool(message.drawsBackgroundColor); } if (message.backgroundColor !== undefined) { @@ -1662,7 +1662,7 @@ export const Slide = { if (message.guidelines?.length) { obj.guidelines = message.guidelines.map((e) => AlignmentGuide.toJSON(e)); } - if (message.drawsBackgroundColor === true) { + if (message.drawsBackgroundColor !== false) { obj.drawsBackgroundColor = message.drawsBackgroundColor; } if (message.backgroundColor !== undefined) { @@ -3501,7 +3501,7 @@ export const Slide_Element_DataLink_Ticker = { if (message.playRate !== 0) { writer.uint32(33).double(message.playRate); } - if (message.shouldLoop === true) { + if (message.shouldLoop !== false) { writer.uint32(40).bool(message.shouldLoop); } if (message.loopDelay !== 0) { @@ -3638,7 +3638,7 @@ export const Slide_Element_DataLink_Ticker = { if (message.playRate !== 0) { obj.playRate = message.playRate; } - if (message.shouldLoop === true) { + if (message.shouldLoop !== false) { obj.shouldLoop = message.shouldLoop; } if (message.loopDelay !== 0) { @@ -5900,7 +5900,7 @@ export const Slide_Element_DataLink_SlideText = { if (message.sourceOption !== 0) { writer.uint32(16).int32(message.sourceOption); } - if (message.preserveNotesFormat === true) { + if (message.preserveNotesFormat !== false) { writer.uint32(24).bool(message.preserveNotesFormat); } if (message.nameToMatch !== '') { @@ -6004,7 +6004,7 @@ export const Slide_Element_DataLink_SlideText = { message.sourceOption, ); } - if (message.preserveNotesFormat === true) { + if (message.preserveNotesFormat !== false) { obj.preserveNotesFormat = message.preserveNotesFormat; } if (message.nameToMatch !== '') { @@ -6120,7 +6120,7 @@ export const Slide_Element_DataLink_StageMessage = { message: Slide_Element_DataLink_StageMessage, writer: _m0.Writer = _m0.Writer.create(), ): _m0.Writer { - if (message.shouldFlash === true) { + if (message.shouldFlash !== false) { writer.uint32(8).bool(message.shouldFlash); } if (message.flashColor !== undefined) { @@ -6176,7 +6176,7 @@ export const Slide_Element_DataLink_StageMessage = { toJSON(message: Slide_Element_DataLink_StageMessage): unknown { const obj: any = {}; - if (message.shouldFlash === true) { + if (message.shouldFlash !== false) { obj.shouldFlash = message.shouldFlash; } if (message.flashColor !== undefined) { @@ -6233,7 +6233,7 @@ export const Slide_Element_DataLink_VideoCountdown = { writer.uint32(26).fork(), ).ldelim(); } - if (message.ignoreLoopingVideos === true) { + if (message.ignoreLoopingVideos !== false) { writer.uint32(32).bool(message.ignoreLoopingVideos); } if (message.videoCountdownSource !== 0) { @@ -6336,7 +6336,7 @@ export const Slide_Element_DataLink_VideoCountdown = { Slide_Element_DataLink_ColorTrigger.toJSON(e), ); } - if (message.ignoreLoopingVideos === true) { + if (message.ignoreLoopingVideos !== false) { obj.ignoreLoopingVideos = message.ignoreLoopingVideos; } if (message.videoCountdownSource !== 0) { @@ -6403,7 +6403,7 @@ export const Slide_Element_DataLink_AudioCountdown = { writer.uint32(26).fork(), ).ldelim(); } - if (message.ignoreLoopingAudio === true) { + if (message.ignoreLoopingAudio !== false) { writer.uint32(32).bool(message.ignoreLoopingAudio); } return writer; @@ -6491,7 +6491,7 @@ export const Slide_Element_DataLink_AudioCountdown = { Slide_Element_DataLink_ColorTrigger.toJSON(e), ); } - if (message.ignoreLoopingAudio === true) { + if (message.ignoreLoopingAudio !== false) { obj.ignoreLoopingAudio = message.ignoreLoopingAudio; } return obj; @@ -6971,7 +6971,7 @@ export const Slide_Element_DataLink_PlaylistItem = { if (message.playlistItemSource !== 0) { writer.uint32(8).int32(message.playlistItemSource); } - if (message.showArrangement === true) { + if (message.showArrangement !== false) { writer.uint32(16).bool(message.showArrangement); } return writer; @@ -7032,7 +7032,7 @@ export const Slide_Element_DataLink_PlaylistItem = { message.playlistItemSource, ); } - if (message.showArrangement === true) { + if (message.showArrangement !== false) { obj.showArrangement = message.showArrangement; } return obj; @@ -7714,7 +7714,7 @@ export const Slide_Element_DataLink_PlaybackMarkerText = { writer.uint32(10).fork(), ).ldelim(); } - if (message.shouldUseMarkerColor === true) { + if (message.shouldUseMarkerColor !== false) { writer.uint32(32).bool(message.shouldUseMarkerColor); } if (message.name !== undefined) { @@ -7816,7 +7816,7 @@ export const Slide_Element_DataLink_PlaybackMarkerText = { message.identifier, ); } - if (message.shouldUseMarkerColor === true) { + if (message.shouldUseMarkerColor !== false) { obj.shouldUseMarkerColor = message.shouldUseMarkerColor; } if (message.name !== undefined) { @@ -8195,13 +8195,13 @@ export const Slide_Element_TextScroller = { message: Slide_Element_TextScroller, writer: _m0.Writer = _m0.Writer.create(), ): _m0.Writer { - if (message.shouldScroll === true) { + if (message.shouldScroll !== false) { writer.uint32(8).bool(message.shouldScroll); } if (message.scrollRate !== 0) { writer.uint32(17).double(message.scrollRate); } - if (message.shouldRepeat === true) { + if (message.shouldRepeat !== false) { writer.uint32(24).bool(message.shouldRepeat); } if (message.repeatDistance !== 0) { @@ -8210,7 +8210,7 @@ export const Slide_Element_TextScroller = { if (message.scrollingDirection !== 0) { writer.uint32(40).int32(message.scrollingDirection); } - if (message.startsOffScreen === true) { + if (message.startsOffScreen !== false) { writer.uint32(48).bool(message.startsOffScreen); } if (message.fadeLeft !== 0) { @@ -8329,13 +8329,13 @@ export const Slide_Element_TextScroller = { toJSON(message: Slide_Element_TextScroller): unknown { const obj: any = {}; - if (message.shouldScroll === true) { + if (message.shouldScroll !== false) { obj.shouldScroll = message.shouldScroll; } if (message.scrollRate !== 0) { obj.scrollRate = message.scrollRate; } - if (message.shouldRepeat === true) { + if (message.shouldRepeat !== false) { obj.shouldRepeat = message.shouldRepeat; } if (message.repeatDistance !== 0) { @@ -8346,7 +8346,7 @@ export const Slide_Element_TextScroller = { message.scrollingDirection, ); } - if (message.startsOffScreen === true) { + if (message.startsOffScreen !== false) { obj.startsOffScreen = message.startsOffScreen; } if (message.fadeLeft !== 0) { diff --git a/proto/testPattern.proto b/proto/testPattern.proto index b16dd59..f15b4b0 100644 --- a/proto/testPattern.proto +++ b/proto/testPattern.proto @@ -6,7 +6,10 @@ option cc_enable_arenas = true; option csharp_namespace = "Pro.SerializationInterop.RVProtoData"; option swift_prefix = "RVData_"; -import "basicTypes.proto"; +import "color.proto"; +import "font.proto"; +import "uuid.proto"; +import "url.proto"; message TestPattern { message BlendGrid { @@ -34,6 +37,8 @@ message TestPattern { TYPE_BLACK_COLOR = 5; TYPE_WHITE_COLOR = 6; TYPE_CUSTOM_COLOR = 7; + TYPE_TEXT = 8; + TYPE_VIDEO_SYNC = 9; } .rv.data.TestPattern.Type type = 1; @@ -44,3 +49,179 @@ message TestPattern { } } +message TestPatternDefinition { + message ColorProperty { + .rv.data.Color value = 1; + bool allow_alpha = 2; + repeated .rv.data.Color default_colors = 3; + } + + message DoubleProperty { + enum ViewType { + VIEW_TYPE_STEPPER = 0; + VIEW_TYPE_SLIDER = 1; + VIEW_TYPE_SPEED_SLIDER = 2; + } + + double value = 1; + double min = 2; + double max = 3; + double step = 4; + string units = 5; + .rv.data.TestPatternDefinition.DoubleProperty.ViewType viewType = 6; + } + + message IntProperty { + int32 value = 1; + int32 min = 2; + int32 max = 3; + string units = 5; + } + + message BoolProperty { + bool value = 1; + repeated .rv.data.TestPatternDefinition.Property dependent_properties = 2; + } + + message StringProperty { + string value = 1; + int32 min_chars = 2; + int32 max_chars = 3; + } + + message FontProperty { + .rv.data.Font font = 1; + } + + message SelectorProperty { + int32 selected_index = 1; + repeated string value_localization_keys = 2; + } + + message Property { + string name_localization_key = 1; + oneof PropertyType { + .rv.data.TestPatternDefinition.ColorProperty color_property = 3; + .rv.data.TestPatternDefinition.DoubleProperty double_property = 4; + .rv.data.TestPatternDefinition.IntProperty int_property = 5; + .rv.data.TestPatternDefinition.BoolProperty bool_property = 6; + .rv.data.TestPatternDefinition.StringProperty string_property = 7; + .rv.data.TestPatternDefinition.FontProperty font_property = 8; + .rv.data.TestPatternDefinition.SelectorProperty selector_property = 9; + } + } + + .rv.data.UUID uuid = 1; + string name_localization_key = 2; + repeated .rv.data.TestPatternDefinition.Property properties = 3; + bool show_delay_settings = 4; + bool is_default = 5; +} + +message TestPatternRenderSettings { + reserved 2; + message Output { + int32 x = 1; + int32 y = 2; + int32 width = 3; + int32 height = 4; + string name = 5; + double frame_rate = 6; + } + + .rv.data.TestPatternDefinition pattern = 1; + string screen_name = 3; + repeated .rv.data.TestPatternRenderSettings.Output outputs = 4; + .rv.data.LogoType logo_type = 5; + string logo_file = 6; + int32 render_width = 7; + int32 render_height = 8; + bool enable_audio = 9; +} + +message TestPatternState { + enum DisplayLocation { + DISPLAY_LOCATION_ALL_SCREENS = 0; + DISPLAY_LOCATION_AUDIENCE_SCREENS = 1; + DISPLAY_LOCATION_STAGE_SCREENS = 2; + DISPLAY_LOCATION_SPECIFIC_SCREEN = 3; + } + + .rv.data.TestPatternDefinition pattern = 1; + bool show_pattern = 2; + .rv.data.TestPatternState.DisplayLocation display_location = 3; + .rv.data.UUID specific_screen = 4; + bool identify_screens = 5; + .rv.data.LogoType logo_type = 6; + .rv.data.URL user_logo_location = 7; +} + +message TestPatternDocument { + message TestPatternStateData { + .rv.data.UUID test_pattern_id = 1; + string test_pattern_name_localization_key = 2; + .rv.data.TestPatternState.DisplayLocation display_location = 3; + .rv.data.UUID specific_screen = 4; + bool identify_screens = 5; + .rv.data.LogoType logo_type = 6; + .rv.data.URL user_logo_location = 7; + } + + message TestPatternData { + message ColorProperty { + .rv.data.Color value = 1; + } + + message DoubleProperty { + double value = 1; + } + + message IntProperty { + int32 value = 1; + } + + message BoolProperty { + bool value = 1; + repeated .rv.data.TestPatternDocument.TestPatternData.Property dependent_properties = 2; + } + + message StringProperty { + string value = 1; + } + + message FontProperty { + .rv.data.Font value = 1; + } + + message SelectorProperty { + int32 value = 1; + } + + message Property { + string name_localization_key = 1; + oneof PropertyType { + .rv.data.TestPatternDocument.TestPatternData.ColorProperty color_property = 2; + .rv.data.TestPatternDocument.TestPatternData.DoubleProperty double_property = 3; + .rv.data.TestPatternDocument.TestPatternData.IntProperty int_property = 4; + .rv.data.TestPatternDocument.TestPatternData.BoolProperty bool_property = 5; + .rv.data.TestPatternDocument.TestPatternData.StringProperty string_property = 6; + .rv.data.TestPatternDocument.TestPatternData.FontProperty font_property = 7; + .rv.data.TestPatternDocument.TestPatternData.SelectorProperty selector_property = 8; + } + } + + .rv.data.UUID uuid = 1; + string name_localization_key = 2; + repeated .rv.data.TestPatternDocument.TestPatternData.Property properties = 3; + } + + .rv.data.TestPatternDocument.TestPatternStateData state = 1; + repeated .rv.data.TestPatternDocument.TestPatternData patterns = 2; +} + +enum LogoType { + LOGO_TYPE_NONE = 0; + LOGO_TYPE_PROPRESENTER = 1; + LOGO_TYPE_USER = 2; +} + diff --git a/proto/testPattern.ts b/proto/testPattern.ts index 3e06d8a..ab4936f 100644 --- a/proto/testPattern.ts +++ b/proto/testPattern.ts @@ -1,9 +1,51 @@ /* eslint-disable */ import _m0 from 'protobufjs/minimal'; -import { Color } from './basicTypes'; +import { Color } from './color'; +import { Font } from './font'; +import { URL } from './url'; +import { UUID } from './uuid'; export const protobufPackage = 'rv.data'; +export enum LogoType { + LOGO_TYPE_NONE = 0, + LOGO_TYPE_PROPRESENTER = 1, + LOGO_TYPE_USER = 2, + UNRECOGNIZED = -1, +} + +export function logoTypeFromJSON(object: any): LogoType { + switch (object) { + case 0: + case 'LOGO_TYPE_NONE': + return LogoType.LOGO_TYPE_NONE; + case 1: + case 'LOGO_TYPE_PROPRESENTER': + return LogoType.LOGO_TYPE_PROPRESENTER; + case 2: + case 'LOGO_TYPE_USER': + return LogoType.LOGO_TYPE_USER; + case -1: + case 'UNRECOGNIZED': + default: + return LogoType.UNRECOGNIZED; + } +} + +export function logoTypeToJSON(object: LogoType): string { + switch (object) { + case LogoType.LOGO_TYPE_NONE: + return 'LOGO_TYPE_NONE'; + case LogoType.LOGO_TYPE_PROPRESENTER: + return 'LOGO_TYPE_PROPRESENTER'; + case LogoType.LOGO_TYPE_USER: + return 'LOGO_TYPE_USER'; + case LogoType.UNRECOGNIZED: + default: + return 'UNRECOGNIZED'; + } +} + export interface TestPattern { type: TestPattern_Type; blendGrid?: TestPattern_BlendGrid | undefined; @@ -20,6 +62,8 @@ export enum TestPattern_Type { TYPE_BLACK_COLOR = 5, TYPE_WHITE_COLOR = 6, TYPE_CUSTOM_COLOR = 7, + TYPE_TEXT = 8, + TYPE_VIDEO_SYNC = 9, UNRECOGNIZED = -1, } @@ -49,6 +93,12 @@ export function testPattern_TypeFromJSON(object: any): TestPattern_Type { case 7: case 'TYPE_CUSTOM_COLOR': return TestPattern_Type.TYPE_CUSTOM_COLOR; + case 8: + case 'TYPE_TEXT': + return TestPattern_Type.TYPE_TEXT; + case 9: + case 'TYPE_VIDEO_SYNC': + return TestPattern_Type.TYPE_VIDEO_SYNC; case -1: case 'UNRECOGNIZED': default: @@ -74,6 +124,10 @@ export function testPattern_TypeToJSON(object: TestPattern_Type): string { return 'TYPE_WHITE_COLOR'; case TestPattern_Type.TYPE_CUSTOM_COLOR: return 'TYPE_CUSTOM_COLOR'; + case TestPattern_Type.TYPE_TEXT: + return 'TYPE_TEXT'; + case TestPattern_Type.TYPE_VIDEO_SYNC: + return 'TYPE_VIDEO_SYNC'; case TestPattern_Type.UNRECOGNIZED: default: return 'UNRECOGNIZED'; @@ -96,6 +150,256 @@ export interface TestPattern_IntensityColor { intensity: number; } +export interface TestPatternDefinition { + uuid: UUID | undefined; + nameLocalizationKey: string; + properties: TestPatternDefinition_Property[]; + showDelaySettings: boolean; + isDefault: boolean; +} + +export interface TestPatternDefinition_ColorProperty { + value: Color | undefined; + allowAlpha: boolean; + defaultColors: Color[]; +} + +export interface TestPatternDefinition_DoubleProperty { + value: number; + min: number; + max: number; + step: number; + units: string; + viewType: TestPatternDefinition_DoubleProperty_ViewType; +} + +export enum TestPatternDefinition_DoubleProperty_ViewType { + VIEW_TYPE_STEPPER = 0, + VIEW_TYPE_SLIDER = 1, + VIEW_TYPE_SPEED_SLIDER = 2, + UNRECOGNIZED = -1, +} + +export function testPatternDefinition_DoubleProperty_ViewTypeFromJSON( + object: any, +): TestPatternDefinition_DoubleProperty_ViewType { + switch (object) { + case 0: + case 'VIEW_TYPE_STEPPER': + return TestPatternDefinition_DoubleProperty_ViewType.VIEW_TYPE_STEPPER; + case 1: + case 'VIEW_TYPE_SLIDER': + return TestPatternDefinition_DoubleProperty_ViewType.VIEW_TYPE_SLIDER; + case 2: + case 'VIEW_TYPE_SPEED_SLIDER': + return TestPatternDefinition_DoubleProperty_ViewType.VIEW_TYPE_SPEED_SLIDER; + case -1: + case 'UNRECOGNIZED': + default: + return TestPatternDefinition_DoubleProperty_ViewType.UNRECOGNIZED; + } +} + +export function testPatternDefinition_DoubleProperty_ViewTypeToJSON( + object: TestPatternDefinition_DoubleProperty_ViewType, +): string { + switch (object) { + case TestPatternDefinition_DoubleProperty_ViewType.VIEW_TYPE_STEPPER: + return 'VIEW_TYPE_STEPPER'; + case TestPatternDefinition_DoubleProperty_ViewType.VIEW_TYPE_SLIDER: + return 'VIEW_TYPE_SLIDER'; + case TestPatternDefinition_DoubleProperty_ViewType.VIEW_TYPE_SPEED_SLIDER: + return 'VIEW_TYPE_SPEED_SLIDER'; + case TestPatternDefinition_DoubleProperty_ViewType.UNRECOGNIZED: + default: + return 'UNRECOGNIZED'; + } +} + +export interface TestPatternDefinition_IntProperty { + value: number; + min: number; + max: number; + units: string; +} + +export interface TestPatternDefinition_BoolProperty { + value: boolean; + dependentProperties: TestPatternDefinition_Property[]; +} + +export interface TestPatternDefinition_StringProperty { + value: string; + minChars: number; + maxChars: number; +} + +export interface TestPatternDefinition_FontProperty { + font: Font | undefined; +} + +export interface TestPatternDefinition_SelectorProperty { + selectedIndex: number; + valueLocalizationKeys: string[]; +} + +export interface TestPatternDefinition_Property { + nameLocalizationKey: string; + colorProperty?: TestPatternDefinition_ColorProperty | undefined; + doubleProperty?: TestPatternDefinition_DoubleProperty | undefined; + intProperty?: TestPatternDefinition_IntProperty | undefined; + boolProperty?: TestPatternDefinition_BoolProperty | undefined; + stringProperty?: TestPatternDefinition_StringProperty | undefined; + fontProperty?: TestPatternDefinition_FontProperty | undefined; + selectorProperty?: TestPatternDefinition_SelectorProperty | undefined; +} + +export interface TestPatternRenderSettings { + pattern: TestPatternDefinition | undefined; + screenName: string; + outputs: TestPatternRenderSettings_Output[]; + logoType: LogoType; + logoFile: string; + renderWidth: number; + renderHeight: number; + enableAudio: boolean; +} + +export interface TestPatternRenderSettings_Output { + x: number; + y: number; + width: number; + height: number; + name: string; + frameRate: number; +} + +export interface TestPatternState { + pattern: TestPatternDefinition | undefined; + showPattern: boolean; + displayLocation: TestPatternState_DisplayLocation; + specificScreen: UUID | undefined; + identifyScreens: boolean; + logoType: LogoType; + userLogoLocation: URL | undefined; +} + +export enum TestPatternState_DisplayLocation { + DISPLAY_LOCATION_ALL_SCREENS = 0, + DISPLAY_LOCATION_AUDIENCE_SCREENS = 1, + DISPLAY_LOCATION_STAGE_SCREENS = 2, + DISPLAY_LOCATION_SPECIFIC_SCREEN = 3, + UNRECOGNIZED = -1, +} + +export function testPatternState_DisplayLocationFromJSON( + object: any, +): TestPatternState_DisplayLocation { + switch (object) { + case 0: + case 'DISPLAY_LOCATION_ALL_SCREENS': + return TestPatternState_DisplayLocation.DISPLAY_LOCATION_ALL_SCREENS; + case 1: + case 'DISPLAY_LOCATION_AUDIENCE_SCREENS': + return TestPatternState_DisplayLocation.DISPLAY_LOCATION_AUDIENCE_SCREENS; + case 2: + case 'DISPLAY_LOCATION_STAGE_SCREENS': + return TestPatternState_DisplayLocation.DISPLAY_LOCATION_STAGE_SCREENS; + case 3: + case 'DISPLAY_LOCATION_SPECIFIC_SCREEN': + return TestPatternState_DisplayLocation.DISPLAY_LOCATION_SPECIFIC_SCREEN; + case -1: + case 'UNRECOGNIZED': + default: + return TestPatternState_DisplayLocation.UNRECOGNIZED; + } +} + +export function testPatternState_DisplayLocationToJSON( + object: TestPatternState_DisplayLocation, +): string { + switch (object) { + case TestPatternState_DisplayLocation.DISPLAY_LOCATION_ALL_SCREENS: + return 'DISPLAY_LOCATION_ALL_SCREENS'; + case TestPatternState_DisplayLocation.DISPLAY_LOCATION_AUDIENCE_SCREENS: + return 'DISPLAY_LOCATION_AUDIENCE_SCREENS'; + case TestPatternState_DisplayLocation.DISPLAY_LOCATION_STAGE_SCREENS: + return 'DISPLAY_LOCATION_STAGE_SCREENS'; + case TestPatternState_DisplayLocation.DISPLAY_LOCATION_SPECIFIC_SCREEN: + return 'DISPLAY_LOCATION_SPECIFIC_SCREEN'; + case TestPatternState_DisplayLocation.UNRECOGNIZED: + default: + return 'UNRECOGNIZED'; + } +} + +export interface TestPatternDocument { + state: TestPatternDocument_TestPatternStateData | undefined; + patterns: TestPatternDocument_TestPatternData[]; +} + +export interface TestPatternDocument_TestPatternStateData { + testPatternId: UUID | undefined; + testPatternNameLocalizationKey: string; + displayLocation: TestPatternState_DisplayLocation; + specificScreen: UUID | undefined; + identifyScreens: boolean; + logoType: LogoType; + userLogoLocation: URL | undefined; +} + +export interface TestPatternDocument_TestPatternData { + uuid: UUID | undefined; + nameLocalizationKey: string; + properties: TestPatternDocument_TestPatternData_Property[]; +} + +export interface TestPatternDocument_TestPatternData_ColorProperty { + value: Color | undefined; +} + +export interface TestPatternDocument_TestPatternData_DoubleProperty { + value: number; +} + +export interface TestPatternDocument_TestPatternData_IntProperty { + value: number; +} + +export interface TestPatternDocument_TestPatternData_BoolProperty { + value: boolean; + dependentProperties: TestPatternDocument_TestPatternData_Property[]; +} + +export interface TestPatternDocument_TestPatternData_StringProperty { + value: string; +} + +export interface TestPatternDocument_TestPatternData_FontProperty { + value: Font | undefined; +} + +export interface TestPatternDocument_TestPatternData_SelectorProperty { + value: number; +} + +export interface TestPatternDocument_TestPatternData_Property { + nameLocalizationKey: string; + colorProperty?: TestPatternDocument_TestPatternData_ColorProperty | undefined; + doubleProperty?: + | TestPatternDocument_TestPatternData_DoubleProperty + | undefined; + intProperty?: TestPatternDocument_TestPatternData_IntProperty | undefined; + boolProperty?: TestPatternDocument_TestPatternData_BoolProperty | undefined; + stringProperty?: + | TestPatternDocument_TestPatternData_StringProperty + | undefined; + fontProperty?: TestPatternDocument_TestPatternData_FontProperty | undefined; + selectorProperty?: + | TestPatternDocument_TestPatternData_SelectorProperty + | undefined; +} + function createBaseTestPattern(): TestPattern { return { type: 0, @@ -259,16 +563,16 @@ export const TestPattern_BlendGrid = { message: TestPattern_BlendGrid, writer: _m0.Writer = _m0.Writer.create(), ): _m0.Writer { - if (message.drawGrid === true) { + if (message.drawGrid !== false) { writer.uint32(8).bool(message.drawGrid); } - if (message.drawCircles === true) { + if (message.drawCircles !== false) { writer.uint32(16).bool(message.drawCircles); } - if (message.drawLines === true) { + if (message.drawLines !== false) { writer.uint32(24).bool(message.drawLines); } - if (message.invertColors === true) { + if (message.invertColors !== false) { writer.uint32(32).bool(message.invertColors); } if (message.gridSpacing !== 0) { @@ -354,16 +658,16 @@ export const TestPattern_BlendGrid = { toJSON(message: TestPattern_BlendGrid): unknown { const obj: any = {}; - if (message.drawGrid === true) { + if (message.drawGrid !== false) { obj.drawGrid = message.drawGrid; } - if (message.drawCircles === true) { + if (message.drawCircles !== false) { obj.drawCircles = message.drawCircles; } - if (message.drawLines === true) { + if (message.drawLines !== false) { obj.drawLines = message.drawLines; } - if (message.invertColors === true) { + if (message.invertColors !== false) { obj.invertColors = message.invertColors; } if (message.gridSpacing !== 0) { @@ -535,6 +839,3099 @@ export const TestPattern_IntensityColor = { }, }; +function createBaseTestPatternDefinition(): TestPatternDefinition { + return { + uuid: undefined, + nameLocalizationKey: '', + properties: [], + showDelaySettings: false, + isDefault: false, + }; +} + +export const TestPatternDefinition = { + encode( + message: TestPatternDefinition, + writer: _m0.Writer = _m0.Writer.create(), + ): _m0.Writer { + if (message.uuid !== undefined) { + UUID.encode(message.uuid, writer.uint32(10).fork()).ldelim(); + } + if (message.nameLocalizationKey !== '') { + writer.uint32(18).string(message.nameLocalizationKey); + } + for (const v of message.properties) { + TestPatternDefinition_Property.encode( + v!, + writer.uint32(26).fork(), + ).ldelim(); + } + if (message.showDelaySettings !== false) { + writer.uint32(32).bool(message.showDelaySettings); + } + if (message.isDefault !== false) { + writer.uint32(40).bool(message.isDefault); + } + return writer; + }, + + decode( + input: _m0.Reader | Uint8Array, + length?: number, + ): TestPatternDefinition { + const reader = + input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseTestPatternDefinition(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } + + message.uuid = UUID.decode(reader, reader.uint32()); + continue; + case 2: + if (tag !== 18) { + break; + } + + message.nameLocalizationKey = reader.string(); + continue; + case 3: + if (tag !== 26) { + break; + } + + message.properties.push( + TestPatternDefinition_Property.decode(reader, reader.uint32()), + ); + continue; + case 4: + if (tag !== 32) { + break; + } + + message.showDelaySettings = reader.bool(); + continue; + case 5: + if (tag !== 40) { + break; + } + + message.isDefault = reader.bool(); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(object: any): TestPatternDefinition { + return { + uuid: isSet(object.uuid) ? UUID.fromJSON(object.uuid) : undefined, + nameLocalizationKey: isSet(object.nameLocalizationKey) + ? globalThis.String(object.nameLocalizationKey) + : '', + properties: globalThis.Array.isArray(object?.properties) + ? object.properties.map((e: any) => + TestPatternDefinition_Property.fromJSON(e), + ) + : [], + showDelaySettings: isSet(object.showDelaySettings) + ? globalThis.Boolean(object.showDelaySettings) + : false, + isDefault: isSet(object.isDefault) + ? globalThis.Boolean(object.isDefault) + : false, + }; + }, + + toJSON(message: TestPatternDefinition): unknown { + const obj: any = {}; + if (message.uuid !== undefined) { + obj.uuid = UUID.toJSON(message.uuid); + } + if (message.nameLocalizationKey !== '') { + obj.nameLocalizationKey = message.nameLocalizationKey; + } + if (message.properties?.length) { + obj.properties = message.properties.map((e) => + TestPatternDefinition_Property.toJSON(e), + ); + } + if (message.showDelaySettings !== false) { + obj.showDelaySettings = message.showDelaySettings; + } + if (message.isDefault !== false) { + obj.isDefault = message.isDefault; + } + return obj; + }, + + create, I>>( + base?: I, + ): TestPatternDefinition { + return TestPatternDefinition.fromPartial(base ?? ({} as any)); + }, + fromPartial, I>>( + object: I, + ): TestPatternDefinition { + const message = createBaseTestPatternDefinition(); + message.uuid = + object.uuid !== undefined && object.uuid !== null + ? UUID.fromPartial(object.uuid) + : undefined; + message.nameLocalizationKey = object.nameLocalizationKey ?? ''; + message.properties = + object.properties?.map((e) => + TestPatternDefinition_Property.fromPartial(e), + ) || []; + message.showDelaySettings = object.showDelaySettings ?? false; + message.isDefault = object.isDefault ?? false; + return message; + }, +}; + +function createBaseTestPatternDefinition_ColorProperty(): TestPatternDefinition_ColorProperty { + return { value: undefined, allowAlpha: false, defaultColors: [] }; +} + +export const TestPatternDefinition_ColorProperty = { + encode( + message: TestPatternDefinition_ColorProperty, + writer: _m0.Writer = _m0.Writer.create(), + ): _m0.Writer { + if (message.value !== undefined) { + Color.encode(message.value, writer.uint32(10).fork()).ldelim(); + } + if (message.allowAlpha !== false) { + writer.uint32(16).bool(message.allowAlpha); + } + for (const v of message.defaultColors) { + Color.encode(v!, writer.uint32(26).fork()).ldelim(); + } + return writer; + }, + + decode( + input: _m0.Reader | Uint8Array, + length?: number, + ): TestPatternDefinition_ColorProperty { + const reader = + input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseTestPatternDefinition_ColorProperty(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } + + message.value = Color.decode(reader, reader.uint32()); + continue; + case 2: + if (tag !== 16) { + break; + } + + message.allowAlpha = reader.bool(); + continue; + case 3: + if (tag !== 26) { + break; + } + + message.defaultColors.push(Color.decode(reader, reader.uint32())); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(object: any): TestPatternDefinition_ColorProperty { + return { + value: isSet(object.value) ? Color.fromJSON(object.value) : undefined, + allowAlpha: isSet(object.allowAlpha) + ? globalThis.Boolean(object.allowAlpha) + : false, + defaultColors: globalThis.Array.isArray(object?.defaultColors) + ? object.defaultColors.map((e: any) => Color.fromJSON(e)) + : [], + }; + }, + + toJSON(message: TestPatternDefinition_ColorProperty): unknown { + const obj: any = {}; + if (message.value !== undefined) { + obj.value = Color.toJSON(message.value); + } + if (message.allowAlpha !== false) { + obj.allowAlpha = message.allowAlpha; + } + if (message.defaultColors?.length) { + obj.defaultColors = message.defaultColors.map((e) => Color.toJSON(e)); + } + return obj; + }, + + create, I>>( + base?: I, + ): TestPatternDefinition_ColorProperty { + return TestPatternDefinition_ColorProperty.fromPartial(base ?? ({} as any)); + }, + fromPartial< + I extends Exact, I>, + >(object: I): TestPatternDefinition_ColorProperty { + const message = createBaseTestPatternDefinition_ColorProperty(); + message.value = + object.value !== undefined && object.value !== null + ? Color.fromPartial(object.value) + : undefined; + message.allowAlpha = object.allowAlpha ?? false; + message.defaultColors = + object.defaultColors?.map((e) => Color.fromPartial(e)) || []; + return message; + }, +}; + +function createBaseTestPatternDefinition_DoubleProperty(): TestPatternDefinition_DoubleProperty { + return { value: 0, min: 0, max: 0, step: 0, units: '', viewType: 0 }; +} + +export const TestPatternDefinition_DoubleProperty = { + encode( + message: TestPatternDefinition_DoubleProperty, + writer: _m0.Writer = _m0.Writer.create(), + ): _m0.Writer { + if (message.value !== 0) { + writer.uint32(9).double(message.value); + } + if (message.min !== 0) { + writer.uint32(17).double(message.min); + } + if (message.max !== 0) { + writer.uint32(25).double(message.max); + } + if (message.step !== 0) { + writer.uint32(33).double(message.step); + } + if (message.units !== '') { + writer.uint32(42).string(message.units); + } + if (message.viewType !== 0) { + writer.uint32(48).int32(message.viewType); + } + return writer; + }, + + decode( + input: _m0.Reader | Uint8Array, + length?: number, + ): TestPatternDefinition_DoubleProperty { + const reader = + input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseTestPatternDefinition_DoubleProperty(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 9) { + break; + } + + message.value = reader.double(); + continue; + case 2: + if (tag !== 17) { + break; + } + + message.min = reader.double(); + continue; + case 3: + if (tag !== 25) { + break; + } + + message.max = reader.double(); + continue; + case 4: + if (tag !== 33) { + break; + } + + message.step = reader.double(); + continue; + case 5: + if (tag !== 42) { + break; + } + + message.units = reader.string(); + continue; + case 6: + if (tag !== 48) { + break; + } + + message.viewType = reader.int32() as any; + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(object: any): TestPatternDefinition_DoubleProperty { + return { + value: isSet(object.value) ? globalThis.Number(object.value) : 0, + min: isSet(object.min) ? globalThis.Number(object.min) : 0, + max: isSet(object.max) ? globalThis.Number(object.max) : 0, + step: isSet(object.step) ? globalThis.Number(object.step) : 0, + units: isSet(object.units) ? globalThis.String(object.units) : '', + viewType: isSet(object.viewType) + ? testPatternDefinition_DoubleProperty_ViewTypeFromJSON(object.viewType) + : 0, + }; + }, + + toJSON(message: TestPatternDefinition_DoubleProperty): unknown { + const obj: any = {}; + if (message.value !== 0) { + obj.value = message.value; + } + if (message.min !== 0) { + obj.min = message.min; + } + if (message.max !== 0) { + obj.max = message.max; + } + if (message.step !== 0) { + obj.step = message.step; + } + if (message.units !== '') { + obj.units = message.units; + } + if (message.viewType !== 0) { + obj.viewType = testPatternDefinition_DoubleProperty_ViewTypeToJSON( + message.viewType, + ); + } + return obj; + }, + + create, I>>( + base?: I, + ): TestPatternDefinition_DoubleProperty { + return TestPatternDefinition_DoubleProperty.fromPartial( + base ?? ({} as any), + ); + }, + fromPartial< + I extends Exact, I>, + >(object: I): TestPatternDefinition_DoubleProperty { + const message = createBaseTestPatternDefinition_DoubleProperty(); + message.value = object.value ?? 0; + message.min = object.min ?? 0; + message.max = object.max ?? 0; + message.step = object.step ?? 0; + message.units = object.units ?? ''; + message.viewType = object.viewType ?? 0; + return message; + }, +}; + +function createBaseTestPatternDefinition_IntProperty(): TestPatternDefinition_IntProperty { + return { value: 0, min: 0, max: 0, units: '' }; +} + +export const TestPatternDefinition_IntProperty = { + encode( + message: TestPatternDefinition_IntProperty, + writer: _m0.Writer = _m0.Writer.create(), + ): _m0.Writer { + if (message.value !== 0) { + writer.uint32(8).int32(message.value); + } + if (message.min !== 0) { + writer.uint32(16).int32(message.min); + } + if (message.max !== 0) { + writer.uint32(24).int32(message.max); + } + if (message.units !== '') { + writer.uint32(42).string(message.units); + } + return writer; + }, + + decode( + input: _m0.Reader | Uint8Array, + length?: number, + ): TestPatternDefinition_IntProperty { + const reader = + input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseTestPatternDefinition_IntProperty(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 8) { + break; + } + + message.value = reader.int32(); + continue; + case 2: + if (tag !== 16) { + break; + } + + message.min = reader.int32(); + continue; + case 3: + if (tag !== 24) { + break; + } + + message.max = reader.int32(); + continue; + case 5: + if (tag !== 42) { + break; + } + + message.units = reader.string(); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(object: any): TestPatternDefinition_IntProperty { + return { + value: isSet(object.value) ? globalThis.Number(object.value) : 0, + min: isSet(object.min) ? globalThis.Number(object.min) : 0, + max: isSet(object.max) ? globalThis.Number(object.max) : 0, + units: isSet(object.units) ? globalThis.String(object.units) : '', + }; + }, + + toJSON(message: TestPatternDefinition_IntProperty): unknown { + const obj: any = {}; + if (message.value !== 0) { + obj.value = Math.round(message.value); + } + if (message.min !== 0) { + obj.min = Math.round(message.min); + } + if (message.max !== 0) { + obj.max = Math.round(message.max); + } + if (message.units !== '') { + obj.units = message.units; + } + return obj; + }, + + create, I>>( + base?: I, + ): TestPatternDefinition_IntProperty { + return TestPatternDefinition_IntProperty.fromPartial(base ?? ({} as any)); + }, + fromPartial< + I extends Exact, I>, + >(object: I): TestPatternDefinition_IntProperty { + const message = createBaseTestPatternDefinition_IntProperty(); + message.value = object.value ?? 0; + message.min = object.min ?? 0; + message.max = object.max ?? 0; + message.units = object.units ?? ''; + return message; + }, +}; + +function createBaseTestPatternDefinition_BoolProperty(): TestPatternDefinition_BoolProperty { + return { value: false, dependentProperties: [] }; +} + +export const TestPatternDefinition_BoolProperty = { + encode( + message: TestPatternDefinition_BoolProperty, + writer: _m0.Writer = _m0.Writer.create(), + ): _m0.Writer { + if (message.value !== false) { + writer.uint32(8).bool(message.value); + } + for (const v of message.dependentProperties) { + TestPatternDefinition_Property.encode( + v!, + writer.uint32(18).fork(), + ).ldelim(); + } + return writer; + }, + + decode( + input: _m0.Reader | Uint8Array, + length?: number, + ): TestPatternDefinition_BoolProperty { + const reader = + input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseTestPatternDefinition_BoolProperty(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 8) { + break; + } + + message.value = reader.bool(); + continue; + case 2: + if (tag !== 18) { + break; + } + + message.dependentProperties.push( + TestPatternDefinition_Property.decode(reader, reader.uint32()), + ); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(object: any): TestPatternDefinition_BoolProperty { + return { + value: isSet(object.value) ? globalThis.Boolean(object.value) : false, + dependentProperties: globalThis.Array.isArray(object?.dependentProperties) + ? object.dependentProperties.map((e: any) => + TestPatternDefinition_Property.fromJSON(e), + ) + : [], + }; + }, + + toJSON(message: TestPatternDefinition_BoolProperty): unknown { + const obj: any = {}; + if (message.value !== false) { + obj.value = message.value; + } + if (message.dependentProperties?.length) { + obj.dependentProperties = message.dependentProperties.map((e) => + TestPatternDefinition_Property.toJSON(e), + ); + } + return obj; + }, + + create, I>>( + base?: I, + ): TestPatternDefinition_BoolProperty { + return TestPatternDefinition_BoolProperty.fromPartial(base ?? ({} as any)); + }, + fromPartial< + I extends Exact, I>, + >(object: I): TestPatternDefinition_BoolProperty { + const message = createBaseTestPatternDefinition_BoolProperty(); + message.value = object.value ?? false; + message.dependentProperties = + object.dependentProperties?.map((e) => + TestPatternDefinition_Property.fromPartial(e), + ) || []; + return message; + }, +}; + +function createBaseTestPatternDefinition_StringProperty(): TestPatternDefinition_StringProperty { + return { value: '', minChars: 0, maxChars: 0 }; +} + +export const TestPatternDefinition_StringProperty = { + encode( + message: TestPatternDefinition_StringProperty, + writer: _m0.Writer = _m0.Writer.create(), + ): _m0.Writer { + if (message.value !== '') { + writer.uint32(10).string(message.value); + } + if (message.minChars !== 0) { + writer.uint32(16).int32(message.minChars); + } + if (message.maxChars !== 0) { + writer.uint32(24).int32(message.maxChars); + } + return writer; + }, + + decode( + input: _m0.Reader | Uint8Array, + length?: number, + ): TestPatternDefinition_StringProperty { + const reader = + input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseTestPatternDefinition_StringProperty(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } + + message.value = reader.string(); + continue; + case 2: + if (tag !== 16) { + break; + } + + message.minChars = reader.int32(); + continue; + case 3: + if (tag !== 24) { + break; + } + + message.maxChars = reader.int32(); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(object: any): TestPatternDefinition_StringProperty { + return { + value: isSet(object.value) ? globalThis.String(object.value) : '', + minChars: isSet(object.minChars) ? globalThis.Number(object.minChars) : 0, + maxChars: isSet(object.maxChars) ? globalThis.Number(object.maxChars) : 0, + }; + }, + + toJSON(message: TestPatternDefinition_StringProperty): unknown { + const obj: any = {}; + if (message.value !== '') { + obj.value = message.value; + } + if (message.minChars !== 0) { + obj.minChars = Math.round(message.minChars); + } + if (message.maxChars !== 0) { + obj.maxChars = Math.round(message.maxChars); + } + return obj; + }, + + create, I>>( + base?: I, + ): TestPatternDefinition_StringProperty { + return TestPatternDefinition_StringProperty.fromPartial( + base ?? ({} as any), + ); + }, + fromPartial< + I extends Exact, I>, + >(object: I): TestPatternDefinition_StringProperty { + const message = createBaseTestPatternDefinition_StringProperty(); + message.value = object.value ?? ''; + message.minChars = object.minChars ?? 0; + message.maxChars = object.maxChars ?? 0; + return message; + }, +}; + +function createBaseTestPatternDefinition_FontProperty(): TestPatternDefinition_FontProperty { + return { font: undefined }; +} + +export const TestPatternDefinition_FontProperty = { + encode( + message: TestPatternDefinition_FontProperty, + writer: _m0.Writer = _m0.Writer.create(), + ): _m0.Writer { + if (message.font !== undefined) { + Font.encode(message.font, writer.uint32(10).fork()).ldelim(); + } + return writer; + }, + + decode( + input: _m0.Reader | Uint8Array, + length?: number, + ): TestPatternDefinition_FontProperty { + const reader = + input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseTestPatternDefinition_FontProperty(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } + + message.font = Font.decode(reader, reader.uint32()); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(object: any): TestPatternDefinition_FontProperty { + return { + font: isSet(object.font) ? Font.fromJSON(object.font) : undefined, + }; + }, + + toJSON(message: TestPatternDefinition_FontProperty): unknown { + const obj: any = {}; + if (message.font !== undefined) { + obj.font = Font.toJSON(message.font); + } + return obj; + }, + + create, I>>( + base?: I, + ): TestPatternDefinition_FontProperty { + return TestPatternDefinition_FontProperty.fromPartial(base ?? ({} as any)); + }, + fromPartial< + I extends Exact, I>, + >(object: I): TestPatternDefinition_FontProperty { + const message = createBaseTestPatternDefinition_FontProperty(); + message.font = + object.font !== undefined && object.font !== null + ? Font.fromPartial(object.font) + : undefined; + return message; + }, +}; + +function createBaseTestPatternDefinition_SelectorProperty(): TestPatternDefinition_SelectorProperty { + return { selectedIndex: 0, valueLocalizationKeys: [] }; +} + +export const TestPatternDefinition_SelectorProperty = { + encode( + message: TestPatternDefinition_SelectorProperty, + writer: _m0.Writer = _m0.Writer.create(), + ): _m0.Writer { + if (message.selectedIndex !== 0) { + writer.uint32(8).int32(message.selectedIndex); + } + for (const v of message.valueLocalizationKeys) { + writer.uint32(18).string(v!); + } + return writer; + }, + + decode( + input: _m0.Reader | Uint8Array, + length?: number, + ): TestPatternDefinition_SelectorProperty { + const reader = + input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseTestPatternDefinition_SelectorProperty(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 8) { + break; + } + + message.selectedIndex = reader.int32(); + continue; + case 2: + if (tag !== 18) { + break; + } + + message.valueLocalizationKeys.push(reader.string()); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(object: any): TestPatternDefinition_SelectorProperty { + return { + selectedIndex: isSet(object.selectedIndex) + ? globalThis.Number(object.selectedIndex) + : 0, + valueLocalizationKeys: globalThis.Array.isArray( + object?.valueLocalizationKeys, + ) + ? object.valueLocalizationKeys.map((e: any) => globalThis.String(e)) + : [], + }; + }, + + toJSON(message: TestPatternDefinition_SelectorProperty): unknown { + const obj: any = {}; + if (message.selectedIndex !== 0) { + obj.selectedIndex = Math.round(message.selectedIndex); + } + if (message.valueLocalizationKeys?.length) { + obj.valueLocalizationKeys = message.valueLocalizationKeys; + } + return obj; + }, + + create< + I extends Exact, I>, + >(base?: I): TestPatternDefinition_SelectorProperty { + return TestPatternDefinition_SelectorProperty.fromPartial( + base ?? ({} as any), + ); + }, + fromPartial< + I extends Exact, I>, + >(object: I): TestPatternDefinition_SelectorProperty { + const message = createBaseTestPatternDefinition_SelectorProperty(); + message.selectedIndex = object.selectedIndex ?? 0; + message.valueLocalizationKeys = + object.valueLocalizationKeys?.map((e) => e) || []; + return message; + }, +}; + +function createBaseTestPatternDefinition_Property(): TestPatternDefinition_Property { + return { + nameLocalizationKey: '', + colorProperty: undefined, + doubleProperty: undefined, + intProperty: undefined, + boolProperty: undefined, + stringProperty: undefined, + fontProperty: undefined, + selectorProperty: undefined, + }; +} + +export const TestPatternDefinition_Property = { + encode( + message: TestPatternDefinition_Property, + writer: _m0.Writer = _m0.Writer.create(), + ): _m0.Writer { + if (message.nameLocalizationKey !== '') { + writer.uint32(10).string(message.nameLocalizationKey); + } + if (message.colorProperty !== undefined) { + TestPatternDefinition_ColorProperty.encode( + message.colorProperty, + writer.uint32(26).fork(), + ).ldelim(); + } + if (message.doubleProperty !== undefined) { + TestPatternDefinition_DoubleProperty.encode( + message.doubleProperty, + writer.uint32(34).fork(), + ).ldelim(); + } + if (message.intProperty !== undefined) { + TestPatternDefinition_IntProperty.encode( + message.intProperty, + writer.uint32(42).fork(), + ).ldelim(); + } + if (message.boolProperty !== undefined) { + TestPatternDefinition_BoolProperty.encode( + message.boolProperty, + writer.uint32(50).fork(), + ).ldelim(); + } + if (message.stringProperty !== undefined) { + TestPatternDefinition_StringProperty.encode( + message.stringProperty, + writer.uint32(58).fork(), + ).ldelim(); + } + if (message.fontProperty !== undefined) { + TestPatternDefinition_FontProperty.encode( + message.fontProperty, + writer.uint32(66).fork(), + ).ldelim(); + } + if (message.selectorProperty !== undefined) { + TestPatternDefinition_SelectorProperty.encode( + message.selectorProperty, + writer.uint32(74).fork(), + ).ldelim(); + } + return writer; + }, + + decode( + input: _m0.Reader | Uint8Array, + length?: number, + ): TestPatternDefinition_Property { + const reader = + input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseTestPatternDefinition_Property(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } + + message.nameLocalizationKey = reader.string(); + continue; + case 3: + if (tag !== 26) { + break; + } + + message.colorProperty = TestPatternDefinition_ColorProperty.decode( + reader, + reader.uint32(), + ); + continue; + case 4: + if (tag !== 34) { + break; + } + + message.doubleProperty = TestPatternDefinition_DoubleProperty.decode( + reader, + reader.uint32(), + ); + continue; + case 5: + if (tag !== 42) { + break; + } + + message.intProperty = TestPatternDefinition_IntProperty.decode( + reader, + reader.uint32(), + ); + continue; + case 6: + if (tag !== 50) { + break; + } + + message.boolProperty = TestPatternDefinition_BoolProperty.decode( + reader, + reader.uint32(), + ); + continue; + case 7: + if (tag !== 58) { + break; + } + + message.stringProperty = TestPatternDefinition_StringProperty.decode( + reader, + reader.uint32(), + ); + continue; + case 8: + if (tag !== 66) { + break; + } + + message.fontProperty = TestPatternDefinition_FontProperty.decode( + reader, + reader.uint32(), + ); + continue; + case 9: + if (tag !== 74) { + break; + } + + message.selectorProperty = + TestPatternDefinition_SelectorProperty.decode( + reader, + reader.uint32(), + ); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(object: any): TestPatternDefinition_Property { + return { + nameLocalizationKey: isSet(object.nameLocalizationKey) + ? globalThis.String(object.nameLocalizationKey) + : '', + colorProperty: isSet(object.colorProperty) + ? TestPatternDefinition_ColorProperty.fromJSON(object.colorProperty) + : undefined, + doubleProperty: isSet(object.doubleProperty) + ? TestPatternDefinition_DoubleProperty.fromJSON(object.doubleProperty) + : undefined, + intProperty: isSet(object.intProperty) + ? TestPatternDefinition_IntProperty.fromJSON(object.intProperty) + : undefined, + boolProperty: isSet(object.boolProperty) + ? TestPatternDefinition_BoolProperty.fromJSON(object.boolProperty) + : undefined, + stringProperty: isSet(object.stringProperty) + ? TestPatternDefinition_StringProperty.fromJSON(object.stringProperty) + : undefined, + fontProperty: isSet(object.fontProperty) + ? TestPatternDefinition_FontProperty.fromJSON(object.fontProperty) + : undefined, + selectorProperty: isSet(object.selectorProperty) + ? TestPatternDefinition_SelectorProperty.fromJSON( + object.selectorProperty, + ) + : undefined, + }; + }, + + toJSON(message: TestPatternDefinition_Property): unknown { + const obj: any = {}; + if (message.nameLocalizationKey !== '') { + obj.nameLocalizationKey = message.nameLocalizationKey; + } + if (message.colorProperty !== undefined) { + obj.colorProperty = TestPatternDefinition_ColorProperty.toJSON( + message.colorProperty, + ); + } + if (message.doubleProperty !== undefined) { + obj.doubleProperty = TestPatternDefinition_DoubleProperty.toJSON( + message.doubleProperty, + ); + } + if (message.intProperty !== undefined) { + obj.intProperty = TestPatternDefinition_IntProperty.toJSON( + message.intProperty, + ); + } + if (message.boolProperty !== undefined) { + obj.boolProperty = TestPatternDefinition_BoolProperty.toJSON( + message.boolProperty, + ); + } + if (message.stringProperty !== undefined) { + obj.stringProperty = TestPatternDefinition_StringProperty.toJSON( + message.stringProperty, + ); + } + if (message.fontProperty !== undefined) { + obj.fontProperty = TestPatternDefinition_FontProperty.toJSON( + message.fontProperty, + ); + } + if (message.selectorProperty !== undefined) { + obj.selectorProperty = TestPatternDefinition_SelectorProperty.toJSON( + message.selectorProperty, + ); + } + return obj; + }, + + create, I>>( + base?: I, + ): TestPatternDefinition_Property { + return TestPatternDefinition_Property.fromPartial(base ?? ({} as any)); + }, + fromPartial, I>>( + object: I, + ): TestPatternDefinition_Property { + const message = createBaseTestPatternDefinition_Property(); + message.nameLocalizationKey = object.nameLocalizationKey ?? ''; + message.colorProperty = + object.colorProperty !== undefined && object.colorProperty !== null + ? TestPatternDefinition_ColorProperty.fromPartial(object.colorProperty) + : undefined; + message.doubleProperty = + object.doubleProperty !== undefined && object.doubleProperty !== null + ? TestPatternDefinition_DoubleProperty.fromPartial( + object.doubleProperty, + ) + : undefined; + message.intProperty = + object.intProperty !== undefined && object.intProperty !== null + ? TestPatternDefinition_IntProperty.fromPartial(object.intProperty) + : undefined; + message.boolProperty = + object.boolProperty !== undefined && object.boolProperty !== null + ? TestPatternDefinition_BoolProperty.fromPartial(object.boolProperty) + : undefined; + message.stringProperty = + object.stringProperty !== undefined && object.stringProperty !== null + ? TestPatternDefinition_StringProperty.fromPartial( + object.stringProperty, + ) + : undefined; + message.fontProperty = + object.fontProperty !== undefined && object.fontProperty !== null + ? TestPatternDefinition_FontProperty.fromPartial(object.fontProperty) + : undefined; + message.selectorProperty = + object.selectorProperty !== undefined && object.selectorProperty !== null + ? TestPatternDefinition_SelectorProperty.fromPartial( + object.selectorProperty, + ) + : undefined; + return message; + }, +}; + +function createBaseTestPatternRenderSettings(): TestPatternRenderSettings { + return { + pattern: undefined, + screenName: '', + outputs: [], + logoType: 0, + logoFile: '', + renderWidth: 0, + renderHeight: 0, + enableAudio: false, + }; +} + +export const TestPatternRenderSettings = { + encode( + message: TestPatternRenderSettings, + writer: _m0.Writer = _m0.Writer.create(), + ): _m0.Writer { + if (message.pattern !== undefined) { + TestPatternDefinition.encode( + message.pattern, + writer.uint32(10).fork(), + ).ldelim(); + } + if (message.screenName !== '') { + writer.uint32(26).string(message.screenName); + } + for (const v of message.outputs) { + TestPatternRenderSettings_Output.encode( + v!, + writer.uint32(34).fork(), + ).ldelim(); + } + if (message.logoType !== 0) { + writer.uint32(40).int32(message.logoType); + } + if (message.logoFile !== '') { + writer.uint32(50).string(message.logoFile); + } + if (message.renderWidth !== 0) { + writer.uint32(56).int32(message.renderWidth); + } + if (message.renderHeight !== 0) { + writer.uint32(64).int32(message.renderHeight); + } + if (message.enableAudio !== false) { + writer.uint32(72).bool(message.enableAudio); + } + return writer; + }, + + decode( + input: _m0.Reader | Uint8Array, + length?: number, + ): TestPatternRenderSettings { + const reader = + input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseTestPatternRenderSettings(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } + + message.pattern = TestPatternDefinition.decode( + reader, + reader.uint32(), + ); + continue; + case 3: + if (tag !== 26) { + break; + } + + message.screenName = reader.string(); + continue; + case 4: + if (tag !== 34) { + break; + } + + message.outputs.push( + TestPatternRenderSettings_Output.decode(reader, reader.uint32()), + ); + continue; + case 5: + if (tag !== 40) { + break; + } + + message.logoType = reader.int32() as any; + continue; + case 6: + if (tag !== 50) { + break; + } + + message.logoFile = reader.string(); + continue; + case 7: + if (tag !== 56) { + break; + } + + message.renderWidth = reader.int32(); + continue; + case 8: + if (tag !== 64) { + break; + } + + message.renderHeight = reader.int32(); + continue; + case 9: + if (tag !== 72) { + break; + } + + message.enableAudio = reader.bool(); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(object: any): TestPatternRenderSettings { + return { + pattern: isSet(object.pattern) + ? TestPatternDefinition.fromJSON(object.pattern) + : undefined, + screenName: isSet(object.screenName) + ? globalThis.String(object.screenName) + : '', + outputs: globalThis.Array.isArray(object?.outputs) + ? object.outputs.map((e: any) => + TestPatternRenderSettings_Output.fromJSON(e), + ) + : [], + logoType: isSet(object.logoType) ? logoTypeFromJSON(object.logoType) : 0, + logoFile: isSet(object.logoFile) + ? globalThis.String(object.logoFile) + : '', + renderWidth: isSet(object.renderWidth) + ? globalThis.Number(object.renderWidth) + : 0, + renderHeight: isSet(object.renderHeight) + ? globalThis.Number(object.renderHeight) + : 0, + enableAudio: isSet(object.enableAudio) + ? globalThis.Boolean(object.enableAudio) + : false, + }; + }, + + toJSON(message: TestPatternRenderSettings): unknown { + const obj: any = {}; + if (message.pattern !== undefined) { + obj.pattern = TestPatternDefinition.toJSON(message.pattern); + } + if (message.screenName !== '') { + obj.screenName = message.screenName; + } + if (message.outputs?.length) { + obj.outputs = message.outputs.map((e) => + TestPatternRenderSettings_Output.toJSON(e), + ); + } + if (message.logoType !== 0) { + obj.logoType = logoTypeToJSON(message.logoType); + } + if (message.logoFile !== '') { + obj.logoFile = message.logoFile; + } + if (message.renderWidth !== 0) { + obj.renderWidth = Math.round(message.renderWidth); + } + if (message.renderHeight !== 0) { + obj.renderHeight = Math.round(message.renderHeight); + } + if (message.enableAudio !== false) { + obj.enableAudio = message.enableAudio; + } + return obj; + }, + + create, I>>( + base?: I, + ): TestPatternRenderSettings { + return TestPatternRenderSettings.fromPartial(base ?? ({} as any)); + }, + fromPartial, I>>( + object: I, + ): TestPatternRenderSettings { + const message = createBaseTestPatternRenderSettings(); + message.pattern = + object.pattern !== undefined && object.pattern !== null + ? TestPatternDefinition.fromPartial(object.pattern) + : undefined; + message.screenName = object.screenName ?? ''; + message.outputs = + object.outputs?.map((e) => + TestPatternRenderSettings_Output.fromPartial(e), + ) || []; + message.logoType = object.logoType ?? 0; + message.logoFile = object.logoFile ?? ''; + message.renderWidth = object.renderWidth ?? 0; + message.renderHeight = object.renderHeight ?? 0; + message.enableAudio = object.enableAudio ?? false; + return message; + }, +}; + +function createBaseTestPatternRenderSettings_Output(): TestPatternRenderSettings_Output { + return { x: 0, y: 0, width: 0, height: 0, name: '', frameRate: 0 }; +} + +export const TestPatternRenderSettings_Output = { + encode( + message: TestPatternRenderSettings_Output, + writer: _m0.Writer = _m0.Writer.create(), + ): _m0.Writer { + if (message.x !== 0) { + writer.uint32(8).int32(message.x); + } + if (message.y !== 0) { + writer.uint32(16).int32(message.y); + } + if (message.width !== 0) { + writer.uint32(24).int32(message.width); + } + if (message.height !== 0) { + writer.uint32(32).int32(message.height); + } + if (message.name !== '') { + writer.uint32(42).string(message.name); + } + if (message.frameRate !== 0) { + writer.uint32(49).double(message.frameRate); + } + return writer; + }, + + decode( + input: _m0.Reader | Uint8Array, + length?: number, + ): TestPatternRenderSettings_Output { + const reader = + input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseTestPatternRenderSettings_Output(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 8) { + break; + } + + message.x = reader.int32(); + continue; + case 2: + if (tag !== 16) { + break; + } + + message.y = reader.int32(); + continue; + case 3: + if (tag !== 24) { + break; + } + + message.width = reader.int32(); + continue; + case 4: + if (tag !== 32) { + break; + } + + message.height = reader.int32(); + continue; + case 5: + if (tag !== 42) { + break; + } + + message.name = reader.string(); + continue; + case 6: + if (tag !== 49) { + break; + } + + message.frameRate = reader.double(); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(object: any): TestPatternRenderSettings_Output { + return { + x: isSet(object.x) ? globalThis.Number(object.x) : 0, + y: isSet(object.y) ? globalThis.Number(object.y) : 0, + width: isSet(object.width) ? globalThis.Number(object.width) : 0, + height: isSet(object.height) ? globalThis.Number(object.height) : 0, + name: isSet(object.name) ? globalThis.String(object.name) : '', + frameRate: isSet(object.frameRate) + ? globalThis.Number(object.frameRate) + : 0, + }; + }, + + toJSON(message: TestPatternRenderSettings_Output): unknown { + const obj: any = {}; + if (message.x !== 0) { + obj.x = Math.round(message.x); + } + if (message.y !== 0) { + obj.y = Math.round(message.y); + } + if (message.width !== 0) { + obj.width = Math.round(message.width); + } + if (message.height !== 0) { + obj.height = Math.round(message.height); + } + if (message.name !== '') { + obj.name = message.name; + } + if (message.frameRate !== 0) { + obj.frameRate = message.frameRate; + } + return obj; + }, + + create, I>>( + base?: I, + ): TestPatternRenderSettings_Output { + return TestPatternRenderSettings_Output.fromPartial(base ?? ({} as any)); + }, + fromPartial< + I extends Exact, I>, + >(object: I): TestPatternRenderSettings_Output { + const message = createBaseTestPatternRenderSettings_Output(); + message.x = object.x ?? 0; + message.y = object.y ?? 0; + message.width = object.width ?? 0; + message.height = object.height ?? 0; + message.name = object.name ?? ''; + message.frameRate = object.frameRate ?? 0; + return message; + }, +}; + +function createBaseTestPatternState(): TestPatternState { + return { + pattern: undefined, + showPattern: false, + displayLocation: 0, + specificScreen: undefined, + identifyScreens: false, + logoType: 0, + userLogoLocation: undefined, + }; +} + +export const TestPatternState = { + encode( + message: TestPatternState, + writer: _m0.Writer = _m0.Writer.create(), + ): _m0.Writer { + if (message.pattern !== undefined) { + TestPatternDefinition.encode( + message.pattern, + writer.uint32(10).fork(), + ).ldelim(); + } + if (message.showPattern !== false) { + writer.uint32(16).bool(message.showPattern); + } + if (message.displayLocation !== 0) { + writer.uint32(24).int32(message.displayLocation); + } + if (message.specificScreen !== undefined) { + UUID.encode(message.specificScreen, writer.uint32(34).fork()).ldelim(); + } + if (message.identifyScreens !== false) { + writer.uint32(40).bool(message.identifyScreens); + } + if (message.logoType !== 0) { + writer.uint32(48).int32(message.logoType); + } + if (message.userLogoLocation !== undefined) { + URL.encode(message.userLogoLocation, writer.uint32(58).fork()).ldelim(); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): TestPatternState { + const reader = + input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseTestPatternState(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } + + message.pattern = TestPatternDefinition.decode( + reader, + reader.uint32(), + ); + continue; + case 2: + if (tag !== 16) { + break; + } + + message.showPattern = reader.bool(); + continue; + case 3: + if (tag !== 24) { + break; + } + + message.displayLocation = reader.int32() as any; + continue; + case 4: + if (tag !== 34) { + break; + } + + message.specificScreen = UUID.decode(reader, reader.uint32()); + continue; + case 5: + if (tag !== 40) { + break; + } + + message.identifyScreens = reader.bool(); + continue; + case 6: + if (tag !== 48) { + break; + } + + message.logoType = reader.int32() as any; + continue; + case 7: + if (tag !== 58) { + break; + } + + message.userLogoLocation = URL.decode(reader, reader.uint32()); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(object: any): TestPatternState { + return { + pattern: isSet(object.pattern) + ? TestPatternDefinition.fromJSON(object.pattern) + : undefined, + showPattern: isSet(object.showPattern) + ? globalThis.Boolean(object.showPattern) + : false, + displayLocation: isSet(object.displayLocation) + ? testPatternState_DisplayLocationFromJSON(object.displayLocation) + : 0, + specificScreen: isSet(object.specificScreen) + ? UUID.fromJSON(object.specificScreen) + : undefined, + identifyScreens: isSet(object.identifyScreens) + ? globalThis.Boolean(object.identifyScreens) + : false, + logoType: isSet(object.logoType) ? logoTypeFromJSON(object.logoType) : 0, + userLogoLocation: isSet(object.userLogoLocation) + ? URL.fromJSON(object.userLogoLocation) + : undefined, + }; + }, + + toJSON(message: TestPatternState): unknown { + const obj: any = {}; + if (message.pattern !== undefined) { + obj.pattern = TestPatternDefinition.toJSON(message.pattern); + } + if (message.showPattern !== false) { + obj.showPattern = message.showPattern; + } + if (message.displayLocation !== 0) { + obj.displayLocation = testPatternState_DisplayLocationToJSON( + message.displayLocation, + ); + } + if (message.specificScreen !== undefined) { + obj.specificScreen = UUID.toJSON(message.specificScreen); + } + if (message.identifyScreens !== false) { + obj.identifyScreens = message.identifyScreens; + } + if (message.logoType !== 0) { + obj.logoType = logoTypeToJSON(message.logoType); + } + if (message.userLogoLocation !== undefined) { + obj.userLogoLocation = URL.toJSON(message.userLogoLocation); + } + return obj; + }, + + create, I>>( + base?: I, + ): TestPatternState { + return TestPatternState.fromPartial(base ?? ({} as any)); + }, + fromPartial, I>>( + object: I, + ): TestPatternState { + const message = createBaseTestPatternState(); + message.pattern = + object.pattern !== undefined && object.pattern !== null + ? TestPatternDefinition.fromPartial(object.pattern) + : undefined; + message.showPattern = object.showPattern ?? false; + message.displayLocation = object.displayLocation ?? 0; + message.specificScreen = + object.specificScreen !== undefined && object.specificScreen !== null + ? UUID.fromPartial(object.specificScreen) + : undefined; + message.identifyScreens = object.identifyScreens ?? false; + message.logoType = object.logoType ?? 0; + message.userLogoLocation = + object.userLogoLocation !== undefined && object.userLogoLocation !== null + ? URL.fromPartial(object.userLogoLocation) + : undefined; + return message; + }, +}; + +function createBaseTestPatternDocument(): TestPatternDocument { + return { state: undefined, patterns: [] }; +} + +export const TestPatternDocument = { + encode( + message: TestPatternDocument, + writer: _m0.Writer = _m0.Writer.create(), + ): _m0.Writer { + if (message.state !== undefined) { + TestPatternDocument_TestPatternStateData.encode( + message.state, + writer.uint32(10).fork(), + ).ldelim(); + } + for (const v of message.patterns) { + TestPatternDocument_TestPatternData.encode( + v!, + writer.uint32(18).fork(), + ).ldelim(); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): TestPatternDocument { + const reader = + input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseTestPatternDocument(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } + + message.state = TestPatternDocument_TestPatternStateData.decode( + reader, + reader.uint32(), + ); + continue; + case 2: + if (tag !== 18) { + break; + } + + message.patterns.push( + TestPatternDocument_TestPatternData.decode(reader, reader.uint32()), + ); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(object: any): TestPatternDocument { + return { + state: isSet(object.state) + ? TestPatternDocument_TestPatternStateData.fromJSON(object.state) + : undefined, + patterns: globalThis.Array.isArray(object?.patterns) + ? object.patterns.map((e: any) => + TestPatternDocument_TestPatternData.fromJSON(e), + ) + : [], + }; + }, + + toJSON(message: TestPatternDocument): unknown { + const obj: any = {}; + if (message.state !== undefined) { + obj.state = TestPatternDocument_TestPatternStateData.toJSON( + message.state, + ); + } + if (message.patterns?.length) { + obj.patterns = message.patterns.map((e) => + TestPatternDocument_TestPatternData.toJSON(e), + ); + } + return obj; + }, + + create, I>>( + base?: I, + ): TestPatternDocument { + return TestPatternDocument.fromPartial(base ?? ({} as any)); + }, + fromPartial, I>>( + object: I, + ): TestPatternDocument { + const message = createBaseTestPatternDocument(); + message.state = + object.state !== undefined && object.state !== null + ? TestPatternDocument_TestPatternStateData.fromPartial(object.state) + : undefined; + message.patterns = + object.patterns?.map((e) => + TestPatternDocument_TestPatternData.fromPartial(e), + ) || []; + return message; + }, +}; + +function createBaseTestPatternDocument_TestPatternStateData(): TestPatternDocument_TestPatternStateData { + return { + testPatternId: undefined, + testPatternNameLocalizationKey: '', + displayLocation: 0, + specificScreen: undefined, + identifyScreens: false, + logoType: 0, + userLogoLocation: undefined, + }; +} + +export const TestPatternDocument_TestPatternStateData = { + encode( + message: TestPatternDocument_TestPatternStateData, + writer: _m0.Writer = _m0.Writer.create(), + ): _m0.Writer { + if (message.testPatternId !== undefined) { + UUID.encode(message.testPatternId, writer.uint32(10).fork()).ldelim(); + } + if (message.testPatternNameLocalizationKey !== '') { + writer.uint32(18).string(message.testPatternNameLocalizationKey); + } + if (message.displayLocation !== 0) { + writer.uint32(24).int32(message.displayLocation); + } + if (message.specificScreen !== undefined) { + UUID.encode(message.specificScreen, writer.uint32(34).fork()).ldelim(); + } + if (message.identifyScreens !== false) { + writer.uint32(40).bool(message.identifyScreens); + } + if (message.logoType !== 0) { + writer.uint32(48).int32(message.logoType); + } + if (message.userLogoLocation !== undefined) { + URL.encode(message.userLogoLocation, writer.uint32(58).fork()).ldelim(); + } + return writer; + }, + + decode( + input: _m0.Reader | Uint8Array, + length?: number, + ): TestPatternDocument_TestPatternStateData { + const reader = + input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseTestPatternDocument_TestPatternStateData(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } + + message.testPatternId = UUID.decode(reader, reader.uint32()); + continue; + case 2: + if (tag !== 18) { + break; + } + + message.testPatternNameLocalizationKey = reader.string(); + continue; + case 3: + if (tag !== 24) { + break; + } + + message.displayLocation = reader.int32() as any; + continue; + case 4: + if (tag !== 34) { + break; + } + + message.specificScreen = UUID.decode(reader, reader.uint32()); + continue; + case 5: + if (tag !== 40) { + break; + } + + message.identifyScreens = reader.bool(); + continue; + case 6: + if (tag !== 48) { + break; + } + + message.logoType = reader.int32() as any; + continue; + case 7: + if (tag !== 58) { + break; + } + + message.userLogoLocation = URL.decode(reader, reader.uint32()); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(object: any): TestPatternDocument_TestPatternStateData { + return { + testPatternId: isSet(object.testPatternId) + ? UUID.fromJSON(object.testPatternId) + : undefined, + testPatternNameLocalizationKey: isSet( + object.testPatternNameLocalizationKey, + ) + ? globalThis.String(object.testPatternNameLocalizationKey) + : '', + displayLocation: isSet(object.displayLocation) + ? testPatternState_DisplayLocationFromJSON(object.displayLocation) + : 0, + specificScreen: isSet(object.specificScreen) + ? UUID.fromJSON(object.specificScreen) + : undefined, + identifyScreens: isSet(object.identifyScreens) + ? globalThis.Boolean(object.identifyScreens) + : false, + logoType: isSet(object.logoType) ? logoTypeFromJSON(object.logoType) : 0, + userLogoLocation: isSet(object.userLogoLocation) + ? URL.fromJSON(object.userLogoLocation) + : undefined, + }; + }, + + toJSON(message: TestPatternDocument_TestPatternStateData): unknown { + const obj: any = {}; + if (message.testPatternId !== undefined) { + obj.testPatternId = UUID.toJSON(message.testPatternId); + } + if (message.testPatternNameLocalizationKey !== '') { + obj.testPatternNameLocalizationKey = + message.testPatternNameLocalizationKey; + } + if (message.displayLocation !== 0) { + obj.displayLocation = testPatternState_DisplayLocationToJSON( + message.displayLocation, + ); + } + if (message.specificScreen !== undefined) { + obj.specificScreen = UUID.toJSON(message.specificScreen); + } + if (message.identifyScreens !== false) { + obj.identifyScreens = message.identifyScreens; + } + if (message.logoType !== 0) { + obj.logoType = logoTypeToJSON(message.logoType); + } + if (message.userLogoLocation !== undefined) { + obj.userLogoLocation = URL.toJSON(message.userLogoLocation); + } + return obj; + }, + + create< + I extends Exact, I>, + >(base?: I): TestPatternDocument_TestPatternStateData { + return TestPatternDocument_TestPatternStateData.fromPartial( + base ?? ({} as any), + ); + }, + fromPartial< + I extends Exact, I>, + >(object: I): TestPatternDocument_TestPatternStateData { + const message = createBaseTestPatternDocument_TestPatternStateData(); + message.testPatternId = + object.testPatternId !== undefined && object.testPatternId !== null + ? UUID.fromPartial(object.testPatternId) + : undefined; + message.testPatternNameLocalizationKey = + object.testPatternNameLocalizationKey ?? ''; + message.displayLocation = object.displayLocation ?? 0; + message.specificScreen = + object.specificScreen !== undefined && object.specificScreen !== null + ? UUID.fromPartial(object.specificScreen) + : undefined; + message.identifyScreens = object.identifyScreens ?? false; + message.logoType = object.logoType ?? 0; + message.userLogoLocation = + object.userLogoLocation !== undefined && object.userLogoLocation !== null + ? URL.fromPartial(object.userLogoLocation) + : undefined; + return message; + }, +}; + +function createBaseTestPatternDocument_TestPatternData(): TestPatternDocument_TestPatternData { + return { uuid: undefined, nameLocalizationKey: '', properties: [] }; +} + +export const TestPatternDocument_TestPatternData = { + encode( + message: TestPatternDocument_TestPatternData, + writer: _m0.Writer = _m0.Writer.create(), + ): _m0.Writer { + if (message.uuid !== undefined) { + UUID.encode(message.uuid, writer.uint32(10).fork()).ldelim(); + } + if (message.nameLocalizationKey !== '') { + writer.uint32(18).string(message.nameLocalizationKey); + } + for (const v of message.properties) { + TestPatternDocument_TestPatternData_Property.encode( + v!, + writer.uint32(26).fork(), + ).ldelim(); + } + return writer; + }, + + decode( + input: _m0.Reader | Uint8Array, + length?: number, + ): TestPatternDocument_TestPatternData { + const reader = + input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseTestPatternDocument_TestPatternData(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } + + message.uuid = UUID.decode(reader, reader.uint32()); + continue; + case 2: + if (tag !== 18) { + break; + } + + message.nameLocalizationKey = reader.string(); + continue; + case 3: + if (tag !== 26) { + break; + } + + message.properties.push( + TestPatternDocument_TestPatternData_Property.decode( + reader, + reader.uint32(), + ), + ); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(object: any): TestPatternDocument_TestPatternData { + return { + uuid: isSet(object.uuid) ? UUID.fromJSON(object.uuid) : undefined, + nameLocalizationKey: isSet(object.nameLocalizationKey) + ? globalThis.String(object.nameLocalizationKey) + : '', + properties: globalThis.Array.isArray(object?.properties) + ? object.properties.map((e: any) => + TestPatternDocument_TestPatternData_Property.fromJSON(e), + ) + : [], + }; + }, + + toJSON(message: TestPatternDocument_TestPatternData): unknown { + const obj: any = {}; + if (message.uuid !== undefined) { + obj.uuid = UUID.toJSON(message.uuid); + } + if (message.nameLocalizationKey !== '') { + obj.nameLocalizationKey = message.nameLocalizationKey; + } + if (message.properties?.length) { + obj.properties = message.properties.map((e) => + TestPatternDocument_TestPatternData_Property.toJSON(e), + ); + } + return obj; + }, + + create, I>>( + base?: I, + ): TestPatternDocument_TestPatternData { + return TestPatternDocument_TestPatternData.fromPartial(base ?? ({} as any)); + }, + fromPartial< + I extends Exact, I>, + >(object: I): TestPatternDocument_TestPatternData { + const message = createBaseTestPatternDocument_TestPatternData(); + message.uuid = + object.uuid !== undefined && object.uuid !== null + ? UUID.fromPartial(object.uuid) + : undefined; + message.nameLocalizationKey = object.nameLocalizationKey ?? ''; + message.properties = + object.properties?.map((e) => + TestPatternDocument_TestPatternData_Property.fromPartial(e), + ) || []; + return message; + }, +}; + +function createBaseTestPatternDocument_TestPatternData_ColorProperty(): TestPatternDocument_TestPatternData_ColorProperty { + return { value: undefined }; +} + +export const TestPatternDocument_TestPatternData_ColorProperty = { + encode( + message: TestPatternDocument_TestPatternData_ColorProperty, + writer: _m0.Writer = _m0.Writer.create(), + ): _m0.Writer { + if (message.value !== undefined) { + Color.encode(message.value, writer.uint32(10).fork()).ldelim(); + } + return writer; + }, + + decode( + input: _m0.Reader | Uint8Array, + length?: number, + ): TestPatternDocument_TestPatternData_ColorProperty { + const reader = + input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = + createBaseTestPatternDocument_TestPatternData_ColorProperty(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } + + message.value = Color.decode(reader, reader.uint32()); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(object: any): TestPatternDocument_TestPatternData_ColorProperty { + return { + value: isSet(object.value) ? Color.fromJSON(object.value) : undefined, + }; + }, + + toJSON(message: TestPatternDocument_TestPatternData_ColorProperty): unknown { + const obj: any = {}; + if (message.value !== undefined) { + obj.value = Color.toJSON(message.value); + } + return obj; + }, + + create< + I extends Exact< + DeepPartial, + I + >, + >(base?: I): TestPatternDocument_TestPatternData_ColorProperty { + return TestPatternDocument_TestPatternData_ColorProperty.fromPartial( + base ?? ({} as any), + ); + }, + fromPartial< + I extends Exact< + DeepPartial, + I + >, + >(object: I): TestPatternDocument_TestPatternData_ColorProperty { + const message = + createBaseTestPatternDocument_TestPatternData_ColorProperty(); + message.value = + object.value !== undefined && object.value !== null + ? Color.fromPartial(object.value) + : undefined; + return message; + }, +}; + +function createBaseTestPatternDocument_TestPatternData_DoubleProperty(): TestPatternDocument_TestPatternData_DoubleProperty { + return { value: 0 }; +} + +export const TestPatternDocument_TestPatternData_DoubleProperty = { + encode( + message: TestPatternDocument_TestPatternData_DoubleProperty, + writer: _m0.Writer = _m0.Writer.create(), + ): _m0.Writer { + if (message.value !== 0) { + writer.uint32(9).double(message.value); + } + return writer; + }, + + decode( + input: _m0.Reader | Uint8Array, + length?: number, + ): TestPatternDocument_TestPatternData_DoubleProperty { + const reader = + input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = + createBaseTestPatternDocument_TestPatternData_DoubleProperty(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 9) { + break; + } + + message.value = reader.double(); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(object: any): TestPatternDocument_TestPatternData_DoubleProperty { + return { value: isSet(object.value) ? globalThis.Number(object.value) : 0 }; + }, + + toJSON(message: TestPatternDocument_TestPatternData_DoubleProperty): unknown { + const obj: any = {}; + if (message.value !== 0) { + obj.value = message.value; + } + return obj; + }, + + create< + I extends Exact< + DeepPartial, + I + >, + >(base?: I): TestPatternDocument_TestPatternData_DoubleProperty { + return TestPatternDocument_TestPatternData_DoubleProperty.fromPartial( + base ?? ({} as any), + ); + }, + fromPartial< + I extends Exact< + DeepPartial, + I + >, + >(object: I): TestPatternDocument_TestPatternData_DoubleProperty { + const message = + createBaseTestPatternDocument_TestPatternData_DoubleProperty(); + message.value = object.value ?? 0; + return message; + }, +}; + +function createBaseTestPatternDocument_TestPatternData_IntProperty(): TestPatternDocument_TestPatternData_IntProperty { + return { value: 0 }; +} + +export const TestPatternDocument_TestPatternData_IntProperty = { + encode( + message: TestPatternDocument_TestPatternData_IntProperty, + writer: _m0.Writer = _m0.Writer.create(), + ): _m0.Writer { + if (message.value !== 0) { + writer.uint32(8).int32(message.value); + } + return writer; + }, + + decode( + input: _m0.Reader | Uint8Array, + length?: number, + ): TestPatternDocument_TestPatternData_IntProperty { + const reader = + input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseTestPatternDocument_TestPatternData_IntProperty(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 8) { + break; + } + + message.value = reader.int32(); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(object: any): TestPatternDocument_TestPatternData_IntProperty { + return { value: isSet(object.value) ? globalThis.Number(object.value) : 0 }; + }, + + toJSON(message: TestPatternDocument_TestPatternData_IntProperty): unknown { + const obj: any = {}; + if (message.value !== 0) { + obj.value = Math.round(message.value); + } + return obj; + }, + + create< + I extends Exact< + DeepPartial, + I + >, + >(base?: I): TestPatternDocument_TestPatternData_IntProperty { + return TestPatternDocument_TestPatternData_IntProperty.fromPartial( + base ?? ({} as any), + ); + }, + fromPartial< + I extends Exact< + DeepPartial, + I + >, + >(object: I): TestPatternDocument_TestPatternData_IntProperty { + const message = createBaseTestPatternDocument_TestPatternData_IntProperty(); + message.value = object.value ?? 0; + return message; + }, +}; + +function createBaseTestPatternDocument_TestPatternData_BoolProperty(): TestPatternDocument_TestPatternData_BoolProperty { + return { value: false, dependentProperties: [] }; +} + +export const TestPatternDocument_TestPatternData_BoolProperty = { + encode( + message: TestPatternDocument_TestPatternData_BoolProperty, + writer: _m0.Writer = _m0.Writer.create(), + ): _m0.Writer { + if (message.value !== false) { + writer.uint32(8).bool(message.value); + } + for (const v of message.dependentProperties) { + TestPatternDocument_TestPatternData_Property.encode( + v!, + writer.uint32(18).fork(), + ).ldelim(); + } + return writer; + }, + + decode( + input: _m0.Reader | Uint8Array, + length?: number, + ): TestPatternDocument_TestPatternData_BoolProperty { + const reader = + input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = + createBaseTestPatternDocument_TestPatternData_BoolProperty(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 8) { + break; + } + + message.value = reader.bool(); + continue; + case 2: + if (tag !== 18) { + break; + } + + message.dependentProperties.push( + TestPatternDocument_TestPatternData_Property.decode( + reader, + reader.uint32(), + ), + ); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(object: any): TestPatternDocument_TestPatternData_BoolProperty { + return { + value: isSet(object.value) ? globalThis.Boolean(object.value) : false, + dependentProperties: globalThis.Array.isArray(object?.dependentProperties) + ? object.dependentProperties.map((e: any) => + TestPatternDocument_TestPatternData_Property.fromJSON(e), + ) + : [], + }; + }, + + toJSON(message: TestPatternDocument_TestPatternData_BoolProperty): unknown { + const obj: any = {}; + if (message.value !== false) { + obj.value = message.value; + } + if (message.dependentProperties?.length) { + obj.dependentProperties = message.dependentProperties.map((e) => + TestPatternDocument_TestPatternData_Property.toJSON(e), + ); + } + return obj; + }, + + create< + I extends Exact< + DeepPartial, + I + >, + >(base?: I): TestPatternDocument_TestPatternData_BoolProperty { + return TestPatternDocument_TestPatternData_BoolProperty.fromPartial( + base ?? ({} as any), + ); + }, + fromPartial< + I extends Exact< + DeepPartial, + I + >, + >(object: I): TestPatternDocument_TestPatternData_BoolProperty { + const message = + createBaseTestPatternDocument_TestPatternData_BoolProperty(); + message.value = object.value ?? false; + message.dependentProperties = + object.dependentProperties?.map((e) => + TestPatternDocument_TestPatternData_Property.fromPartial(e), + ) || []; + return message; + }, +}; + +function createBaseTestPatternDocument_TestPatternData_StringProperty(): TestPatternDocument_TestPatternData_StringProperty { + return { value: '' }; +} + +export const TestPatternDocument_TestPatternData_StringProperty = { + encode( + message: TestPatternDocument_TestPatternData_StringProperty, + writer: _m0.Writer = _m0.Writer.create(), + ): _m0.Writer { + if (message.value !== '') { + writer.uint32(10).string(message.value); + } + return writer; + }, + + decode( + input: _m0.Reader | Uint8Array, + length?: number, + ): TestPatternDocument_TestPatternData_StringProperty { + const reader = + input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = + createBaseTestPatternDocument_TestPatternData_StringProperty(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } + + message.value = reader.string(); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(object: any): TestPatternDocument_TestPatternData_StringProperty { + return { + value: isSet(object.value) ? globalThis.String(object.value) : '', + }; + }, + + toJSON(message: TestPatternDocument_TestPatternData_StringProperty): unknown { + const obj: any = {}; + if (message.value !== '') { + obj.value = message.value; + } + return obj; + }, + + create< + I extends Exact< + DeepPartial, + I + >, + >(base?: I): TestPatternDocument_TestPatternData_StringProperty { + return TestPatternDocument_TestPatternData_StringProperty.fromPartial( + base ?? ({} as any), + ); + }, + fromPartial< + I extends Exact< + DeepPartial, + I + >, + >(object: I): TestPatternDocument_TestPatternData_StringProperty { + const message = + createBaseTestPatternDocument_TestPatternData_StringProperty(); + message.value = object.value ?? ''; + return message; + }, +}; + +function createBaseTestPatternDocument_TestPatternData_FontProperty(): TestPatternDocument_TestPatternData_FontProperty { + return { value: undefined }; +} + +export const TestPatternDocument_TestPatternData_FontProperty = { + encode( + message: TestPatternDocument_TestPatternData_FontProperty, + writer: _m0.Writer = _m0.Writer.create(), + ): _m0.Writer { + if (message.value !== undefined) { + Font.encode(message.value, writer.uint32(10).fork()).ldelim(); + } + return writer; + }, + + decode( + input: _m0.Reader | Uint8Array, + length?: number, + ): TestPatternDocument_TestPatternData_FontProperty { + const reader = + input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = + createBaseTestPatternDocument_TestPatternData_FontProperty(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } + + message.value = Font.decode(reader, reader.uint32()); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(object: any): TestPatternDocument_TestPatternData_FontProperty { + return { + value: isSet(object.value) ? Font.fromJSON(object.value) : undefined, + }; + }, + + toJSON(message: TestPatternDocument_TestPatternData_FontProperty): unknown { + const obj: any = {}; + if (message.value !== undefined) { + obj.value = Font.toJSON(message.value); + } + return obj; + }, + + create< + I extends Exact< + DeepPartial, + I + >, + >(base?: I): TestPatternDocument_TestPatternData_FontProperty { + return TestPatternDocument_TestPatternData_FontProperty.fromPartial( + base ?? ({} as any), + ); + }, + fromPartial< + I extends Exact< + DeepPartial, + I + >, + >(object: I): TestPatternDocument_TestPatternData_FontProperty { + const message = + createBaseTestPatternDocument_TestPatternData_FontProperty(); + message.value = + object.value !== undefined && object.value !== null + ? Font.fromPartial(object.value) + : undefined; + return message; + }, +}; + +function createBaseTestPatternDocument_TestPatternData_SelectorProperty(): TestPatternDocument_TestPatternData_SelectorProperty { + return { value: 0 }; +} + +export const TestPatternDocument_TestPatternData_SelectorProperty = { + encode( + message: TestPatternDocument_TestPatternData_SelectorProperty, + writer: _m0.Writer = _m0.Writer.create(), + ): _m0.Writer { + if (message.value !== 0) { + writer.uint32(8).int32(message.value); + } + return writer; + }, + + decode( + input: _m0.Reader | Uint8Array, + length?: number, + ): TestPatternDocument_TestPatternData_SelectorProperty { + const reader = + input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = + createBaseTestPatternDocument_TestPatternData_SelectorProperty(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 8) { + break; + } + + message.value = reader.int32(); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(object: any): TestPatternDocument_TestPatternData_SelectorProperty { + return { value: isSet(object.value) ? globalThis.Number(object.value) : 0 }; + }, + + toJSON( + message: TestPatternDocument_TestPatternData_SelectorProperty, + ): unknown { + const obj: any = {}; + if (message.value !== 0) { + obj.value = Math.round(message.value); + } + return obj; + }, + + create< + I extends Exact< + DeepPartial, + I + >, + >(base?: I): TestPatternDocument_TestPatternData_SelectorProperty { + return TestPatternDocument_TestPatternData_SelectorProperty.fromPartial( + base ?? ({} as any), + ); + }, + fromPartial< + I extends Exact< + DeepPartial, + I + >, + >(object: I): TestPatternDocument_TestPatternData_SelectorProperty { + const message = + createBaseTestPatternDocument_TestPatternData_SelectorProperty(); + message.value = object.value ?? 0; + return message; + }, +}; + +function createBaseTestPatternDocument_TestPatternData_Property(): TestPatternDocument_TestPatternData_Property { + return { + nameLocalizationKey: '', + colorProperty: undefined, + doubleProperty: undefined, + intProperty: undefined, + boolProperty: undefined, + stringProperty: undefined, + fontProperty: undefined, + selectorProperty: undefined, + }; +} + +export const TestPatternDocument_TestPatternData_Property = { + encode( + message: TestPatternDocument_TestPatternData_Property, + writer: _m0.Writer = _m0.Writer.create(), + ): _m0.Writer { + if (message.nameLocalizationKey !== '') { + writer.uint32(10).string(message.nameLocalizationKey); + } + if (message.colorProperty !== undefined) { + TestPatternDocument_TestPatternData_ColorProperty.encode( + message.colorProperty, + writer.uint32(18).fork(), + ).ldelim(); + } + if (message.doubleProperty !== undefined) { + TestPatternDocument_TestPatternData_DoubleProperty.encode( + message.doubleProperty, + writer.uint32(26).fork(), + ).ldelim(); + } + if (message.intProperty !== undefined) { + TestPatternDocument_TestPatternData_IntProperty.encode( + message.intProperty, + writer.uint32(34).fork(), + ).ldelim(); + } + if (message.boolProperty !== undefined) { + TestPatternDocument_TestPatternData_BoolProperty.encode( + message.boolProperty, + writer.uint32(42).fork(), + ).ldelim(); + } + if (message.stringProperty !== undefined) { + TestPatternDocument_TestPatternData_StringProperty.encode( + message.stringProperty, + writer.uint32(50).fork(), + ).ldelim(); + } + if (message.fontProperty !== undefined) { + TestPatternDocument_TestPatternData_FontProperty.encode( + message.fontProperty, + writer.uint32(58).fork(), + ).ldelim(); + } + if (message.selectorProperty !== undefined) { + TestPatternDocument_TestPatternData_SelectorProperty.encode( + message.selectorProperty, + writer.uint32(66).fork(), + ).ldelim(); + } + return writer; + }, + + decode( + input: _m0.Reader | Uint8Array, + length?: number, + ): TestPatternDocument_TestPatternData_Property { + const reader = + input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseTestPatternDocument_TestPatternData_Property(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } + + message.nameLocalizationKey = reader.string(); + continue; + case 2: + if (tag !== 18) { + break; + } + + message.colorProperty = + TestPatternDocument_TestPatternData_ColorProperty.decode( + reader, + reader.uint32(), + ); + continue; + case 3: + if (tag !== 26) { + break; + } + + message.doubleProperty = + TestPatternDocument_TestPatternData_DoubleProperty.decode( + reader, + reader.uint32(), + ); + continue; + case 4: + if (tag !== 34) { + break; + } + + message.intProperty = + TestPatternDocument_TestPatternData_IntProperty.decode( + reader, + reader.uint32(), + ); + continue; + case 5: + if (tag !== 42) { + break; + } + + message.boolProperty = + TestPatternDocument_TestPatternData_BoolProperty.decode( + reader, + reader.uint32(), + ); + continue; + case 6: + if (tag !== 50) { + break; + } + + message.stringProperty = + TestPatternDocument_TestPatternData_StringProperty.decode( + reader, + reader.uint32(), + ); + continue; + case 7: + if (tag !== 58) { + break; + } + + message.fontProperty = + TestPatternDocument_TestPatternData_FontProperty.decode( + reader, + reader.uint32(), + ); + continue; + case 8: + if (tag !== 66) { + break; + } + + message.selectorProperty = + TestPatternDocument_TestPatternData_SelectorProperty.decode( + reader, + reader.uint32(), + ); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(object: any): TestPatternDocument_TestPatternData_Property { + return { + nameLocalizationKey: isSet(object.nameLocalizationKey) + ? globalThis.String(object.nameLocalizationKey) + : '', + colorProperty: isSet(object.colorProperty) + ? TestPatternDocument_TestPatternData_ColorProperty.fromJSON( + object.colorProperty, + ) + : undefined, + doubleProperty: isSet(object.doubleProperty) + ? TestPatternDocument_TestPatternData_DoubleProperty.fromJSON( + object.doubleProperty, + ) + : undefined, + intProperty: isSet(object.intProperty) + ? TestPatternDocument_TestPatternData_IntProperty.fromJSON( + object.intProperty, + ) + : undefined, + boolProperty: isSet(object.boolProperty) + ? TestPatternDocument_TestPatternData_BoolProperty.fromJSON( + object.boolProperty, + ) + : undefined, + stringProperty: isSet(object.stringProperty) + ? TestPatternDocument_TestPatternData_StringProperty.fromJSON( + object.stringProperty, + ) + : undefined, + fontProperty: isSet(object.fontProperty) + ? TestPatternDocument_TestPatternData_FontProperty.fromJSON( + object.fontProperty, + ) + : undefined, + selectorProperty: isSet(object.selectorProperty) + ? TestPatternDocument_TestPatternData_SelectorProperty.fromJSON( + object.selectorProperty, + ) + : undefined, + }; + }, + + toJSON(message: TestPatternDocument_TestPatternData_Property): unknown { + const obj: any = {}; + if (message.nameLocalizationKey !== '') { + obj.nameLocalizationKey = message.nameLocalizationKey; + } + if (message.colorProperty !== undefined) { + obj.colorProperty = + TestPatternDocument_TestPatternData_ColorProperty.toJSON( + message.colorProperty, + ); + } + if (message.doubleProperty !== undefined) { + obj.doubleProperty = + TestPatternDocument_TestPatternData_DoubleProperty.toJSON( + message.doubleProperty, + ); + } + if (message.intProperty !== undefined) { + obj.intProperty = TestPatternDocument_TestPatternData_IntProperty.toJSON( + message.intProperty, + ); + } + if (message.boolProperty !== undefined) { + obj.boolProperty = + TestPatternDocument_TestPatternData_BoolProperty.toJSON( + message.boolProperty, + ); + } + if (message.stringProperty !== undefined) { + obj.stringProperty = + TestPatternDocument_TestPatternData_StringProperty.toJSON( + message.stringProperty, + ); + } + if (message.fontProperty !== undefined) { + obj.fontProperty = + TestPatternDocument_TestPatternData_FontProperty.toJSON( + message.fontProperty, + ); + } + if (message.selectorProperty !== undefined) { + obj.selectorProperty = + TestPatternDocument_TestPatternData_SelectorProperty.toJSON( + message.selectorProperty, + ); + } + return obj; + }, + + create< + I extends Exact< + DeepPartial, + I + >, + >(base?: I): TestPatternDocument_TestPatternData_Property { + return TestPatternDocument_TestPatternData_Property.fromPartial( + base ?? ({} as any), + ); + }, + fromPartial< + I extends Exact< + DeepPartial, + I + >, + >(object: I): TestPatternDocument_TestPatternData_Property { + const message = createBaseTestPatternDocument_TestPatternData_Property(); + message.nameLocalizationKey = object.nameLocalizationKey ?? ''; + message.colorProperty = + object.colorProperty !== undefined && object.colorProperty !== null + ? TestPatternDocument_TestPatternData_ColorProperty.fromPartial( + object.colorProperty, + ) + : undefined; + message.doubleProperty = + object.doubleProperty !== undefined && object.doubleProperty !== null + ? TestPatternDocument_TestPatternData_DoubleProperty.fromPartial( + object.doubleProperty, + ) + : undefined; + message.intProperty = + object.intProperty !== undefined && object.intProperty !== null + ? TestPatternDocument_TestPatternData_IntProperty.fromPartial( + object.intProperty, + ) + : undefined; + message.boolProperty = + object.boolProperty !== undefined && object.boolProperty !== null + ? TestPatternDocument_TestPatternData_BoolProperty.fromPartial( + object.boolProperty, + ) + : undefined; + message.stringProperty = + object.stringProperty !== undefined && object.stringProperty !== null + ? TestPatternDocument_TestPatternData_StringProperty.fromPartial( + object.stringProperty, + ) + : undefined; + message.fontProperty = + object.fontProperty !== undefined && object.fontProperty !== null + ? TestPatternDocument_TestPatternData_FontProperty.fromPartial( + object.fontProperty, + ) + : undefined; + message.selectorProperty = + object.selectorProperty !== undefined && object.selectorProperty !== null + ? TestPatternDocument_TestPatternData_SelectorProperty.fromPartial( + object.selectorProperty, + ) + : undefined; + return message; + }, +}; + type Builtin = | Date | Function diff --git a/proto/timedPlayback.proto b/proto/timedPlayback.proto new file mode 100755 index 0000000..d563250 --- /dev/null +++ b/proto/timedPlayback.proto @@ -0,0 +1,139 @@ +syntax = "proto3"; + +package rv.data; + +option cc_enable_arenas = true; +option csharp_namespace = "Pro.SerializationInterop.RVProtoData"; +option swift_prefix = "RVData_"; + +import "action.proto"; +import "cue.proto"; +import "presentation.proto"; +import "uuid.proto"; + +message TriggerSource { + message Library { + string path = 1; + string presentation_name = 2; + } + + message Playlist { + .rv.data.UUID identifier = 1; + .rv.data.UUID item_identifier = 2; + } + + oneof Location { + .rv.data.TriggerSource.Library library_location = 1; + .rv.data.TriggerSource.Playlist playlist_location = 2; + .rv.data.TriggerSource.Playlist media_playlist_location = 3; + .rv.data.TriggerSource.Playlist audio_playlist_location = 4; + } +} + +message TimedPlayback { + message Sequence { + message SequenceItem { + .rv.data.UUID identifier = 1; + double time = 2; + .rv.data.TriggerSource trigger_source = 3; + .rv.data.Action.ContentDestination content_destination = 4; + double end_time = 7; + oneof Item { + .rv.data.Cue cue = 5; + .rv.data.Action action = 6; + } + } + + repeated .rv.data.TimedPlayback.Sequence.SequenceItem sequence = 1; + .rv.data.Action.ContentDestination content_destination = 2; + .rv.data.Presentation presentation = 3; + } + + message Timing { + message LayerTransport { + int32 layer = 1; + } + + message SMPTETimecode { + enum Format { + FORMAT_24_FPS = 0; + FORMAT_25_FPS = 1; + FORMAT_29_97_FPS = 2; + FORMAT_30_FPS = 3; + } + + string device_identifier = 1; + int32 channel = 2; + .rv.data.TimedPlayback.Timing.SMPTETimecode.Format format = 3; + double offset = 4; + } + + message Internal { + double duration = 1; + bool should_loop = 2; + } + + oneof Source { + .rv.data.TimedPlayback.Timing.LayerTransport layer_transport = 1; + .rv.data.TimedPlayback.Timing.SMPTETimecode smpte_timecode = 2; + .rv.data.TimedPlayback.Timing.Internal internal = 3; + } + } + + message Update { + message Play { + } + + message Record { + bool is_recording = 1; + } + + message Pause { + } + + message Reset { + } + + message JumpToTime { + double time = 1; + } + + message StartScrub { + double time = 1; + } + + message EndScrub { + double time = 2; + } + + message Duration { + double duration = 1; + } + + message Loop { + bool loop = 1; + } + + message MonitorSource { + bool enable = 1; + } + + oneof ActionType { + .rv.data.TimedPlayback.Update.Play play = 1; + .rv.data.TimedPlayback.Update.Record record = 2; + .rv.data.TimedPlayback.Update.Pause pause = 3; + .rv.data.TimedPlayback.Update.Reset reset = 4; + .rv.data.TimedPlayback.Update.JumpToTime jump_to_time = 5; + .rv.data.TimedPlayback.Update.StartScrub start_scrub = 6; + .rv.data.TimedPlayback.Update.EndScrub end_scrub = 7; + .rv.data.TimedPlayback.Update.Duration duration = 8; + .rv.data.TimedPlayback.Update.Loop loop = 9; + .rv.data.TimedPlayback.Sequence update_sequence = 10; + .rv.data.TimedPlayback.Update.MonitorSource monitor_source = 11; + } + } + + .rv.data.TimedPlayback.Sequence sequence = 1; + .rv.data.TimedPlayback.Timing timing = 2; +} + diff --git a/proto/timedPlayback.ts b/proto/timedPlayback.ts new file mode 100644 index 0000000..a1bab80 --- /dev/null +++ b/proto/timedPlayback.ts @@ -0,0 +1,1939 @@ +/* eslint-disable */ +import _m0 from "protobufjs/minimal"; +import { + Action, + Action_ContentDestination, + action_ContentDestinationFromJSON, + action_ContentDestinationToJSON, +} from "./action"; +import { Cue } from "./cue"; +import { Presentation } from "./presentation"; +import { UUID } from "./uuid"; + +export const protobufPackage = "rv.data"; + +export interface TriggerSource { + libraryLocation?: TriggerSource_Library | undefined; + playlistLocation?: TriggerSource_Playlist | undefined; + mediaPlaylistLocation?: TriggerSource_Playlist | undefined; + audioPlaylistLocation?: TriggerSource_Playlist | undefined; +} + +export interface TriggerSource_Library { + path: string; + presentationName: string; +} + +export interface TriggerSource_Playlist { + identifier: UUID | undefined; + itemIdentifier: UUID | undefined; +} + +export interface TimedPlayback { + sequence: TimedPlayback_Sequence | undefined; + timing: TimedPlayback_Timing | undefined; +} + +export interface TimedPlayback_Sequence { + sequence: TimedPlayback_Sequence_SequenceItem[]; + contentDestination: Action_ContentDestination; + presentation: Presentation | undefined; +} + +export interface TimedPlayback_Sequence_SequenceItem { + identifier: UUID | undefined; + time: number; + triggerSource: TriggerSource | undefined; + contentDestination: Action_ContentDestination; + endTime: number; + cue?: Cue | undefined; + action?: Action | undefined; +} + +export interface TimedPlayback_Timing { + layerTransport?: TimedPlayback_Timing_LayerTransport | undefined; + smpteTimecode?: TimedPlayback_Timing_SMPTETimecode | undefined; + internal?: TimedPlayback_Timing_Internal | undefined; +} + +export interface TimedPlayback_Timing_LayerTransport { + layer: number; +} + +export interface TimedPlayback_Timing_SMPTETimecode { + deviceIdentifier: string; + channel: number; + format: TimedPlayback_Timing_SMPTETimecode_Format; + offset: number; +} + +export enum TimedPlayback_Timing_SMPTETimecode_Format { + FORMAT_24_FPS = 0, + FORMAT_25_FPS = 1, + FORMAT_29_97_FPS = 2, + FORMAT_30_FPS = 3, + UNRECOGNIZED = -1, +} + +export function timedPlayback_Timing_SMPTETimecode_FormatFromJSON( + object: any, +): TimedPlayback_Timing_SMPTETimecode_Format { + switch (object) { + case 0: + case "FORMAT_24_FPS": + return TimedPlayback_Timing_SMPTETimecode_Format.FORMAT_24_FPS; + case 1: + case "FORMAT_25_FPS": + return TimedPlayback_Timing_SMPTETimecode_Format.FORMAT_25_FPS; + case 2: + case "FORMAT_29_97_FPS": + return TimedPlayback_Timing_SMPTETimecode_Format.FORMAT_29_97_FPS; + case 3: + case "FORMAT_30_FPS": + return TimedPlayback_Timing_SMPTETimecode_Format.FORMAT_30_FPS; + case -1: + case "UNRECOGNIZED": + default: + return TimedPlayback_Timing_SMPTETimecode_Format.UNRECOGNIZED; + } +} + +export function timedPlayback_Timing_SMPTETimecode_FormatToJSON( + object: TimedPlayback_Timing_SMPTETimecode_Format, +): string { + switch (object) { + case TimedPlayback_Timing_SMPTETimecode_Format.FORMAT_24_FPS: + return "FORMAT_24_FPS"; + case TimedPlayback_Timing_SMPTETimecode_Format.FORMAT_25_FPS: + return "FORMAT_25_FPS"; + case TimedPlayback_Timing_SMPTETimecode_Format.FORMAT_29_97_FPS: + return "FORMAT_29_97_FPS"; + case TimedPlayback_Timing_SMPTETimecode_Format.FORMAT_30_FPS: + return "FORMAT_30_FPS"; + case TimedPlayback_Timing_SMPTETimecode_Format.UNRECOGNIZED: + default: + return "UNRECOGNIZED"; + } +} + +export interface TimedPlayback_Timing_Internal { + duration: number; + shouldLoop: boolean; +} + +export interface TimedPlayback_Update { + play?: TimedPlayback_Update_Play | undefined; + record?: TimedPlayback_Update_Record | undefined; + pause?: TimedPlayback_Update_Pause | undefined; + reset?: TimedPlayback_Update_Reset | undefined; + jumpToTime?: TimedPlayback_Update_JumpToTime | undefined; + startScrub?: TimedPlayback_Update_StartScrub | undefined; + endScrub?: TimedPlayback_Update_EndScrub | undefined; + duration?: TimedPlayback_Update_Duration | undefined; + loop?: TimedPlayback_Update_Loop | undefined; + updateSequence?: TimedPlayback_Sequence | undefined; + monitorSource?: TimedPlayback_Update_MonitorSource | undefined; +} + +export interface TimedPlayback_Update_Play { +} + +export interface TimedPlayback_Update_Record { + isRecording: boolean; +} + +export interface TimedPlayback_Update_Pause { +} + +export interface TimedPlayback_Update_Reset { +} + +export interface TimedPlayback_Update_JumpToTime { + time: number; +} + +export interface TimedPlayback_Update_StartScrub { + time: number; +} + +export interface TimedPlayback_Update_EndScrub { + time: number; +} + +export interface TimedPlayback_Update_Duration { + duration: number; +} + +export interface TimedPlayback_Update_Loop { + loop: boolean; +} + +export interface TimedPlayback_Update_MonitorSource { + enable: boolean; +} + +function createBaseTriggerSource(): TriggerSource { + return { + libraryLocation: undefined, + playlistLocation: undefined, + mediaPlaylistLocation: undefined, + audioPlaylistLocation: undefined, + }; +} + +export const TriggerSource = { + encode(message: TriggerSource, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.libraryLocation !== undefined) { + TriggerSource_Library.encode(message.libraryLocation, writer.uint32(10).fork()).ldelim(); + } + if (message.playlistLocation !== undefined) { + TriggerSource_Playlist.encode(message.playlistLocation, writer.uint32(18).fork()).ldelim(); + } + if (message.mediaPlaylistLocation !== undefined) { + TriggerSource_Playlist.encode(message.mediaPlaylistLocation, writer.uint32(26).fork()).ldelim(); + } + if (message.audioPlaylistLocation !== undefined) { + TriggerSource_Playlist.encode(message.audioPlaylistLocation, writer.uint32(34).fork()).ldelim(); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): TriggerSource { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseTriggerSource(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } + + message.libraryLocation = TriggerSource_Library.decode(reader, reader.uint32()); + continue; + case 2: + if (tag !== 18) { + break; + } + + message.playlistLocation = TriggerSource_Playlist.decode(reader, reader.uint32()); + continue; + case 3: + if (tag !== 26) { + break; + } + + message.mediaPlaylistLocation = TriggerSource_Playlist.decode(reader, reader.uint32()); + continue; + case 4: + if (tag !== 34) { + break; + } + + message.audioPlaylistLocation = TriggerSource_Playlist.decode(reader, reader.uint32()); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(object: any): TriggerSource { + return { + libraryLocation: isSet(object.libraryLocation) + ? TriggerSource_Library.fromJSON(object.libraryLocation) + : undefined, + playlistLocation: isSet(object.playlistLocation) + ? TriggerSource_Playlist.fromJSON(object.playlistLocation) + : undefined, + mediaPlaylistLocation: isSet(object.mediaPlaylistLocation) + ? TriggerSource_Playlist.fromJSON(object.mediaPlaylistLocation) + : undefined, + audioPlaylistLocation: isSet(object.audioPlaylistLocation) + ? TriggerSource_Playlist.fromJSON(object.audioPlaylistLocation) + : undefined, + }; + }, + + toJSON(message: TriggerSource): unknown { + const obj: any = {}; + if (message.libraryLocation !== undefined) { + obj.libraryLocation = TriggerSource_Library.toJSON(message.libraryLocation); + } + if (message.playlistLocation !== undefined) { + obj.playlistLocation = TriggerSource_Playlist.toJSON(message.playlistLocation); + } + if (message.mediaPlaylistLocation !== undefined) { + obj.mediaPlaylistLocation = TriggerSource_Playlist.toJSON(message.mediaPlaylistLocation); + } + if (message.audioPlaylistLocation !== undefined) { + obj.audioPlaylistLocation = TriggerSource_Playlist.toJSON(message.audioPlaylistLocation); + } + return obj; + }, + + create, I>>(base?: I): TriggerSource { + return TriggerSource.fromPartial(base ?? ({} as any)); + }, + fromPartial, I>>(object: I): TriggerSource { + const message = createBaseTriggerSource(); + message.libraryLocation = (object.libraryLocation !== undefined && object.libraryLocation !== null) + ? TriggerSource_Library.fromPartial(object.libraryLocation) + : undefined; + message.playlistLocation = (object.playlistLocation !== undefined && object.playlistLocation !== null) + ? TriggerSource_Playlist.fromPartial(object.playlistLocation) + : undefined; + message.mediaPlaylistLocation = + (object.mediaPlaylistLocation !== undefined && object.mediaPlaylistLocation !== null) + ? TriggerSource_Playlist.fromPartial(object.mediaPlaylistLocation) + : undefined; + message.audioPlaylistLocation = + (object.audioPlaylistLocation !== undefined && object.audioPlaylistLocation !== null) + ? TriggerSource_Playlist.fromPartial(object.audioPlaylistLocation) + : undefined; + return message; + }, +}; + +function createBaseTriggerSource_Library(): TriggerSource_Library { + return { path: "", presentationName: "" }; +} + +export const TriggerSource_Library = { + encode(message: TriggerSource_Library, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.path !== "") { + writer.uint32(10).string(message.path); + } + if (message.presentationName !== "") { + writer.uint32(18).string(message.presentationName); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): TriggerSource_Library { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseTriggerSource_Library(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } + + message.path = reader.string(); + continue; + case 2: + if (tag !== 18) { + break; + } + + message.presentationName = reader.string(); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(object: any): TriggerSource_Library { + return { + path: isSet(object.path) ? globalThis.String(object.path) : "", + presentationName: isSet(object.presentationName) ? globalThis.String(object.presentationName) : "", + }; + }, + + toJSON(message: TriggerSource_Library): unknown { + const obj: any = {}; + if (message.path !== "") { + obj.path = message.path; + } + if (message.presentationName !== "") { + obj.presentationName = message.presentationName; + } + return obj; + }, + + create, I>>(base?: I): TriggerSource_Library { + return TriggerSource_Library.fromPartial(base ?? ({} as any)); + }, + fromPartial, I>>(object: I): TriggerSource_Library { + const message = createBaseTriggerSource_Library(); + message.path = object.path ?? ""; + message.presentationName = object.presentationName ?? ""; + return message; + }, +}; + +function createBaseTriggerSource_Playlist(): TriggerSource_Playlist { + return { identifier: undefined, itemIdentifier: undefined }; +} + +export const TriggerSource_Playlist = { + encode(message: TriggerSource_Playlist, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.identifier !== undefined) { + UUID.encode(message.identifier, writer.uint32(10).fork()).ldelim(); + } + if (message.itemIdentifier !== undefined) { + UUID.encode(message.itemIdentifier, writer.uint32(18).fork()).ldelim(); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): TriggerSource_Playlist { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseTriggerSource_Playlist(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } + + message.identifier = UUID.decode(reader, reader.uint32()); + continue; + case 2: + if (tag !== 18) { + break; + } + + message.itemIdentifier = UUID.decode(reader, reader.uint32()); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(object: any): TriggerSource_Playlist { + return { + identifier: isSet(object.identifier) ? UUID.fromJSON(object.identifier) : undefined, + itemIdentifier: isSet(object.itemIdentifier) ? UUID.fromJSON(object.itemIdentifier) : undefined, + }; + }, + + toJSON(message: TriggerSource_Playlist): unknown { + const obj: any = {}; + if (message.identifier !== undefined) { + obj.identifier = UUID.toJSON(message.identifier); + } + if (message.itemIdentifier !== undefined) { + obj.itemIdentifier = UUID.toJSON(message.itemIdentifier); + } + return obj; + }, + + create, I>>(base?: I): TriggerSource_Playlist { + return TriggerSource_Playlist.fromPartial(base ?? ({} as any)); + }, + fromPartial, I>>(object: I): TriggerSource_Playlist { + const message = createBaseTriggerSource_Playlist(); + message.identifier = (object.identifier !== undefined && object.identifier !== null) + ? UUID.fromPartial(object.identifier) + : undefined; + message.itemIdentifier = (object.itemIdentifier !== undefined && object.itemIdentifier !== null) + ? UUID.fromPartial(object.itemIdentifier) + : undefined; + return message; + }, +}; + +function createBaseTimedPlayback(): TimedPlayback { + return { sequence: undefined, timing: undefined }; +} + +export const TimedPlayback = { + encode(message: TimedPlayback, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.sequence !== undefined) { + TimedPlayback_Sequence.encode(message.sequence, writer.uint32(10).fork()).ldelim(); + } + if (message.timing !== undefined) { + TimedPlayback_Timing.encode(message.timing, writer.uint32(18).fork()).ldelim(); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): TimedPlayback { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseTimedPlayback(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } + + message.sequence = TimedPlayback_Sequence.decode(reader, reader.uint32()); + continue; + case 2: + if (tag !== 18) { + break; + } + + message.timing = TimedPlayback_Timing.decode(reader, reader.uint32()); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(object: any): TimedPlayback { + return { + sequence: isSet(object.sequence) ? TimedPlayback_Sequence.fromJSON(object.sequence) : undefined, + timing: isSet(object.timing) ? TimedPlayback_Timing.fromJSON(object.timing) : undefined, + }; + }, + + toJSON(message: TimedPlayback): unknown { + const obj: any = {}; + if (message.sequence !== undefined) { + obj.sequence = TimedPlayback_Sequence.toJSON(message.sequence); + } + if (message.timing !== undefined) { + obj.timing = TimedPlayback_Timing.toJSON(message.timing); + } + return obj; + }, + + create, I>>(base?: I): TimedPlayback { + return TimedPlayback.fromPartial(base ?? ({} as any)); + }, + fromPartial, I>>(object: I): TimedPlayback { + const message = createBaseTimedPlayback(); + message.sequence = (object.sequence !== undefined && object.sequence !== null) + ? TimedPlayback_Sequence.fromPartial(object.sequence) + : undefined; + message.timing = (object.timing !== undefined && object.timing !== null) + ? TimedPlayback_Timing.fromPartial(object.timing) + : undefined; + return message; + }, +}; + +function createBaseTimedPlayback_Sequence(): TimedPlayback_Sequence { + return { sequence: [], contentDestination: 0, presentation: undefined }; +} + +export const TimedPlayback_Sequence = { + encode(message: TimedPlayback_Sequence, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + for (const v of message.sequence) { + TimedPlayback_Sequence_SequenceItem.encode(v!, writer.uint32(10).fork()).ldelim(); + } + if (message.contentDestination !== 0) { + writer.uint32(16).int32(message.contentDestination); + } + if (message.presentation !== undefined) { + Presentation.encode(message.presentation, writer.uint32(26).fork()).ldelim(); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): TimedPlayback_Sequence { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseTimedPlayback_Sequence(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } + + message.sequence.push(TimedPlayback_Sequence_SequenceItem.decode(reader, reader.uint32())); + continue; + case 2: + if (tag !== 16) { + break; + } + + message.contentDestination = reader.int32() as any; + continue; + case 3: + if (tag !== 26) { + break; + } + + message.presentation = Presentation.decode(reader, reader.uint32()); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(object: any): TimedPlayback_Sequence { + return { + sequence: globalThis.Array.isArray(object?.sequence) + ? object.sequence.map((e: any) => TimedPlayback_Sequence_SequenceItem.fromJSON(e)) + : [], + contentDestination: isSet(object.contentDestination) + ? action_ContentDestinationFromJSON(object.contentDestination) + : 0, + presentation: isSet(object.presentation) ? Presentation.fromJSON(object.presentation) : undefined, + }; + }, + + toJSON(message: TimedPlayback_Sequence): unknown { + const obj: any = {}; + if (message.sequence?.length) { + obj.sequence = message.sequence.map((e) => TimedPlayback_Sequence_SequenceItem.toJSON(e)); + } + if (message.contentDestination !== 0) { + obj.contentDestination = action_ContentDestinationToJSON(message.contentDestination); + } + if (message.presentation !== undefined) { + obj.presentation = Presentation.toJSON(message.presentation); + } + return obj; + }, + + create, I>>(base?: I): TimedPlayback_Sequence { + return TimedPlayback_Sequence.fromPartial(base ?? ({} as any)); + }, + fromPartial, I>>(object: I): TimedPlayback_Sequence { + const message = createBaseTimedPlayback_Sequence(); + message.sequence = object.sequence?.map((e) => TimedPlayback_Sequence_SequenceItem.fromPartial(e)) || []; + message.contentDestination = object.contentDestination ?? 0; + message.presentation = (object.presentation !== undefined && object.presentation !== null) + ? Presentation.fromPartial(object.presentation) + : undefined; + return message; + }, +}; + +function createBaseTimedPlayback_Sequence_SequenceItem(): TimedPlayback_Sequence_SequenceItem { + return { + identifier: undefined, + time: 0, + triggerSource: undefined, + contentDestination: 0, + endTime: 0, + cue: undefined, + action: undefined, + }; +} + +export const TimedPlayback_Sequence_SequenceItem = { + encode(message: TimedPlayback_Sequence_SequenceItem, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.identifier !== undefined) { + UUID.encode(message.identifier, writer.uint32(10).fork()).ldelim(); + } + if (message.time !== 0) { + writer.uint32(17).double(message.time); + } + if (message.triggerSource !== undefined) { + TriggerSource.encode(message.triggerSource, writer.uint32(26).fork()).ldelim(); + } + if (message.contentDestination !== 0) { + writer.uint32(32).int32(message.contentDestination); + } + if (message.endTime !== 0) { + writer.uint32(57).double(message.endTime); + } + if (message.cue !== undefined) { + Cue.encode(message.cue, writer.uint32(42).fork()).ldelim(); + } + if (message.action !== undefined) { + Action.encode(message.action, writer.uint32(50).fork()).ldelim(); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): TimedPlayback_Sequence_SequenceItem { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseTimedPlayback_Sequence_SequenceItem(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } + + message.identifier = UUID.decode(reader, reader.uint32()); + continue; + case 2: + if (tag !== 17) { + break; + } + + message.time = reader.double(); + continue; + case 3: + if (tag !== 26) { + break; + } + + message.triggerSource = TriggerSource.decode(reader, reader.uint32()); + continue; + case 4: + if (tag !== 32) { + break; + } + + message.contentDestination = reader.int32() as any; + continue; + case 7: + if (tag !== 57) { + break; + } + + message.endTime = reader.double(); + continue; + case 5: + if (tag !== 42) { + break; + } + + message.cue = Cue.decode(reader, reader.uint32()); + continue; + case 6: + if (tag !== 50) { + break; + } + + message.action = Action.decode(reader, reader.uint32()); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(object: any): TimedPlayback_Sequence_SequenceItem { + return { + identifier: isSet(object.identifier) ? UUID.fromJSON(object.identifier) : undefined, + time: isSet(object.time) ? globalThis.Number(object.time) : 0, + triggerSource: isSet(object.triggerSource) ? TriggerSource.fromJSON(object.triggerSource) : undefined, + contentDestination: isSet(object.contentDestination) + ? action_ContentDestinationFromJSON(object.contentDestination) + : 0, + endTime: isSet(object.endTime) ? globalThis.Number(object.endTime) : 0, + cue: isSet(object.cue) ? Cue.fromJSON(object.cue) : undefined, + action: isSet(object.action) ? Action.fromJSON(object.action) : undefined, + }; + }, + + toJSON(message: TimedPlayback_Sequence_SequenceItem): unknown { + const obj: any = {}; + if (message.identifier !== undefined) { + obj.identifier = UUID.toJSON(message.identifier); + } + if (message.time !== 0) { + obj.time = message.time; + } + if (message.triggerSource !== undefined) { + obj.triggerSource = TriggerSource.toJSON(message.triggerSource); + } + if (message.contentDestination !== 0) { + obj.contentDestination = action_ContentDestinationToJSON(message.contentDestination); + } + if (message.endTime !== 0) { + obj.endTime = message.endTime; + } + if (message.cue !== undefined) { + obj.cue = Cue.toJSON(message.cue); + } + if (message.action !== undefined) { + obj.action = Action.toJSON(message.action); + } + return obj; + }, + + create, I>>( + base?: I, + ): TimedPlayback_Sequence_SequenceItem { + return TimedPlayback_Sequence_SequenceItem.fromPartial(base ?? ({} as any)); + }, + fromPartial, I>>( + object: I, + ): TimedPlayback_Sequence_SequenceItem { + const message = createBaseTimedPlayback_Sequence_SequenceItem(); + message.identifier = (object.identifier !== undefined && object.identifier !== null) + ? UUID.fromPartial(object.identifier) + : undefined; + message.time = object.time ?? 0; + message.triggerSource = (object.triggerSource !== undefined && object.triggerSource !== null) + ? TriggerSource.fromPartial(object.triggerSource) + : undefined; + message.contentDestination = object.contentDestination ?? 0; + message.endTime = object.endTime ?? 0; + message.cue = (object.cue !== undefined && object.cue !== null) ? Cue.fromPartial(object.cue) : undefined; + message.action = (object.action !== undefined && object.action !== null) + ? Action.fromPartial(object.action) + : undefined; + return message; + }, +}; + +function createBaseTimedPlayback_Timing(): TimedPlayback_Timing { + return { layerTransport: undefined, smpteTimecode: undefined, internal: undefined }; +} + +export const TimedPlayback_Timing = { + encode(message: TimedPlayback_Timing, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.layerTransport !== undefined) { + TimedPlayback_Timing_LayerTransport.encode(message.layerTransport, writer.uint32(10).fork()).ldelim(); + } + if (message.smpteTimecode !== undefined) { + TimedPlayback_Timing_SMPTETimecode.encode(message.smpteTimecode, writer.uint32(18).fork()).ldelim(); + } + if (message.internal !== undefined) { + TimedPlayback_Timing_Internal.encode(message.internal, writer.uint32(26).fork()).ldelim(); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): TimedPlayback_Timing { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseTimedPlayback_Timing(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } + + message.layerTransport = TimedPlayback_Timing_LayerTransport.decode(reader, reader.uint32()); + continue; + case 2: + if (tag !== 18) { + break; + } + + message.smpteTimecode = TimedPlayback_Timing_SMPTETimecode.decode(reader, reader.uint32()); + continue; + case 3: + if (tag !== 26) { + break; + } + + message.internal = TimedPlayback_Timing_Internal.decode(reader, reader.uint32()); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(object: any): TimedPlayback_Timing { + return { + layerTransport: isSet(object.layerTransport) + ? TimedPlayback_Timing_LayerTransport.fromJSON(object.layerTransport) + : undefined, + smpteTimecode: isSet(object.smpteTimecode) + ? TimedPlayback_Timing_SMPTETimecode.fromJSON(object.smpteTimecode) + : undefined, + internal: isSet(object.internal) ? TimedPlayback_Timing_Internal.fromJSON(object.internal) : undefined, + }; + }, + + toJSON(message: TimedPlayback_Timing): unknown { + const obj: any = {}; + if (message.layerTransport !== undefined) { + obj.layerTransport = TimedPlayback_Timing_LayerTransport.toJSON(message.layerTransport); + } + if (message.smpteTimecode !== undefined) { + obj.smpteTimecode = TimedPlayback_Timing_SMPTETimecode.toJSON(message.smpteTimecode); + } + if (message.internal !== undefined) { + obj.internal = TimedPlayback_Timing_Internal.toJSON(message.internal); + } + return obj; + }, + + create, I>>(base?: I): TimedPlayback_Timing { + return TimedPlayback_Timing.fromPartial(base ?? ({} as any)); + }, + fromPartial, I>>(object: I): TimedPlayback_Timing { + const message = createBaseTimedPlayback_Timing(); + message.layerTransport = (object.layerTransport !== undefined && object.layerTransport !== null) + ? TimedPlayback_Timing_LayerTransport.fromPartial(object.layerTransport) + : undefined; + message.smpteTimecode = (object.smpteTimecode !== undefined && object.smpteTimecode !== null) + ? TimedPlayback_Timing_SMPTETimecode.fromPartial(object.smpteTimecode) + : undefined; + message.internal = (object.internal !== undefined && object.internal !== null) + ? TimedPlayback_Timing_Internal.fromPartial(object.internal) + : undefined; + return message; + }, +}; + +function createBaseTimedPlayback_Timing_LayerTransport(): TimedPlayback_Timing_LayerTransport { + return { layer: 0 }; +} + +export const TimedPlayback_Timing_LayerTransport = { + encode(message: TimedPlayback_Timing_LayerTransport, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.layer !== 0) { + writer.uint32(8).int32(message.layer); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): TimedPlayback_Timing_LayerTransport { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseTimedPlayback_Timing_LayerTransport(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 8) { + break; + } + + message.layer = reader.int32(); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(object: any): TimedPlayback_Timing_LayerTransport { + return { layer: isSet(object.layer) ? globalThis.Number(object.layer) : 0 }; + }, + + toJSON(message: TimedPlayback_Timing_LayerTransport): unknown { + const obj: any = {}; + if (message.layer !== 0) { + obj.layer = Math.round(message.layer); + } + return obj; + }, + + create, I>>( + base?: I, + ): TimedPlayback_Timing_LayerTransport { + return TimedPlayback_Timing_LayerTransport.fromPartial(base ?? ({} as any)); + }, + fromPartial, I>>( + object: I, + ): TimedPlayback_Timing_LayerTransport { + const message = createBaseTimedPlayback_Timing_LayerTransport(); + message.layer = object.layer ?? 0; + return message; + }, +}; + +function createBaseTimedPlayback_Timing_SMPTETimecode(): TimedPlayback_Timing_SMPTETimecode { + return { deviceIdentifier: "", channel: 0, format: 0, offset: 0 }; +} + +export const TimedPlayback_Timing_SMPTETimecode = { + encode(message: TimedPlayback_Timing_SMPTETimecode, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.deviceIdentifier !== "") { + writer.uint32(10).string(message.deviceIdentifier); + } + if (message.channel !== 0) { + writer.uint32(16).int32(message.channel); + } + if (message.format !== 0) { + writer.uint32(24).int32(message.format); + } + if (message.offset !== 0) { + writer.uint32(33).double(message.offset); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): TimedPlayback_Timing_SMPTETimecode { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseTimedPlayback_Timing_SMPTETimecode(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } + + message.deviceIdentifier = reader.string(); + continue; + case 2: + if (tag !== 16) { + break; + } + + message.channel = reader.int32(); + continue; + case 3: + if (tag !== 24) { + break; + } + + message.format = reader.int32() as any; + continue; + case 4: + if (tag !== 33) { + break; + } + + message.offset = reader.double(); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(object: any): TimedPlayback_Timing_SMPTETimecode { + return { + deviceIdentifier: isSet(object.deviceIdentifier) ? globalThis.String(object.deviceIdentifier) : "", + channel: isSet(object.channel) ? globalThis.Number(object.channel) : 0, + format: isSet(object.format) ? timedPlayback_Timing_SMPTETimecode_FormatFromJSON(object.format) : 0, + offset: isSet(object.offset) ? globalThis.Number(object.offset) : 0, + }; + }, + + toJSON(message: TimedPlayback_Timing_SMPTETimecode): unknown { + const obj: any = {}; + if (message.deviceIdentifier !== "") { + obj.deviceIdentifier = message.deviceIdentifier; + } + if (message.channel !== 0) { + obj.channel = Math.round(message.channel); + } + if (message.format !== 0) { + obj.format = timedPlayback_Timing_SMPTETimecode_FormatToJSON(message.format); + } + if (message.offset !== 0) { + obj.offset = message.offset; + } + return obj; + }, + + create, I>>( + base?: I, + ): TimedPlayback_Timing_SMPTETimecode { + return TimedPlayback_Timing_SMPTETimecode.fromPartial(base ?? ({} as any)); + }, + fromPartial, I>>( + object: I, + ): TimedPlayback_Timing_SMPTETimecode { + const message = createBaseTimedPlayback_Timing_SMPTETimecode(); + message.deviceIdentifier = object.deviceIdentifier ?? ""; + message.channel = object.channel ?? 0; + message.format = object.format ?? 0; + message.offset = object.offset ?? 0; + return message; + }, +}; + +function createBaseTimedPlayback_Timing_Internal(): TimedPlayback_Timing_Internal { + return { duration: 0, shouldLoop: false }; +} + +export const TimedPlayback_Timing_Internal = { + encode(message: TimedPlayback_Timing_Internal, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.duration !== 0) { + writer.uint32(9).double(message.duration); + } + if (message.shouldLoop !== false) { + writer.uint32(16).bool(message.shouldLoop); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): TimedPlayback_Timing_Internal { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseTimedPlayback_Timing_Internal(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 9) { + break; + } + + message.duration = reader.double(); + continue; + case 2: + if (tag !== 16) { + break; + } + + message.shouldLoop = reader.bool(); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(object: any): TimedPlayback_Timing_Internal { + return { + duration: isSet(object.duration) ? globalThis.Number(object.duration) : 0, + shouldLoop: isSet(object.shouldLoop) ? globalThis.Boolean(object.shouldLoop) : false, + }; + }, + + toJSON(message: TimedPlayback_Timing_Internal): unknown { + const obj: any = {}; + if (message.duration !== 0) { + obj.duration = message.duration; + } + if (message.shouldLoop !== false) { + obj.shouldLoop = message.shouldLoop; + } + return obj; + }, + + create, I>>(base?: I): TimedPlayback_Timing_Internal { + return TimedPlayback_Timing_Internal.fromPartial(base ?? ({} as any)); + }, + fromPartial, I>>( + object: I, + ): TimedPlayback_Timing_Internal { + const message = createBaseTimedPlayback_Timing_Internal(); + message.duration = object.duration ?? 0; + message.shouldLoop = object.shouldLoop ?? false; + return message; + }, +}; + +function createBaseTimedPlayback_Update(): TimedPlayback_Update { + return { + play: undefined, + record: undefined, + pause: undefined, + reset: undefined, + jumpToTime: undefined, + startScrub: undefined, + endScrub: undefined, + duration: undefined, + loop: undefined, + updateSequence: undefined, + monitorSource: undefined, + }; +} + +export const TimedPlayback_Update = { + encode(message: TimedPlayback_Update, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.play !== undefined) { + TimedPlayback_Update_Play.encode(message.play, writer.uint32(10).fork()).ldelim(); + } + if (message.record !== undefined) { + TimedPlayback_Update_Record.encode(message.record, writer.uint32(18).fork()).ldelim(); + } + if (message.pause !== undefined) { + TimedPlayback_Update_Pause.encode(message.pause, writer.uint32(26).fork()).ldelim(); + } + if (message.reset !== undefined) { + TimedPlayback_Update_Reset.encode(message.reset, writer.uint32(34).fork()).ldelim(); + } + if (message.jumpToTime !== undefined) { + TimedPlayback_Update_JumpToTime.encode(message.jumpToTime, writer.uint32(42).fork()).ldelim(); + } + if (message.startScrub !== undefined) { + TimedPlayback_Update_StartScrub.encode(message.startScrub, writer.uint32(50).fork()).ldelim(); + } + if (message.endScrub !== undefined) { + TimedPlayback_Update_EndScrub.encode(message.endScrub, writer.uint32(58).fork()).ldelim(); + } + if (message.duration !== undefined) { + TimedPlayback_Update_Duration.encode(message.duration, writer.uint32(66).fork()).ldelim(); + } + if (message.loop !== undefined) { + TimedPlayback_Update_Loop.encode(message.loop, writer.uint32(74).fork()).ldelim(); + } + if (message.updateSequence !== undefined) { + TimedPlayback_Sequence.encode(message.updateSequence, writer.uint32(82).fork()).ldelim(); + } + if (message.monitorSource !== undefined) { + TimedPlayback_Update_MonitorSource.encode(message.monitorSource, writer.uint32(90).fork()).ldelim(); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): TimedPlayback_Update { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseTimedPlayback_Update(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } + + message.play = TimedPlayback_Update_Play.decode(reader, reader.uint32()); + continue; + case 2: + if (tag !== 18) { + break; + } + + message.record = TimedPlayback_Update_Record.decode(reader, reader.uint32()); + continue; + case 3: + if (tag !== 26) { + break; + } + + message.pause = TimedPlayback_Update_Pause.decode(reader, reader.uint32()); + continue; + case 4: + if (tag !== 34) { + break; + } + + message.reset = TimedPlayback_Update_Reset.decode(reader, reader.uint32()); + continue; + case 5: + if (tag !== 42) { + break; + } + + message.jumpToTime = TimedPlayback_Update_JumpToTime.decode(reader, reader.uint32()); + continue; + case 6: + if (tag !== 50) { + break; + } + + message.startScrub = TimedPlayback_Update_StartScrub.decode(reader, reader.uint32()); + continue; + case 7: + if (tag !== 58) { + break; + } + + message.endScrub = TimedPlayback_Update_EndScrub.decode(reader, reader.uint32()); + continue; + case 8: + if (tag !== 66) { + break; + } + + message.duration = TimedPlayback_Update_Duration.decode(reader, reader.uint32()); + continue; + case 9: + if (tag !== 74) { + break; + } + + message.loop = TimedPlayback_Update_Loop.decode(reader, reader.uint32()); + continue; + case 10: + if (tag !== 82) { + break; + } + + message.updateSequence = TimedPlayback_Sequence.decode(reader, reader.uint32()); + continue; + case 11: + if (tag !== 90) { + break; + } + + message.monitorSource = TimedPlayback_Update_MonitorSource.decode(reader, reader.uint32()); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(object: any): TimedPlayback_Update { + return { + play: isSet(object.play) ? TimedPlayback_Update_Play.fromJSON(object.play) : undefined, + record: isSet(object.record) ? TimedPlayback_Update_Record.fromJSON(object.record) : undefined, + pause: isSet(object.pause) ? TimedPlayback_Update_Pause.fromJSON(object.pause) : undefined, + reset: isSet(object.reset) ? TimedPlayback_Update_Reset.fromJSON(object.reset) : undefined, + jumpToTime: isSet(object.jumpToTime) ? TimedPlayback_Update_JumpToTime.fromJSON(object.jumpToTime) : undefined, + startScrub: isSet(object.startScrub) ? TimedPlayback_Update_StartScrub.fromJSON(object.startScrub) : undefined, + endScrub: isSet(object.endScrub) ? TimedPlayback_Update_EndScrub.fromJSON(object.endScrub) : undefined, + duration: isSet(object.duration) ? TimedPlayback_Update_Duration.fromJSON(object.duration) : undefined, + loop: isSet(object.loop) ? TimedPlayback_Update_Loop.fromJSON(object.loop) : undefined, + updateSequence: isSet(object.updateSequence) ? TimedPlayback_Sequence.fromJSON(object.updateSequence) : undefined, + monitorSource: isSet(object.monitorSource) + ? TimedPlayback_Update_MonitorSource.fromJSON(object.monitorSource) + : undefined, + }; + }, + + toJSON(message: TimedPlayback_Update): unknown { + const obj: any = {}; + if (message.play !== undefined) { + obj.play = TimedPlayback_Update_Play.toJSON(message.play); + } + if (message.record !== undefined) { + obj.record = TimedPlayback_Update_Record.toJSON(message.record); + } + if (message.pause !== undefined) { + obj.pause = TimedPlayback_Update_Pause.toJSON(message.pause); + } + if (message.reset !== undefined) { + obj.reset = TimedPlayback_Update_Reset.toJSON(message.reset); + } + if (message.jumpToTime !== undefined) { + obj.jumpToTime = TimedPlayback_Update_JumpToTime.toJSON(message.jumpToTime); + } + if (message.startScrub !== undefined) { + obj.startScrub = TimedPlayback_Update_StartScrub.toJSON(message.startScrub); + } + if (message.endScrub !== undefined) { + obj.endScrub = TimedPlayback_Update_EndScrub.toJSON(message.endScrub); + } + if (message.duration !== undefined) { + obj.duration = TimedPlayback_Update_Duration.toJSON(message.duration); + } + if (message.loop !== undefined) { + obj.loop = TimedPlayback_Update_Loop.toJSON(message.loop); + } + if (message.updateSequence !== undefined) { + obj.updateSequence = TimedPlayback_Sequence.toJSON(message.updateSequence); + } + if (message.monitorSource !== undefined) { + obj.monitorSource = TimedPlayback_Update_MonitorSource.toJSON(message.monitorSource); + } + return obj; + }, + + create, I>>(base?: I): TimedPlayback_Update { + return TimedPlayback_Update.fromPartial(base ?? ({} as any)); + }, + fromPartial, I>>(object: I): TimedPlayback_Update { + const message = createBaseTimedPlayback_Update(); + message.play = (object.play !== undefined && object.play !== null) + ? TimedPlayback_Update_Play.fromPartial(object.play) + : undefined; + message.record = (object.record !== undefined && object.record !== null) + ? TimedPlayback_Update_Record.fromPartial(object.record) + : undefined; + message.pause = (object.pause !== undefined && object.pause !== null) + ? TimedPlayback_Update_Pause.fromPartial(object.pause) + : undefined; + message.reset = (object.reset !== undefined && object.reset !== null) + ? TimedPlayback_Update_Reset.fromPartial(object.reset) + : undefined; + message.jumpToTime = (object.jumpToTime !== undefined && object.jumpToTime !== null) + ? TimedPlayback_Update_JumpToTime.fromPartial(object.jumpToTime) + : undefined; + message.startScrub = (object.startScrub !== undefined && object.startScrub !== null) + ? TimedPlayback_Update_StartScrub.fromPartial(object.startScrub) + : undefined; + message.endScrub = (object.endScrub !== undefined && object.endScrub !== null) + ? TimedPlayback_Update_EndScrub.fromPartial(object.endScrub) + : undefined; + message.duration = (object.duration !== undefined && object.duration !== null) + ? TimedPlayback_Update_Duration.fromPartial(object.duration) + : undefined; + message.loop = (object.loop !== undefined && object.loop !== null) + ? TimedPlayback_Update_Loop.fromPartial(object.loop) + : undefined; + message.updateSequence = (object.updateSequence !== undefined && object.updateSequence !== null) + ? TimedPlayback_Sequence.fromPartial(object.updateSequence) + : undefined; + message.monitorSource = (object.monitorSource !== undefined && object.monitorSource !== null) + ? TimedPlayback_Update_MonitorSource.fromPartial(object.monitorSource) + : undefined; + return message; + }, +}; + +function createBaseTimedPlayback_Update_Play(): TimedPlayback_Update_Play { + return {}; +} + +export const TimedPlayback_Update_Play = { + encode(_: TimedPlayback_Update_Play, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): TimedPlayback_Update_Play { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseTimedPlayback_Update_Play(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(_: any): TimedPlayback_Update_Play { + return {}; + }, + + toJSON(_: TimedPlayback_Update_Play): unknown { + const obj: any = {}; + return obj; + }, + + create, I>>(base?: I): TimedPlayback_Update_Play { + return TimedPlayback_Update_Play.fromPartial(base ?? ({} as any)); + }, + fromPartial, I>>(_: I): TimedPlayback_Update_Play { + const message = createBaseTimedPlayback_Update_Play(); + return message; + }, +}; + +function createBaseTimedPlayback_Update_Record(): TimedPlayback_Update_Record { + return { isRecording: false }; +} + +export const TimedPlayback_Update_Record = { + encode(message: TimedPlayback_Update_Record, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.isRecording !== false) { + writer.uint32(8).bool(message.isRecording); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): TimedPlayback_Update_Record { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseTimedPlayback_Update_Record(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 8) { + break; + } + + message.isRecording = reader.bool(); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(object: any): TimedPlayback_Update_Record { + return { isRecording: isSet(object.isRecording) ? globalThis.Boolean(object.isRecording) : false }; + }, + + toJSON(message: TimedPlayback_Update_Record): unknown { + const obj: any = {}; + if (message.isRecording !== false) { + obj.isRecording = message.isRecording; + } + return obj; + }, + + create, I>>(base?: I): TimedPlayback_Update_Record { + return TimedPlayback_Update_Record.fromPartial(base ?? ({} as any)); + }, + fromPartial, I>>(object: I): TimedPlayback_Update_Record { + const message = createBaseTimedPlayback_Update_Record(); + message.isRecording = object.isRecording ?? false; + return message; + }, +}; + +function createBaseTimedPlayback_Update_Pause(): TimedPlayback_Update_Pause { + return {}; +} + +export const TimedPlayback_Update_Pause = { + encode(_: TimedPlayback_Update_Pause, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): TimedPlayback_Update_Pause { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseTimedPlayback_Update_Pause(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(_: any): TimedPlayback_Update_Pause { + return {}; + }, + + toJSON(_: TimedPlayback_Update_Pause): unknown { + const obj: any = {}; + return obj; + }, + + create, I>>(base?: I): TimedPlayback_Update_Pause { + return TimedPlayback_Update_Pause.fromPartial(base ?? ({} as any)); + }, + fromPartial, I>>(_: I): TimedPlayback_Update_Pause { + const message = createBaseTimedPlayback_Update_Pause(); + return message; + }, +}; + +function createBaseTimedPlayback_Update_Reset(): TimedPlayback_Update_Reset { + return {}; +} + +export const TimedPlayback_Update_Reset = { + encode(_: TimedPlayback_Update_Reset, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): TimedPlayback_Update_Reset { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseTimedPlayback_Update_Reset(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(_: any): TimedPlayback_Update_Reset { + return {}; + }, + + toJSON(_: TimedPlayback_Update_Reset): unknown { + const obj: any = {}; + return obj; + }, + + create, I>>(base?: I): TimedPlayback_Update_Reset { + return TimedPlayback_Update_Reset.fromPartial(base ?? ({} as any)); + }, + fromPartial, I>>(_: I): TimedPlayback_Update_Reset { + const message = createBaseTimedPlayback_Update_Reset(); + return message; + }, +}; + +function createBaseTimedPlayback_Update_JumpToTime(): TimedPlayback_Update_JumpToTime { + return { time: 0 }; +} + +export const TimedPlayback_Update_JumpToTime = { + encode(message: TimedPlayback_Update_JumpToTime, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.time !== 0) { + writer.uint32(9).double(message.time); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): TimedPlayback_Update_JumpToTime { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseTimedPlayback_Update_JumpToTime(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 9) { + break; + } + + message.time = reader.double(); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(object: any): TimedPlayback_Update_JumpToTime { + return { time: isSet(object.time) ? globalThis.Number(object.time) : 0 }; + }, + + toJSON(message: TimedPlayback_Update_JumpToTime): unknown { + const obj: any = {}; + if (message.time !== 0) { + obj.time = message.time; + } + return obj; + }, + + create, I>>(base?: I): TimedPlayback_Update_JumpToTime { + return TimedPlayback_Update_JumpToTime.fromPartial(base ?? ({} as any)); + }, + fromPartial, I>>( + object: I, + ): TimedPlayback_Update_JumpToTime { + const message = createBaseTimedPlayback_Update_JumpToTime(); + message.time = object.time ?? 0; + return message; + }, +}; + +function createBaseTimedPlayback_Update_StartScrub(): TimedPlayback_Update_StartScrub { + return { time: 0 }; +} + +export const TimedPlayback_Update_StartScrub = { + encode(message: TimedPlayback_Update_StartScrub, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.time !== 0) { + writer.uint32(9).double(message.time); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): TimedPlayback_Update_StartScrub { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseTimedPlayback_Update_StartScrub(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 9) { + break; + } + + message.time = reader.double(); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(object: any): TimedPlayback_Update_StartScrub { + return { time: isSet(object.time) ? globalThis.Number(object.time) : 0 }; + }, + + toJSON(message: TimedPlayback_Update_StartScrub): unknown { + const obj: any = {}; + if (message.time !== 0) { + obj.time = message.time; + } + return obj; + }, + + create, I>>(base?: I): TimedPlayback_Update_StartScrub { + return TimedPlayback_Update_StartScrub.fromPartial(base ?? ({} as any)); + }, + fromPartial, I>>( + object: I, + ): TimedPlayback_Update_StartScrub { + const message = createBaseTimedPlayback_Update_StartScrub(); + message.time = object.time ?? 0; + return message; + }, +}; + +function createBaseTimedPlayback_Update_EndScrub(): TimedPlayback_Update_EndScrub { + return { time: 0 }; +} + +export const TimedPlayback_Update_EndScrub = { + encode(message: TimedPlayback_Update_EndScrub, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.time !== 0) { + writer.uint32(17).double(message.time); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): TimedPlayback_Update_EndScrub { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseTimedPlayback_Update_EndScrub(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 2: + if (tag !== 17) { + break; + } + + message.time = reader.double(); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(object: any): TimedPlayback_Update_EndScrub { + return { time: isSet(object.time) ? globalThis.Number(object.time) : 0 }; + }, + + toJSON(message: TimedPlayback_Update_EndScrub): unknown { + const obj: any = {}; + if (message.time !== 0) { + obj.time = message.time; + } + return obj; + }, + + create, I>>(base?: I): TimedPlayback_Update_EndScrub { + return TimedPlayback_Update_EndScrub.fromPartial(base ?? ({} as any)); + }, + fromPartial, I>>( + object: I, + ): TimedPlayback_Update_EndScrub { + const message = createBaseTimedPlayback_Update_EndScrub(); + message.time = object.time ?? 0; + return message; + }, +}; + +function createBaseTimedPlayback_Update_Duration(): TimedPlayback_Update_Duration { + return { duration: 0 }; +} + +export const TimedPlayback_Update_Duration = { + encode(message: TimedPlayback_Update_Duration, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.duration !== 0) { + writer.uint32(9).double(message.duration); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): TimedPlayback_Update_Duration { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseTimedPlayback_Update_Duration(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 9) { + break; + } + + message.duration = reader.double(); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(object: any): TimedPlayback_Update_Duration { + return { duration: isSet(object.duration) ? globalThis.Number(object.duration) : 0 }; + }, + + toJSON(message: TimedPlayback_Update_Duration): unknown { + const obj: any = {}; + if (message.duration !== 0) { + obj.duration = message.duration; + } + return obj; + }, + + create, I>>(base?: I): TimedPlayback_Update_Duration { + return TimedPlayback_Update_Duration.fromPartial(base ?? ({} as any)); + }, + fromPartial, I>>( + object: I, + ): TimedPlayback_Update_Duration { + const message = createBaseTimedPlayback_Update_Duration(); + message.duration = object.duration ?? 0; + return message; + }, +}; + +function createBaseTimedPlayback_Update_Loop(): TimedPlayback_Update_Loop { + return { loop: false }; +} + +export const TimedPlayback_Update_Loop = { + encode(message: TimedPlayback_Update_Loop, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.loop !== false) { + writer.uint32(8).bool(message.loop); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): TimedPlayback_Update_Loop { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseTimedPlayback_Update_Loop(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 8) { + break; + } + + message.loop = reader.bool(); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(object: any): TimedPlayback_Update_Loop { + return { loop: isSet(object.loop) ? globalThis.Boolean(object.loop) : false }; + }, + + toJSON(message: TimedPlayback_Update_Loop): unknown { + const obj: any = {}; + if (message.loop !== false) { + obj.loop = message.loop; + } + return obj; + }, + + create, I>>(base?: I): TimedPlayback_Update_Loop { + return TimedPlayback_Update_Loop.fromPartial(base ?? ({} as any)); + }, + fromPartial, I>>(object: I): TimedPlayback_Update_Loop { + const message = createBaseTimedPlayback_Update_Loop(); + message.loop = object.loop ?? false; + return message; + }, +}; + +function createBaseTimedPlayback_Update_MonitorSource(): TimedPlayback_Update_MonitorSource { + return { enable: false }; +} + +export const TimedPlayback_Update_MonitorSource = { + encode(message: TimedPlayback_Update_MonitorSource, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.enable !== false) { + writer.uint32(8).bool(message.enable); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): TimedPlayback_Update_MonitorSource { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseTimedPlayback_Update_MonitorSource(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 8) { + break; + } + + message.enable = reader.bool(); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(object: any): TimedPlayback_Update_MonitorSource { + return { enable: isSet(object.enable) ? globalThis.Boolean(object.enable) : false }; + }, + + toJSON(message: TimedPlayback_Update_MonitorSource): unknown { + const obj: any = {}; + if (message.enable !== false) { + obj.enable = message.enable; + } + return obj; + }, + + create, I>>( + base?: I, + ): TimedPlayback_Update_MonitorSource { + return TimedPlayback_Update_MonitorSource.fromPartial(base ?? ({} as any)); + }, + fromPartial, I>>( + object: I, + ): TimedPlayback_Update_MonitorSource { + const message = createBaseTimedPlayback_Update_MonitorSource(); + message.enable = object.enable ?? false; + return message; + }, +}; + +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; + +export type DeepPartial = T extends Builtin ? T + : T extends globalThis.Array ? globalThis.Array> + : T extends ReadonlyArray ? ReadonlyArray> + : T extends {} ? { [K in keyof T]?: DeepPartial } + : Partial; + +type KeysOfUnion = T extends T ? keyof T : never; +export type Exact = P extends Builtin ? P + : P & { [K in keyof P]: Exact } & { [K in Exclude>]: never }; + +function isSet(value: any): boolean { + return value !== null && value !== undefined; +} diff --git a/proto/timers.ts b/proto/timers.ts index 66f4263..0c01938 100644 --- a/proto/timers.ts +++ b/proto/timers.ts @@ -283,7 +283,7 @@ export const Clock_Format = { if (message.timeFormat !== 0) { writer.uint32(24).int32(message.timeFormat); } - if (message.militaryTimeEnabled === true) { + if (message.militaryTimeEnabled !== false) { writer.uint32(32).bool(message.militaryTimeEnabled); } return writer; @@ -351,7 +351,7 @@ export const Clock_Format = { message.timeFormat, ); } - if (message.militaryTimeEnabled === true) { + if (message.militaryTimeEnabled !== false) { obj.militaryTimeEnabled = message.militaryTimeEnabled; } return obj; @@ -506,13 +506,13 @@ export const Timer_Format = { if (message.millisecond !== 0) { writer.uint32(32).int32(message.millisecond); } - if (message.isWallClockTime === true) { + if (message.isWallClockTime !== false) { writer.uint32(40).bool(message.isWallClockTime); } - if (message.is24HourTime === true) { + if (message.is24HourTime !== false) { writer.uint32(48).bool(message.is24HourTime); } - if (message.showMillisecondsUnderMinuteOnly === true) { + if (message.showMillisecondsUnderMinuteOnly !== false) { writer.uint32(56).bool(message.showMillisecondsUnderMinuteOnly); } return writer; @@ -624,13 +624,13 @@ export const Timer_Format = { if (message.millisecond !== 0) { obj.millisecond = timer_Format_StyleToJSON(message.millisecond); } - if (message.isWallClockTime === true) { + if (message.isWallClockTime !== false) { obj.isWallClockTime = message.isWallClockTime; } - if (message.is24HourTime === true) { + if (message.is24HourTime !== false) { obj.is24HourTime = message.is24HourTime; } - if (message.showMillisecondsUnderMinuteOnly === true) { + if (message.showMillisecondsUnderMinuteOnly !== false) { obj.showMillisecondsUnderMinuteOnly = message.showMillisecondsUnderMinuteOnly; } @@ -672,7 +672,7 @@ export const Timer_Configuration = { message: Timer_Configuration, writer: _m0.Writer = _m0.Writer.create(), ): _m0.Writer { - if (message.allowsOverrun === true) { + if (message.allowsOverrun !== false) { writer.uint32(32).bool(message.allowsOverrun); } if (message.countdown !== undefined) { @@ -772,7 +772,7 @@ export const Timer_Configuration = { toJSON(message: Timer_Configuration): unknown { const obj: any = {}; - if (message.allowsOverrun === true) { + if (message.allowsOverrun !== false) { obj.allowsOverrun = message.allowsOverrun; } if (message.countdown !== undefined) { @@ -1012,7 +1012,7 @@ export const Timer_Configuration_TimerTypeElapsedTime = { if (message.endTime !== 0) { writer.uint32(17).double(message.endTime); } - if (message.hasEndTime === true) { + if (message.hasEndTime !== false) { writer.uint32(24).bool(message.hasEndTime); } return writer; @@ -1079,7 +1079,7 @@ export const Timer_Configuration_TimerTypeElapsedTime = { if (message.endTime !== 0) { obj.endTime = message.endTime; } - if (message.hasEndTime === true) { + if (message.hasEndTime !== false) { obj.hasEndTime = message.hasEndTime; } return obj; diff --git a/proto/url.ts b/proto/url.ts index 7115392..e6effe6 100644 --- a/proto/url.ts +++ b/proto/url.ts @@ -643,7 +643,7 @@ export const URL_ExternalRelativePath_Win32ExternalVolume = { if (message.volumeName !== '') { writer.uint32(18).string(message.volumeName); } - if (message.networkShare === true) { + if (message.networkShare !== false) { writer.uint32(24).bool(message.networkShare); } return writer; @@ -712,7 +712,7 @@ export const URL_ExternalRelativePath_Win32ExternalVolume = { if (message.volumeName !== '') { obj.volumeName = message.volumeName; } - if (message.networkShare === true) { + if (message.networkShare !== false) { obj.networkShare = message.networkShare; } return obj; diff --git a/src/__snapshots__/proPresenter7SongConverter.spec.ts.snap b/src/__snapshots__/proPresenter7SongConverter.spec.ts.snap index 3cc3d12..cc11b50 100644 --- a/src/__snapshots__/proPresenter7SongConverter.spec.ts.snap +++ b/src/__snapshots__/proPresenter7SongConverter.spec.ts.snap @@ -1009,6 +1009,7 @@ exports[`proPresenter7SongConverter Advanced song (w/ subsection) should convert "parameterUuid": { "string": "ANY_REF_MACRO_ID", }, + "parentCollection": undefined, }, }, "mask": undefined, @@ -9049,6 +9050,7 @@ exports[`proPresenter7SongConverter Basic song (no subsection) should convert to "parameterUuid": { "string": "ANY_REF_MACRO_ID", }, + "parentCollection": undefined, }, }, "mask": undefined, diff --git a/src/constants.ts b/src/constants.ts index 1b687a4..f95ad31 100644 --- a/src/constants.ts +++ b/src/constants.ts @@ -1,7 +1,5 @@ export const EMPTY_STRING = ''; -export const ERROR_CODE = 1; - export const COMMA = ','; export const COLON = ':'; @@ -16,21 +14,10 @@ export const DASH = '-'; export const TXT_EXTENSION = '.txt'; -export const TEST_FILE = 'TEMPLATE.txt'; - -export const ALLOWED_CHARS = - ` *_{}&!(),-./1234567890:;?ABCDEFGHIJKLMNOPRSTUVWXZYQ[\\]abcdefghijklmnopqrstuvwxyzÎâîăÂȘșĂȚț‘’”„\n`.split( - EMPTY_STRING, - ); - export const NEW_LINE_TUPLE = '\n'; export const DOUBLE_LINE_TUPLE = `${NEW_LINE_TUPLE}${NEW_LINE_TUPLE}`; -export const CHARS_SEPARATORS = /[ !(),./:;?”„\n]+/; - -export const ALT_SONGS_FILE_SUFFIX = /(- i|- ii)/; - export const TEST_ENV = 'test'; export const EMPTY_SPACE = ' '; diff --git a/src/proPresenter7SongConverter.spec.ts b/src/proPresenter7SongConverter.spec.ts index 06ebc34..885fac9 100644 --- a/src/proPresenter7SongConverter.spec.ts +++ b/src/proPresenter7SongConverter.spec.ts @@ -2,9 +2,9 @@ import { convertSongToProPresenter7 } from './proPresenter7SongConverter'; import { SequenceChar, Song, SongSection } from './types'; import { getMatchingGroup } from './proPresenterMatchingGroupDeriver'; import { Presentation_CCLI } from '../proto/presentation'; -import { Graphics_Text_Attributes_Font } from '../proto/graphicsData'; import { parseSong } from './songsParser'; import { SONG_WITH_SUBSECTIONS_MOCK_FILE_CONTENT } from '../mocks'; +import { Font } from '../proto/font'; jest.mock('crypto', () => { let index = 1; @@ -28,7 +28,7 @@ const ANY_CONFIG = { size: 58, family: 'CMG Sans Cn CAPS', bold: true, - } as Graphics_Text_Attributes_Font, + } as Font, graphicSize: { width: 1920, height: 1080, diff --git a/src/proPresenter7SongConverter.ts b/src/proPresenter7SongConverter.ts index 105012f..c65d1b8 100644 --- a/src/proPresenter7SongConverter.ts +++ b/src/proPresenter7SongConverter.ts @@ -40,7 +40,6 @@ import { Graphics_Text_Attributes_Alignment, Graphics_Text_Attributes_Capitalization, Graphics_Text_Attributes_CustomAttribute, - Graphics_Text_Attributes_Font, Graphics_Text_Attributes_Paragraph, Graphics_Text_ScaleBehavior, Graphics_Text_Transform, @@ -49,11 +48,12 @@ import { import { Group } from '../proto/groups'; import { Section, Song } from './types'; import { convertToRtf } from './txtToRtfConverter'; +import { Font } from '../proto/font'; export type Config = { arrangementName: string; ccliSettings: Presentation_CCLI; - fontConfig: Graphics_Text_Attributes_Font; + fontConfig: Font; graphicSize: Graphics_Size; presentationCategory: string; refMacroId: string; @@ -119,7 +119,7 @@ const FULL_SIZE_PATH_OBJECT = Graphics_Path.create({ const createTextFromSection = (verse: string, config: Config) => Graphics_Text.create({ attributes: Graphics_Text_Attributes.create({ - font: Graphics_Text_Attributes_Font.create(config.fontConfig), + font: Font.create(config.fontConfig), customAttributes: [ Graphics_Text_Attributes_CustomAttribute.create({ originalFontSize: config.fontConfig.size,