From 5da779148951335fd39fd901499ad8eea2f2ff0b Mon Sep 17 00:00:00 2001 From: Brent Shaffer Date: Wed, 29 Jul 2026 20:35:06 +0000 Subject: [PATCH 01/24] feat(ci): run unit-tests in parallel to speed them up --- ci/run_conditional_tests.sh | 40 ++++++++++++++++++++++--------------- 1 file changed, 24 insertions(+), 16 deletions(-) diff --git a/ci/run_conditional_tests.sh b/ci/run_conditional_tests.sh index 5e10d220da66..6eebbd28af10 100755 --- a/ci/run_conditional_tests.sh +++ b/ci/run_conditional_tests.sh @@ -82,7 +82,7 @@ subdirs=( ) RETVAL=0 -# These following APIs need an explicit credential file to run properly (or oAuth2, which we don't support in this repo). +# These following APIs need an explicit credential file to run properly (or oAuth2, which we don't support in this repo). # When we hit these packages, we will run the "samples with credentials" trigger, which contains the credentials as an env variable tests_with_credentials="core/packages/google-auth-library-nodejs/ packages/google-analytics-admin/ packages/google-area120-tables/ packages/google-analytics-data/ packages/google-iam-credentials/ packages/google-apps-meet/ packages/google-chat/ packages/google-streetview-publish/ packages/google-cloud-developerconnect/" @@ -90,7 +90,7 @@ tests_with_credentials="core/packages/google-auth-library-nodejs/ packages/googl # Some packages are only used by our bots and automation. These packages do not need to run on Windows and # often employ platform specific code like file system interaction. Some packages may also fail # on Windows due to incompatible npm scripts. -# +# # Until these packages can be updated to be OS agnostic, we will skip them on Windows. windows_exempt_tests="core/ core/packages/ core/dev-packages/ .github/scripts/fixtures/ .github/scripts/tests/ core/packages/gapic-node-processing/ core/packages/typeless-sample-bot/ handwritten/cloud-profiler/" @@ -116,7 +116,7 @@ for subdir in ${subdirs[@]}; do # System tests for packages are broken and blocking PRs. # See https://github.com/googleapis/google-cloud-node/issues/7976. # - # Per https://github.com/googleapis/google-cloud-node/issues/7921, + # Per https://github.com/googleapis/google-cloud-node/issues/7921, # we are likely to permanently remove these tests in the near future. if [[ "${subdir}" == "packages" && "${TEST_TYPE}" == "system" ]]; then echo "Skipping ${TEST_TYPE} test for packages: ${d}" @@ -126,7 +126,7 @@ for subdir in ${subdirs[@]}; do # Sample tests for packages are broken/flaky and blocking PRs. # See https://github.com/googleapis/google-cloud-node/issues/7976#issuecomment-4210458096. # - # Per https://github.com/googleapis/google-cloud-node/issues/7921, + # Per https://github.com/googleapis/google-cloud-node/issues/7921, # we are likely to permanently remove these tests in the near future. if [[ "${subdir}" == "packages" && "${TEST_TYPE}" == "samples" ]]; then echo "Skipping ${TEST_TYPE} test for packages: ${d}" @@ -205,20 +205,28 @@ for subdir in ${subdirs[@]}; do fi if [ "${should_test}" = true ]; then echo "running test in ${d}" - pushd ${d} - # Temporarily allow failure. - set +e - ${test_script} - ret=$? - set -e - if [ ${ret} -ne 0 ]; then - RETVAL=${ret} - # Since there are so many APIs, we should exit early if there's an error - exit ${RETVAL} + ( + pushd ${d} >/dev/null + # Temporarily allow failure. + set +e + ${test_script} + ret=$? + set -e + if [ ${ret} -ne 0 ]; then + exit ${ret} + fi + popd >/dev/null + ) & + + if [[ $(jobs -r -p | wc -l) -ge 4 ]]; then + wait -n || exit $? fi - popd fi done done -exit ${RETVAL} +for job in $(jobs -p); do + wait $job || exit $? +done + +exit 0 From 0d9eb53e27a124a66332e25ef63ce2a597dfa222 Mon Sep 17 00:00:00 2001 From: Brent Shaffer Date: Wed, 29 Jul 2026 20:57:58 +0000 Subject: [PATCH 02/24] chore(ci): reduce unit-test output due to log truncation --- ci/run_single_test.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ci/run_single_test.sh b/ci/run_single_test.sh index 13b2d43d1782..6632227295df 100755 --- a/ci/run_single_test.sh +++ b/ci/run_single_test.sh @@ -37,6 +37,8 @@ if [ ${BUILD_TYPE} != "presubmit" ]; then export MOCHA_REPORTER_OUTPUT=${PROJECT}_sponge_log.xml export MOCHA_REPORTER_SUITENAME=${PROJECT} export MOCHA_REPORTER=xunit +else + export MOCHA_REPORTER=dot fi # Install dependencies @@ -47,8 +49,8 @@ if command -v cygpath >/dev/null 2>&1; then PNPMFILE_PATH=$(cygpath -m "${PNPMFILE_PATH}") fi -echo "pnpm install --ignore-scripts --engine-strict --prod --pnpmfile \"${PNPMFILE_PATH}\"; pnpm install --pnpmfile \"${PNPMFILE_PATH}\"" -pnpm install --ignore-scripts --engine-strict --prod --pnpmfile "${PNPMFILE_PATH}"; pnpm install --pnpmfile "${PNPMFILE_PATH}" +echo "pnpm install --reporter=silent --ignore-scripts --engine-strict --prod --pnpmfile \"${PNPMFILE_PATH}\"; pnpm install --reporter=silent --pnpmfile \"${PNPMFILE_PATH}\"" +pnpm install --reporter=silent --ignore-scripts --engine-strict --prod --pnpmfile "${PNPMFILE_PATH}"; pnpm install --reporter=silent --pnpmfile "${PNPMFILE_PATH}" retval=0 From 6a142374f968573548b99dbb3a4e44a7819b6b33 Mon Sep 17 00:00:00 2001 From: Brent Shaffer Date: Wed, 29 Jul 2026 21:24:03 +0000 Subject: [PATCH 03/24] chore(ci): rename conformance tests for clarity --- .../workflows/{conformance.yaml => bigtable-conformance.yaml} | 2 +- .../{conformance-test.yaml => storage-conformance.yaml} | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) rename .github/workflows/{conformance.yaml => bigtable-conformance.yaml} (98%) rename .github/workflows/{conformance-test.yaml => storage-conformance.yaml} (96%) diff --git a/.github/workflows/conformance.yaml b/.github/workflows/bigtable-conformance.yaml similarity index 98% rename from .github/workflows/conformance.yaml rename to .github/workflows/bigtable-conformance.yaml index c35f95e5afb3..cf8279b80ecd 100644 --- a/.github/workflows/conformance.yaml +++ b/.github/workflows/bigtable-conformance.yaml @@ -25,7 +25,7 @@ on: pull_request: paths: - 'handwritten/bigtable/**' -name: conformance +name: bigtable-conformance jobs: conformance: runs-on: ubuntu-latest diff --git a/.github/workflows/conformance-test.yaml b/.github/workflows/storage-conformance.yaml similarity index 96% rename from .github/workflows/conformance-test.yaml rename to .github/workflows/storage-conformance.yaml index 13eb09ab8981..924b88407081 100644 --- a/.github/workflows/conformance-test.yaml +++ b/.github/workflows/storage-conformance.yaml @@ -10,7 +10,7 @@ on: pull_request: paths: - 'handwritten/storage/**' -name: conformance +name: storage-conformance jobs: conformance-test: runs-on: ubuntu-latest From 740552be254174536864417ca8a571147cc5000a Mon Sep 17 00:00:00 2001 From: Brent Shaffer Date: Wed, 29 Jul 2026 20:00:10 +0000 Subject: [PATCH 04/24] chore: run all ci tests --- ci/run_conditional_tests.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/ci/run_conditional_tests.sh b/ci/run_conditional_tests.sh index 6eebbd28af10..06bddb5dc9cb 100755 --- a/ci/run_conditional_tests.sh +++ b/ci/run_conditional_tests.sh @@ -61,11 +61,11 @@ set -e if [[ "${changed}" -eq 0 ]]; then echo "no change detected in ci" else - echo "skipping trigger of tests for now: tracking in #7540" - # echo "change detected in ci, we should test everything" - # echo "result of git diff ${GIT_DIFF_ARG} ci:" - # git diff ${GIT_DIFF_ARG} ci - # GIT_DIFF_ARG="" + # echo "skipping trigger of tests for now: tracking in #7540" + echo "change detected in ci, we should test everything" + echo "result of git diff ${GIT_DIFF_ARG} ci:" + git diff ${GIT_DIFF_ARG} ci + GIT_DIFF_ARG="" fi # Now we have a fixed list, but we can change it to autodetect if From 3d37a2cb0b9a0205569daa614a31b49ef79cd1ca Mon Sep 17 00:00:00 2001 From: Brent Shaffer Date: Wed, 29 Jul 2026 21:41:32 +0000 Subject: [PATCH 05/24] fix(ci): failing unit-tests --- core/packages/nodejs-googleapis-common/test/test.discovery.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/packages/nodejs-googleapis-common/test/test.discovery.ts b/core/packages/nodejs-googleapis-common/test/test.discovery.ts index 0e656c5fb6b1..6745982a218f 100644 --- a/core/packages/nodejs-googleapis-common/test/test.discovery.ts +++ b/core/packages/nodejs-googleapis-common/test/test.discovery.ts @@ -24,7 +24,7 @@ describe(__filename, () => { nock.cleanAll(); }); it('should discover an API', async () => { - const discoUrl = 'http://test.local'; + const discoUrl = 'http://test.local:80'; const scope = nock(discoUrl) .get('/') .replyWithFile(200, './test/fixtures/compute-v1.json', { @@ -37,7 +37,7 @@ describe(__filename, () => { scope.done(); }); it('should discover an API through second weird path', async () => { - const discoUrl = 'http://test.local'; + const discoUrl = 'http://test.local:80'; const scope = nock(discoUrl) .get('/') .replyWithFile(200, './test/fixtures/compute-v1.json', { From 24763d2f4c5da806908b4e4e73a5fc5572eda5d9 Mon Sep 17 00:00:00 2001 From: Brent Shaffer Date: Wed, 29 Jul 2026 21:41:40 +0000 Subject: [PATCH 06/24] feat(ci): add matrix sharding --- .github/workflows/presubmit.yaml | 4 ++++ ci/run_conditional_tests.sh | 26 ++++++++++++++++++++++---- ci/run_single_test.sh | 4 ++-- 3 files changed, 28 insertions(+), 6 deletions(-) diff --git a/.github/workflows/presubmit.yaml b/.github/workflows/presubmit.yaml index dc152e2bec88..7835e305a174 100644 --- a/.github/workflows/presubmit.yaml +++ b/.github/workflows/presubmit.yaml @@ -8,8 +8,10 @@ jobs: units: runs-on: ubuntu-latest strategy: + fail-fast: false matrix: node-version: [22, 24, 26] + shard-index: [0, 1, 2, 3, 4] steps: - uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6.1.0 with: @@ -28,6 +30,8 @@ jobs: env: BUILD_TYPE: presubmit TEST_TYPE: units + SHARD_TOTAL: 5 + SHARD_INDEX: ${{ matrix.shard-index }} lint: runs-on: ubuntu-latest continue-on-error: true diff --git a/ci/run_conditional_tests.sh b/ci/run_conditional_tests.sh index 06bddb5dc9cb..5755c32b97af 100755 --- a/ci/run_conditional_tests.sh +++ b/ci/run_conditional_tests.sh @@ -94,6 +94,9 @@ tests_with_credentials="core/packages/google-auth-library-nodejs/ packages/googl # Until these packages can be updated to be OS agnostic, we will skip them on Windows. windows_exempt_tests="core/ core/packages/ core/dev-packages/ .github/scripts/fixtures/ .github/scripts/tests/ core/packages/gapic-node-processing/ core/packages/typeless-sample-bot/ handwritten/cloud-profiler/" +# Gather all test directories into an array +test_dirs=() + for subdir in ${subdirs[@]}; do for d in `ls -d ${subdir}/*/`; do if [ -s "ignore.json" ] && jq -e ".ignored[] | select(. == \"$d\")" ignore.json > /dev/null 2>&1; then @@ -204,10 +207,25 @@ for subdir in ${subdirs[@]}; do fi fi if [ "${should_test}" = true ]; then - echo "running test in ${d}" - ( - pushd ${d} >/dev/null - # Temporarily allow failure. + test_dirs+=("${d}") + fi + done +done + +# If SHARD_TOTAL and SHARD_INDEX are provided, we will only run a subset of the tests. +for i in "${!test_dirs[@]}"; do + d="${test_dirs[$i]}" + + if [[ -n "${SHARD_TOTAL}" && -n "${SHARD_INDEX}" ]]; then + if (( i % SHARD_TOTAL != SHARD_INDEX )); then + continue + fi + fi + + echo "running test in ${d}" + ( + pushd ${d} >/dev/null + # Temporarily allow failure. set +e ${test_script} ret=$? diff --git a/ci/run_single_test.sh b/ci/run_single_test.sh index 6632227295df..b4b030341150 100755 --- a/ci/run_single_test.sh +++ b/ci/run_single_test.sh @@ -49,8 +49,8 @@ if command -v cygpath >/dev/null 2>&1; then PNPMFILE_PATH=$(cygpath -m "${PNPMFILE_PATH}") fi -echo "pnpm install --reporter=silent --ignore-scripts --engine-strict --prod --pnpmfile \"${PNPMFILE_PATH}\"; pnpm install --reporter=silent --pnpmfile \"${PNPMFILE_PATH}\"" -pnpm install --reporter=silent --ignore-scripts --engine-strict --prod --pnpmfile "${PNPMFILE_PATH}"; pnpm install --reporter=silent --pnpmfile "${PNPMFILE_PATH}" +echo "pnpm install --reporter=silent --ignore-scripts --engine-strict --pnpmfile \"${PNPMFILE_PATH}\"" +pnpm install --reporter=silent --ignore-scripts --engine-strict --pnpmfile "${PNPMFILE_PATH}" retval=0 From 0c5f19ac6e767bf56e3975af24e4d970ecfe2f3f Mon Sep 17 00:00:00 2001 From: Brent Shaffer Date: Wed, 29 Jul 2026 21:55:11 +0000 Subject: [PATCH 07/24] fix bash syntax error, better job names --- .github/workflows/presubmit.yaml | 1 + .github/workflows/windows-presubmit.yaml | 5 +++++ ci/run_conditional_tests.sh | 26 +++++++++++------------- 3 files changed, 18 insertions(+), 14 deletions(-) diff --git a/.github/workflows/presubmit.yaml b/.github/workflows/presubmit.yaml index 7835e305a174..4911fa7d46aa 100644 --- a/.github/workflows/presubmit.yaml +++ b/.github/workflows/presubmit.yaml @@ -6,6 +6,7 @@ on: name: presubmit jobs: units: + name: units (Node ${{ matrix.node-version }}, Shard ${{ matrix.shard-index }}) runs-on: ubuntu-latest strategy: fail-fast: false diff --git a/.github/workflows/windows-presubmit.yaml b/.github/workflows/windows-presubmit.yaml index 31105cfa46de..e7dbff0647b5 100644 --- a/.github/workflows/windows-presubmit.yaml +++ b/.github/workflows/windows-presubmit.yaml @@ -6,10 +6,13 @@ on: name: presubmit-windows jobs: units: + name: units (Node ${{ matrix.node-version }}, Shard ${{ matrix.shard-index }}) runs-on: windows-latest strategy: + fail-fast: false matrix: node-version: [22, 24, 26] + shard-index: [0, 1, 2, 3, 4] steps: - uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6.1.0 with: @@ -29,3 +32,5 @@ jobs: env: BUILD_TYPE: presubmit TEST_TYPE: units + SHARD_TOTAL: 5 + SHARD_INDEX: ${{ matrix.shard-index }} diff --git a/ci/run_conditional_tests.sh b/ci/run_conditional_tests.sh index 5755c32b97af..d9d422927f13 100755 --- a/ci/run_conditional_tests.sh +++ b/ci/run_conditional_tests.sh @@ -226,21 +226,19 @@ for i in "${!test_dirs[@]}"; do ( pushd ${d} >/dev/null # Temporarily allow failure. - set +e - ${test_script} - ret=$? - set -e - if [ ${ret} -ne 0 ]; then - exit ${ret} - fi - popd >/dev/null - ) & - - if [[ $(jobs -r -p | wc -l) -ge 4 ]]; then - wait -n || exit $? - fi + set +e + ${test_script} + ret=$? + set -e + if [ ${ret} -ne 0 ]; then + exit ${ret} fi - done + popd >/dev/null + ) & + + if [[ $(jobs -r -p | wc -l) -ge 4 ]]; then + wait -n || exit $? + fi done for job in $(jobs -p); do From 5b0a4a45ad295ae82c8c021c13efd8a3ed72863b Mon Sep 17 00:00:00 2001 From: Brent Shaffer Date: Wed, 29 Jul 2026 22:16:47 +0000 Subject: [PATCH 08/24] reduce fetch-depth for github actions runs, remove concurrency --- .github/workflows/presubmit.yaml | 5 +- .github/workflows/windows-presubmit.yaml | 3 +- ci/run_conditional_tests.sh | 68 +++++++++++------------- ci/run_single_test.sh | 4 +- 4 files changed, 37 insertions(+), 43 deletions(-) diff --git a/.github/workflows/presubmit.yaml b/.github/workflows/presubmit.yaml index 4911fa7d46aa..4c87008e123f 100644 --- a/.github/workflows/presubmit.yaml +++ b/.github/workflows/presubmit.yaml @@ -16,7 +16,7 @@ jobs: steps: - uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6.1.0 with: - fetch-depth: 300 + fetch-depth: 2 persist-credentials: false - name: Use Node.js ${{ matrix.node-version }} uses: actions/setup-node@249970729cb0ef3589644e2896645e5dc5ba9c38 # v6.5.0 @@ -33,13 +33,14 @@ jobs: TEST_TYPE: units SHARD_TOTAL: 5 SHARD_INDEX: ${{ matrix.shard-index }} + GIT_DIFF_ARG: HEAD^1 lint: runs-on: ubuntu-latest continue-on-error: true steps: - uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6.1.0 with: - fetch-depth: 300 + fetch-depth: 2 persist-credentials: false - name: Use Node.js 24 uses: actions/setup-node@249970729cb0ef3589644e2896645e5dc5ba9c38 # v6.5.0 diff --git a/.github/workflows/windows-presubmit.yaml b/.github/workflows/windows-presubmit.yaml index e7dbff0647b5..3dee137d5023 100644 --- a/.github/workflows/windows-presubmit.yaml +++ b/.github/workflows/windows-presubmit.yaml @@ -16,7 +16,7 @@ jobs: steps: - uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6.1.0 with: - fetch-depth: 300 + fetch-depth: 2 persist-credentials: false - name: Use Node.js ${{ matrix.node-version }} uses: actions/setup-node@249970729cb0ef3589644e2896645e5dc5ba9c38 # v6.5.0 @@ -34,3 +34,4 @@ jobs: TEST_TYPE: units SHARD_TOTAL: 5 SHARD_INDEX: ${{ matrix.shard-index }} + GIT_DIFF_ARG: HEAD^1 diff --git a/ci/run_conditional_tests.sh b/ci/run_conditional_tests.sh index d9d422927f13..c7d0c69525ed 100755 --- a/ci/run_conditional_tests.sh +++ b/ci/run_conditional_tests.sh @@ -31,25 +31,27 @@ fi test_script="${PROJECT_ROOT}/ci/run_single_test.sh" -if [ ${BUILD_TYPE} == "presubmit" ]; then - # For presubmit build, we want to know the difference from the - # common commit in origin/main. - GIT_DIFF_ARG="origin/main..." - - # Then fetch enough history for finding the common commit. - git fetch origin main --deepen=300 - -elif [ ${BUILD_TYPE} == "continuous" ]; then - # For continuous build, we want to know the difference in the last - # commit. This assumes we use squash commit when merging PRs. - GIT_DIFF_ARG="HEAD~.." - - # Then fetch one last commit for getting the diff. - git fetch origin main --deepen=1 - -else - # Run everything. - GIT_DIFF_ARG="" +if [ -z "${GIT_DIFF_ARG}" ]; then + if [ ${BUILD_TYPE} == "presubmit" ]; then + # For presubmit build, we want to know the difference from the + # common commit in origin/main. + GIT_DIFF_ARG="origin/main..." + + # Then fetch enough history for finding the common commit. + git fetch origin main --deepen=300 + + elif [ ${BUILD_TYPE} == "continuous" ]; then + # For continuous build, we want to know the difference in the last + # commit. This assumes we use squash commit when merging PRs. + GIT_DIFF_ARG="HEAD~.." + + # Then fetch one last commit for getting the diff. + git fetch origin main --deepen=1 + + else + # Run everything. + GIT_DIFF_ARG="" + fi fi # Then detect changes in the test scripts. @@ -223,26 +225,16 @@ for i in "${!test_dirs[@]}"; do fi echo "running test in ${d}" - ( - pushd ${d} >/dev/null - # Temporarily allow failure. - set +e - ${test_script} - ret=$? - set -e - if [ ${ret} -ne 0 ]; then - exit ${ret} - fi - popd >/dev/null - ) & - - if [[ $(jobs -r -p | wc -l) -ge 4 ]]; then - wait -n || exit $? + pushd ${d} >/dev/null + # Temporarily allow failure. + set +e + ${test_script} + ret=$? + set -e + if [ ${ret} -ne 0 ]; then + exit ${ret} fi -done - -for job in $(jobs -p); do - wait $job || exit $? + popd >/dev/null done exit 0 diff --git a/ci/run_single_test.sh b/ci/run_single_test.sh index b4b030341150..47a26d09ff83 100755 --- a/ci/run_single_test.sh +++ b/ci/run_single_test.sh @@ -49,8 +49,8 @@ if command -v cygpath >/dev/null 2>&1; then PNPMFILE_PATH=$(cygpath -m "${PNPMFILE_PATH}") fi -echo "pnpm install --reporter=silent --ignore-scripts --engine-strict --pnpmfile \"${PNPMFILE_PATH}\"" -pnpm install --reporter=silent --ignore-scripts --engine-strict --pnpmfile "${PNPMFILE_PATH}" +echo "pnpm install --reporter=silent --engine-strict --pnpmfile \"${PNPMFILE_PATH}\"" +pnpm install --reporter=silent --engine-strict --pnpmfile "${PNPMFILE_PATH}" retval=0 From 37e6bcf4816a4b11e68e74189b010c628e4bd926 Mon Sep 17 00:00:00 2001 From: Brent Shaffer Date: Wed, 29 Jul 2026 22:30:31 +0000 Subject: [PATCH 09/24] remove c8 text output --- .nycrc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.nycrc b/.nycrc index 83a421a0628a..5b4f895e9882 100644 --- a/.nycrc +++ b/.nycrc @@ -1,6 +1,6 @@ { "report-dir": "./.coverage", - "reporter": ["text", "lcov"], + "reporter": ["lcov"], "exclude": [ "**/*-test", "**/.coverage", From dd49119e9fec73df4d2c137a860426abaf243eb8 Mon Sep 17 00:00:00 2001 From: Brent Shaffer Date: Wed, 29 Jul 2026 22:43:08 +0000 Subject: [PATCH 10/24] feat: add conditional sharding using DRY_RUN_SHARDS envvar --- .github/workflows/presubmit.yaml | 23 +++++++++++++++++++++-- .github/workflows/windows-presubmit.yaml | 23 +++++++++++++++++++++-- ci/run_conditional_tests.sh | 12 ++++++++++++ core/packages/gcp-metadata/src/index.ts | 11 ++++++++--- 4 files changed, 62 insertions(+), 7 deletions(-) diff --git a/.github/workflows/presubmit.yaml b/.github/workflows/presubmit.yaml index 4c87008e123f..91d983e0b281 100644 --- a/.github/workflows/presubmit.yaml +++ b/.github/workflows/presubmit.yaml @@ -5,14 +5,33 @@ on: pull_request: name: presubmit jobs: + setup: + runs-on: ubuntu-latest + outputs: + shard-matrix: ${{ steps.set-matrix.outputs.shard_matrix }} + shard-total: ${{ steps.set-matrix.outputs.shard_total }} + steps: + - uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6.1.0 + with: + fetch-depth: 2 + persist-credentials: false + - name: Calculate Matrix + id: set-matrix + run: | + export DRY_RUN_SHARDS=true + export BUILD_TYPE=presubmit + export TEST_TYPE=units + export GIT_DIFF_ARG=HEAD^1 + bash ci/run_conditional_tests.sh units: + needs: setup name: units (Node ${{ matrix.node-version }}, Shard ${{ matrix.shard-index }}) runs-on: ubuntu-latest strategy: fail-fast: false matrix: node-version: [22, 24, 26] - shard-index: [0, 1, 2, 3, 4] + shard-index: ${{ fromJSON(needs.setup.outputs.shard-matrix) }} steps: - uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6.1.0 with: @@ -31,7 +50,7 @@ jobs: env: BUILD_TYPE: presubmit TEST_TYPE: units - SHARD_TOTAL: 5 + SHARD_TOTAL: ${{ needs.setup.outputs.shard-total }} SHARD_INDEX: ${{ matrix.shard-index }} GIT_DIFF_ARG: HEAD^1 lint: diff --git a/.github/workflows/windows-presubmit.yaml b/.github/workflows/windows-presubmit.yaml index 3dee137d5023..247323d8fe50 100644 --- a/.github/workflows/windows-presubmit.yaml +++ b/.github/workflows/windows-presubmit.yaml @@ -5,14 +5,33 @@ on: pull_request: name: presubmit-windows jobs: + setup: + runs-on: ubuntu-latest + outputs: + shard-matrix: ${{ steps.set-matrix.outputs.shard_matrix }} + shard-total: ${{ steps.set-matrix.outputs.shard_total }} + steps: + - uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6.1.0 + with: + fetch-depth: 2 + persist-credentials: false + - name: Calculate Matrix + id: set-matrix + run: | + export DRY_RUN_SHARDS=true + export BUILD_TYPE=presubmit + export TEST_TYPE=units + export GIT_DIFF_ARG=HEAD^1 + bash ci/run_conditional_tests.sh units: + needs: setup name: units (Node ${{ matrix.node-version }}, Shard ${{ matrix.shard-index }}) runs-on: windows-latest strategy: fail-fast: false matrix: node-version: [22, 24, 26] - shard-index: [0, 1, 2, 3, 4] + shard-index: ${{ fromJSON(needs.setup.outputs.shard-matrix) }} steps: - uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6.1.0 with: @@ -32,6 +51,6 @@ jobs: env: BUILD_TYPE: presubmit TEST_TYPE: units - SHARD_TOTAL: 5 + SHARD_TOTAL: ${{ needs.setup.outputs.shard-total }} SHARD_INDEX: ${{ matrix.shard-index }} GIT_DIFF_ARG: HEAD^1 diff --git a/ci/run_conditional_tests.sh b/ci/run_conditional_tests.sh index c7d0c69525ed..f1f46a893b56 100755 --- a/ci/run_conditional_tests.sh +++ b/ci/run_conditional_tests.sh @@ -213,6 +213,18 @@ for subdir in ${subdirs[@]}; do fi done done +# If DRY_RUN_SHARDS is set, output dynamic matrix values to GitHub Actions and exit +if [[ "${DRY_RUN_SHARDS}" == "true" ]]; then + count=${#test_dirs[@]} + if [[ $count -gt 15 ]]; then + echo "shard_matrix=[0, 1, 2, 3, 4]" >> $GITHUB_OUTPUT + echo "shard_total=5" >> $GITHUB_OUTPUT + else + echo "shard_matrix=[0]" >> $GITHUB_OUTPUT + echo "shard_total=1" >> $GITHUB_OUTPUT + fi + exit 0 +fi # If SHARD_TOTAL and SHARD_INDEX are provided, we will only run a subset of the tests. for i in "${!test_dirs[@]}"; do diff --git a/core/packages/gcp-metadata/src/index.ts b/core/packages/gcp-metadata/src/index.ts index 723fcf1d3f1e..d438a4c8b6a7 100644 --- a/core/packages/gcp-metadata/src/index.ts +++ b/core/packages/gcp-metadata/src/index.ts @@ -383,12 +383,17 @@ export async function isAvailable() { if (err.response && err.response.status === 404) { return false; } else { + let errObj = e as any; + if (errObj instanceof Error && errObj.cause) { + errObj = errObj.cause; + } + const codes = - e instanceof Error && e.name === 'AggregateError' - ? (e as any).errors.map((error: any) => + errObj instanceof Error && errObj.name === 'AggregateError' + ? (errObj as any).errors.map((error: any) => error.code ? error.code.toString() : 'UNKNOWN', ) - : [err.code ? err.code.toString() : 'UNKNOWN']; + : [errObj.code ? errObj.code.toString() : 'UNKNOWN']; const isExpected = codes.every((code: string) => [ From 90754d47892abb2a7ab7e413134fdc86249e6b79 Mon Sep 17 00:00:00 2001 From: Brent Shaffer Date: Wed, 29 Jul 2026 22:51:32 +0000 Subject: [PATCH 11/24] fix(ci): common and pack-and-play tests --- core/dev-packages/pack-n-play/test/test.ts | 3 ++- .../nodejs-googleapis-common/src/discovery.ts | 12 +++++++++--- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/core/dev-packages/pack-n-play/test/test.ts b/core/dev-packages/pack-n-play/test/test.ts index da954b94ba08..21ab6e1bc88e 100644 --- a/core/dev-packages/pack-n-play/test/test.ts +++ b/core/dev-packages/pack-n-play/test/test.ts @@ -18,7 +18,8 @@ import execa = require('execa'); import {describe, it} from 'mocha'; describe('pack-n-play', () => { - it('should run tests', async () => { + it('should run tests', async function () { + this.timeout(120000); // 2 minutes const fixturesPath = path.resolve('./test/fixtures'); const dirs = fs .readdirSync(fixturesPath) diff --git a/core/packages/nodejs-googleapis-common/src/discovery.ts b/core/packages/nodejs-googleapis-common/src/discovery.ts index c00c663bed28..cb9114e05cdb 100644 --- a/core/packages/nodejs-googleapis-common/src/discovery.ts +++ b/core/packages/nodejs-googleapis-common/src/discovery.ts @@ -13,7 +13,6 @@ import * as fs from 'fs'; import {Gaxios} from 'gaxios'; -import resolve = require('url'); import * as util from 'util'; import {GlobalOptions, ServiceOptions, APIRequestParams} from './api'; @@ -136,8 +135,15 @@ export class Discovery { apiDiscoveryUrl: string | {url?: string}, ): Promise { if (typeof apiDiscoveryUrl === 'string') { - const parts = resolve.parse(apiDiscoveryUrl); - if (apiDiscoveryUrl && !parts.protocol) { + let isUrl = false; + try { + new URL(apiDiscoveryUrl); + isUrl = true; + } catch (e) { + // Not a valid URL + } + + if (apiDiscoveryUrl && !isUrl) { this.log('Reading from file ' + apiDiscoveryUrl); const file = await readFile(apiDiscoveryUrl, {encoding: 'utf8'}); return this.makeEndpoint(JSON.parse(file)); From e42dd27e537776aaf34519397b1f6908364ee53b Mon Sep 17 00:00:00 2001 From: Brent Shaffer Date: Wed, 29 Jul 2026 23:14:09 +0000 Subject: [PATCH 12/24] Revert "remove c8 text output" - we will handle this in a future PR This reverts commit 37e6bcf4816a4b11e68e74189b010c628e4bd926. --- .nycrc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.nycrc b/.nycrc index 5b4f895e9882..83a421a0628a 100644 --- a/.nycrc +++ b/.nycrc @@ -1,6 +1,6 @@ { "report-dir": "./.coverage", - "reporter": ["lcov"], + "reporter": ["text", "lcov"], "exclude": [ "**/*-test", "**/.coverage", From f12544ef23520fa3771524946eaf1988d20606b4 Mon Sep 17 00:00:00 2001 From: Brent Shaffer Date: Wed, 29 Jul 2026 23:22:50 +0000 Subject: [PATCH 13/24] add parent job for unit test shards (by node version), remove firestore test output --- .github/workflows/presubmit.yaml | 34 +++++++++++++++++++ .../firestore/dev/conformance/runner.ts | 2 -- 2 files changed, 34 insertions(+), 2 deletions(-) diff --git a/.github/workflows/presubmit.yaml b/.github/workflows/presubmit.yaml index 91d983e0b281..2c87f7666c3c 100644 --- a/.github/workflows/presubmit.yaml +++ b/.github/workflows/presubmit.yaml @@ -68,3 +68,37 @@ jobs: - run: npm install - run: npm run lint name: Run monorepo linter + + # Dummy jobs to satisfy branch protection requirements for each node version + units-status: + name: units (${{ matrix.node-version }}) + needs: units + runs-on: ubuntu-latest + if: always() + strategy: + fail-fast: false + matrix: + node-version: [22, 24, 26] + steps: + - name: Check shard status + uses: actions/github-script@v6 + with: + script: | + const { data: { jobs } } = await github.rest.actions.listJobsForWorkflowRun({ + owner: context.repo.owner, + repo: context.repo.repo, + run_id: context.runId, + }); + const nodeVersion = '${{ matrix.node-version }}'; + const shardJobs = jobs.filter(j => j.name.includes(`units (Node ${nodeVersion},`)); + if (shardJobs.length === 0) { + core.setFailed(`No shard jobs found for Node ${nodeVersion}`); + return; + } + const failed = shardJobs.filter(j => j.conclusion === 'failure' || j.conclusion === 'cancelled'); + if (failed.length > 0) { + const failedLinks = failed.map(j => `- ${j.name}: ${j.html_url}`).join('\n'); + core.setFailed(`${failed.length} shards failed for Node ${nodeVersion}:\n${failedLinks}`); + } else { + core.info(`All shards passed for Node ${nodeVersion}`); + } diff --git a/handwritten/firestore/dev/conformance/runner.ts b/handwritten/firestore/dev/conformance/runner.ts index 54bf22e77d4d..8acd520a4822 100644 --- a/handwritten/firestore/dev/conformance/runner.ts +++ b/handwritten/firestore/dev/conformance/runner.ts @@ -312,8 +312,6 @@ function getHandler(spec: ConformanceProto) { } function runTest(spec: ConformanceProto) { - console.log(`Running Spec:\n${JSON.stringify(spec, null, 2)}\n`); - const updateTest = (spec: ConformanceProto) => { const overrides = {commit: commitHandler(spec)}; return createInstance(overrides).then(() => { From 9d358d3103eb8faec2c70f6884c1c1f8c3fae385 Mon Sep 17 00:00:00 2001 From: Brent Shaffer Date: Thu, 30 Jul 2026 13:39:20 +0000 Subject: [PATCH 14/24] add dummy shards and extend test timeout for windows --- .github/workflows/windows-presubmit.yaml | 34 +++++++++++++++++++ .../test/fixtures/esm-package/test/test.js | 3 +- .../test/fixtures/leaky/test/test.ts | 3 +- .../test/fixtures/pass/test/test.ts | 3 +- 4 files changed, 40 insertions(+), 3 deletions(-) diff --git a/.github/workflows/windows-presubmit.yaml b/.github/workflows/windows-presubmit.yaml index 247323d8fe50..d6178f027af7 100644 --- a/.github/workflows/windows-presubmit.yaml +++ b/.github/workflows/windows-presubmit.yaml @@ -54,3 +54,37 @@ jobs: SHARD_TOTAL: ${{ needs.setup.outputs.shard-total }} SHARD_INDEX: ${{ matrix.shard-index }} GIT_DIFF_ARG: HEAD^1 + + # Dummy jobs to satisfy branch protection requirements for each node version + units-status: + name: units (${{ matrix.node-version }}) + needs: units + runs-on: ubuntu-latest + if: always() + strategy: + fail-fast: false + matrix: + node-version: [22, 24, 26] + steps: + - name: Check shard status + uses: actions/github-script@v6 + with: + script: | + const { data: { jobs } } = await github.rest.actions.listJobsForWorkflowRun({ + owner: context.repo.owner, + repo: context.repo.repo, + run_id: context.runId, + }); + const nodeVersion = '${{ matrix.node-version }}'; + const shardJobs = jobs.filter(j => j.name.includes(`units (Node ${nodeVersion},`)); + if (shardJobs.length === 0) { + core.setFailed(`No shard jobs found for Node ${nodeVersion}`); + return; + } + const failed = shardJobs.filter(j => j.conclusion === 'failure' || j.conclusion === 'cancelled'); + if (failed.length > 0) { + const failedLinks = failed.map(j => `- ${j.name}: ${j.html_url}`).join('\n'); + core.setFailed(`${failed.length} shards failed for Node ${nodeVersion}:\n${failedLinks}`); + } else { + core.info(`All shards passed for Node ${nodeVersion}`); + } diff --git a/core/dev-packages/pack-n-play/test/fixtures/esm-package/test/test.js b/core/dev-packages/pack-n-play/test/fixtures/esm-package/test/test.js index 037babedf227..2adbf53d289c 100644 --- a/core/dev-packages/pack-n-play/test/fixtures/esm-package/test/test.js +++ b/core/dev-packages/pack-n-play/test/fixtures/esm-package/test/test.js @@ -16,7 +16,8 @@ import {packNTest} from 'pack-n-play'; import * as assert from 'assert'; import {describe, it} from 'mocha'; -describe('ESM package', () => { +describe('ESM package', function () { + this.timeout(120000); it('should support esm property', () => packNTest({ sample: { diff --git a/core/dev-packages/pack-n-play/test/fixtures/leaky/test/test.ts b/core/dev-packages/pack-n-play/test/fixtures/leaky/test/test.ts index 3a9dc7f39b39..9c56bc9c0741 100644 --- a/core/dev-packages/pack-n-play/test/fixtures/leaky/test/test.ts +++ b/core/dev-packages/pack-n-play/test/fixtures/leaky/test/test.ts @@ -16,7 +16,8 @@ import {packNTest} from 'pack-n-play'; import * as assert from 'assert'; import {describe, it} from 'mocha'; -describe('leaky tests', () => { +describe('leaky tests', function () { + this.timeout(120000); it('should fail packing n testing', async () => { await assert.rejects( packNTest({ diff --git a/core/dev-packages/pack-n-play/test/fixtures/pass/test/test.ts b/core/dev-packages/pack-n-play/test/fixtures/pass/test/test.ts index 2dd02fb27cff..50d0d07d620d 100644 --- a/core/dev-packages/pack-n-play/test/fixtures/pass/test/test.ts +++ b/core/dev-packages/pack-n-play/test/fixtures/pass/test/test.ts @@ -15,7 +15,8 @@ import {packNTest} from 'pack-n-play'; import {describe, it} from 'mocha'; -describe('passing tests', () => { +describe('passing tests', function () { + this.timeout(120000); it('should pass the test', async () => { await packNTest({ sample: { From 127374fde63ee420ee3fde1ffd9b496e47093094 Mon Sep 17 00:00:00 2001 From: Brent Shaffer Date: Thu, 30 Jul 2026 14:15:25 +0000 Subject: [PATCH 15/24] improve bigtable unit-test performance --- .../test/metrics-collector/gcp-metrics-handler.ts | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/handwritten/bigtable/test/metrics-collector/gcp-metrics-handler.ts b/handwritten/bigtable/test/metrics-collector/gcp-metrics-handler.ts index 0e1d06039b8d..cd5a0cc0158b 100644 --- a/handwritten/bigtable/test/metrics-collector/gcp-metrics-handler.ts +++ b/handwritten/bigtable/test/metrics-collector/gcp-metrics-handler.ts @@ -148,10 +148,21 @@ describe('Bigtable/GCPMetricsHandler', () => { } } } + const sdkMetrics = require('@opentelemetry/sdk-metrics'); + class FastPeriodicExportingMetricReader extends sdkMetrics.PeriodicExportingMetricReader { + constructor(options: any) { + options.exportIntervalMillis = 1000; + super(options); + } + } const stubs = { './exporter': { CloudMonitoringExporter: TestExporter, }, + '@opentelemetry/sdk-metrics': { + ...sdkMetrics, + PeriodicExportingMetricReader: FastPeriodicExportingMetricReader, + }, }; const FakeMetricsHandler = proxyquire( '../../src/client-side-metrics/gcp-metrics-handler.js', From 9ebd7db6cfae951f39b1af47658de0b5e2ebba9f Mon Sep 17 00:00:00 2001 From: Brent Shaffer Date: Thu, 30 Jul 2026 14:23:21 +0000 Subject: [PATCH 16/24] increase timeout to 10 minutes for windows tests --- core/dev-packages/pack-n-play/test/test.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/dev-packages/pack-n-play/test/test.ts b/core/dev-packages/pack-n-play/test/test.ts index 21ab6e1bc88e..0272f3b3e9d9 100644 --- a/core/dev-packages/pack-n-play/test/test.ts +++ b/core/dev-packages/pack-n-play/test/test.ts @@ -19,7 +19,7 @@ import {describe, it} from 'mocha'; describe('pack-n-play', () => { it('should run tests', async function () { - this.timeout(120000); // 2 minutes + this.timeout(600000); // 10 minutes const fixturesPath = path.resolve('./test/fixtures'); const dirs = fs .readdirSync(fixturesPath) From ce4850eb3f0e7a6490db459024489226f51149d1 Mon Sep 17 00:00:00 2001 From: Brent Shaffer Date: Thu, 30 Jul 2026 13:46:12 +0000 Subject: [PATCH 17/24] fix bigtable-system-tests --- .../src/client-side-metrics/exporter.ts | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/handwritten/bigtable/src/client-side-metrics/exporter.ts b/handwritten/bigtable/src/client-side-metrics/exporter.ts index fa4fd3a900a8..df5e0bb209e6 100644 --- a/handwritten/bigtable/src/client-side-metrics/exporter.ts +++ b/handwritten/bigtable/src/client-side-metrics/exporter.ts @@ -52,14 +52,24 @@ function getInterval( | DataPoint | DataPoint, ) { + let endSec = dataPoint.endTime[0]; + let endNanos = dataPoint.endTime[1]; + const startSec = dataPoint.startTime[0]; + const startNanos = dataPoint.startTime[1]; + + if (startSec > endSec || (startSec === endSec && startNanos > endNanos)) { + endSec = startSec; + endNanos = startNanos; + } + return { endTime: { - seconds: dataPoint.endTime[0], - nanos: dataPoint.endTime[1], + seconds: endSec, + nanos: endNanos, }, startTime: { - seconds: dataPoint.startTime[0], - nanos: dataPoint.startTime[1], + seconds: startSec, + nanos: startNanos, }, }; } From cb703c9aed1a7675b60de46cd56092f078287a65 Mon Sep 17 00:00:00 2001 From: Brent Shaffer Date: Thu, 30 Jul 2026 15:14:53 +0000 Subject: [PATCH 18/24] skip pack-n-play tests on windows --- core/dev-packages/pack-n-play/test/test.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/core/dev-packages/pack-n-play/test/test.ts b/core/dev-packages/pack-n-play/test/test.ts index 0272f3b3e9d9..f916e9f7b589 100644 --- a/core/dev-packages/pack-n-play/test/test.ts +++ b/core/dev-packages/pack-n-play/test/test.ts @@ -19,7 +19,10 @@ import {describe, it} from 'mocha'; describe('pack-n-play', () => { it('should run tests', async function () { - this.timeout(600000); // 10 minutes + this.timeout(120000); // 2 minutes + if (process.platform === 'win32') { + this.skip(); + } const fixturesPath = path.resolve('./test/fixtures'); const dirs = fs .readdirSync(fixturesPath) From da39ebe83d0f42b3f13d059792834cbed2b31662 Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Thu, 30 Jul 2026 15:26:48 +0000 Subject: [PATCH 19/24] =?UTF-8?q?=F0=9F=A6=89=20Updates=20from=20OwlBot=20?= =?UTF-8?q?post-processor?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --- handwritten/bigtable/protos/protos.js | 12606 +++++++++++++++--------- 1 file changed, 7971 insertions(+), 4635 deletions(-) diff --git a/handwritten/bigtable/protos/protos.js b/handwritten/bigtable/protos/protos.js index 44572f079a17..e6c081c2a27a 100644 --- a/handwritten/bigtable/protos/protos.js +++ b/handwritten/bigtable/protos/protos.js @@ -28,7 +28,7 @@ var $Reader = $protobuf.Reader, $Writer = $protobuf.Writer, $util = $protobuf.util; // Exported root namespace - var $root = $protobuf.roots._google_cloud_bigtable_protos || ($protobuf.roots._google_cloud_bigtable_protos = {}); + var $root = $protobuf.roots["_google_cloud_bigtable_protos"] || ($protobuf.roots["_google_cloud_bigtable_protos"] = {}); $root.google = (function() { @@ -118,7 +118,7 @@ * @variation 1 */ Object.defineProperty(BigtableInstanceAdmin.prototype.createInstance = function createInstance(request, callback) { - return this.rpcCall(createInstance, $root.google.bigtable.admin.v2.CreateInstanceRequest, $root.google.longrunning.Operation, request, callback); + return $protobuf.rpc.Service.prototype.rpcCall.call(this, createInstance, $root.google.bigtable.admin.v2.CreateInstanceRequest, $root.google.longrunning.Operation, request, callback); }, "name", { value: "CreateInstance" }); /** @@ -151,7 +151,7 @@ * @variation 1 */ Object.defineProperty(BigtableInstanceAdmin.prototype.getInstance = function getInstance(request, callback) { - return this.rpcCall(getInstance, $root.google.bigtable.admin.v2.GetInstanceRequest, $root.google.bigtable.admin.v2.Instance, request, callback); + return $protobuf.rpc.Service.prototype.rpcCall.call(this, getInstance, $root.google.bigtable.admin.v2.GetInstanceRequest, $root.google.bigtable.admin.v2.Instance, request, callback); }, "name", { value: "GetInstance" }); /** @@ -184,7 +184,7 @@ * @variation 1 */ Object.defineProperty(BigtableInstanceAdmin.prototype.listInstances = function listInstances(request, callback) { - return this.rpcCall(listInstances, $root.google.bigtable.admin.v2.ListInstancesRequest, $root.google.bigtable.admin.v2.ListInstancesResponse, request, callback); + return $protobuf.rpc.Service.prototype.rpcCall.call(this, listInstances, $root.google.bigtable.admin.v2.ListInstancesRequest, $root.google.bigtable.admin.v2.ListInstancesResponse, request, callback); }, "name", { value: "ListInstances" }); /** @@ -217,7 +217,7 @@ * @variation 1 */ Object.defineProperty(BigtableInstanceAdmin.prototype.updateInstance = function updateInstance(request, callback) { - return this.rpcCall(updateInstance, $root.google.bigtable.admin.v2.Instance, $root.google.bigtable.admin.v2.Instance, request, callback); + return $protobuf.rpc.Service.prototype.rpcCall.call(this, updateInstance, $root.google.bigtable.admin.v2.Instance, $root.google.bigtable.admin.v2.Instance, request, callback); }, "name", { value: "UpdateInstance" }); /** @@ -250,7 +250,7 @@ * @variation 1 */ Object.defineProperty(BigtableInstanceAdmin.prototype.partialUpdateInstance = function partialUpdateInstance(request, callback) { - return this.rpcCall(partialUpdateInstance, $root.google.bigtable.admin.v2.PartialUpdateInstanceRequest, $root.google.longrunning.Operation, request, callback); + return $protobuf.rpc.Service.prototype.rpcCall.call(this, partialUpdateInstance, $root.google.bigtable.admin.v2.PartialUpdateInstanceRequest, $root.google.longrunning.Operation, request, callback); }, "name", { value: "PartialUpdateInstance" }); /** @@ -283,7 +283,7 @@ * @variation 1 */ Object.defineProperty(BigtableInstanceAdmin.prototype.deleteInstance = function deleteInstance(request, callback) { - return this.rpcCall(deleteInstance, $root.google.bigtable.admin.v2.DeleteInstanceRequest, $root.google.protobuf.Empty, request, callback); + return $protobuf.rpc.Service.prototype.rpcCall.call(this, deleteInstance, $root.google.bigtable.admin.v2.DeleteInstanceRequest, $root.google.protobuf.Empty, request, callback); }, "name", { value: "DeleteInstance" }); /** @@ -316,7 +316,7 @@ * @variation 1 */ Object.defineProperty(BigtableInstanceAdmin.prototype.createCluster = function createCluster(request, callback) { - return this.rpcCall(createCluster, $root.google.bigtable.admin.v2.CreateClusterRequest, $root.google.longrunning.Operation, request, callback); + return $protobuf.rpc.Service.prototype.rpcCall.call(this, createCluster, $root.google.bigtable.admin.v2.CreateClusterRequest, $root.google.longrunning.Operation, request, callback); }, "name", { value: "CreateCluster" }); /** @@ -349,7 +349,7 @@ * @variation 1 */ Object.defineProperty(BigtableInstanceAdmin.prototype.getCluster = function getCluster(request, callback) { - return this.rpcCall(getCluster, $root.google.bigtable.admin.v2.GetClusterRequest, $root.google.bigtable.admin.v2.Cluster, request, callback); + return $protobuf.rpc.Service.prototype.rpcCall.call(this, getCluster, $root.google.bigtable.admin.v2.GetClusterRequest, $root.google.bigtable.admin.v2.Cluster, request, callback); }, "name", { value: "GetCluster" }); /** @@ -382,7 +382,7 @@ * @variation 1 */ Object.defineProperty(BigtableInstanceAdmin.prototype.listClusters = function listClusters(request, callback) { - return this.rpcCall(listClusters, $root.google.bigtable.admin.v2.ListClustersRequest, $root.google.bigtable.admin.v2.ListClustersResponse, request, callback); + return $protobuf.rpc.Service.prototype.rpcCall.call(this, listClusters, $root.google.bigtable.admin.v2.ListClustersRequest, $root.google.bigtable.admin.v2.ListClustersResponse, request, callback); }, "name", { value: "ListClusters" }); /** @@ -415,7 +415,7 @@ * @variation 1 */ Object.defineProperty(BigtableInstanceAdmin.prototype.updateCluster = function updateCluster(request, callback) { - return this.rpcCall(updateCluster, $root.google.bigtable.admin.v2.Cluster, $root.google.longrunning.Operation, request, callback); + return $protobuf.rpc.Service.prototype.rpcCall.call(this, updateCluster, $root.google.bigtable.admin.v2.Cluster, $root.google.longrunning.Operation, request, callback); }, "name", { value: "UpdateCluster" }); /** @@ -448,7 +448,7 @@ * @variation 1 */ Object.defineProperty(BigtableInstanceAdmin.prototype.partialUpdateCluster = function partialUpdateCluster(request, callback) { - return this.rpcCall(partialUpdateCluster, $root.google.bigtable.admin.v2.PartialUpdateClusterRequest, $root.google.longrunning.Operation, request, callback); + return $protobuf.rpc.Service.prototype.rpcCall.call(this, partialUpdateCluster, $root.google.bigtable.admin.v2.PartialUpdateClusterRequest, $root.google.longrunning.Operation, request, callback); }, "name", { value: "PartialUpdateCluster" }); /** @@ -481,7 +481,7 @@ * @variation 1 */ Object.defineProperty(BigtableInstanceAdmin.prototype.deleteCluster = function deleteCluster(request, callback) { - return this.rpcCall(deleteCluster, $root.google.bigtable.admin.v2.DeleteClusterRequest, $root.google.protobuf.Empty, request, callback); + return $protobuf.rpc.Service.prototype.rpcCall.call(this, deleteCluster, $root.google.bigtable.admin.v2.DeleteClusterRequest, $root.google.protobuf.Empty, request, callback); }, "name", { value: "DeleteCluster" }); /** @@ -514,7 +514,7 @@ * @variation 1 */ Object.defineProperty(BigtableInstanceAdmin.prototype.createAppProfile = function createAppProfile(request, callback) { - return this.rpcCall(createAppProfile, $root.google.bigtable.admin.v2.CreateAppProfileRequest, $root.google.bigtable.admin.v2.AppProfile, request, callback); + return $protobuf.rpc.Service.prototype.rpcCall.call(this, createAppProfile, $root.google.bigtable.admin.v2.CreateAppProfileRequest, $root.google.bigtable.admin.v2.AppProfile, request, callback); }, "name", { value: "CreateAppProfile" }); /** @@ -547,7 +547,7 @@ * @variation 1 */ Object.defineProperty(BigtableInstanceAdmin.prototype.getAppProfile = function getAppProfile(request, callback) { - return this.rpcCall(getAppProfile, $root.google.bigtable.admin.v2.GetAppProfileRequest, $root.google.bigtable.admin.v2.AppProfile, request, callback); + return $protobuf.rpc.Service.prototype.rpcCall.call(this, getAppProfile, $root.google.bigtable.admin.v2.GetAppProfileRequest, $root.google.bigtable.admin.v2.AppProfile, request, callback); }, "name", { value: "GetAppProfile" }); /** @@ -580,7 +580,7 @@ * @variation 1 */ Object.defineProperty(BigtableInstanceAdmin.prototype.listAppProfiles = function listAppProfiles(request, callback) { - return this.rpcCall(listAppProfiles, $root.google.bigtable.admin.v2.ListAppProfilesRequest, $root.google.bigtable.admin.v2.ListAppProfilesResponse, request, callback); + return $protobuf.rpc.Service.prototype.rpcCall.call(this, listAppProfiles, $root.google.bigtable.admin.v2.ListAppProfilesRequest, $root.google.bigtable.admin.v2.ListAppProfilesResponse, request, callback); }, "name", { value: "ListAppProfiles" }); /** @@ -613,7 +613,7 @@ * @variation 1 */ Object.defineProperty(BigtableInstanceAdmin.prototype.updateAppProfile = function updateAppProfile(request, callback) { - return this.rpcCall(updateAppProfile, $root.google.bigtable.admin.v2.UpdateAppProfileRequest, $root.google.longrunning.Operation, request, callback); + return $protobuf.rpc.Service.prototype.rpcCall.call(this, updateAppProfile, $root.google.bigtable.admin.v2.UpdateAppProfileRequest, $root.google.longrunning.Operation, request, callback); }, "name", { value: "UpdateAppProfile" }); /** @@ -646,7 +646,7 @@ * @variation 1 */ Object.defineProperty(BigtableInstanceAdmin.prototype.deleteAppProfile = function deleteAppProfile(request, callback) { - return this.rpcCall(deleteAppProfile, $root.google.bigtable.admin.v2.DeleteAppProfileRequest, $root.google.protobuf.Empty, request, callback); + return $protobuf.rpc.Service.prototype.rpcCall.call(this, deleteAppProfile, $root.google.bigtable.admin.v2.DeleteAppProfileRequest, $root.google.protobuf.Empty, request, callback); }, "name", { value: "DeleteAppProfile" }); /** @@ -679,7 +679,7 @@ * @variation 1 */ Object.defineProperty(BigtableInstanceAdmin.prototype.getIamPolicy = function getIamPolicy(request, callback) { - return this.rpcCall(getIamPolicy, $root.google.iam.v1.GetIamPolicyRequest, $root.google.iam.v1.Policy, request, callback); + return $protobuf.rpc.Service.prototype.rpcCall.call(this, getIamPolicy, $root.google.iam.v1.GetIamPolicyRequest, $root.google.iam.v1.Policy, request, callback); }, "name", { value: "GetIamPolicy" }); /** @@ -712,7 +712,7 @@ * @variation 1 */ Object.defineProperty(BigtableInstanceAdmin.prototype.setIamPolicy = function setIamPolicy(request, callback) { - return this.rpcCall(setIamPolicy, $root.google.iam.v1.SetIamPolicyRequest, $root.google.iam.v1.Policy, request, callback); + return $protobuf.rpc.Service.prototype.rpcCall.call(this, setIamPolicy, $root.google.iam.v1.SetIamPolicyRequest, $root.google.iam.v1.Policy, request, callback); }, "name", { value: "SetIamPolicy" }); /** @@ -745,7 +745,7 @@ * @variation 1 */ Object.defineProperty(BigtableInstanceAdmin.prototype.testIamPermissions = function testIamPermissions(request, callback) { - return this.rpcCall(testIamPermissions, $root.google.iam.v1.TestIamPermissionsRequest, $root.google.iam.v1.TestIamPermissionsResponse, request, callback); + return $protobuf.rpc.Service.prototype.rpcCall.call(this, testIamPermissions, $root.google.iam.v1.TestIamPermissionsRequest, $root.google.iam.v1.TestIamPermissionsResponse, request, callback); }, "name", { value: "TestIamPermissions" }); /** @@ -778,7 +778,7 @@ * @variation 1 */ Object.defineProperty(BigtableInstanceAdmin.prototype.listHotTablets = function listHotTablets(request, callback) { - return this.rpcCall(listHotTablets, $root.google.bigtable.admin.v2.ListHotTabletsRequest, $root.google.bigtable.admin.v2.ListHotTabletsResponse, request, callback); + return $protobuf.rpc.Service.prototype.rpcCall.call(this, listHotTablets, $root.google.bigtable.admin.v2.ListHotTabletsRequest, $root.google.bigtable.admin.v2.ListHotTabletsResponse, request, callback); }, "name", { value: "ListHotTablets" }); /** @@ -811,7 +811,7 @@ * @variation 1 */ Object.defineProperty(BigtableInstanceAdmin.prototype.createLogicalView = function createLogicalView(request, callback) { - return this.rpcCall(createLogicalView, $root.google.bigtable.admin.v2.CreateLogicalViewRequest, $root.google.longrunning.Operation, request, callback); + return $protobuf.rpc.Service.prototype.rpcCall.call(this, createLogicalView, $root.google.bigtable.admin.v2.CreateLogicalViewRequest, $root.google.longrunning.Operation, request, callback); }, "name", { value: "CreateLogicalView" }); /** @@ -844,7 +844,7 @@ * @variation 1 */ Object.defineProperty(BigtableInstanceAdmin.prototype.getLogicalView = function getLogicalView(request, callback) { - return this.rpcCall(getLogicalView, $root.google.bigtable.admin.v2.GetLogicalViewRequest, $root.google.bigtable.admin.v2.LogicalView, request, callback); + return $protobuf.rpc.Service.prototype.rpcCall.call(this, getLogicalView, $root.google.bigtable.admin.v2.GetLogicalViewRequest, $root.google.bigtable.admin.v2.LogicalView, request, callback); }, "name", { value: "GetLogicalView" }); /** @@ -877,7 +877,7 @@ * @variation 1 */ Object.defineProperty(BigtableInstanceAdmin.prototype.listLogicalViews = function listLogicalViews(request, callback) { - return this.rpcCall(listLogicalViews, $root.google.bigtable.admin.v2.ListLogicalViewsRequest, $root.google.bigtable.admin.v2.ListLogicalViewsResponse, request, callback); + return $protobuf.rpc.Service.prototype.rpcCall.call(this, listLogicalViews, $root.google.bigtable.admin.v2.ListLogicalViewsRequest, $root.google.bigtable.admin.v2.ListLogicalViewsResponse, request, callback); }, "name", { value: "ListLogicalViews" }); /** @@ -910,7 +910,7 @@ * @variation 1 */ Object.defineProperty(BigtableInstanceAdmin.prototype.updateLogicalView = function updateLogicalView(request, callback) { - return this.rpcCall(updateLogicalView, $root.google.bigtable.admin.v2.UpdateLogicalViewRequest, $root.google.longrunning.Operation, request, callback); + return $protobuf.rpc.Service.prototype.rpcCall.call(this, updateLogicalView, $root.google.bigtable.admin.v2.UpdateLogicalViewRequest, $root.google.longrunning.Operation, request, callback); }, "name", { value: "UpdateLogicalView" }); /** @@ -943,7 +943,7 @@ * @variation 1 */ Object.defineProperty(BigtableInstanceAdmin.prototype.deleteLogicalView = function deleteLogicalView(request, callback) { - return this.rpcCall(deleteLogicalView, $root.google.bigtable.admin.v2.DeleteLogicalViewRequest, $root.google.protobuf.Empty, request, callback); + return $protobuf.rpc.Service.prototype.rpcCall.call(this, deleteLogicalView, $root.google.bigtable.admin.v2.DeleteLogicalViewRequest, $root.google.protobuf.Empty, request, callback); }, "name", { value: "DeleteLogicalView" }); /** @@ -976,7 +976,7 @@ * @variation 1 */ Object.defineProperty(BigtableInstanceAdmin.prototype.createMaterializedView = function createMaterializedView(request, callback) { - return this.rpcCall(createMaterializedView, $root.google.bigtable.admin.v2.CreateMaterializedViewRequest, $root.google.longrunning.Operation, request, callback); + return $protobuf.rpc.Service.prototype.rpcCall.call(this, createMaterializedView, $root.google.bigtable.admin.v2.CreateMaterializedViewRequest, $root.google.longrunning.Operation, request, callback); }, "name", { value: "CreateMaterializedView" }); /** @@ -1009,7 +1009,7 @@ * @variation 1 */ Object.defineProperty(BigtableInstanceAdmin.prototype.getMaterializedView = function getMaterializedView(request, callback) { - return this.rpcCall(getMaterializedView, $root.google.bigtable.admin.v2.GetMaterializedViewRequest, $root.google.bigtable.admin.v2.MaterializedView, request, callback); + return $protobuf.rpc.Service.prototype.rpcCall.call(this, getMaterializedView, $root.google.bigtable.admin.v2.GetMaterializedViewRequest, $root.google.bigtable.admin.v2.MaterializedView, request, callback); }, "name", { value: "GetMaterializedView" }); /** @@ -1042,7 +1042,7 @@ * @variation 1 */ Object.defineProperty(BigtableInstanceAdmin.prototype.listMaterializedViews = function listMaterializedViews(request, callback) { - return this.rpcCall(listMaterializedViews, $root.google.bigtable.admin.v2.ListMaterializedViewsRequest, $root.google.bigtable.admin.v2.ListMaterializedViewsResponse, request, callback); + return $protobuf.rpc.Service.prototype.rpcCall.call(this, listMaterializedViews, $root.google.bigtable.admin.v2.ListMaterializedViewsRequest, $root.google.bigtable.admin.v2.ListMaterializedViewsResponse, request, callback); }, "name", { value: "ListMaterializedViews" }); /** @@ -1075,7 +1075,7 @@ * @variation 1 */ Object.defineProperty(BigtableInstanceAdmin.prototype.updateMaterializedView = function updateMaterializedView(request, callback) { - return this.rpcCall(updateMaterializedView, $root.google.bigtable.admin.v2.UpdateMaterializedViewRequest, $root.google.longrunning.Operation, request, callback); + return $protobuf.rpc.Service.prototype.rpcCall.call(this, updateMaterializedView, $root.google.bigtable.admin.v2.UpdateMaterializedViewRequest, $root.google.longrunning.Operation, request, callback); }, "name", { value: "UpdateMaterializedView" }); /** @@ -1108,7 +1108,7 @@ * @variation 1 */ Object.defineProperty(BigtableInstanceAdmin.prototype.deleteMaterializedView = function deleteMaterializedView(request, callback) { - return this.rpcCall(deleteMaterializedView, $root.google.bigtable.admin.v2.DeleteMaterializedViewRequest, $root.google.protobuf.Empty, request, callback); + return $protobuf.rpc.Service.prototype.rpcCall.call(this, deleteMaterializedView, $root.google.bigtable.admin.v2.DeleteMaterializedViewRequest, $root.google.protobuf.Empty, request, callback); }, "name", { value: "DeleteMaterializedView" }); /** @@ -1205,19 +1205,23 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateInstanceRequest.encode = function encode(message, writer) { + CreateInstanceRequest.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); if (message.instanceId != null && Object.hasOwnProperty.call(message, "instanceId")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.instanceId); if (message.instance != null && Object.hasOwnProperty.call(message, "instance")) - $root.google.bigtable.admin.v2.Instance.encode(message.instance, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + $root.google.bigtable.admin.v2.Instance.encode(message.instance, writer.uint32(/* id 3, wireType 2 =*/26).fork(), q + 1).ldelim(); if (message.clusters != null && Object.hasOwnProperty.call(message, "clusters")) for (var keys = Object.keys(message.clusters), i = 0; i < keys.length; ++i) { writer.uint32(/* id 4, wireType 2 =*/34).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); - $root.google.bigtable.admin.v2.Cluster.encode(message.clusters[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); + $root.google.bigtable.admin.v2.Cluster.encode(message.clusters[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim().ldelim(); } return writer; }; @@ -1232,7 +1236,7 @@ * @returns {$protobuf.Writer} Writer */ CreateInstanceRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -1335,18 +1339,18 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.parent != null && message.hasOwnProperty("parent")) + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) if (!$util.isString(message.parent)) return "parent: string expected"; - if (message.instanceId != null && message.hasOwnProperty("instanceId")) + if (message.instanceId != null && Object.hasOwnProperty.call(message, "instanceId")) if (!$util.isString(message.instanceId)) return "instanceId: string expected"; - if (message.instance != null && message.hasOwnProperty("instance")) { + if (message.instance != null && Object.hasOwnProperty.call(message, "instance")) { var error = $root.google.bigtable.admin.v2.Instance.verify(message.instance, long + 1); if (error) return "instance." + error; } - if (message.clusters != null && message.hasOwnProperty("clusters")) { + if (message.clusters != null && Object.hasOwnProperty.call(message, "clusters")) { if (!$util.isObject(message.clusters)) return "clusters: object expected"; var key = Object.keys(message.clusters); @@ -1370,6 +1374,8 @@ CreateInstanceRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.google.bigtable.admin.v2.CreateInstanceRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.admin.v2.CreateInstanceRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -1380,18 +1386,18 @@ if (object.instanceId != null) message.instanceId = String(object.instanceId); if (object.instance != null) { - if (typeof object.instance !== "object") + if (!$util.isObject(object.instance)) throw TypeError(".google.bigtable.admin.v2.CreateInstanceRequest.instance: object expected"); message.instance = $root.google.bigtable.admin.v2.Instance.fromObject(object.instance, long + 1); } if (object.clusters) { - if (typeof object.clusters !== "object") + if (!$util.isObject(object.clusters)) throw TypeError(".google.bigtable.admin.v2.CreateInstanceRequest.clusters: object expected"); message.clusters = {}; for (var keys = Object.keys(object.clusters), i = 0; i < keys.length; ++i) { if (keys[i] === "__proto__") $util.makeProp(message.clusters, keys[i]); - if (typeof object.clusters[keys[i]] !== "object") + if (!$util.isObject(object.clusters[keys[i]])) throw TypeError(".google.bigtable.admin.v2.CreateInstanceRequest.clusters: object expected"); message.clusters[keys[i]] = $root.google.bigtable.admin.v2.Cluster.fromObject(object.clusters[keys[i]], long + 1); } @@ -1408,9 +1414,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CreateInstanceRequest.toObject = function toObject(message, options) { + CreateInstanceRequest.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.objects || options.defaults) object.clusters = {}; @@ -1419,19 +1429,19 @@ object.instanceId = ""; object.instance = null; } - if (message.parent != null && message.hasOwnProperty("parent")) + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) object.parent = message.parent; - if (message.instanceId != null && message.hasOwnProperty("instanceId")) + if (message.instanceId != null && Object.hasOwnProperty.call(message, "instanceId")) object.instanceId = message.instanceId; - if (message.instance != null && message.hasOwnProperty("instance")) - object.instance = $root.google.bigtable.admin.v2.Instance.toObject(message.instance, options); + if (message.instance != null && Object.hasOwnProperty.call(message, "instance")) + object.instance = $root.google.bigtable.admin.v2.Instance.toObject(message.instance, options, q + 1); var keys2; if (message.clusters && (keys2 = Object.keys(message.clusters)).length) { object.clusters = {}; for (var j = 0; j < keys2.length; ++j) { if (keys2[j] === "__proto__") $util.makeProp(object.clusters, keys2[j]); - object.clusters[keys2[j]] = $root.google.bigtable.admin.v2.Cluster.toObject(message.clusters[keys2[j]], options); + object.clusters[keys2[j]] = $root.google.bigtable.admin.v2.Cluster.toObject(message.clusters[keys2[j]], options, q + 1); } } return object; @@ -1519,9 +1529,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetInstanceRequest.encode = function encode(message, writer) { + GetInstanceRequest.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); return writer; @@ -1537,7 +1551,7 @@ * @returns {$protobuf.Writer} Writer */ GetInstanceRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -1607,7 +1621,7 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) if (!$util.isString(message.name)) return "name: string expected"; return null; @@ -1624,6 +1638,8 @@ GetInstanceRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.google.bigtable.admin.v2.GetInstanceRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.admin.v2.GetInstanceRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -1643,13 +1659,17 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetInstanceRequest.toObject = function toObject(message, options) { + GetInstanceRequest.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) object.name = message.name; return object; }; @@ -1745,9 +1765,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListInstancesRequest.encode = function encode(message, writer) { + ListInstancesRequest.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) @@ -1765,7 +1789,7 @@ * @returns {$protobuf.Writer} Writer */ ListInstancesRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -1839,10 +1863,10 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.parent != null && message.hasOwnProperty("parent")) + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) if (!$util.isString(message.parent)) return "parent: string expected"; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) if (!$util.isString(message.pageToken)) return "pageToken: string expected"; return null; @@ -1859,6 +1883,8 @@ ListInstancesRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.google.bigtable.admin.v2.ListInstancesRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.admin.v2.ListInstancesRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -1880,17 +1906,21 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListInstancesRequest.toObject = function toObject(message, options) { + ListInstancesRequest.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.parent = ""; object.pageToken = ""; } - if (message.parent != null && message.hasOwnProperty("parent")) + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) object.parent = message.parent; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) object.pageToken = message.pageToken; return object; }; @@ -1997,12 +2027,16 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListInstancesResponse.encode = function encode(message, writer) { + ListInstancesResponse.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.instances != null && message.instances.length) for (var i = 0; i < message.instances.length; ++i) - $root.google.bigtable.admin.v2.Instance.encode(message.instances[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + $root.google.bigtable.admin.v2.Instance.encode(message.instances[i], writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); if (message.failedLocations != null && message.failedLocations.length) for (var i = 0; i < message.failedLocations.length; ++i) writer.uint32(/* id 2, wireType 2 =*/18).string(message.failedLocations[i]); @@ -2021,7 +2055,7 @@ * @returns {$protobuf.Writer} Writer */ ListInstancesResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -2103,7 +2137,7 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.instances != null && message.hasOwnProperty("instances")) { + if (message.instances != null && Object.hasOwnProperty.call(message, "instances")) { if (!Array.isArray(message.instances)) return "instances: array expected"; for (var i = 0; i < message.instances.length; ++i) { @@ -2112,14 +2146,14 @@ return "instances." + error; } } - if (message.failedLocations != null && message.hasOwnProperty("failedLocations")) { + if (message.failedLocations != null && Object.hasOwnProperty.call(message, "failedLocations")) { if (!Array.isArray(message.failedLocations)) return "failedLocations: array expected"; for (var i = 0; i < message.failedLocations.length; ++i) if (!$util.isString(message.failedLocations[i])) return "failedLocations: string[] expected"; } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) if (!$util.isString(message.nextPageToken)) return "nextPageToken: string expected"; return null; @@ -2136,6 +2170,8 @@ ListInstancesResponse.fromObject = function fromObject(object, long) { if (object instanceof $root.google.bigtable.admin.v2.ListInstancesResponse) return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.admin.v2.ListInstancesResponse: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -2146,7 +2182,7 @@ throw TypeError(".google.bigtable.admin.v2.ListInstancesResponse.instances: array expected"); message.instances = []; for (var i = 0; i < object.instances.length; ++i) { - if (typeof object.instances[i] !== "object") + if (!$util.isObject(object.instances[i])) throw TypeError(".google.bigtable.admin.v2.ListInstancesResponse.instances: object expected"); message.instances[i] = $root.google.bigtable.admin.v2.Instance.fromObject(object.instances[i], long + 1); } @@ -2172,9 +2208,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListInstancesResponse.toObject = function toObject(message, options) { + ListInstancesResponse.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) { object.instances = []; @@ -2185,14 +2225,14 @@ if (message.instances && message.instances.length) { object.instances = []; for (var j = 0; j < message.instances.length; ++j) - object.instances[j] = $root.google.bigtable.admin.v2.Instance.toObject(message.instances[j], options); + object.instances[j] = $root.google.bigtable.admin.v2.Instance.toObject(message.instances[j], options, q + 1); } if (message.failedLocations && message.failedLocations.length) { object.failedLocations = []; for (var j = 0; j < message.failedLocations.length; ++j) object.failedLocations[j] = message.failedLocations[j]; } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) object.nextPageToken = message.nextPageToken; return object; }; @@ -2288,13 +2328,17 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - PartialUpdateInstanceRequest.encode = function encode(message, writer) { + PartialUpdateInstanceRequest.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.instance != null && Object.hasOwnProperty.call(message, "instance")) - $root.google.bigtable.admin.v2.Instance.encode(message.instance, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + $root.google.bigtable.admin.v2.Instance.encode(message.instance, writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) - $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); return writer; }; @@ -2308,7 +2352,7 @@ * @returns {$protobuf.Writer} Writer */ PartialUpdateInstanceRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -2382,12 +2426,12 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.instance != null && message.hasOwnProperty("instance")) { + if (message.instance != null && Object.hasOwnProperty.call(message, "instance")) { var error = $root.google.bigtable.admin.v2.Instance.verify(message.instance, long + 1); if (error) return "instance." + error; } - if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) { var error = $root.google.protobuf.FieldMask.verify(message.updateMask, long + 1); if (error) return "updateMask." + error; @@ -2406,18 +2450,20 @@ PartialUpdateInstanceRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.google.bigtable.admin.v2.PartialUpdateInstanceRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.admin.v2.PartialUpdateInstanceRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) throw Error("maximum nesting depth exceeded"); var message = new $root.google.bigtable.admin.v2.PartialUpdateInstanceRequest(); if (object.instance != null) { - if (typeof object.instance !== "object") + if (!$util.isObject(object.instance)) throw TypeError(".google.bigtable.admin.v2.PartialUpdateInstanceRequest.instance: object expected"); message.instance = $root.google.bigtable.admin.v2.Instance.fromObject(object.instance, long + 1); } if (object.updateMask != null) { - if (typeof object.updateMask !== "object") + if (!$util.isObject(object.updateMask)) throw TypeError(".google.bigtable.admin.v2.PartialUpdateInstanceRequest.updateMask: object expected"); message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask, long + 1); } @@ -2433,18 +2479,22 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - PartialUpdateInstanceRequest.toObject = function toObject(message, options) { + PartialUpdateInstanceRequest.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.instance = null; object.updateMask = null; } - if (message.instance != null && message.hasOwnProperty("instance")) - object.instance = $root.google.bigtable.admin.v2.Instance.toObject(message.instance, options); - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + if (message.instance != null && Object.hasOwnProperty.call(message, "instance")) + object.instance = $root.google.bigtable.admin.v2.Instance.toObject(message.instance, options, q + 1); + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options, q + 1); return object; }; @@ -2530,9 +2580,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteInstanceRequest.encode = function encode(message, writer) { + DeleteInstanceRequest.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); return writer; @@ -2548,7 +2602,7 @@ * @returns {$protobuf.Writer} Writer */ DeleteInstanceRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -2618,7 +2672,7 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) if (!$util.isString(message.name)) return "name: string expected"; return null; @@ -2635,6 +2689,8 @@ DeleteInstanceRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.google.bigtable.admin.v2.DeleteInstanceRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.admin.v2.DeleteInstanceRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -2654,13 +2710,17 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DeleteInstanceRequest.toObject = function toObject(message, options) { + DeleteInstanceRequest.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) object.name = message.name; return object; }; @@ -2765,15 +2825,19 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateClusterRequest.encode = function encode(message, writer) { + CreateClusterRequest.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); if (message.clusterId != null && Object.hasOwnProperty.call(message, "clusterId")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.clusterId); if (message.cluster != null && Object.hasOwnProperty.call(message, "cluster")) - $root.google.bigtable.admin.v2.Cluster.encode(message.cluster, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + $root.google.bigtable.admin.v2.Cluster.encode(message.cluster, writer.uint32(/* id 3, wireType 2 =*/26).fork(), q + 1).ldelim(); return writer; }; @@ -2787,7 +2851,7 @@ * @returns {$protobuf.Writer} Writer */ CreateClusterRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -2865,13 +2929,13 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.parent != null && message.hasOwnProperty("parent")) + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) if (!$util.isString(message.parent)) return "parent: string expected"; - if (message.clusterId != null && message.hasOwnProperty("clusterId")) + if (message.clusterId != null && Object.hasOwnProperty.call(message, "clusterId")) if (!$util.isString(message.clusterId)) return "clusterId: string expected"; - if (message.cluster != null && message.hasOwnProperty("cluster")) { + if (message.cluster != null && Object.hasOwnProperty.call(message, "cluster")) { var error = $root.google.bigtable.admin.v2.Cluster.verify(message.cluster, long + 1); if (error) return "cluster." + error; @@ -2890,6 +2954,8 @@ CreateClusterRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.google.bigtable.admin.v2.CreateClusterRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.admin.v2.CreateClusterRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -2900,7 +2966,7 @@ if (object.clusterId != null) message.clusterId = String(object.clusterId); if (object.cluster != null) { - if (typeof object.cluster !== "object") + if (!$util.isObject(object.cluster)) throw TypeError(".google.bigtable.admin.v2.CreateClusterRequest.cluster: object expected"); message.cluster = $root.google.bigtable.admin.v2.Cluster.fromObject(object.cluster, long + 1); } @@ -2916,21 +2982,25 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CreateClusterRequest.toObject = function toObject(message, options) { + CreateClusterRequest.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.parent = ""; object.clusterId = ""; object.cluster = null; } - if (message.parent != null && message.hasOwnProperty("parent")) + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) object.parent = message.parent; - if (message.clusterId != null && message.hasOwnProperty("clusterId")) + if (message.clusterId != null && Object.hasOwnProperty.call(message, "clusterId")) object.clusterId = message.clusterId; - if (message.cluster != null && message.hasOwnProperty("cluster")) - object.cluster = $root.google.bigtable.admin.v2.Cluster.toObject(message.cluster, options); + if (message.cluster != null && Object.hasOwnProperty.call(message, "cluster")) + object.cluster = $root.google.bigtable.admin.v2.Cluster.toObject(message.cluster, options, q + 1); return object; }; @@ -3016,9 +3086,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetClusterRequest.encode = function encode(message, writer) { + GetClusterRequest.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); return writer; @@ -3034,7 +3108,7 @@ * @returns {$protobuf.Writer} Writer */ GetClusterRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -3104,7 +3178,7 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) if (!$util.isString(message.name)) return "name: string expected"; return null; @@ -3121,6 +3195,8 @@ GetClusterRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.google.bigtable.admin.v2.GetClusterRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.admin.v2.GetClusterRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -3140,13 +3216,17 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetClusterRequest.toObject = function toObject(message, options) { + GetClusterRequest.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) object.name = message.name; return object; }; @@ -3242,9 +3322,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListClustersRequest.encode = function encode(message, writer) { + ListClustersRequest.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) @@ -3262,7 +3346,7 @@ * @returns {$protobuf.Writer} Writer */ ListClustersRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -3336,10 +3420,10 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.parent != null && message.hasOwnProperty("parent")) + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) if (!$util.isString(message.parent)) return "parent: string expected"; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) if (!$util.isString(message.pageToken)) return "pageToken: string expected"; return null; @@ -3356,6 +3440,8 @@ ListClustersRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.google.bigtable.admin.v2.ListClustersRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.admin.v2.ListClustersRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -3377,17 +3463,21 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListClustersRequest.toObject = function toObject(message, options) { + ListClustersRequest.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.parent = ""; object.pageToken = ""; } - if (message.parent != null && message.hasOwnProperty("parent")) + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) object.parent = message.parent; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) object.pageToken = message.pageToken; return object; }; @@ -3494,12 +3584,16 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListClustersResponse.encode = function encode(message, writer) { + ListClustersResponse.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.clusters != null && message.clusters.length) for (var i = 0; i < message.clusters.length; ++i) - $root.google.bigtable.admin.v2.Cluster.encode(message.clusters[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + $root.google.bigtable.admin.v2.Cluster.encode(message.clusters[i], writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); if (message.failedLocations != null && message.failedLocations.length) for (var i = 0; i < message.failedLocations.length; ++i) writer.uint32(/* id 2, wireType 2 =*/18).string(message.failedLocations[i]); @@ -3518,7 +3612,7 @@ * @returns {$protobuf.Writer} Writer */ ListClustersResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -3600,7 +3694,7 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.clusters != null && message.hasOwnProperty("clusters")) { + if (message.clusters != null && Object.hasOwnProperty.call(message, "clusters")) { if (!Array.isArray(message.clusters)) return "clusters: array expected"; for (var i = 0; i < message.clusters.length; ++i) { @@ -3609,14 +3703,14 @@ return "clusters." + error; } } - if (message.failedLocations != null && message.hasOwnProperty("failedLocations")) { + if (message.failedLocations != null && Object.hasOwnProperty.call(message, "failedLocations")) { if (!Array.isArray(message.failedLocations)) return "failedLocations: array expected"; for (var i = 0; i < message.failedLocations.length; ++i) if (!$util.isString(message.failedLocations[i])) return "failedLocations: string[] expected"; } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) if (!$util.isString(message.nextPageToken)) return "nextPageToken: string expected"; return null; @@ -3633,6 +3727,8 @@ ListClustersResponse.fromObject = function fromObject(object, long) { if (object instanceof $root.google.bigtable.admin.v2.ListClustersResponse) return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.admin.v2.ListClustersResponse: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -3643,7 +3739,7 @@ throw TypeError(".google.bigtable.admin.v2.ListClustersResponse.clusters: array expected"); message.clusters = []; for (var i = 0; i < object.clusters.length; ++i) { - if (typeof object.clusters[i] !== "object") + if (!$util.isObject(object.clusters[i])) throw TypeError(".google.bigtable.admin.v2.ListClustersResponse.clusters: object expected"); message.clusters[i] = $root.google.bigtable.admin.v2.Cluster.fromObject(object.clusters[i], long + 1); } @@ -3669,9 +3765,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListClustersResponse.toObject = function toObject(message, options) { + ListClustersResponse.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) { object.clusters = []; @@ -3682,14 +3782,14 @@ if (message.clusters && message.clusters.length) { object.clusters = []; for (var j = 0; j < message.clusters.length; ++j) - object.clusters[j] = $root.google.bigtable.admin.v2.Cluster.toObject(message.clusters[j], options); + object.clusters[j] = $root.google.bigtable.admin.v2.Cluster.toObject(message.clusters[j], options, q + 1); } if (message.failedLocations && message.failedLocations.length) { object.failedLocations = []; for (var j = 0; j < message.failedLocations.length; ++j) object.failedLocations[j] = message.failedLocations[j]; } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) object.nextPageToken = message.nextPageToken; return object; }; @@ -3776,9 +3876,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteClusterRequest.encode = function encode(message, writer) { + DeleteClusterRequest.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); return writer; @@ -3794,7 +3898,7 @@ * @returns {$protobuf.Writer} Writer */ DeleteClusterRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -3864,7 +3968,7 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) if (!$util.isString(message.name)) return "name: string expected"; return null; @@ -3881,6 +3985,8 @@ DeleteClusterRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.google.bigtable.admin.v2.DeleteClusterRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.admin.v2.DeleteClusterRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -3900,13 +4006,17 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DeleteClusterRequest.toObject = function toObject(message, options) { + DeleteClusterRequest.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) object.name = message.name; return object; }; @@ -4011,15 +4121,19 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateInstanceMetadata.encode = function encode(message, writer) { + CreateInstanceMetadata.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.originalRequest != null && Object.hasOwnProperty.call(message, "originalRequest")) - $root.google.bigtable.admin.v2.CreateInstanceRequest.encode(message.originalRequest, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + $root.google.bigtable.admin.v2.CreateInstanceRequest.encode(message.originalRequest, writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); if (message.requestTime != null && Object.hasOwnProperty.call(message, "requestTime")) - $root.google.protobuf.Timestamp.encode(message.requestTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + $root.google.protobuf.Timestamp.encode(message.requestTime, writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); if (message.finishTime != null && Object.hasOwnProperty.call(message, "finishTime")) - $root.google.protobuf.Timestamp.encode(message.finishTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + $root.google.protobuf.Timestamp.encode(message.finishTime, writer.uint32(/* id 3, wireType 2 =*/26).fork(), q + 1).ldelim(); return writer; }; @@ -4033,7 +4147,7 @@ * @returns {$protobuf.Writer} Writer */ CreateInstanceMetadata.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -4111,17 +4225,17 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.originalRequest != null && message.hasOwnProperty("originalRequest")) { + if (message.originalRequest != null && Object.hasOwnProperty.call(message, "originalRequest")) { var error = $root.google.bigtable.admin.v2.CreateInstanceRequest.verify(message.originalRequest, long + 1); if (error) return "originalRequest." + error; } - if (message.requestTime != null && message.hasOwnProperty("requestTime")) { + if (message.requestTime != null && Object.hasOwnProperty.call(message, "requestTime")) { var error = $root.google.protobuf.Timestamp.verify(message.requestTime, long + 1); if (error) return "requestTime." + error; } - if (message.finishTime != null && message.hasOwnProperty("finishTime")) { + if (message.finishTime != null && Object.hasOwnProperty.call(message, "finishTime")) { var error = $root.google.protobuf.Timestamp.verify(message.finishTime, long + 1); if (error) return "finishTime." + error; @@ -4140,23 +4254,25 @@ CreateInstanceMetadata.fromObject = function fromObject(object, long) { if (object instanceof $root.google.bigtable.admin.v2.CreateInstanceMetadata) return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.admin.v2.CreateInstanceMetadata: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) throw Error("maximum nesting depth exceeded"); var message = new $root.google.bigtable.admin.v2.CreateInstanceMetadata(); if (object.originalRequest != null) { - if (typeof object.originalRequest !== "object") + if (!$util.isObject(object.originalRequest)) throw TypeError(".google.bigtable.admin.v2.CreateInstanceMetadata.originalRequest: object expected"); message.originalRequest = $root.google.bigtable.admin.v2.CreateInstanceRequest.fromObject(object.originalRequest, long + 1); } if (object.requestTime != null) { - if (typeof object.requestTime !== "object") + if (!$util.isObject(object.requestTime)) throw TypeError(".google.bigtable.admin.v2.CreateInstanceMetadata.requestTime: object expected"); message.requestTime = $root.google.protobuf.Timestamp.fromObject(object.requestTime, long + 1); } if (object.finishTime != null) { - if (typeof object.finishTime !== "object") + if (!$util.isObject(object.finishTime)) throw TypeError(".google.bigtable.admin.v2.CreateInstanceMetadata.finishTime: object expected"); message.finishTime = $root.google.protobuf.Timestamp.fromObject(object.finishTime, long + 1); } @@ -4172,21 +4288,25 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CreateInstanceMetadata.toObject = function toObject(message, options) { + CreateInstanceMetadata.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.originalRequest = null; object.requestTime = null; object.finishTime = null; } - if (message.originalRequest != null && message.hasOwnProperty("originalRequest")) - object.originalRequest = $root.google.bigtable.admin.v2.CreateInstanceRequest.toObject(message.originalRequest, options); - if (message.requestTime != null && message.hasOwnProperty("requestTime")) - object.requestTime = $root.google.protobuf.Timestamp.toObject(message.requestTime, options); - if (message.finishTime != null && message.hasOwnProperty("finishTime")) - object.finishTime = $root.google.protobuf.Timestamp.toObject(message.finishTime, options); + if (message.originalRequest != null && Object.hasOwnProperty.call(message, "originalRequest")) + object.originalRequest = $root.google.bigtable.admin.v2.CreateInstanceRequest.toObject(message.originalRequest, options, q + 1); + if (message.requestTime != null && Object.hasOwnProperty.call(message, "requestTime")) + object.requestTime = $root.google.protobuf.Timestamp.toObject(message.requestTime, options, q + 1); + if (message.finishTime != null && Object.hasOwnProperty.call(message, "finishTime")) + object.finishTime = $root.google.protobuf.Timestamp.toObject(message.finishTime, options, q + 1); return object; }; @@ -4290,15 +4410,19 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateInstanceMetadata.encode = function encode(message, writer) { + UpdateInstanceMetadata.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.originalRequest != null && Object.hasOwnProperty.call(message, "originalRequest")) - $root.google.bigtable.admin.v2.PartialUpdateInstanceRequest.encode(message.originalRequest, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + $root.google.bigtable.admin.v2.PartialUpdateInstanceRequest.encode(message.originalRequest, writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); if (message.requestTime != null && Object.hasOwnProperty.call(message, "requestTime")) - $root.google.protobuf.Timestamp.encode(message.requestTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + $root.google.protobuf.Timestamp.encode(message.requestTime, writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); if (message.finishTime != null && Object.hasOwnProperty.call(message, "finishTime")) - $root.google.protobuf.Timestamp.encode(message.finishTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + $root.google.protobuf.Timestamp.encode(message.finishTime, writer.uint32(/* id 3, wireType 2 =*/26).fork(), q + 1).ldelim(); return writer; }; @@ -4312,7 +4436,7 @@ * @returns {$protobuf.Writer} Writer */ UpdateInstanceMetadata.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -4390,17 +4514,17 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.originalRequest != null && message.hasOwnProperty("originalRequest")) { + if (message.originalRequest != null && Object.hasOwnProperty.call(message, "originalRequest")) { var error = $root.google.bigtable.admin.v2.PartialUpdateInstanceRequest.verify(message.originalRequest, long + 1); if (error) return "originalRequest." + error; } - if (message.requestTime != null && message.hasOwnProperty("requestTime")) { + if (message.requestTime != null && Object.hasOwnProperty.call(message, "requestTime")) { var error = $root.google.protobuf.Timestamp.verify(message.requestTime, long + 1); if (error) return "requestTime." + error; } - if (message.finishTime != null && message.hasOwnProperty("finishTime")) { + if (message.finishTime != null && Object.hasOwnProperty.call(message, "finishTime")) { var error = $root.google.protobuf.Timestamp.verify(message.finishTime, long + 1); if (error) return "finishTime." + error; @@ -4419,23 +4543,25 @@ UpdateInstanceMetadata.fromObject = function fromObject(object, long) { if (object instanceof $root.google.bigtable.admin.v2.UpdateInstanceMetadata) return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.admin.v2.UpdateInstanceMetadata: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) throw Error("maximum nesting depth exceeded"); var message = new $root.google.bigtable.admin.v2.UpdateInstanceMetadata(); if (object.originalRequest != null) { - if (typeof object.originalRequest !== "object") + if (!$util.isObject(object.originalRequest)) throw TypeError(".google.bigtable.admin.v2.UpdateInstanceMetadata.originalRequest: object expected"); message.originalRequest = $root.google.bigtable.admin.v2.PartialUpdateInstanceRequest.fromObject(object.originalRequest, long + 1); } if (object.requestTime != null) { - if (typeof object.requestTime !== "object") + if (!$util.isObject(object.requestTime)) throw TypeError(".google.bigtable.admin.v2.UpdateInstanceMetadata.requestTime: object expected"); message.requestTime = $root.google.protobuf.Timestamp.fromObject(object.requestTime, long + 1); } if (object.finishTime != null) { - if (typeof object.finishTime !== "object") + if (!$util.isObject(object.finishTime)) throw TypeError(".google.bigtable.admin.v2.UpdateInstanceMetadata.finishTime: object expected"); message.finishTime = $root.google.protobuf.Timestamp.fromObject(object.finishTime, long + 1); } @@ -4451,21 +4577,25 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - UpdateInstanceMetadata.toObject = function toObject(message, options) { + UpdateInstanceMetadata.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.originalRequest = null; object.requestTime = null; object.finishTime = null; } - if (message.originalRequest != null && message.hasOwnProperty("originalRequest")) - object.originalRequest = $root.google.bigtable.admin.v2.PartialUpdateInstanceRequest.toObject(message.originalRequest, options); - if (message.requestTime != null && message.hasOwnProperty("requestTime")) - object.requestTime = $root.google.protobuf.Timestamp.toObject(message.requestTime, options); - if (message.finishTime != null && message.hasOwnProperty("finishTime")) - object.finishTime = $root.google.protobuf.Timestamp.toObject(message.finishTime, options); + if (message.originalRequest != null && Object.hasOwnProperty.call(message, "originalRequest")) + object.originalRequest = $root.google.bigtable.admin.v2.PartialUpdateInstanceRequest.toObject(message.originalRequest, options, q + 1); + if (message.requestTime != null && Object.hasOwnProperty.call(message, "requestTime")) + object.requestTime = $root.google.protobuf.Timestamp.toObject(message.requestTime, options, q + 1); + if (message.finishTime != null && Object.hasOwnProperty.call(message, "finishTime")) + object.finishTime = $root.google.protobuf.Timestamp.toObject(message.finishTime, options, q + 1); return object; }; @@ -4579,19 +4709,23 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateClusterMetadata.encode = function encode(message, writer) { + CreateClusterMetadata.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.originalRequest != null && Object.hasOwnProperty.call(message, "originalRequest")) - $root.google.bigtable.admin.v2.CreateClusterRequest.encode(message.originalRequest, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + $root.google.bigtable.admin.v2.CreateClusterRequest.encode(message.originalRequest, writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); if (message.requestTime != null && Object.hasOwnProperty.call(message, "requestTime")) - $root.google.protobuf.Timestamp.encode(message.requestTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + $root.google.protobuf.Timestamp.encode(message.requestTime, writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); if (message.finishTime != null && Object.hasOwnProperty.call(message, "finishTime")) - $root.google.protobuf.Timestamp.encode(message.finishTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + $root.google.protobuf.Timestamp.encode(message.finishTime, writer.uint32(/* id 3, wireType 2 =*/26).fork(), q + 1).ldelim(); if (message.tables != null && Object.hasOwnProperty.call(message, "tables")) for (var keys = Object.keys(message.tables), i = 0; i < keys.length; ++i) { writer.uint32(/* id 4, wireType 2 =*/34).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); - $root.google.bigtable.admin.v2.CreateClusterMetadata.TableProgress.encode(message.tables[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); + $root.google.bigtable.admin.v2.CreateClusterMetadata.TableProgress.encode(message.tables[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim().ldelim(); } return writer; }; @@ -4606,7 +4740,7 @@ * @returns {$protobuf.Writer} Writer */ CreateClusterMetadata.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -4709,22 +4843,22 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.originalRequest != null && message.hasOwnProperty("originalRequest")) { + if (message.originalRequest != null && Object.hasOwnProperty.call(message, "originalRequest")) { var error = $root.google.bigtable.admin.v2.CreateClusterRequest.verify(message.originalRequest, long + 1); if (error) return "originalRequest." + error; } - if (message.requestTime != null && message.hasOwnProperty("requestTime")) { + if (message.requestTime != null && Object.hasOwnProperty.call(message, "requestTime")) { var error = $root.google.protobuf.Timestamp.verify(message.requestTime, long + 1); if (error) return "requestTime." + error; } - if (message.finishTime != null && message.hasOwnProperty("finishTime")) { + if (message.finishTime != null && Object.hasOwnProperty.call(message, "finishTime")) { var error = $root.google.protobuf.Timestamp.verify(message.finishTime, long + 1); if (error) return "finishTime." + error; } - if (message.tables != null && message.hasOwnProperty("tables")) { + if (message.tables != null && Object.hasOwnProperty.call(message, "tables")) { if (!$util.isObject(message.tables)) return "tables: object expected"; var key = Object.keys(message.tables); @@ -4748,34 +4882,36 @@ CreateClusterMetadata.fromObject = function fromObject(object, long) { if (object instanceof $root.google.bigtable.admin.v2.CreateClusterMetadata) return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.admin.v2.CreateClusterMetadata: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) throw Error("maximum nesting depth exceeded"); var message = new $root.google.bigtable.admin.v2.CreateClusterMetadata(); if (object.originalRequest != null) { - if (typeof object.originalRequest !== "object") + if (!$util.isObject(object.originalRequest)) throw TypeError(".google.bigtable.admin.v2.CreateClusterMetadata.originalRequest: object expected"); message.originalRequest = $root.google.bigtable.admin.v2.CreateClusterRequest.fromObject(object.originalRequest, long + 1); } if (object.requestTime != null) { - if (typeof object.requestTime !== "object") + if (!$util.isObject(object.requestTime)) throw TypeError(".google.bigtable.admin.v2.CreateClusterMetadata.requestTime: object expected"); message.requestTime = $root.google.protobuf.Timestamp.fromObject(object.requestTime, long + 1); } if (object.finishTime != null) { - if (typeof object.finishTime !== "object") + if (!$util.isObject(object.finishTime)) throw TypeError(".google.bigtable.admin.v2.CreateClusterMetadata.finishTime: object expected"); message.finishTime = $root.google.protobuf.Timestamp.fromObject(object.finishTime, long + 1); } if (object.tables) { - if (typeof object.tables !== "object") + if (!$util.isObject(object.tables)) throw TypeError(".google.bigtable.admin.v2.CreateClusterMetadata.tables: object expected"); message.tables = {}; for (var keys = Object.keys(object.tables), i = 0; i < keys.length; ++i) { if (keys[i] === "__proto__") $util.makeProp(message.tables, keys[i]); - if (typeof object.tables[keys[i]] !== "object") + if (!$util.isObject(object.tables[keys[i]])) throw TypeError(".google.bigtable.admin.v2.CreateClusterMetadata.tables: object expected"); message.tables[keys[i]] = $root.google.bigtable.admin.v2.CreateClusterMetadata.TableProgress.fromObject(object.tables[keys[i]], long + 1); } @@ -4792,9 +4928,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CreateClusterMetadata.toObject = function toObject(message, options) { + CreateClusterMetadata.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.objects || options.defaults) object.tables = {}; @@ -4803,19 +4943,19 @@ object.requestTime = null; object.finishTime = null; } - if (message.originalRequest != null && message.hasOwnProperty("originalRequest")) - object.originalRequest = $root.google.bigtable.admin.v2.CreateClusterRequest.toObject(message.originalRequest, options); - if (message.requestTime != null && message.hasOwnProperty("requestTime")) - object.requestTime = $root.google.protobuf.Timestamp.toObject(message.requestTime, options); - if (message.finishTime != null && message.hasOwnProperty("finishTime")) - object.finishTime = $root.google.protobuf.Timestamp.toObject(message.finishTime, options); + if (message.originalRequest != null && Object.hasOwnProperty.call(message, "originalRequest")) + object.originalRequest = $root.google.bigtable.admin.v2.CreateClusterRequest.toObject(message.originalRequest, options, q + 1); + if (message.requestTime != null && Object.hasOwnProperty.call(message, "requestTime")) + object.requestTime = $root.google.protobuf.Timestamp.toObject(message.requestTime, options, q + 1); + if (message.finishTime != null && Object.hasOwnProperty.call(message, "finishTime")) + object.finishTime = $root.google.protobuf.Timestamp.toObject(message.finishTime, options, q + 1); var keys2; if (message.tables && (keys2 = Object.keys(message.tables)).length) { object.tables = {}; for (var j = 0; j < keys2.length; ++j) { if (keys2[j] === "__proto__") $util.makeProp(object.tables, keys2[j]); - object.tables[keys2[j]] = $root.google.bigtable.admin.v2.CreateClusterMetadata.TableProgress.toObject(message.tables[keys2[j]], options); + object.tables[keys2[j]] = $root.google.bigtable.admin.v2.CreateClusterMetadata.TableProgress.toObject(message.tables[keys2[j]], options, q + 1); } } return object; @@ -4918,9 +5058,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - TableProgress.encode = function encode(message, writer) { + TableProgress.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.estimatedSizeBytes != null && Object.hasOwnProperty.call(message, "estimatedSizeBytes")) writer.uint32(/* id 2, wireType 0 =*/16).int64(message.estimatedSizeBytes); if (message.estimatedCopiedBytes != null && Object.hasOwnProperty.call(message, "estimatedCopiedBytes")) @@ -4940,7 +5084,7 @@ * @returns {$protobuf.Writer} Writer */ TableProgress.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -5018,13 +5162,13 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.estimatedSizeBytes != null && message.hasOwnProperty("estimatedSizeBytes")) + if (message.estimatedSizeBytes != null && Object.hasOwnProperty.call(message, "estimatedSizeBytes")) if (!$util.isInteger(message.estimatedSizeBytes) && !(message.estimatedSizeBytes && $util.isInteger(message.estimatedSizeBytes.low) && $util.isInteger(message.estimatedSizeBytes.high))) return "estimatedSizeBytes: integer|Long expected"; - if (message.estimatedCopiedBytes != null && message.hasOwnProperty("estimatedCopiedBytes")) + if (message.estimatedCopiedBytes != null && Object.hasOwnProperty.call(message, "estimatedCopiedBytes")) if (!$util.isInteger(message.estimatedCopiedBytes) && !(message.estimatedCopiedBytes && $util.isInteger(message.estimatedCopiedBytes.low) && $util.isInteger(message.estimatedCopiedBytes.high))) return "estimatedCopiedBytes: integer|Long expected"; - if (message.state != null && message.hasOwnProperty("state")) + if (message.state != null && Object.hasOwnProperty.call(message, "state")) switch (message.state) { default: return "state: enum value expected"; @@ -5049,6 +5193,8 @@ TableProgress.fromObject = function fromObject(object, long) { if (object instanceof $root.google.bigtable.admin.v2.CreateClusterMetadata.TableProgress) return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.admin.v2.CreateClusterMetadata.TableProgress: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -5056,7 +5202,7 @@ var message = new $root.google.bigtable.admin.v2.CreateClusterMetadata.TableProgress(); if (object.estimatedSizeBytes != null) if ($util.Long) - (message.estimatedSizeBytes = $util.Long.fromValue(object.estimatedSizeBytes)).unsigned = false; + message.estimatedSizeBytes = $util.Long.fromValue(object.estimatedSizeBytes, false); else if (typeof object.estimatedSizeBytes === "string") message.estimatedSizeBytes = parseInt(object.estimatedSizeBytes, 10); else if (typeof object.estimatedSizeBytes === "number") @@ -5065,7 +5211,7 @@ message.estimatedSizeBytes = new $util.LongBits(object.estimatedSizeBytes.low >>> 0, object.estimatedSizeBytes.high >>> 0).toNumber(); if (object.estimatedCopiedBytes != null) if ($util.Long) - (message.estimatedCopiedBytes = $util.Long.fromValue(object.estimatedCopiedBytes)).unsigned = false; + message.estimatedCopiedBytes = $util.Long.fromValue(object.estimatedCopiedBytes, false); else if (typeof object.estimatedCopiedBytes === "string") message.estimatedCopiedBytes = parseInt(object.estimatedCopiedBytes, 10); else if (typeof object.estimatedCopiedBytes === "number") @@ -5112,34 +5258,42 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - TableProgress.toObject = function toObject(message, options) { + TableProgress.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) { if ($util.Long) { var long = new $util.Long(0, 0, false); - object.estimatedSizeBytes = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.estimatedSizeBytes = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : typeof BigInt !== "undefined" && options.longs === BigInt ? long.toBigInt() : long; } else - object.estimatedSizeBytes = options.longs === String ? "0" : 0; + object.estimatedSizeBytes = options.longs === String ? "0" : typeof BigInt !== "undefined" && options.longs === BigInt ? BigInt("0") : 0; if ($util.Long) { var long = new $util.Long(0, 0, false); - object.estimatedCopiedBytes = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.estimatedCopiedBytes = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : typeof BigInt !== "undefined" && options.longs === BigInt ? long.toBigInt() : long; } else - object.estimatedCopiedBytes = options.longs === String ? "0" : 0; + object.estimatedCopiedBytes = options.longs === String ? "0" : typeof BigInt !== "undefined" && options.longs === BigInt ? BigInt("0") : 0; object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; } - if (message.estimatedSizeBytes != null && message.hasOwnProperty("estimatedSizeBytes")) - if (typeof message.estimatedSizeBytes === "number") + if (message.estimatedSizeBytes != null && Object.hasOwnProperty.call(message, "estimatedSizeBytes")) + if (typeof BigInt !== "undefined" && options.longs === BigInt) + object.estimatedSizeBytes = typeof message.estimatedSizeBytes === "number" ? BigInt(message.estimatedSizeBytes) : $util.Long.fromBits(message.estimatedSizeBytes.low >>> 0, message.estimatedSizeBytes.high >>> 0, false).toBigInt(); + else if (typeof message.estimatedSizeBytes === "number") object.estimatedSizeBytes = options.longs === String ? String(message.estimatedSizeBytes) : message.estimatedSizeBytes; else object.estimatedSizeBytes = options.longs === String ? $util.Long.prototype.toString.call(message.estimatedSizeBytes) : options.longs === Number ? new $util.LongBits(message.estimatedSizeBytes.low >>> 0, message.estimatedSizeBytes.high >>> 0).toNumber() : message.estimatedSizeBytes; - if (message.estimatedCopiedBytes != null && message.hasOwnProperty("estimatedCopiedBytes")) - if (typeof message.estimatedCopiedBytes === "number") + if (message.estimatedCopiedBytes != null && Object.hasOwnProperty.call(message, "estimatedCopiedBytes")) + if (typeof BigInt !== "undefined" && options.longs === BigInt) + object.estimatedCopiedBytes = typeof message.estimatedCopiedBytes === "number" ? BigInt(message.estimatedCopiedBytes) : $util.Long.fromBits(message.estimatedCopiedBytes.low >>> 0, message.estimatedCopiedBytes.high >>> 0, false).toBigInt(); + else if (typeof message.estimatedCopiedBytes === "number") object.estimatedCopiedBytes = options.longs === String ? String(message.estimatedCopiedBytes) : message.estimatedCopiedBytes; else object.estimatedCopiedBytes = options.longs === String ? $util.Long.prototype.toString.call(message.estimatedCopiedBytes) : options.longs === Number ? new $util.LongBits(message.estimatedCopiedBytes.low >>> 0, message.estimatedCopiedBytes.high >>> 0).toNumber() : message.estimatedCopiedBytes; - if (message.state != null && message.hasOwnProperty("state")) + if (message.state != null && Object.hasOwnProperty.call(message, "state")) object.state = options.enums === String ? $root.google.bigtable.admin.v2.CreateClusterMetadata.TableProgress.State[message.state] === undefined ? message.state : $root.google.bigtable.admin.v2.CreateClusterMetadata.TableProgress.State[message.state] : message.state; return object; }; @@ -5267,15 +5421,19 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateClusterMetadata.encode = function encode(message, writer) { + UpdateClusterMetadata.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.originalRequest != null && Object.hasOwnProperty.call(message, "originalRequest")) - $root.google.bigtable.admin.v2.Cluster.encode(message.originalRequest, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + $root.google.bigtable.admin.v2.Cluster.encode(message.originalRequest, writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); if (message.requestTime != null && Object.hasOwnProperty.call(message, "requestTime")) - $root.google.protobuf.Timestamp.encode(message.requestTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + $root.google.protobuf.Timestamp.encode(message.requestTime, writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); if (message.finishTime != null && Object.hasOwnProperty.call(message, "finishTime")) - $root.google.protobuf.Timestamp.encode(message.finishTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + $root.google.protobuf.Timestamp.encode(message.finishTime, writer.uint32(/* id 3, wireType 2 =*/26).fork(), q + 1).ldelim(); return writer; }; @@ -5289,7 +5447,7 @@ * @returns {$protobuf.Writer} Writer */ UpdateClusterMetadata.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -5367,17 +5525,17 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.originalRequest != null && message.hasOwnProperty("originalRequest")) { + if (message.originalRequest != null && Object.hasOwnProperty.call(message, "originalRequest")) { var error = $root.google.bigtable.admin.v2.Cluster.verify(message.originalRequest, long + 1); if (error) return "originalRequest." + error; } - if (message.requestTime != null && message.hasOwnProperty("requestTime")) { + if (message.requestTime != null && Object.hasOwnProperty.call(message, "requestTime")) { var error = $root.google.protobuf.Timestamp.verify(message.requestTime, long + 1); if (error) return "requestTime." + error; } - if (message.finishTime != null && message.hasOwnProperty("finishTime")) { + if (message.finishTime != null && Object.hasOwnProperty.call(message, "finishTime")) { var error = $root.google.protobuf.Timestamp.verify(message.finishTime, long + 1); if (error) return "finishTime." + error; @@ -5396,23 +5554,25 @@ UpdateClusterMetadata.fromObject = function fromObject(object, long) { if (object instanceof $root.google.bigtable.admin.v2.UpdateClusterMetadata) return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.admin.v2.UpdateClusterMetadata: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) throw Error("maximum nesting depth exceeded"); var message = new $root.google.bigtable.admin.v2.UpdateClusterMetadata(); if (object.originalRequest != null) { - if (typeof object.originalRequest !== "object") + if (!$util.isObject(object.originalRequest)) throw TypeError(".google.bigtable.admin.v2.UpdateClusterMetadata.originalRequest: object expected"); message.originalRequest = $root.google.bigtable.admin.v2.Cluster.fromObject(object.originalRequest, long + 1); } if (object.requestTime != null) { - if (typeof object.requestTime !== "object") + if (!$util.isObject(object.requestTime)) throw TypeError(".google.bigtable.admin.v2.UpdateClusterMetadata.requestTime: object expected"); message.requestTime = $root.google.protobuf.Timestamp.fromObject(object.requestTime, long + 1); } if (object.finishTime != null) { - if (typeof object.finishTime !== "object") + if (!$util.isObject(object.finishTime)) throw TypeError(".google.bigtable.admin.v2.UpdateClusterMetadata.finishTime: object expected"); message.finishTime = $root.google.protobuf.Timestamp.fromObject(object.finishTime, long + 1); } @@ -5428,21 +5588,25 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - UpdateClusterMetadata.toObject = function toObject(message, options) { + UpdateClusterMetadata.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.originalRequest = null; object.requestTime = null; object.finishTime = null; } - if (message.originalRequest != null && message.hasOwnProperty("originalRequest")) - object.originalRequest = $root.google.bigtable.admin.v2.Cluster.toObject(message.originalRequest, options); - if (message.requestTime != null && message.hasOwnProperty("requestTime")) - object.requestTime = $root.google.protobuf.Timestamp.toObject(message.requestTime, options); - if (message.finishTime != null && message.hasOwnProperty("finishTime")) - object.finishTime = $root.google.protobuf.Timestamp.toObject(message.finishTime, options); + if (message.originalRequest != null && Object.hasOwnProperty.call(message, "originalRequest")) + object.originalRequest = $root.google.bigtable.admin.v2.Cluster.toObject(message.originalRequest, options, q + 1); + if (message.requestTime != null && Object.hasOwnProperty.call(message, "requestTime")) + object.requestTime = $root.google.protobuf.Timestamp.toObject(message.requestTime, options, q + 1); + if (message.finishTime != null && Object.hasOwnProperty.call(message, "finishTime")) + object.finishTime = $root.google.protobuf.Timestamp.toObject(message.finishTime, options, q + 1); return object; }; @@ -5546,15 +5710,19 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - PartialUpdateClusterMetadata.encode = function encode(message, writer) { + PartialUpdateClusterMetadata.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.requestTime != null && Object.hasOwnProperty.call(message, "requestTime")) - $root.google.protobuf.Timestamp.encode(message.requestTime, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + $root.google.protobuf.Timestamp.encode(message.requestTime, writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); if (message.finishTime != null && Object.hasOwnProperty.call(message, "finishTime")) - $root.google.protobuf.Timestamp.encode(message.finishTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + $root.google.protobuf.Timestamp.encode(message.finishTime, writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); if (message.originalRequest != null && Object.hasOwnProperty.call(message, "originalRequest")) - $root.google.bigtable.admin.v2.PartialUpdateClusterRequest.encode(message.originalRequest, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + $root.google.bigtable.admin.v2.PartialUpdateClusterRequest.encode(message.originalRequest, writer.uint32(/* id 3, wireType 2 =*/26).fork(), q + 1).ldelim(); return writer; }; @@ -5568,7 +5736,7 @@ * @returns {$protobuf.Writer} Writer */ PartialUpdateClusterMetadata.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -5646,17 +5814,17 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.requestTime != null && message.hasOwnProperty("requestTime")) { + if (message.requestTime != null && Object.hasOwnProperty.call(message, "requestTime")) { var error = $root.google.protobuf.Timestamp.verify(message.requestTime, long + 1); if (error) return "requestTime." + error; } - if (message.finishTime != null && message.hasOwnProperty("finishTime")) { + if (message.finishTime != null && Object.hasOwnProperty.call(message, "finishTime")) { var error = $root.google.protobuf.Timestamp.verify(message.finishTime, long + 1); if (error) return "finishTime." + error; } - if (message.originalRequest != null && message.hasOwnProperty("originalRequest")) { + if (message.originalRequest != null && Object.hasOwnProperty.call(message, "originalRequest")) { var error = $root.google.bigtable.admin.v2.PartialUpdateClusterRequest.verify(message.originalRequest, long + 1); if (error) return "originalRequest." + error; @@ -5675,23 +5843,25 @@ PartialUpdateClusterMetadata.fromObject = function fromObject(object, long) { if (object instanceof $root.google.bigtable.admin.v2.PartialUpdateClusterMetadata) return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.admin.v2.PartialUpdateClusterMetadata: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) throw Error("maximum nesting depth exceeded"); var message = new $root.google.bigtable.admin.v2.PartialUpdateClusterMetadata(); if (object.requestTime != null) { - if (typeof object.requestTime !== "object") + if (!$util.isObject(object.requestTime)) throw TypeError(".google.bigtable.admin.v2.PartialUpdateClusterMetadata.requestTime: object expected"); message.requestTime = $root.google.protobuf.Timestamp.fromObject(object.requestTime, long + 1); } if (object.finishTime != null) { - if (typeof object.finishTime !== "object") + if (!$util.isObject(object.finishTime)) throw TypeError(".google.bigtable.admin.v2.PartialUpdateClusterMetadata.finishTime: object expected"); message.finishTime = $root.google.protobuf.Timestamp.fromObject(object.finishTime, long + 1); } if (object.originalRequest != null) { - if (typeof object.originalRequest !== "object") + if (!$util.isObject(object.originalRequest)) throw TypeError(".google.bigtable.admin.v2.PartialUpdateClusterMetadata.originalRequest: object expected"); message.originalRequest = $root.google.bigtable.admin.v2.PartialUpdateClusterRequest.fromObject(object.originalRequest, long + 1); } @@ -5707,21 +5877,25 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - PartialUpdateClusterMetadata.toObject = function toObject(message, options) { + PartialUpdateClusterMetadata.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.requestTime = null; object.finishTime = null; object.originalRequest = null; } - if (message.requestTime != null && message.hasOwnProperty("requestTime")) - object.requestTime = $root.google.protobuf.Timestamp.toObject(message.requestTime, options); - if (message.finishTime != null && message.hasOwnProperty("finishTime")) - object.finishTime = $root.google.protobuf.Timestamp.toObject(message.finishTime, options); - if (message.originalRequest != null && message.hasOwnProperty("originalRequest")) - object.originalRequest = $root.google.bigtable.admin.v2.PartialUpdateClusterRequest.toObject(message.originalRequest, options); + if (message.requestTime != null && Object.hasOwnProperty.call(message, "requestTime")) + object.requestTime = $root.google.protobuf.Timestamp.toObject(message.requestTime, options, q + 1); + if (message.finishTime != null && Object.hasOwnProperty.call(message, "finishTime")) + object.finishTime = $root.google.protobuf.Timestamp.toObject(message.finishTime, options, q + 1); + if (message.originalRequest != null && Object.hasOwnProperty.call(message, "originalRequest")) + object.originalRequest = $root.google.bigtable.admin.v2.PartialUpdateClusterRequest.toObject(message.originalRequest, options, q + 1); return object; }; @@ -5816,13 +5990,17 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - PartialUpdateClusterRequest.encode = function encode(message, writer) { + PartialUpdateClusterRequest.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.cluster != null && Object.hasOwnProperty.call(message, "cluster")) - $root.google.bigtable.admin.v2.Cluster.encode(message.cluster, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + $root.google.bigtable.admin.v2.Cluster.encode(message.cluster, writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) - $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); return writer; }; @@ -5836,7 +6014,7 @@ * @returns {$protobuf.Writer} Writer */ PartialUpdateClusterRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -5910,12 +6088,12 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.cluster != null && message.hasOwnProperty("cluster")) { + if (message.cluster != null && Object.hasOwnProperty.call(message, "cluster")) { var error = $root.google.bigtable.admin.v2.Cluster.verify(message.cluster, long + 1); if (error) return "cluster." + error; } - if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) { var error = $root.google.protobuf.FieldMask.verify(message.updateMask, long + 1); if (error) return "updateMask." + error; @@ -5934,18 +6112,20 @@ PartialUpdateClusterRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.google.bigtable.admin.v2.PartialUpdateClusterRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.admin.v2.PartialUpdateClusterRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) throw Error("maximum nesting depth exceeded"); var message = new $root.google.bigtable.admin.v2.PartialUpdateClusterRequest(); if (object.cluster != null) { - if (typeof object.cluster !== "object") + if (!$util.isObject(object.cluster)) throw TypeError(".google.bigtable.admin.v2.PartialUpdateClusterRequest.cluster: object expected"); message.cluster = $root.google.bigtable.admin.v2.Cluster.fromObject(object.cluster, long + 1); } if (object.updateMask != null) { - if (typeof object.updateMask !== "object") + if (!$util.isObject(object.updateMask)) throw TypeError(".google.bigtable.admin.v2.PartialUpdateClusterRequest.updateMask: object expected"); message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask, long + 1); } @@ -5961,18 +6141,22 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - PartialUpdateClusterRequest.toObject = function toObject(message, options) { + PartialUpdateClusterRequest.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.cluster = null; object.updateMask = null; } - if (message.cluster != null && message.hasOwnProperty("cluster")) - object.cluster = $root.google.bigtable.admin.v2.Cluster.toObject(message.cluster, options); - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + if (message.cluster != null && Object.hasOwnProperty.call(message, "cluster")) + object.cluster = $root.google.bigtable.admin.v2.Cluster.toObject(message.cluster, options, q + 1); + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options, q + 1); return object; }; @@ -6085,15 +6269,19 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateAppProfileRequest.encode = function encode(message, writer) { + CreateAppProfileRequest.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); if (message.appProfileId != null && Object.hasOwnProperty.call(message, "appProfileId")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.appProfileId); if (message.appProfile != null && Object.hasOwnProperty.call(message, "appProfile")) - $root.google.bigtable.admin.v2.AppProfile.encode(message.appProfile, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + $root.google.bigtable.admin.v2.AppProfile.encode(message.appProfile, writer.uint32(/* id 3, wireType 2 =*/26).fork(), q + 1).ldelim(); if (message.ignoreWarnings != null && Object.hasOwnProperty.call(message, "ignoreWarnings")) writer.uint32(/* id 4, wireType 0 =*/32).bool(message.ignoreWarnings); return writer; @@ -6109,7 +6297,7 @@ * @returns {$protobuf.Writer} Writer */ CreateAppProfileRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -6191,18 +6379,18 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.parent != null && message.hasOwnProperty("parent")) + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) if (!$util.isString(message.parent)) return "parent: string expected"; - if (message.appProfileId != null && message.hasOwnProperty("appProfileId")) + if (message.appProfileId != null && Object.hasOwnProperty.call(message, "appProfileId")) if (!$util.isString(message.appProfileId)) return "appProfileId: string expected"; - if (message.appProfile != null && message.hasOwnProperty("appProfile")) { + if (message.appProfile != null && Object.hasOwnProperty.call(message, "appProfile")) { var error = $root.google.bigtable.admin.v2.AppProfile.verify(message.appProfile, long + 1); if (error) return "appProfile." + error; } - if (message.ignoreWarnings != null && message.hasOwnProperty("ignoreWarnings")) + if (message.ignoreWarnings != null && Object.hasOwnProperty.call(message, "ignoreWarnings")) if (typeof message.ignoreWarnings !== "boolean") return "ignoreWarnings: boolean expected"; return null; @@ -6219,6 +6407,8 @@ CreateAppProfileRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.google.bigtable.admin.v2.CreateAppProfileRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.admin.v2.CreateAppProfileRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -6229,7 +6419,7 @@ if (object.appProfileId != null) message.appProfileId = String(object.appProfileId); if (object.appProfile != null) { - if (typeof object.appProfile !== "object") + if (!$util.isObject(object.appProfile)) throw TypeError(".google.bigtable.admin.v2.CreateAppProfileRequest.appProfile: object expected"); message.appProfile = $root.google.bigtable.admin.v2.AppProfile.fromObject(object.appProfile, long + 1); } @@ -6247,9 +6437,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CreateAppProfileRequest.toObject = function toObject(message, options) { + CreateAppProfileRequest.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.parent = ""; @@ -6257,13 +6451,13 @@ object.appProfile = null; object.ignoreWarnings = false; } - if (message.parent != null && message.hasOwnProperty("parent")) + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) object.parent = message.parent; - if (message.appProfileId != null && message.hasOwnProperty("appProfileId")) + if (message.appProfileId != null && Object.hasOwnProperty.call(message, "appProfileId")) object.appProfileId = message.appProfileId; - if (message.appProfile != null && message.hasOwnProperty("appProfile")) - object.appProfile = $root.google.bigtable.admin.v2.AppProfile.toObject(message.appProfile, options); - if (message.ignoreWarnings != null && message.hasOwnProperty("ignoreWarnings")) + if (message.appProfile != null && Object.hasOwnProperty.call(message, "appProfile")) + object.appProfile = $root.google.bigtable.admin.v2.AppProfile.toObject(message.appProfile, options, q + 1); + if (message.ignoreWarnings != null && Object.hasOwnProperty.call(message, "ignoreWarnings")) object.ignoreWarnings = message.ignoreWarnings; return object; }; @@ -6350,9 +6544,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetAppProfileRequest.encode = function encode(message, writer) { + GetAppProfileRequest.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); return writer; @@ -6368,7 +6566,7 @@ * @returns {$protobuf.Writer} Writer */ GetAppProfileRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -6438,7 +6636,7 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) if (!$util.isString(message.name)) return "name: string expected"; return null; @@ -6455,6 +6653,8 @@ GetAppProfileRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.google.bigtable.admin.v2.GetAppProfileRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.admin.v2.GetAppProfileRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -6474,13 +6674,17 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetAppProfileRequest.toObject = function toObject(message, options) { + GetAppProfileRequest.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) object.name = message.name; return object; }; @@ -6585,9 +6789,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListAppProfilesRequest.encode = function encode(message, writer) { + ListAppProfilesRequest.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) @@ -6607,7 +6815,7 @@ * @returns {$protobuf.Writer} Writer */ ListAppProfilesRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -6685,13 +6893,13 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.parent != null && message.hasOwnProperty("parent")) + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) if (!$util.isString(message.parent)) return "parent: string expected"; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) if (!$util.isInteger(message.pageSize)) return "pageSize: integer expected"; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) if (!$util.isString(message.pageToken)) return "pageToken: string expected"; return null; @@ -6708,6 +6916,8 @@ ListAppProfilesRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.google.bigtable.admin.v2.ListAppProfilesRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.admin.v2.ListAppProfilesRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -6731,20 +6941,24 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListAppProfilesRequest.toObject = function toObject(message, options) { + ListAppProfilesRequest.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.parent = ""; object.pageToken = ""; object.pageSize = 0; } - if (message.parent != null && message.hasOwnProperty("parent")) + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) object.parent = message.parent; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) object.pageToken = message.pageToken; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) object.pageSize = message.pageSize; return object; }; @@ -6851,12 +7065,16 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListAppProfilesResponse.encode = function encode(message, writer) { + ListAppProfilesResponse.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.appProfiles != null && message.appProfiles.length) for (var i = 0; i < message.appProfiles.length; ++i) - $root.google.bigtable.admin.v2.AppProfile.encode(message.appProfiles[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + $root.google.bigtable.admin.v2.AppProfile.encode(message.appProfiles[i], writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); if (message.failedLocations != null && message.failedLocations.length) @@ -6875,7 +7093,7 @@ * @returns {$protobuf.Writer} Writer */ ListAppProfilesResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -6957,7 +7175,7 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.appProfiles != null && message.hasOwnProperty("appProfiles")) { + if (message.appProfiles != null && Object.hasOwnProperty.call(message, "appProfiles")) { if (!Array.isArray(message.appProfiles)) return "appProfiles: array expected"; for (var i = 0; i < message.appProfiles.length; ++i) { @@ -6966,10 +7184,10 @@ return "appProfiles." + error; } } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) if (!$util.isString(message.nextPageToken)) return "nextPageToken: string expected"; - if (message.failedLocations != null && message.hasOwnProperty("failedLocations")) { + if (message.failedLocations != null && Object.hasOwnProperty.call(message, "failedLocations")) { if (!Array.isArray(message.failedLocations)) return "failedLocations: array expected"; for (var i = 0; i < message.failedLocations.length; ++i) @@ -6990,6 +7208,8 @@ ListAppProfilesResponse.fromObject = function fromObject(object, long) { if (object instanceof $root.google.bigtable.admin.v2.ListAppProfilesResponse) return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.admin.v2.ListAppProfilesResponse: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -7000,7 +7220,7 @@ throw TypeError(".google.bigtable.admin.v2.ListAppProfilesResponse.appProfiles: array expected"); message.appProfiles = []; for (var i = 0; i < object.appProfiles.length; ++i) { - if (typeof object.appProfiles[i] !== "object") + if (!$util.isObject(object.appProfiles[i])) throw TypeError(".google.bigtable.admin.v2.ListAppProfilesResponse.appProfiles: object expected"); message.appProfiles[i] = $root.google.bigtable.admin.v2.AppProfile.fromObject(object.appProfiles[i], long + 1); } @@ -7026,9 +7246,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListAppProfilesResponse.toObject = function toObject(message, options) { + ListAppProfilesResponse.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) { object.appProfiles = []; @@ -7039,9 +7263,9 @@ if (message.appProfiles && message.appProfiles.length) { object.appProfiles = []; for (var j = 0; j < message.appProfiles.length; ++j) - object.appProfiles[j] = $root.google.bigtable.admin.v2.AppProfile.toObject(message.appProfiles[j], options); + object.appProfiles[j] = $root.google.bigtable.admin.v2.AppProfile.toObject(message.appProfiles[j], options, q + 1); } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) object.nextPageToken = message.nextPageToken; if (message.failedLocations && message.failedLocations.length) { object.failedLocations = []; @@ -7151,13 +7375,17 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateAppProfileRequest.encode = function encode(message, writer) { + UpdateAppProfileRequest.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.appProfile != null && Object.hasOwnProperty.call(message, "appProfile")) - $root.google.bigtable.admin.v2.AppProfile.encode(message.appProfile, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + $root.google.bigtable.admin.v2.AppProfile.encode(message.appProfile, writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) - $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); if (message.ignoreWarnings != null && Object.hasOwnProperty.call(message, "ignoreWarnings")) writer.uint32(/* id 3, wireType 0 =*/24).bool(message.ignoreWarnings); return writer; @@ -7173,7 +7401,7 @@ * @returns {$protobuf.Writer} Writer */ UpdateAppProfileRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -7251,17 +7479,17 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.appProfile != null && message.hasOwnProperty("appProfile")) { + if (message.appProfile != null && Object.hasOwnProperty.call(message, "appProfile")) { var error = $root.google.bigtable.admin.v2.AppProfile.verify(message.appProfile, long + 1); if (error) return "appProfile." + error; } - if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) { var error = $root.google.protobuf.FieldMask.verify(message.updateMask, long + 1); if (error) return "updateMask." + error; } - if (message.ignoreWarnings != null && message.hasOwnProperty("ignoreWarnings")) + if (message.ignoreWarnings != null && Object.hasOwnProperty.call(message, "ignoreWarnings")) if (typeof message.ignoreWarnings !== "boolean") return "ignoreWarnings: boolean expected"; return null; @@ -7278,18 +7506,20 @@ UpdateAppProfileRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.google.bigtable.admin.v2.UpdateAppProfileRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.admin.v2.UpdateAppProfileRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) throw Error("maximum nesting depth exceeded"); var message = new $root.google.bigtable.admin.v2.UpdateAppProfileRequest(); if (object.appProfile != null) { - if (typeof object.appProfile !== "object") + if (!$util.isObject(object.appProfile)) throw TypeError(".google.bigtable.admin.v2.UpdateAppProfileRequest.appProfile: object expected"); message.appProfile = $root.google.bigtable.admin.v2.AppProfile.fromObject(object.appProfile, long + 1); } if (object.updateMask != null) { - if (typeof object.updateMask !== "object") + if (!$util.isObject(object.updateMask)) throw TypeError(".google.bigtable.admin.v2.UpdateAppProfileRequest.updateMask: object expected"); message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask, long + 1); } @@ -7307,20 +7537,24 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - UpdateAppProfileRequest.toObject = function toObject(message, options) { + UpdateAppProfileRequest.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.appProfile = null; object.updateMask = null; object.ignoreWarnings = false; } - if (message.appProfile != null && message.hasOwnProperty("appProfile")) - object.appProfile = $root.google.bigtable.admin.v2.AppProfile.toObject(message.appProfile, options); - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); - if (message.ignoreWarnings != null && message.hasOwnProperty("ignoreWarnings")) + if (message.appProfile != null && Object.hasOwnProperty.call(message, "appProfile")) + object.appProfile = $root.google.bigtable.admin.v2.AppProfile.toObject(message.appProfile, options, q + 1); + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options, q + 1); + if (message.ignoreWarnings != null && Object.hasOwnProperty.call(message, "ignoreWarnings")) object.ignoreWarnings = message.ignoreWarnings; return object; }; @@ -7416,9 +7650,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteAppProfileRequest.encode = function encode(message, writer) { + DeleteAppProfileRequest.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); if (message.ignoreWarnings != null && Object.hasOwnProperty.call(message, "ignoreWarnings")) @@ -7436,7 +7674,7 @@ * @returns {$protobuf.Writer} Writer */ DeleteAppProfileRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -7510,10 +7748,10 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) if (!$util.isString(message.name)) return "name: string expected"; - if (message.ignoreWarnings != null && message.hasOwnProperty("ignoreWarnings")) + if (message.ignoreWarnings != null && Object.hasOwnProperty.call(message, "ignoreWarnings")) if (typeof message.ignoreWarnings !== "boolean") return "ignoreWarnings: boolean expected"; return null; @@ -7530,6 +7768,8 @@ DeleteAppProfileRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.google.bigtable.admin.v2.DeleteAppProfileRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.admin.v2.DeleteAppProfileRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -7551,17 +7791,21 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DeleteAppProfileRequest.toObject = function toObject(message, options) { + DeleteAppProfileRequest.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.name = ""; object.ignoreWarnings = false; } - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) object.name = message.name; - if (message.ignoreWarnings != null && message.hasOwnProperty("ignoreWarnings")) + if (message.ignoreWarnings != null && Object.hasOwnProperty.call(message, "ignoreWarnings")) object.ignoreWarnings = message.ignoreWarnings; return object; }; @@ -7639,9 +7883,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateAppProfileMetadata.encode = function encode(message, writer) { + UpdateAppProfileMetadata.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); return writer; }; @@ -7655,7 +7903,7 @@ * @returns {$protobuf.Writer} Writer */ UpdateAppProfileMetadata.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -7735,10 +7983,6 @@ UpdateAppProfileMetadata.fromObject = function fromObject(object, long) { if (object instanceof $root.google.bigtable.admin.v2.UpdateAppProfileMetadata) return object; - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - throw Error("maximum nesting depth exceeded"); return new $root.google.bigtable.admin.v2.UpdateAppProfileMetadata(); }; @@ -7873,15 +8117,19 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListHotTabletsRequest.encode = function encode(message, writer) { + ListHotTabletsRequest.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); if (message.startTime != null && Object.hasOwnProperty.call(message, "startTime")) - $root.google.protobuf.Timestamp.encode(message.startTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + $root.google.protobuf.Timestamp.encode(message.startTime, writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) - $root.google.protobuf.Timestamp.encode(message.endTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + $root.google.protobuf.Timestamp.encode(message.endTime, writer.uint32(/* id 3, wireType 2 =*/26).fork(), q + 1).ldelim(); if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) writer.uint32(/* id 4, wireType 0 =*/32).int32(message.pageSize); if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) @@ -7899,7 +8147,7 @@ * @returns {$protobuf.Writer} Writer */ ListHotTabletsRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -7985,23 +8233,23 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.parent != null && message.hasOwnProperty("parent")) + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) if (!$util.isString(message.parent)) return "parent: string expected"; - if (message.startTime != null && message.hasOwnProperty("startTime")) { + if (message.startTime != null && Object.hasOwnProperty.call(message, "startTime")) { var error = $root.google.protobuf.Timestamp.verify(message.startTime, long + 1); if (error) return "startTime." + error; } - if (message.endTime != null && message.hasOwnProperty("endTime")) { + if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) { var error = $root.google.protobuf.Timestamp.verify(message.endTime, long + 1); if (error) return "endTime." + error; } - if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) if (!$util.isInteger(message.pageSize)) return "pageSize: integer expected"; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) if (!$util.isString(message.pageToken)) return "pageToken: string expected"; return null; @@ -8018,6 +8266,8 @@ ListHotTabletsRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.google.bigtable.admin.v2.ListHotTabletsRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.admin.v2.ListHotTabletsRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -8026,12 +8276,12 @@ if (object.parent != null) message.parent = String(object.parent); if (object.startTime != null) { - if (typeof object.startTime !== "object") + if (!$util.isObject(object.startTime)) throw TypeError(".google.bigtable.admin.v2.ListHotTabletsRequest.startTime: object expected"); message.startTime = $root.google.protobuf.Timestamp.fromObject(object.startTime, long + 1); } if (object.endTime != null) { - if (typeof object.endTime !== "object") + if (!$util.isObject(object.endTime)) throw TypeError(".google.bigtable.admin.v2.ListHotTabletsRequest.endTime: object expected"); message.endTime = $root.google.protobuf.Timestamp.fromObject(object.endTime, long + 1); } @@ -8051,9 +8301,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListHotTabletsRequest.toObject = function toObject(message, options) { + ListHotTabletsRequest.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.parent = ""; @@ -8062,15 +8316,15 @@ object.pageSize = 0; object.pageToken = ""; } - if (message.parent != null && message.hasOwnProperty("parent")) + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) object.parent = message.parent; - if (message.startTime != null && message.hasOwnProperty("startTime")) - object.startTime = $root.google.protobuf.Timestamp.toObject(message.startTime, options); - if (message.endTime != null && message.hasOwnProperty("endTime")) - object.endTime = $root.google.protobuf.Timestamp.toObject(message.endTime, options); - if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (message.startTime != null && Object.hasOwnProperty.call(message, "startTime")) + object.startTime = $root.google.protobuf.Timestamp.toObject(message.startTime, options, q + 1); + if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) + object.endTime = $root.google.protobuf.Timestamp.toObject(message.endTime, options, q + 1); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) object.pageSize = message.pageSize; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) object.pageToken = message.pageToken; return object; }; @@ -8167,12 +8421,16 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListHotTabletsResponse.encode = function encode(message, writer) { + ListHotTabletsResponse.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.hotTablets != null && message.hotTablets.length) for (var i = 0; i < message.hotTablets.length; ++i) - $root.google.bigtable.admin.v2.HotTablet.encode(message.hotTablets[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + $root.google.bigtable.admin.v2.HotTablet.encode(message.hotTablets[i], writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); return writer; @@ -8188,7 +8446,7 @@ * @returns {$protobuf.Writer} Writer */ ListHotTabletsResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -8264,7 +8522,7 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.hotTablets != null && message.hasOwnProperty("hotTablets")) { + if (message.hotTablets != null && Object.hasOwnProperty.call(message, "hotTablets")) { if (!Array.isArray(message.hotTablets)) return "hotTablets: array expected"; for (var i = 0; i < message.hotTablets.length; ++i) { @@ -8273,7 +8531,7 @@ return "hotTablets." + error; } } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) if (!$util.isString(message.nextPageToken)) return "nextPageToken: string expected"; return null; @@ -8290,6 +8548,8 @@ ListHotTabletsResponse.fromObject = function fromObject(object, long) { if (object instanceof $root.google.bigtable.admin.v2.ListHotTabletsResponse) return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.admin.v2.ListHotTabletsResponse: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -8300,7 +8560,7 @@ throw TypeError(".google.bigtable.admin.v2.ListHotTabletsResponse.hotTablets: array expected"); message.hotTablets = []; for (var i = 0; i < object.hotTablets.length; ++i) { - if (typeof object.hotTablets[i] !== "object") + if (!$util.isObject(object.hotTablets[i])) throw TypeError(".google.bigtable.admin.v2.ListHotTabletsResponse.hotTablets: object expected"); message.hotTablets[i] = $root.google.bigtable.admin.v2.HotTablet.fromObject(object.hotTablets[i], long + 1); } @@ -8319,9 +8579,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListHotTabletsResponse.toObject = function toObject(message, options) { + ListHotTabletsResponse.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.hotTablets = []; @@ -8330,9 +8594,9 @@ if (message.hotTablets && message.hotTablets.length) { object.hotTablets = []; for (var j = 0; j < message.hotTablets.length; ++j) - object.hotTablets[j] = $root.google.bigtable.admin.v2.HotTablet.toObject(message.hotTablets[j], options); + object.hotTablets[j] = $root.google.bigtable.admin.v2.HotTablet.toObject(message.hotTablets[j], options, q + 1); } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) object.nextPageToken = message.nextPageToken; return object; }; @@ -8437,15 +8701,19 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateLogicalViewRequest.encode = function encode(message, writer) { + CreateLogicalViewRequest.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); if (message.logicalViewId != null && Object.hasOwnProperty.call(message, "logicalViewId")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.logicalViewId); if (message.logicalView != null && Object.hasOwnProperty.call(message, "logicalView")) - $root.google.bigtable.admin.v2.LogicalView.encode(message.logicalView, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + $root.google.bigtable.admin.v2.LogicalView.encode(message.logicalView, writer.uint32(/* id 3, wireType 2 =*/26).fork(), q + 1).ldelim(); return writer; }; @@ -8459,7 +8727,7 @@ * @returns {$protobuf.Writer} Writer */ CreateLogicalViewRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -8537,13 +8805,13 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.parent != null && message.hasOwnProperty("parent")) + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) if (!$util.isString(message.parent)) return "parent: string expected"; - if (message.logicalViewId != null && message.hasOwnProperty("logicalViewId")) + if (message.logicalViewId != null && Object.hasOwnProperty.call(message, "logicalViewId")) if (!$util.isString(message.logicalViewId)) return "logicalViewId: string expected"; - if (message.logicalView != null && message.hasOwnProperty("logicalView")) { + if (message.logicalView != null && Object.hasOwnProperty.call(message, "logicalView")) { var error = $root.google.bigtable.admin.v2.LogicalView.verify(message.logicalView, long + 1); if (error) return "logicalView." + error; @@ -8562,6 +8830,8 @@ CreateLogicalViewRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.google.bigtable.admin.v2.CreateLogicalViewRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.admin.v2.CreateLogicalViewRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -8572,7 +8842,7 @@ if (object.logicalViewId != null) message.logicalViewId = String(object.logicalViewId); if (object.logicalView != null) { - if (typeof object.logicalView !== "object") + if (!$util.isObject(object.logicalView)) throw TypeError(".google.bigtable.admin.v2.CreateLogicalViewRequest.logicalView: object expected"); message.logicalView = $root.google.bigtable.admin.v2.LogicalView.fromObject(object.logicalView, long + 1); } @@ -8588,21 +8858,25 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CreateLogicalViewRequest.toObject = function toObject(message, options) { + CreateLogicalViewRequest.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.parent = ""; object.logicalViewId = ""; object.logicalView = null; } - if (message.parent != null && message.hasOwnProperty("parent")) + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) object.parent = message.parent; - if (message.logicalViewId != null && message.hasOwnProperty("logicalViewId")) + if (message.logicalViewId != null && Object.hasOwnProperty.call(message, "logicalViewId")) object.logicalViewId = message.logicalViewId; - if (message.logicalView != null && message.hasOwnProperty("logicalView")) - object.logicalView = $root.google.bigtable.admin.v2.LogicalView.toObject(message.logicalView, options); + if (message.logicalView != null && Object.hasOwnProperty.call(message, "logicalView")) + object.logicalView = $root.google.bigtable.admin.v2.LogicalView.toObject(message.logicalView, options, q + 1); return object; }; @@ -8706,15 +8980,19 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateLogicalViewMetadata.encode = function encode(message, writer) { + CreateLogicalViewMetadata.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.originalRequest != null && Object.hasOwnProperty.call(message, "originalRequest")) - $root.google.bigtable.admin.v2.CreateLogicalViewRequest.encode(message.originalRequest, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + $root.google.bigtable.admin.v2.CreateLogicalViewRequest.encode(message.originalRequest, writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); if (message.startTime != null && Object.hasOwnProperty.call(message, "startTime")) - $root.google.protobuf.Timestamp.encode(message.startTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + $root.google.protobuf.Timestamp.encode(message.startTime, writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) - $root.google.protobuf.Timestamp.encode(message.endTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + $root.google.protobuf.Timestamp.encode(message.endTime, writer.uint32(/* id 3, wireType 2 =*/26).fork(), q + 1).ldelim(); return writer; }; @@ -8728,7 +9006,7 @@ * @returns {$protobuf.Writer} Writer */ CreateLogicalViewMetadata.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -8806,17 +9084,17 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.originalRequest != null && message.hasOwnProperty("originalRequest")) { + if (message.originalRequest != null && Object.hasOwnProperty.call(message, "originalRequest")) { var error = $root.google.bigtable.admin.v2.CreateLogicalViewRequest.verify(message.originalRequest, long + 1); if (error) return "originalRequest." + error; } - if (message.startTime != null && message.hasOwnProperty("startTime")) { + if (message.startTime != null && Object.hasOwnProperty.call(message, "startTime")) { var error = $root.google.protobuf.Timestamp.verify(message.startTime, long + 1); if (error) return "startTime." + error; } - if (message.endTime != null && message.hasOwnProperty("endTime")) { + if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) { var error = $root.google.protobuf.Timestamp.verify(message.endTime, long + 1); if (error) return "endTime." + error; @@ -8835,23 +9113,25 @@ CreateLogicalViewMetadata.fromObject = function fromObject(object, long) { if (object instanceof $root.google.bigtable.admin.v2.CreateLogicalViewMetadata) return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.admin.v2.CreateLogicalViewMetadata: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) throw Error("maximum nesting depth exceeded"); var message = new $root.google.bigtable.admin.v2.CreateLogicalViewMetadata(); if (object.originalRequest != null) { - if (typeof object.originalRequest !== "object") + if (!$util.isObject(object.originalRequest)) throw TypeError(".google.bigtable.admin.v2.CreateLogicalViewMetadata.originalRequest: object expected"); message.originalRequest = $root.google.bigtable.admin.v2.CreateLogicalViewRequest.fromObject(object.originalRequest, long + 1); } if (object.startTime != null) { - if (typeof object.startTime !== "object") + if (!$util.isObject(object.startTime)) throw TypeError(".google.bigtable.admin.v2.CreateLogicalViewMetadata.startTime: object expected"); message.startTime = $root.google.protobuf.Timestamp.fromObject(object.startTime, long + 1); } if (object.endTime != null) { - if (typeof object.endTime !== "object") + if (!$util.isObject(object.endTime)) throw TypeError(".google.bigtable.admin.v2.CreateLogicalViewMetadata.endTime: object expected"); message.endTime = $root.google.protobuf.Timestamp.fromObject(object.endTime, long + 1); } @@ -8867,21 +9147,25 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CreateLogicalViewMetadata.toObject = function toObject(message, options) { + CreateLogicalViewMetadata.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.originalRequest = null; object.startTime = null; object.endTime = null; } - if (message.originalRequest != null && message.hasOwnProperty("originalRequest")) - object.originalRequest = $root.google.bigtable.admin.v2.CreateLogicalViewRequest.toObject(message.originalRequest, options); - if (message.startTime != null && message.hasOwnProperty("startTime")) - object.startTime = $root.google.protobuf.Timestamp.toObject(message.startTime, options); - if (message.endTime != null && message.hasOwnProperty("endTime")) - object.endTime = $root.google.protobuf.Timestamp.toObject(message.endTime, options); + if (message.originalRequest != null && Object.hasOwnProperty.call(message, "originalRequest")) + object.originalRequest = $root.google.bigtable.admin.v2.CreateLogicalViewRequest.toObject(message.originalRequest, options, q + 1); + if (message.startTime != null && Object.hasOwnProperty.call(message, "startTime")) + object.startTime = $root.google.protobuf.Timestamp.toObject(message.startTime, options, q + 1); + if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) + object.endTime = $root.google.protobuf.Timestamp.toObject(message.endTime, options, q + 1); return object; }; @@ -8967,9 +9251,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetLogicalViewRequest.encode = function encode(message, writer) { + GetLogicalViewRequest.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); return writer; @@ -8985,7 +9273,7 @@ * @returns {$protobuf.Writer} Writer */ GetLogicalViewRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -9055,7 +9343,7 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) if (!$util.isString(message.name)) return "name: string expected"; return null; @@ -9072,6 +9360,8 @@ GetLogicalViewRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.google.bigtable.admin.v2.GetLogicalViewRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.admin.v2.GetLogicalViewRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -9091,13 +9381,17 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetLogicalViewRequest.toObject = function toObject(message, options) { + GetLogicalViewRequest.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) object.name = message.name; return object; }; @@ -9202,9 +9496,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListLogicalViewsRequest.encode = function encode(message, writer) { + ListLogicalViewsRequest.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) @@ -9224,7 +9522,7 @@ * @returns {$protobuf.Writer} Writer */ ListLogicalViewsRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -9302,13 +9600,13 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.parent != null && message.hasOwnProperty("parent")) + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) if (!$util.isString(message.parent)) return "parent: string expected"; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) if (!$util.isInteger(message.pageSize)) return "pageSize: integer expected"; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) if (!$util.isString(message.pageToken)) return "pageToken: string expected"; return null; @@ -9325,6 +9623,8 @@ ListLogicalViewsRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.google.bigtable.admin.v2.ListLogicalViewsRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.admin.v2.ListLogicalViewsRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -9348,20 +9648,24 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListLogicalViewsRequest.toObject = function toObject(message, options) { + ListLogicalViewsRequest.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.parent = ""; object.pageSize = 0; object.pageToken = ""; } - if (message.parent != null && message.hasOwnProperty("parent")) + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) object.parent = message.parent; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) object.pageSize = message.pageSize; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) object.pageToken = message.pageToken; return object; }; @@ -9458,12 +9762,16 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListLogicalViewsResponse.encode = function encode(message, writer) { + ListLogicalViewsResponse.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.logicalViews != null && message.logicalViews.length) for (var i = 0; i < message.logicalViews.length; ++i) - $root.google.bigtable.admin.v2.LogicalView.encode(message.logicalViews[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + $root.google.bigtable.admin.v2.LogicalView.encode(message.logicalViews[i], writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); return writer; @@ -9479,7 +9787,7 @@ * @returns {$protobuf.Writer} Writer */ ListLogicalViewsResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -9555,7 +9863,7 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.logicalViews != null && message.hasOwnProperty("logicalViews")) { + if (message.logicalViews != null && Object.hasOwnProperty.call(message, "logicalViews")) { if (!Array.isArray(message.logicalViews)) return "logicalViews: array expected"; for (var i = 0; i < message.logicalViews.length; ++i) { @@ -9564,7 +9872,7 @@ return "logicalViews." + error; } } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) if (!$util.isString(message.nextPageToken)) return "nextPageToken: string expected"; return null; @@ -9581,6 +9889,8 @@ ListLogicalViewsResponse.fromObject = function fromObject(object, long) { if (object instanceof $root.google.bigtable.admin.v2.ListLogicalViewsResponse) return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.admin.v2.ListLogicalViewsResponse: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -9591,7 +9901,7 @@ throw TypeError(".google.bigtable.admin.v2.ListLogicalViewsResponse.logicalViews: array expected"); message.logicalViews = []; for (var i = 0; i < object.logicalViews.length; ++i) { - if (typeof object.logicalViews[i] !== "object") + if (!$util.isObject(object.logicalViews[i])) throw TypeError(".google.bigtable.admin.v2.ListLogicalViewsResponse.logicalViews: object expected"); message.logicalViews[i] = $root.google.bigtable.admin.v2.LogicalView.fromObject(object.logicalViews[i], long + 1); } @@ -9610,9 +9920,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListLogicalViewsResponse.toObject = function toObject(message, options) { + ListLogicalViewsResponse.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.logicalViews = []; @@ -9621,9 +9935,9 @@ if (message.logicalViews && message.logicalViews.length) { object.logicalViews = []; for (var j = 0; j < message.logicalViews.length; ++j) - object.logicalViews[j] = $root.google.bigtable.admin.v2.LogicalView.toObject(message.logicalViews[j], options); + object.logicalViews[j] = $root.google.bigtable.admin.v2.LogicalView.toObject(message.logicalViews[j], options, q + 1); } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) object.nextPageToken = message.nextPageToken; return object; }; @@ -9719,13 +10033,17 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateLogicalViewRequest.encode = function encode(message, writer) { + UpdateLogicalViewRequest.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.logicalView != null && Object.hasOwnProperty.call(message, "logicalView")) - $root.google.bigtable.admin.v2.LogicalView.encode(message.logicalView, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + $root.google.bigtable.admin.v2.LogicalView.encode(message.logicalView, writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) - $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); return writer; }; @@ -9739,7 +10057,7 @@ * @returns {$protobuf.Writer} Writer */ UpdateLogicalViewRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -9813,12 +10131,12 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.logicalView != null && message.hasOwnProperty("logicalView")) { + if (message.logicalView != null && Object.hasOwnProperty.call(message, "logicalView")) { var error = $root.google.bigtable.admin.v2.LogicalView.verify(message.logicalView, long + 1); if (error) return "logicalView." + error; } - if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) { var error = $root.google.protobuf.FieldMask.verify(message.updateMask, long + 1); if (error) return "updateMask." + error; @@ -9837,18 +10155,20 @@ UpdateLogicalViewRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.google.bigtable.admin.v2.UpdateLogicalViewRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.admin.v2.UpdateLogicalViewRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) throw Error("maximum nesting depth exceeded"); var message = new $root.google.bigtable.admin.v2.UpdateLogicalViewRequest(); if (object.logicalView != null) { - if (typeof object.logicalView !== "object") + if (!$util.isObject(object.logicalView)) throw TypeError(".google.bigtable.admin.v2.UpdateLogicalViewRequest.logicalView: object expected"); message.logicalView = $root.google.bigtable.admin.v2.LogicalView.fromObject(object.logicalView, long + 1); } if (object.updateMask != null) { - if (typeof object.updateMask !== "object") + if (!$util.isObject(object.updateMask)) throw TypeError(".google.bigtable.admin.v2.UpdateLogicalViewRequest.updateMask: object expected"); message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask, long + 1); } @@ -9864,18 +10184,22 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - UpdateLogicalViewRequest.toObject = function toObject(message, options) { + UpdateLogicalViewRequest.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.logicalView = null; object.updateMask = null; } - if (message.logicalView != null && message.hasOwnProperty("logicalView")) - object.logicalView = $root.google.bigtable.admin.v2.LogicalView.toObject(message.logicalView, options); - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + if (message.logicalView != null && Object.hasOwnProperty.call(message, "logicalView")) + object.logicalView = $root.google.bigtable.admin.v2.LogicalView.toObject(message.logicalView, options, q + 1); + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options, q + 1); return object; }; @@ -9979,15 +10303,19 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateLogicalViewMetadata.encode = function encode(message, writer) { + UpdateLogicalViewMetadata.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.originalRequest != null && Object.hasOwnProperty.call(message, "originalRequest")) - $root.google.bigtable.admin.v2.UpdateLogicalViewRequest.encode(message.originalRequest, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + $root.google.bigtable.admin.v2.UpdateLogicalViewRequest.encode(message.originalRequest, writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); if (message.startTime != null && Object.hasOwnProperty.call(message, "startTime")) - $root.google.protobuf.Timestamp.encode(message.startTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + $root.google.protobuf.Timestamp.encode(message.startTime, writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) - $root.google.protobuf.Timestamp.encode(message.endTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + $root.google.protobuf.Timestamp.encode(message.endTime, writer.uint32(/* id 3, wireType 2 =*/26).fork(), q + 1).ldelim(); return writer; }; @@ -10001,7 +10329,7 @@ * @returns {$protobuf.Writer} Writer */ UpdateLogicalViewMetadata.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -10079,17 +10407,17 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.originalRequest != null && message.hasOwnProperty("originalRequest")) { + if (message.originalRequest != null && Object.hasOwnProperty.call(message, "originalRequest")) { var error = $root.google.bigtable.admin.v2.UpdateLogicalViewRequest.verify(message.originalRequest, long + 1); if (error) return "originalRequest." + error; } - if (message.startTime != null && message.hasOwnProperty("startTime")) { + if (message.startTime != null && Object.hasOwnProperty.call(message, "startTime")) { var error = $root.google.protobuf.Timestamp.verify(message.startTime, long + 1); if (error) return "startTime." + error; } - if (message.endTime != null && message.hasOwnProperty("endTime")) { + if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) { var error = $root.google.protobuf.Timestamp.verify(message.endTime, long + 1); if (error) return "endTime." + error; @@ -10108,23 +10436,25 @@ UpdateLogicalViewMetadata.fromObject = function fromObject(object, long) { if (object instanceof $root.google.bigtable.admin.v2.UpdateLogicalViewMetadata) return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.admin.v2.UpdateLogicalViewMetadata: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) throw Error("maximum nesting depth exceeded"); var message = new $root.google.bigtable.admin.v2.UpdateLogicalViewMetadata(); if (object.originalRequest != null) { - if (typeof object.originalRequest !== "object") + if (!$util.isObject(object.originalRequest)) throw TypeError(".google.bigtable.admin.v2.UpdateLogicalViewMetadata.originalRequest: object expected"); message.originalRequest = $root.google.bigtable.admin.v2.UpdateLogicalViewRequest.fromObject(object.originalRequest, long + 1); } if (object.startTime != null) { - if (typeof object.startTime !== "object") + if (!$util.isObject(object.startTime)) throw TypeError(".google.bigtable.admin.v2.UpdateLogicalViewMetadata.startTime: object expected"); message.startTime = $root.google.protobuf.Timestamp.fromObject(object.startTime, long + 1); } if (object.endTime != null) { - if (typeof object.endTime !== "object") + if (!$util.isObject(object.endTime)) throw TypeError(".google.bigtable.admin.v2.UpdateLogicalViewMetadata.endTime: object expected"); message.endTime = $root.google.protobuf.Timestamp.fromObject(object.endTime, long + 1); } @@ -10140,21 +10470,25 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - UpdateLogicalViewMetadata.toObject = function toObject(message, options) { + UpdateLogicalViewMetadata.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.originalRequest = null; object.startTime = null; object.endTime = null; } - if (message.originalRequest != null && message.hasOwnProperty("originalRequest")) - object.originalRequest = $root.google.bigtable.admin.v2.UpdateLogicalViewRequest.toObject(message.originalRequest, options); - if (message.startTime != null && message.hasOwnProperty("startTime")) - object.startTime = $root.google.protobuf.Timestamp.toObject(message.startTime, options); - if (message.endTime != null && message.hasOwnProperty("endTime")) - object.endTime = $root.google.protobuf.Timestamp.toObject(message.endTime, options); + if (message.originalRequest != null && Object.hasOwnProperty.call(message, "originalRequest")) + object.originalRequest = $root.google.bigtable.admin.v2.UpdateLogicalViewRequest.toObject(message.originalRequest, options, q + 1); + if (message.startTime != null && Object.hasOwnProperty.call(message, "startTime")) + object.startTime = $root.google.protobuf.Timestamp.toObject(message.startTime, options, q + 1); + if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) + object.endTime = $root.google.protobuf.Timestamp.toObject(message.endTime, options, q + 1); return object; }; @@ -10249,9 +10583,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteLogicalViewRequest.encode = function encode(message, writer) { + DeleteLogicalViewRequest.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) @@ -10269,7 +10607,7 @@ * @returns {$protobuf.Writer} Writer */ DeleteLogicalViewRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -10343,10 +10681,10 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) if (!$util.isString(message.name)) return "name: string expected"; - if (message.etag != null && message.hasOwnProperty("etag")) + if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) if (!$util.isString(message.etag)) return "etag: string expected"; return null; @@ -10363,6 +10701,8 @@ DeleteLogicalViewRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.google.bigtable.admin.v2.DeleteLogicalViewRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.admin.v2.DeleteLogicalViewRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -10384,17 +10724,21 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DeleteLogicalViewRequest.toObject = function toObject(message, options) { + DeleteLogicalViewRequest.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.name = ""; object.etag = ""; } - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) object.name = message.name; - if (message.etag != null && message.hasOwnProperty("etag")) + if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) object.etag = message.etag; return object; }; @@ -10499,15 +10843,19 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateMaterializedViewRequest.encode = function encode(message, writer) { + CreateMaterializedViewRequest.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); if (message.materializedViewId != null && Object.hasOwnProperty.call(message, "materializedViewId")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.materializedViewId); if (message.materializedView != null && Object.hasOwnProperty.call(message, "materializedView")) - $root.google.bigtable.admin.v2.MaterializedView.encode(message.materializedView, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + $root.google.bigtable.admin.v2.MaterializedView.encode(message.materializedView, writer.uint32(/* id 3, wireType 2 =*/26).fork(), q + 1).ldelim(); return writer; }; @@ -10521,7 +10869,7 @@ * @returns {$protobuf.Writer} Writer */ CreateMaterializedViewRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -10599,13 +10947,13 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.parent != null && message.hasOwnProperty("parent")) + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) if (!$util.isString(message.parent)) return "parent: string expected"; - if (message.materializedViewId != null && message.hasOwnProperty("materializedViewId")) + if (message.materializedViewId != null && Object.hasOwnProperty.call(message, "materializedViewId")) if (!$util.isString(message.materializedViewId)) return "materializedViewId: string expected"; - if (message.materializedView != null && message.hasOwnProperty("materializedView")) { + if (message.materializedView != null && Object.hasOwnProperty.call(message, "materializedView")) { var error = $root.google.bigtable.admin.v2.MaterializedView.verify(message.materializedView, long + 1); if (error) return "materializedView." + error; @@ -10624,6 +10972,8 @@ CreateMaterializedViewRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.google.bigtable.admin.v2.CreateMaterializedViewRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.admin.v2.CreateMaterializedViewRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -10634,7 +10984,7 @@ if (object.materializedViewId != null) message.materializedViewId = String(object.materializedViewId); if (object.materializedView != null) { - if (typeof object.materializedView !== "object") + if (!$util.isObject(object.materializedView)) throw TypeError(".google.bigtable.admin.v2.CreateMaterializedViewRequest.materializedView: object expected"); message.materializedView = $root.google.bigtable.admin.v2.MaterializedView.fromObject(object.materializedView, long + 1); } @@ -10650,21 +11000,25 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CreateMaterializedViewRequest.toObject = function toObject(message, options) { + CreateMaterializedViewRequest.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.parent = ""; object.materializedViewId = ""; object.materializedView = null; } - if (message.parent != null && message.hasOwnProperty("parent")) + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) object.parent = message.parent; - if (message.materializedViewId != null && message.hasOwnProperty("materializedViewId")) + if (message.materializedViewId != null && Object.hasOwnProperty.call(message, "materializedViewId")) object.materializedViewId = message.materializedViewId; - if (message.materializedView != null && message.hasOwnProperty("materializedView")) - object.materializedView = $root.google.bigtable.admin.v2.MaterializedView.toObject(message.materializedView, options); + if (message.materializedView != null && Object.hasOwnProperty.call(message, "materializedView")) + object.materializedView = $root.google.bigtable.admin.v2.MaterializedView.toObject(message.materializedView, options, q + 1); return object; }; @@ -10768,15 +11122,19 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateMaterializedViewMetadata.encode = function encode(message, writer) { + CreateMaterializedViewMetadata.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.originalRequest != null && Object.hasOwnProperty.call(message, "originalRequest")) - $root.google.bigtable.admin.v2.CreateMaterializedViewRequest.encode(message.originalRequest, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + $root.google.bigtable.admin.v2.CreateMaterializedViewRequest.encode(message.originalRequest, writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); if (message.startTime != null && Object.hasOwnProperty.call(message, "startTime")) - $root.google.protobuf.Timestamp.encode(message.startTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + $root.google.protobuf.Timestamp.encode(message.startTime, writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) - $root.google.protobuf.Timestamp.encode(message.endTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + $root.google.protobuf.Timestamp.encode(message.endTime, writer.uint32(/* id 3, wireType 2 =*/26).fork(), q + 1).ldelim(); return writer; }; @@ -10790,7 +11148,7 @@ * @returns {$protobuf.Writer} Writer */ CreateMaterializedViewMetadata.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -10868,17 +11226,17 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.originalRequest != null && message.hasOwnProperty("originalRequest")) { + if (message.originalRequest != null && Object.hasOwnProperty.call(message, "originalRequest")) { var error = $root.google.bigtable.admin.v2.CreateMaterializedViewRequest.verify(message.originalRequest, long + 1); if (error) return "originalRequest." + error; } - if (message.startTime != null && message.hasOwnProperty("startTime")) { + if (message.startTime != null && Object.hasOwnProperty.call(message, "startTime")) { var error = $root.google.protobuf.Timestamp.verify(message.startTime, long + 1); if (error) return "startTime." + error; } - if (message.endTime != null && message.hasOwnProperty("endTime")) { + if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) { var error = $root.google.protobuf.Timestamp.verify(message.endTime, long + 1); if (error) return "endTime." + error; @@ -10897,23 +11255,25 @@ CreateMaterializedViewMetadata.fromObject = function fromObject(object, long) { if (object instanceof $root.google.bigtable.admin.v2.CreateMaterializedViewMetadata) return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.admin.v2.CreateMaterializedViewMetadata: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) throw Error("maximum nesting depth exceeded"); var message = new $root.google.bigtable.admin.v2.CreateMaterializedViewMetadata(); if (object.originalRequest != null) { - if (typeof object.originalRequest !== "object") + if (!$util.isObject(object.originalRequest)) throw TypeError(".google.bigtable.admin.v2.CreateMaterializedViewMetadata.originalRequest: object expected"); message.originalRequest = $root.google.bigtable.admin.v2.CreateMaterializedViewRequest.fromObject(object.originalRequest, long + 1); } if (object.startTime != null) { - if (typeof object.startTime !== "object") + if (!$util.isObject(object.startTime)) throw TypeError(".google.bigtable.admin.v2.CreateMaterializedViewMetadata.startTime: object expected"); message.startTime = $root.google.protobuf.Timestamp.fromObject(object.startTime, long + 1); } if (object.endTime != null) { - if (typeof object.endTime !== "object") + if (!$util.isObject(object.endTime)) throw TypeError(".google.bigtable.admin.v2.CreateMaterializedViewMetadata.endTime: object expected"); message.endTime = $root.google.protobuf.Timestamp.fromObject(object.endTime, long + 1); } @@ -10929,21 +11289,25 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CreateMaterializedViewMetadata.toObject = function toObject(message, options) { + CreateMaterializedViewMetadata.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.originalRequest = null; object.startTime = null; object.endTime = null; } - if (message.originalRequest != null && message.hasOwnProperty("originalRequest")) - object.originalRequest = $root.google.bigtable.admin.v2.CreateMaterializedViewRequest.toObject(message.originalRequest, options); - if (message.startTime != null && message.hasOwnProperty("startTime")) - object.startTime = $root.google.protobuf.Timestamp.toObject(message.startTime, options); - if (message.endTime != null && message.hasOwnProperty("endTime")) - object.endTime = $root.google.protobuf.Timestamp.toObject(message.endTime, options); + if (message.originalRequest != null && Object.hasOwnProperty.call(message, "originalRequest")) + object.originalRequest = $root.google.bigtable.admin.v2.CreateMaterializedViewRequest.toObject(message.originalRequest, options, q + 1); + if (message.startTime != null && Object.hasOwnProperty.call(message, "startTime")) + object.startTime = $root.google.protobuf.Timestamp.toObject(message.startTime, options, q + 1); + if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) + object.endTime = $root.google.protobuf.Timestamp.toObject(message.endTime, options, q + 1); return object; }; @@ -11029,9 +11393,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetMaterializedViewRequest.encode = function encode(message, writer) { + GetMaterializedViewRequest.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); return writer; @@ -11047,7 +11415,7 @@ * @returns {$protobuf.Writer} Writer */ GetMaterializedViewRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -11117,7 +11485,7 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) if (!$util.isString(message.name)) return "name: string expected"; return null; @@ -11134,6 +11502,8 @@ GetMaterializedViewRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.google.bigtable.admin.v2.GetMaterializedViewRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.admin.v2.GetMaterializedViewRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -11153,13 +11523,17 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetMaterializedViewRequest.toObject = function toObject(message, options) { + GetMaterializedViewRequest.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) object.name = message.name; return object; }; @@ -11264,9 +11638,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListMaterializedViewsRequest.encode = function encode(message, writer) { + ListMaterializedViewsRequest.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) @@ -11286,7 +11664,7 @@ * @returns {$protobuf.Writer} Writer */ ListMaterializedViewsRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -11364,13 +11742,13 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.parent != null && message.hasOwnProperty("parent")) + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) if (!$util.isString(message.parent)) return "parent: string expected"; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) if (!$util.isInteger(message.pageSize)) return "pageSize: integer expected"; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) if (!$util.isString(message.pageToken)) return "pageToken: string expected"; return null; @@ -11387,6 +11765,8 @@ ListMaterializedViewsRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.google.bigtable.admin.v2.ListMaterializedViewsRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.admin.v2.ListMaterializedViewsRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -11410,20 +11790,24 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListMaterializedViewsRequest.toObject = function toObject(message, options) { + ListMaterializedViewsRequest.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.parent = ""; object.pageSize = 0; object.pageToken = ""; } - if (message.parent != null && message.hasOwnProperty("parent")) + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) object.parent = message.parent; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) object.pageSize = message.pageSize; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) object.pageToken = message.pageToken; return object; }; @@ -11520,12 +11904,16 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListMaterializedViewsResponse.encode = function encode(message, writer) { + ListMaterializedViewsResponse.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.materializedViews != null && message.materializedViews.length) for (var i = 0; i < message.materializedViews.length; ++i) - $root.google.bigtable.admin.v2.MaterializedView.encode(message.materializedViews[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + $root.google.bigtable.admin.v2.MaterializedView.encode(message.materializedViews[i], writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); return writer; @@ -11541,7 +11929,7 @@ * @returns {$protobuf.Writer} Writer */ ListMaterializedViewsResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -11617,7 +12005,7 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.materializedViews != null && message.hasOwnProperty("materializedViews")) { + if (message.materializedViews != null && Object.hasOwnProperty.call(message, "materializedViews")) { if (!Array.isArray(message.materializedViews)) return "materializedViews: array expected"; for (var i = 0; i < message.materializedViews.length; ++i) { @@ -11626,7 +12014,7 @@ return "materializedViews." + error; } } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) if (!$util.isString(message.nextPageToken)) return "nextPageToken: string expected"; return null; @@ -11643,6 +12031,8 @@ ListMaterializedViewsResponse.fromObject = function fromObject(object, long) { if (object instanceof $root.google.bigtable.admin.v2.ListMaterializedViewsResponse) return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.admin.v2.ListMaterializedViewsResponse: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -11653,7 +12043,7 @@ throw TypeError(".google.bigtable.admin.v2.ListMaterializedViewsResponse.materializedViews: array expected"); message.materializedViews = []; for (var i = 0; i < object.materializedViews.length; ++i) { - if (typeof object.materializedViews[i] !== "object") + if (!$util.isObject(object.materializedViews[i])) throw TypeError(".google.bigtable.admin.v2.ListMaterializedViewsResponse.materializedViews: object expected"); message.materializedViews[i] = $root.google.bigtable.admin.v2.MaterializedView.fromObject(object.materializedViews[i], long + 1); } @@ -11672,9 +12062,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListMaterializedViewsResponse.toObject = function toObject(message, options) { + ListMaterializedViewsResponse.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.materializedViews = []; @@ -11683,9 +12077,9 @@ if (message.materializedViews && message.materializedViews.length) { object.materializedViews = []; for (var j = 0; j < message.materializedViews.length; ++j) - object.materializedViews[j] = $root.google.bigtable.admin.v2.MaterializedView.toObject(message.materializedViews[j], options); + object.materializedViews[j] = $root.google.bigtable.admin.v2.MaterializedView.toObject(message.materializedViews[j], options, q + 1); } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) object.nextPageToken = message.nextPageToken; return object; }; @@ -11781,13 +12175,17 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateMaterializedViewRequest.encode = function encode(message, writer) { + UpdateMaterializedViewRequest.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.materializedView != null && Object.hasOwnProperty.call(message, "materializedView")) - $root.google.bigtable.admin.v2.MaterializedView.encode(message.materializedView, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + $root.google.bigtable.admin.v2.MaterializedView.encode(message.materializedView, writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) - $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); return writer; }; @@ -11801,7 +12199,7 @@ * @returns {$protobuf.Writer} Writer */ UpdateMaterializedViewRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -11875,12 +12273,12 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.materializedView != null && message.hasOwnProperty("materializedView")) { + if (message.materializedView != null && Object.hasOwnProperty.call(message, "materializedView")) { var error = $root.google.bigtable.admin.v2.MaterializedView.verify(message.materializedView, long + 1); if (error) return "materializedView." + error; } - if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) { var error = $root.google.protobuf.FieldMask.verify(message.updateMask, long + 1); if (error) return "updateMask." + error; @@ -11899,18 +12297,20 @@ UpdateMaterializedViewRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.google.bigtable.admin.v2.UpdateMaterializedViewRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.admin.v2.UpdateMaterializedViewRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) throw Error("maximum nesting depth exceeded"); var message = new $root.google.bigtable.admin.v2.UpdateMaterializedViewRequest(); if (object.materializedView != null) { - if (typeof object.materializedView !== "object") + if (!$util.isObject(object.materializedView)) throw TypeError(".google.bigtable.admin.v2.UpdateMaterializedViewRequest.materializedView: object expected"); message.materializedView = $root.google.bigtable.admin.v2.MaterializedView.fromObject(object.materializedView, long + 1); } if (object.updateMask != null) { - if (typeof object.updateMask !== "object") + if (!$util.isObject(object.updateMask)) throw TypeError(".google.bigtable.admin.v2.UpdateMaterializedViewRequest.updateMask: object expected"); message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask, long + 1); } @@ -11926,18 +12326,22 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - UpdateMaterializedViewRequest.toObject = function toObject(message, options) { + UpdateMaterializedViewRequest.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.materializedView = null; object.updateMask = null; } - if (message.materializedView != null && message.hasOwnProperty("materializedView")) - object.materializedView = $root.google.bigtable.admin.v2.MaterializedView.toObject(message.materializedView, options); - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + if (message.materializedView != null && Object.hasOwnProperty.call(message, "materializedView")) + object.materializedView = $root.google.bigtable.admin.v2.MaterializedView.toObject(message.materializedView, options, q + 1); + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options, q + 1); return object; }; @@ -12041,15 +12445,19 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateMaterializedViewMetadata.encode = function encode(message, writer) { + UpdateMaterializedViewMetadata.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.originalRequest != null && Object.hasOwnProperty.call(message, "originalRequest")) - $root.google.bigtable.admin.v2.UpdateMaterializedViewRequest.encode(message.originalRequest, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + $root.google.bigtable.admin.v2.UpdateMaterializedViewRequest.encode(message.originalRequest, writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); if (message.startTime != null && Object.hasOwnProperty.call(message, "startTime")) - $root.google.protobuf.Timestamp.encode(message.startTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + $root.google.protobuf.Timestamp.encode(message.startTime, writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) - $root.google.protobuf.Timestamp.encode(message.endTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + $root.google.protobuf.Timestamp.encode(message.endTime, writer.uint32(/* id 3, wireType 2 =*/26).fork(), q + 1).ldelim(); return writer; }; @@ -12063,7 +12471,7 @@ * @returns {$protobuf.Writer} Writer */ UpdateMaterializedViewMetadata.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -12141,17 +12549,17 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.originalRequest != null && message.hasOwnProperty("originalRequest")) { + if (message.originalRequest != null && Object.hasOwnProperty.call(message, "originalRequest")) { var error = $root.google.bigtable.admin.v2.UpdateMaterializedViewRequest.verify(message.originalRequest, long + 1); if (error) return "originalRequest." + error; } - if (message.startTime != null && message.hasOwnProperty("startTime")) { + if (message.startTime != null && Object.hasOwnProperty.call(message, "startTime")) { var error = $root.google.protobuf.Timestamp.verify(message.startTime, long + 1); if (error) return "startTime." + error; } - if (message.endTime != null && message.hasOwnProperty("endTime")) { + if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) { var error = $root.google.protobuf.Timestamp.verify(message.endTime, long + 1); if (error) return "endTime." + error; @@ -12170,23 +12578,25 @@ UpdateMaterializedViewMetadata.fromObject = function fromObject(object, long) { if (object instanceof $root.google.bigtable.admin.v2.UpdateMaterializedViewMetadata) return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.admin.v2.UpdateMaterializedViewMetadata: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) throw Error("maximum nesting depth exceeded"); var message = new $root.google.bigtable.admin.v2.UpdateMaterializedViewMetadata(); if (object.originalRequest != null) { - if (typeof object.originalRequest !== "object") + if (!$util.isObject(object.originalRequest)) throw TypeError(".google.bigtable.admin.v2.UpdateMaterializedViewMetadata.originalRequest: object expected"); message.originalRequest = $root.google.bigtable.admin.v2.UpdateMaterializedViewRequest.fromObject(object.originalRequest, long + 1); } if (object.startTime != null) { - if (typeof object.startTime !== "object") + if (!$util.isObject(object.startTime)) throw TypeError(".google.bigtable.admin.v2.UpdateMaterializedViewMetadata.startTime: object expected"); message.startTime = $root.google.protobuf.Timestamp.fromObject(object.startTime, long + 1); } if (object.endTime != null) { - if (typeof object.endTime !== "object") + if (!$util.isObject(object.endTime)) throw TypeError(".google.bigtable.admin.v2.UpdateMaterializedViewMetadata.endTime: object expected"); message.endTime = $root.google.protobuf.Timestamp.fromObject(object.endTime, long + 1); } @@ -12202,21 +12612,25 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - UpdateMaterializedViewMetadata.toObject = function toObject(message, options) { + UpdateMaterializedViewMetadata.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.originalRequest = null; object.startTime = null; object.endTime = null; } - if (message.originalRequest != null && message.hasOwnProperty("originalRequest")) - object.originalRequest = $root.google.bigtable.admin.v2.UpdateMaterializedViewRequest.toObject(message.originalRequest, options); - if (message.startTime != null && message.hasOwnProperty("startTime")) - object.startTime = $root.google.protobuf.Timestamp.toObject(message.startTime, options); - if (message.endTime != null && message.hasOwnProperty("endTime")) - object.endTime = $root.google.protobuf.Timestamp.toObject(message.endTime, options); + if (message.originalRequest != null && Object.hasOwnProperty.call(message, "originalRequest")) + object.originalRequest = $root.google.bigtable.admin.v2.UpdateMaterializedViewRequest.toObject(message.originalRequest, options, q + 1); + if (message.startTime != null && Object.hasOwnProperty.call(message, "startTime")) + object.startTime = $root.google.protobuf.Timestamp.toObject(message.startTime, options, q + 1); + if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) + object.endTime = $root.google.protobuf.Timestamp.toObject(message.endTime, options, q + 1); return object; }; @@ -12311,9 +12725,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteMaterializedViewRequest.encode = function encode(message, writer) { + DeleteMaterializedViewRequest.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) @@ -12331,7 +12749,7 @@ * @returns {$protobuf.Writer} Writer */ DeleteMaterializedViewRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -12405,10 +12823,10 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) if (!$util.isString(message.name)) return "name: string expected"; - if (message.etag != null && message.hasOwnProperty("etag")) + if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) if (!$util.isString(message.etag)) return "etag: string expected"; return null; @@ -12425,6 +12843,8 @@ DeleteMaterializedViewRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.google.bigtable.admin.v2.DeleteMaterializedViewRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.admin.v2.DeleteMaterializedViewRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -12446,17 +12866,21 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DeleteMaterializedViewRequest.toObject = function toObject(message, options) { + DeleteMaterializedViewRequest.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.name = ""; object.etag = ""; } - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) object.name = message.name; - if (message.etag != null && message.hasOwnProperty("etag")) + if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) object.etag = message.etag; return object; }; @@ -12632,9 +13056,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Instance.encode = function encode(message, writer) { + Instance.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) @@ -12647,7 +13075,7 @@ for (var keys = Object.keys(message.labels), i = 0; i < keys.length; ++i) writer.uint32(/* id 5, wireType 2 =*/42).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) - $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 7, wireType 2 =*/58).fork(), q + 1).ldelim(); if (message.satisfiesPzs != null && Object.hasOwnProperty.call(message, "satisfiesPzs")) writer.uint32(/* id 8, wireType 0 =*/64).bool(message.satisfiesPzs); if (message.satisfiesPzi != null && Object.hasOwnProperty.call(message, "satisfiesPzi")) @@ -12668,7 +13096,7 @@ * @returns {$protobuf.Writer} Writer */ Instance.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -12813,13 +13241,13 @@ if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; var properties = {}; - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) if (!$util.isString(message.name)) return "name: string expected"; - if (message.displayName != null && message.hasOwnProperty("displayName")) + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) if (!$util.isString(message.displayName)) return "displayName: string expected"; - if (message.state != null && message.hasOwnProperty("state")) + if (message.state != null && Object.hasOwnProperty.call(message, "state")) switch (message.state) { default: return "state: enum value expected"; @@ -12828,7 +13256,7 @@ case 2: break; } - if (message.type != null && message.hasOwnProperty("type")) + if (message.type != null && Object.hasOwnProperty.call(message, "type")) switch (message.type) { default: return "type: enum value expected"; @@ -12837,7 +13265,7 @@ case 2: break; } - if (message.labels != null && message.hasOwnProperty("labels")) { + if (message.labels != null && Object.hasOwnProperty.call(message, "labels")) { if (!$util.isObject(message.labels)) return "labels: object expected"; var key = Object.keys(message.labels); @@ -12845,22 +13273,22 @@ if (!$util.isString(message.labels[key[i]])) return "labels: string{k:string} expected"; } - if (message.createTime != null && message.hasOwnProperty("createTime")) { + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) { var error = $root.google.protobuf.Timestamp.verify(message.createTime, long + 1); if (error) return "createTime." + error; } - if (message.satisfiesPzs != null && message.hasOwnProperty("satisfiesPzs")) { + if (message.satisfiesPzs != null && Object.hasOwnProperty.call(message, "satisfiesPzs")) { properties._satisfiesPzs = 1; if (typeof message.satisfiesPzs !== "boolean") return "satisfiesPzs: boolean expected"; } - if (message.satisfiesPzi != null && message.hasOwnProperty("satisfiesPzi")) { + if (message.satisfiesPzi != null && Object.hasOwnProperty.call(message, "satisfiesPzi")) { properties._satisfiesPzi = 1; if (typeof message.satisfiesPzi !== "boolean") return "satisfiesPzi: boolean expected"; } - if (message.tags != null && message.hasOwnProperty("tags")) { + if (message.tags != null && Object.hasOwnProperty.call(message, "tags")) { if (!$util.isObject(message.tags)) return "tags: object expected"; var key = Object.keys(message.tags); @@ -12882,6 +13310,8 @@ Instance.fromObject = function fromObject(object, long) { if (object instanceof $root.google.bigtable.admin.v2.Instance) return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.admin.v2.Instance: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -12932,7 +13362,7 @@ break; } if (object.labels) { - if (typeof object.labels !== "object") + if (!$util.isObject(object.labels)) throw TypeError(".google.bigtable.admin.v2.Instance.labels: object expected"); message.labels = {}; for (var keys = Object.keys(object.labels), i = 0; i < keys.length; ++i) { @@ -12942,7 +13372,7 @@ } } if (object.createTime != null) { - if (typeof object.createTime !== "object") + if (!$util.isObject(object.createTime)) throw TypeError(".google.bigtable.admin.v2.Instance.createTime: object expected"); message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime, long + 1); } @@ -12951,7 +13381,7 @@ if (object.satisfiesPzi != null) message.satisfiesPzi = Boolean(object.satisfiesPzi); if (object.tags) { - if (typeof object.tags !== "object") + if (!$util.isObject(object.tags)) throw TypeError(".google.bigtable.admin.v2.Instance.tags: object expected"); message.tags = {}; for (var keys = Object.keys(object.tags), i = 0; i < keys.length; ++i) { @@ -12972,9 +13402,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Instance.toObject = function toObject(message, options) { + Instance.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.objects || options.defaults) { object.labels = {}; @@ -12987,13 +13421,13 @@ object.type = options.enums === String ? "TYPE_UNSPECIFIED" : 0; object.createTime = null; } - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) object.name = message.name; - if (message.displayName != null && message.hasOwnProperty("displayName")) + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) object.displayName = message.displayName; - if (message.state != null && message.hasOwnProperty("state")) + if (message.state != null && Object.hasOwnProperty.call(message, "state")) object.state = options.enums === String ? $root.google.bigtable.admin.v2.Instance.State[message.state] === undefined ? message.state : $root.google.bigtable.admin.v2.Instance.State[message.state] : message.state; - if (message.type != null && message.hasOwnProperty("type")) + if (message.type != null && Object.hasOwnProperty.call(message, "type")) object.type = options.enums === String ? $root.google.bigtable.admin.v2.Instance.Type[message.type] === undefined ? message.type : $root.google.bigtable.admin.v2.Instance.Type[message.type] : message.type; var keys2; if (message.labels && (keys2 = Object.keys(message.labels)).length) { @@ -13004,14 +13438,14 @@ object.labels[keys2[j]] = message.labels[keys2[j]]; } } - if (message.createTime != null && message.hasOwnProperty("createTime")) - object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); - if (message.satisfiesPzs != null && message.hasOwnProperty("satisfiesPzs")) { + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options, q + 1); + if (message.satisfiesPzs != null && Object.hasOwnProperty.call(message, "satisfiesPzs")) { object.satisfiesPzs = message.satisfiesPzs; if (options.oneofs) object._satisfiesPzs = "satisfiesPzs"; } - if (message.satisfiesPzi != null && message.hasOwnProperty("satisfiesPzi")) { + if (message.satisfiesPzi != null && Object.hasOwnProperty.call(message, "satisfiesPzi")) { object.satisfiesPzi = message.satisfiesPzi; if (options.oneofs) object._satisfiesPzi = "satisfiesPzi"; @@ -13150,9 +13584,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AutoscalingTargets.encode = function encode(message, writer) { + AutoscalingTargets.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.cpuUtilizationPercent != null && Object.hasOwnProperty.call(message, "cpuUtilizationPercent")) writer.uint32(/* id 2, wireType 0 =*/16).int32(message.cpuUtilizationPercent); if (message.storageUtilizationGibPerNode != null && Object.hasOwnProperty.call(message, "storageUtilizationGibPerNode")) @@ -13170,7 +13608,7 @@ * @returns {$protobuf.Writer} Writer */ AutoscalingTargets.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -13244,10 +13682,10 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.cpuUtilizationPercent != null && message.hasOwnProperty("cpuUtilizationPercent")) + if (message.cpuUtilizationPercent != null && Object.hasOwnProperty.call(message, "cpuUtilizationPercent")) if (!$util.isInteger(message.cpuUtilizationPercent)) return "cpuUtilizationPercent: integer expected"; - if (message.storageUtilizationGibPerNode != null && message.hasOwnProperty("storageUtilizationGibPerNode")) + if (message.storageUtilizationGibPerNode != null && Object.hasOwnProperty.call(message, "storageUtilizationGibPerNode")) if (!$util.isInteger(message.storageUtilizationGibPerNode)) return "storageUtilizationGibPerNode: integer expected"; return null; @@ -13264,6 +13702,8 @@ AutoscalingTargets.fromObject = function fromObject(object, long) { if (object instanceof $root.google.bigtable.admin.v2.AutoscalingTargets) return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.admin.v2.AutoscalingTargets: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -13285,17 +13725,21 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - AutoscalingTargets.toObject = function toObject(message, options) { + AutoscalingTargets.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.cpuUtilizationPercent = 0; object.storageUtilizationGibPerNode = 0; } - if (message.cpuUtilizationPercent != null && message.hasOwnProperty("cpuUtilizationPercent")) + if (message.cpuUtilizationPercent != null && Object.hasOwnProperty.call(message, "cpuUtilizationPercent")) object.cpuUtilizationPercent = message.cpuUtilizationPercent; - if (message.storageUtilizationGibPerNode != null && message.hasOwnProperty("storageUtilizationGibPerNode")) + if (message.storageUtilizationGibPerNode != null && Object.hasOwnProperty.call(message, "storageUtilizationGibPerNode")) object.storageUtilizationGibPerNode = message.storageUtilizationGibPerNode; return object; }; @@ -13391,9 +13835,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AutoscalingLimits.encode = function encode(message, writer) { + AutoscalingLimits.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.minServeNodes != null && Object.hasOwnProperty.call(message, "minServeNodes")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.minServeNodes); if (message.maxServeNodes != null && Object.hasOwnProperty.call(message, "maxServeNodes")) @@ -13411,7 +13859,7 @@ * @returns {$protobuf.Writer} Writer */ AutoscalingLimits.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -13485,10 +13933,10 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.minServeNodes != null && message.hasOwnProperty("minServeNodes")) + if (message.minServeNodes != null && Object.hasOwnProperty.call(message, "minServeNodes")) if (!$util.isInteger(message.minServeNodes)) return "minServeNodes: integer expected"; - if (message.maxServeNodes != null && message.hasOwnProperty("maxServeNodes")) + if (message.maxServeNodes != null && Object.hasOwnProperty.call(message, "maxServeNodes")) if (!$util.isInteger(message.maxServeNodes)) return "maxServeNodes: integer expected"; return null; @@ -13505,6 +13953,8 @@ AutoscalingLimits.fromObject = function fromObject(object, long) { if (object instanceof $root.google.bigtable.admin.v2.AutoscalingLimits) return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.admin.v2.AutoscalingLimits: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -13526,17 +13976,21 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - AutoscalingLimits.toObject = function toObject(message, options) { + AutoscalingLimits.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.minServeNodes = 0; object.maxServeNodes = 0; } - if (message.minServeNodes != null && message.hasOwnProperty("minServeNodes")) + if (message.minServeNodes != null && Object.hasOwnProperty.call(message, "minServeNodes")) object.minServeNodes = message.minServeNodes; - if (message.maxServeNodes != null && message.hasOwnProperty("maxServeNodes")) + if (message.maxServeNodes != null && Object.hasOwnProperty.call(message, "maxServeNodes")) object.maxServeNodes = message.maxServeNodes; return object; }; @@ -13700,9 +14154,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Cluster.encode = function encode(message, writer) { + Cluster.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); if (message.location != null && Object.hasOwnProperty.call(message, "location")) @@ -13714,9 +14172,9 @@ if (message.defaultStorageType != null && Object.hasOwnProperty.call(message, "defaultStorageType")) writer.uint32(/* id 5, wireType 0 =*/40).int32(message.defaultStorageType); if (message.encryptionConfig != null && Object.hasOwnProperty.call(message, "encryptionConfig")) - $root.google.bigtable.admin.v2.Cluster.EncryptionConfig.encode(message.encryptionConfig, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + $root.google.bigtable.admin.v2.Cluster.EncryptionConfig.encode(message.encryptionConfig, writer.uint32(/* id 6, wireType 2 =*/50).fork(), q + 1).ldelim(); if (message.clusterConfig != null && Object.hasOwnProperty.call(message, "clusterConfig")) - $root.google.bigtable.admin.v2.Cluster.ClusterConfig.encode(message.clusterConfig, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + $root.google.bigtable.admin.v2.Cluster.ClusterConfig.encode(message.clusterConfig, writer.uint32(/* id 7, wireType 2 =*/58).fork(), q + 1).ldelim(); if (message.nodeScalingFactor != null && Object.hasOwnProperty.call(message, "nodeScalingFactor")) writer.uint32(/* id 9, wireType 0 =*/72).int32(message.nodeScalingFactor); return writer; @@ -13732,7 +14190,7 @@ * @returns {$protobuf.Writer} Writer */ Cluster.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -13831,13 +14289,13 @@ if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; var properties = {}; - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) if (!$util.isString(message.name)) return "name: string expected"; - if (message.location != null && message.hasOwnProperty("location")) + if (message.location != null && Object.hasOwnProperty.call(message, "location")) if (!$util.isString(message.location)) return "location: string expected"; - if (message.state != null && message.hasOwnProperty("state")) + if (message.state != null && Object.hasOwnProperty.call(message, "state")) switch (message.state) { default: return "state: enum value expected"; @@ -13848,10 +14306,10 @@ case 4: break; } - if (message.serveNodes != null && message.hasOwnProperty("serveNodes")) + if (message.serveNodes != null && Object.hasOwnProperty.call(message, "serveNodes")) if (!$util.isInteger(message.serveNodes)) return "serveNodes: integer expected"; - if (message.nodeScalingFactor != null && message.hasOwnProperty("nodeScalingFactor")) + if (message.nodeScalingFactor != null && Object.hasOwnProperty.call(message, "nodeScalingFactor")) switch (message.nodeScalingFactor) { default: return "nodeScalingFactor: enum value expected"; @@ -13860,7 +14318,7 @@ case 2: break; } - if (message.clusterConfig != null && message.hasOwnProperty("clusterConfig")) { + if (message.clusterConfig != null && Object.hasOwnProperty.call(message, "clusterConfig")) { properties.config = 1; { var error = $root.google.bigtable.admin.v2.Cluster.ClusterConfig.verify(message.clusterConfig, long + 1); @@ -13868,7 +14326,7 @@ return "clusterConfig." + error; } } - if (message.defaultStorageType != null && message.hasOwnProperty("defaultStorageType")) + if (message.defaultStorageType != null && Object.hasOwnProperty.call(message, "defaultStorageType")) switch (message.defaultStorageType) { default: return "defaultStorageType: enum value expected"; @@ -13877,7 +14335,7 @@ case 2: break; } - if (message.encryptionConfig != null && message.hasOwnProperty("encryptionConfig")) { + if (message.encryptionConfig != null && Object.hasOwnProperty.call(message, "encryptionConfig")) { var error = $root.google.bigtable.admin.v2.Cluster.EncryptionConfig.verify(message.encryptionConfig, long + 1); if (error) return "encryptionConfig." + error; @@ -13896,6 +14354,8 @@ Cluster.fromObject = function fromObject(object, long) { if (object instanceof $root.google.bigtable.admin.v2.Cluster) return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.admin.v2.Cluster: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -13956,7 +14416,7 @@ break; } if (object.clusterConfig != null) { - if (typeof object.clusterConfig !== "object") + if (!$util.isObject(object.clusterConfig)) throw TypeError(".google.bigtable.admin.v2.Cluster.clusterConfig: object expected"); message.clusterConfig = $root.google.bigtable.admin.v2.Cluster.ClusterConfig.fromObject(object.clusterConfig, long + 1); } @@ -13981,7 +14441,7 @@ break; } if (object.encryptionConfig != null) { - if (typeof object.encryptionConfig !== "object") + if (!$util.isObject(object.encryptionConfig)) throw TypeError(".google.bigtable.admin.v2.Cluster.encryptionConfig: object expected"); message.encryptionConfig = $root.google.bigtable.admin.v2.Cluster.EncryptionConfig.fromObject(object.encryptionConfig, long + 1); } @@ -13997,9 +14457,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Cluster.toObject = function toObject(message, options) { + Cluster.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.name = ""; @@ -14010,24 +14474,24 @@ object.encryptionConfig = null; object.nodeScalingFactor = options.enums === String ? "NODE_SCALING_FACTOR_UNSPECIFIED" : 0; } - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) object.name = message.name; - if (message.location != null && message.hasOwnProperty("location")) + if (message.location != null && Object.hasOwnProperty.call(message, "location")) object.location = message.location; - if (message.state != null && message.hasOwnProperty("state")) + if (message.state != null && Object.hasOwnProperty.call(message, "state")) object.state = options.enums === String ? $root.google.bigtable.admin.v2.Cluster.State[message.state] === undefined ? message.state : $root.google.bigtable.admin.v2.Cluster.State[message.state] : message.state; - if (message.serveNodes != null && message.hasOwnProperty("serveNodes")) + if (message.serveNodes != null && Object.hasOwnProperty.call(message, "serveNodes")) object.serveNodes = message.serveNodes; - if (message.defaultStorageType != null && message.hasOwnProperty("defaultStorageType")) + if (message.defaultStorageType != null && Object.hasOwnProperty.call(message, "defaultStorageType")) object.defaultStorageType = options.enums === String ? $root.google.bigtable.admin.v2.StorageType[message.defaultStorageType] === undefined ? message.defaultStorageType : $root.google.bigtable.admin.v2.StorageType[message.defaultStorageType] : message.defaultStorageType; - if (message.encryptionConfig != null && message.hasOwnProperty("encryptionConfig")) - object.encryptionConfig = $root.google.bigtable.admin.v2.Cluster.EncryptionConfig.toObject(message.encryptionConfig, options); - if (message.clusterConfig != null && message.hasOwnProperty("clusterConfig")) { - object.clusterConfig = $root.google.bigtable.admin.v2.Cluster.ClusterConfig.toObject(message.clusterConfig, options); + if (message.encryptionConfig != null && Object.hasOwnProperty.call(message, "encryptionConfig")) + object.encryptionConfig = $root.google.bigtable.admin.v2.Cluster.EncryptionConfig.toObject(message.encryptionConfig, options, q + 1); + if (message.clusterConfig != null && Object.hasOwnProperty.call(message, "clusterConfig")) { + object.clusterConfig = $root.google.bigtable.admin.v2.Cluster.ClusterConfig.toObject(message.clusterConfig, options, q + 1); if (options.oneofs) object.config = "clusterConfig"; } - if (message.nodeScalingFactor != null && message.hasOwnProperty("nodeScalingFactor")) + if (message.nodeScalingFactor != null && Object.hasOwnProperty.call(message, "nodeScalingFactor")) object.nodeScalingFactor = options.enums === String ? $root.google.bigtable.admin.v2.Cluster.NodeScalingFactor[message.nodeScalingFactor] === undefined ? message.nodeScalingFactor : $root.google.bigtable.admin.v2.Cluster.NodeScalingFactor[message.nodeScalingFactor] : message.nodeScalingFactor; return object; }; @@ -14156,13 +14620,17 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ClusterAutoscalingConfig.encode = function encode(message, writer) { + ClusterAutoscalingConfig.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.autoscalingLimits != null && Object.hasOwnProperty.call(message, "autoscalingLimits")) - $root.google.bigtable.admin.v2.AutoscalingLimits.encode(message.autoscalingLimits, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + $root.google.bigtable.admin.v2.AutoscalingLimits.encode(message.autoscalingLimits, writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); if (message.autoscalingTargets != null && Object.hasOwnProperty.call(message, "autoscalingTargets")) - $root.google.bigtable.admin.v2.AutoscalingTargets.encode(message.autoscalingTargets, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + $root.google.bigtable.admin.v2.AutoscalingTargets.encode(message.autoscalingTargets, writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); return writer; }; @@ -14176,7 +14644,7 @@ * @returns {$protobuf.Writer} Writer */ ClusterAutoscalingConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -14250,12 +14718,12 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.autoscalingLimits != null && message.hasOwnProperty("autoscalingLimits")) { + if (message.autoscalingLimits != null && Object.hasOwnProperty.call(message, "autoscalingLimits")) { var error = $root.google.bigtable.admin.v2.AutoscalingLimits.verify(message.autoscalingLimits, long + 1); if (error) return "autoscalingLimits." + error; } - if (message.autoscalingTargets != null && message.hasOwnProperty("autoscalingTargets")) { + if (message.autoscalingTargets != null && Object.hasOwnProperty.call(message, "autoscalingTargets")) { var error = $root.google.bigtable.admin.v2.AutoscalingTargets.verify(message.autoscalingTargets, long + 1); if (error) return "autoscalingTargets." + error; @@ -14274,18 +14742,20 @@ ClusterAutoscalingConfig.fromObject = function fromObject(object, long) { if (object instanceof $root.google.bigtable.admin.v2.Cluster.ClusterAutoscalingConfig) return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.admin.v2.Cluster.ClusterAutoscalingConfig: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) throw Error("maximum nesting depth exceeded"); var message = new $root.google.bigtable.admin.v2.Cluster.ClusterAutoscalingConfig(); if (object.autoscalingLimits != null) { - if (typeof object.autoscalingLimits !== "object") + if (!$util.isObject(object.autoscalingLimits)) throw TypeError(".google.bigtable.admin.v2.Cluster.ClusterAutoscalingConfig.autoscalingLimits: object expected"); message.autoscalingLimits = $root.google.bigtable.admin.v2.AutoscalingLimits.fromObject(object.autoscalingLimits, long + 1); } if (object.autoscalingTargets != null) { - if (typeof object.autoscalingTargets !== "object") + if (!$util.isObject(object.autoscalingTargets)) throw TypeError(".google.bigtable.admin.v2.Cluster.ClusterAutoscalingConfig.autoscalingTargets: object expected"); message.autoscalingTargets = $root.google.bigtable.admin.v2.AutoscalingTargets.fromObject(object.autoscalingTargets, long + 1); } @@ -14301,18 +14771,22 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ClusterAutoscalingConfig.toObject = function toObject(message, options) { + ClusterAutoscalingConfig.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.autoscalingLimits = null; object.autoscalingTargets = null; } - if (message.autoscalingLimits != null && message.hasOwnProperty("autoscalingLimits")) - object.autoscalingLimits = $root.google.bigtable.admin.v2.AutoscalingLimits.toObject(message.autoscalingLimits, options); - if (message.autoscalingTargets != null && message.hasOwnProperty("autoscalingTargets")) - object.autoscalingTargets = $root.google.bigtable.admin.v2.AutoscalingTargets.toObject(message.autoscalingTargets, options); + if (message.autoscalingLimits != null && Object.hasOwnProperty.call(message, "autoscalingLimits")) + object.autoscalingLimits = $root.google.bigtable.admin.v2.AutoscalingLimits.toObject(message.autoscalingLimits, options, q + 1); + if (message.autoscalingTargets != null && Object.hasOwnProperty.call(message, "autoscalingTargets")) + object.autoscalingTargets = $root.google.bigtable.admin.v2.AutoscalingTargets.toObject(message.autoscalingTargets, options, q + 1); return object; }; @@ -14398,11 +14872,15 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ClusterConfig.encode = function encode(message, writer) { + ClusterConfig.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.clusterAutoscalingConfig != null && Object.hasOwnProperty.call(message, "clusterAutoscalingConfig")) - $root.google.bigtable.admin.v2.Cluster.ClusterAutoscalingConfig.encode(message.clusterAutoscalingConfig, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + $root.google.bigtable.admin.v2.Cluster.ClusterAutoscalingConfig.encode(message.clusterAutoscalingConfig, writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); return writer; }; @@ -14416,7 +14894,7 @@ * @returns {$protobuf.Writer} Writer */ ClusterConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -14486,7 +14964,7 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.clusterAutoscalingConfig != null && message.hasOwnProperty("clusterAutoscalingConfig")) { + if (message.clusterAutoscalingConfig != null && Object.hasOwnProperty.call(message, "clusterAutoscalingConfig")) { var error = $root.google.bigtable.admin.v2.Cluster.ClusterAutoscalingConfig.verify(message.clusterAutoscalingConfig, long + 1); if (error) return "clusterAutoscalingConfig." + error; @@ -14505,13 +14983,15 @@ ClusterConfig.fromObject = function fromObject(object, long) { if (object instanceof $root.google.bigtable.admin.v2.Cluster.ClusterConfig) return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.admin.v2.Cluster.ClusterConfig: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) throw Error("maximum nesting depth exceeded"); var message = new $root.google.bigtable.admin.v2.Cluster.ClusterConfig(); if (object.clusterAutoscalingConfig != null) { - if (typeof object.clusterAutoscalingConfig !== "object") + if (!$util.isObject(object.clusterAutoscalingConfig)) throw TypeError(".google.bigtable.admin.v2.Cluster.ClusterConfig.clusterAutoscalingConfig: object expected"); message.clusterAutoscalingConfig = $root.google.bigtable.admin.v2.Cluster.ClusterAutoscalingConfig.fromObject(object.clusterAutoscalingConfig, long + 1); } @@ -14527,14 +15007,18 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ClusterConfig.toObject = function toObject(message, options) { + ClusterConfig.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) object.clusterAutoscalingConfig = null; - if (message.clusterAutoscalingConfig != null && message.hasOwnProperty("clusterAutoscalingConfig")) - object.clusterAutoscalingConfig = $root.google.bigtable.admin.v2.Cluster.ClusterAutoscalingConfig.toObject(message.clusterAutoscalingConfig, options); + if (message.clusterAutoscalingConfig != null && Object.hasOwnProperty.call(message, "clusterAutoscalingConfig")) + object.clusterAutoscalingConfig = $root.google.bigtable.admin.v2.Cluster.ClusterAutoscalingConfig.toObject(message.clusterAutoscalingConfig, options, q + 1); return object; }; @@ -14620,9 +15104,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - EncryptionConfig.encode = function encode(message, writer) { + EncryptionConfig.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.kmsKeyName != null && Object.hasOwnProperty.call(message, "kmsKeyName")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.kmsKeyName); return writer; @@ -14638,7 +15126,7 @@ * @returns {$protobuf.Writer} Writer */ EncryptionConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -14708,7 +15196,7 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.kmsKeyName != null && message.hasOwnProperty("kmsKeyName")) + if (message.kmsKeyName != null && Object.hasOwnProperty.call(message, "kmsKeyName")) if (!$util.isString(message.kmsKeyName)) return "kmsKeyName: string expected"; return null; @@ -14725,6 +15213,8 @@ EncryptionConfig.fromObject = function fromObject(object, long) { if (object instanceof $root.google.bigtable.admin.v2.Cluster.EncryptionConfig) return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.admin.v2.Cluster.EncryptionConfig: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -14744,13 +15234,17 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - EncryptionConfig.toObject = function toObject(message, options) { + EncryptionConfig.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) object.kmsKeyName = ""; - if (message.kmsKeyName != null && message.hasOwnProperty("kmsKeyName")) + if (message.kmsKeyName != null && Object.hasOwnProperty.call(message, "kmsKeyName")) object.kmsKeyName = message.kmsKeyName; return object; }; @@ -14928,9 +15422,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AppProfile.encode = function encode(message, writer) { + AppProfile.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) @@ -14938,15 +15436,15 @@ if (message.description != null && Object.hasOwnProperty.call(message, "description")) writer.uint32(/* id 3, wireType 2 =*/26).string(message.description); if (message.multiClusterRoutingUseAny != null && Object.hasOwnProperty.call(message, "multiClusterRoutingUseAny")) - $root.google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny.encode(message.multiClusterRoutingUseAny, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + $root.google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny.encode(message.multiClusterRoutingUseAny, writer.uint32(/* id 5, wireType 2 =*/42).fork(), q + 1).ldelim(); if (message.singleClusterRouting != null && Object.hasOwnProperty.call(message, "singleClusterRouting")) - $root.google.bigtable.admin.v2.AppProfile.SingleClusterRouting.encode(message.singleClusterRouting, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + $root.google.bigtable.admin.v2.AppProfile.SingleClusterRouting.encode(message.singleClusterRouting, writer.uint32(/* id 6, wireType 2 =*/50).fork(), q + 1).ldelim(); if (message.priority != null && Object.hasOwnProperty.call(message, "priority")) writer.uint32(/* id 7, wireType 0 =*/56).int32(message.priority); if (message.dataBoostIsolationReadOnly != null && Object.hasOwnProperty.call(message, "dataBoostIsolationReadOnly")) - $root.google.bigtable.admin.v2.AppProfile.DataBoostIsolationReadOnly.encode(message.dataBoostIsolationReadOnly, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + $root.google.bigtable.admin.v2.AppProfile.DataBoostIsolationReadOnly.encode(message.dataBoostIsolationReadOnly, writer.uint32(/* id 10, wireType 2 =*/82).fork(), q + 1).ldelim(); if (message.standardIsolation != null && Object.hasOwnProperty.call(message, "standardIsolation")) - $root.google.bigtable.admin.v2.AppProfile.StandardIsolation.encode(message.standardIsolation, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + $root.google.bigtable.admin.v2.AppProfile.StandardIsolation.encode(message.standardIsolation, writer.uint32(/* id 11, wireType 2 =*/90).fork(), q + 1).ldelim(); return writer; }; @@ -14960,7 +15458,7 @@ * @returns {$protobuf.Writer} Writer */ AppProfile.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -15059,16 +15557,16 @@ if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; var properties = {}; - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) if (!$util.isString(message.name)) return "name: string expected"; - if (message.etag != null && message.hasOwnProperty("etag")) + if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) if (!$util.isString(message.etag)) return "etag: string expected"; - if (message.description != null && message.hasOwnProperty("description")) + if (message.description != null && Object.hasOwnProperty.call(message, "description")) if (!$util.isString(message.description)) return "description: string expected"; - if (message.multiClusterRoutingUseAny != null && message.hasOwnProperty("multiClusterRoutingUseAny")) { + if (message.multiClusterRoutingUseAny != null && Object.hasOwnProperty.call(message, "multiClusterRoutingUseAny")) { properties.routingPolicy = 1; { var error = $root.google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny.verify(message.multiClusterRoutingUseAny, long + 1); @@ -15076,7 +15574,7 @@ return "multiClusterRoutingUseAny." + error; } } - if (message.singleClusterRouting != null && message.hasOwnProperty("singleClusterRouting")) { + if (message.singleClusterRouting != null && Object.hasOwnProperty.call(message, "singleClusterRouting")) { if (properties.routingPolicy === 1) return "routingPolicy: multiple values"; properties.routingPolicy = 1; @@ -15086,7 +15584,7 @@ return "singleClusterRouting." + error; } } - if (message.priority != null && message.hasOwnProperty("priority")) { + if (message.priority != null && Object.hasOwnProperty.call(message, "priority")) { properties.isolation = 1; switch (message.priority) { default: @@ -15098,7 +15596,7 @@ break; } } - if (message.standardIsolation != null && message.hasOwnProperty("standardIsolation")) { + if (message.standardIsolation != null && Object.hasOwnProperty.call(message, "standardIsolation")) { if (properties.isolation === 1) return "isolation: multiple values"; properties.isolation = 1; @@ -15108,7 +15606,7 @@ return "standardIsolation." + error; } } - if (message.dataBoostIsolationReadOnly != null && message.hasOwnProperty("dataBoostIsolationReadOnly")) { + if (message.dataBoostIsolationReadOnly != null && Object.hasOwnProperty.call(message, "dataBoostIsolationReadOnly")) { if (properties.isolation === 1) return "isolation: multiple values"; properties.isolation = 1; @@ -15132,6 +15630,8 @@ AppProfile.fromObject = function fromObject(object, long) { if (object instanceof $root.google.bigtable.admin.v2.AppProfile) return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.admin.v2.AppProfile: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -15144,12 +15644,12 @@ if (object.description != null) message.description = String(object.description); if (object.multiClusterRoutingUseAny != null) { - if (typeof object.multiClusterRoutingUseAny !== "object") + if (!$util.isObject(object.multiClusterRoutingUseAny)) throw TypeError(".google.bigtable.admin.v2.AppProfile.multiClusterRoutingUseAny: object expected"); message.multiClusterRoutingUseAny = $root.google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny.fromObject(object.multiClusterRoutingUseAny, long + 1); } if (object.singleClusterRouting != null) { - if (typeof object.singleClusterRouting !== "object") + if (!$util.isObject(object.singleClusterRouting)) throw TypeError(".google.bigtable.admin.v2.AppProfile.singleClusterRouting: object expected"); message.singleClusterRouting = $root.google.bigtable.admin.v2.AppProfile.SingleClusterRouting.fromObject(object.singleClusterRouting, long + 1); } @@ -15178,12 +15678,12 @@ break; } if (object.standardIsolation != null) { - if (typeof object.standardIsolation !== "object") + if (!$util.isObject(object.standardIsolation)) throw TypeError(".google.bigtable.admin.v2.AppProfile.standardIsolation: object expected"); message.standardIsolation = $root.google.bigtable.admin.v2.AppProfile.StandardIsolation.fromObject(object.standardIsolation, long + 1); } if (object.dataBoostIsolationReadOnly != null) { - if (typeof object.dataBoostIsolationReadOnly !== "object") + if (!$util.isObject(object.dataBoostIsolationReadOnly)) throw TypeError(".google.bigtable.admin.v2.AppProfile.dataBoostIsolationReadOnly: object expected"); message.dataBoostIsolationReadOnly = $root.google.bigtable.admin.v2.AppProfile.DataBoostIsolationReadOnly.fromObject(object.dataBoostIsolationReadOnly, long + 1); } @@ -15199,43 +15699,47 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - AppProfile.toObject = function toObject(message, options) { + AppProfile.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.name = ""; object.etag = ""; object.description = ""; } - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) object.name = message.name; - if (message.etag != null && message.hasOwnProperty("etag")) + if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) object.etag = message.etag; - if (message.description != null && message.hasOwnProperty("description")) + if (message.description != null && Object.hasOwnProperty.call(message, "description")) object.description = message.description; - if (message.multiClusterRoutingUseAny != null && message.hasOwnProperty("multiClusterRoutingUseAny")) { - object.multiClusterRoutingUseAny = $root.google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny.toObject(message.multiClusterRoutingUseAny, options); + if (message.multiClusterRoutingUseAny != null && Object.hasOwnProperty.call(message, "multiClusterRoutingUseAny")) { + object.multiClusterRoutingUseAny = $root.google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny.toObject(message.multiClusterRoutingUseAny, options, q + 1); if (options.oneofs) object.routingPolicy = "multiClusterRoutingUseAny"; } - if (message.singleClusterRouting != null && message.hasOwnProperty("singleClusterRouting")) { - object.singleClusterRouting = $root.google.bigtable.admin.v2.AppProfile.SingleClusterRouting.toObject(message.singleClusterRouting, options); + if (message.singleClusterRouting != null && Object.hasOwnProperty.call(message, "singleClusterRouting")) { + object.singleClusterRouting = $root.google.bigtable.admin.v2.AppProfile.SingleClusterRouting.toObject(message.singleClusterRouting, options, q + 1); if (options.oneofs) object.routingPolicy = "singleClusterRouting"; } - if (message.priority != null && message.hasOwnProperty("priority")) { + if (message.priority != null && Object.hasOwnProperty.call(message, "priority")) { object.priority = options.enums === String ? $root.google.bigtable.admin.v2.AppProfile.Priority[message.priority] === undefined ? message.priority : $root.google.bigtable.admin.v2.AppProfile.Priority[message.priority] : message.priority; if (options.oneofs) object.isolation = "priority"; } - if (message.dataBoostIsolationReadOnly != null && message.hasOwnProperty("dataBoostIsolationReadOnly")) { - object.dataBoostIsolationReadOnly = $root.google.bigtable.admin.v2.AppProfile.DataBoostIsolationReadOnly.toObject(message.dataBoostIsolationReadOnly, options); + if (message.dataBoostIsolationReadOnly != null && Object.hasOwnProperty.call(message, "dataBoostIsolationReadOnly")) { + object.dataBoostIsolationReadOnly = $root.google.bigtable.admin.v2.AppProfile.DataBoostIsolationReadOnly.toObject(message.dataBoostIsolationReadOnly, options, q + 1); if (options.oneofs) object.isolation = "dataBoostIsolationReadOnly"; } - if (message.standardIsolation != null && message.hasOwnProperty("standardIsolation")) { - object.standardIsolation = $root.google.bigtable.admin.v2.AppProfile.StandardIsolation.toObject(message.standardIsolation, options); + if (message.standardIsolation != null && Object.hasOwnProperty.call(message, "standardIsolation")) { + object.standardIsolation = $root.google.bigtable.admin.v2.AppProfile.StandardIsolation.toObject(message.standardIsolation, options, q + 1); if (options.oneofs) object.isolation = "standardIsolation"; } @@ -15345,14 +15849,18 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MultiClusterRoutingUseAny.encode = function encode(message, writer) { + MultiClusterRoutingUseAny.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.clusterIds != null && message.clusterIds.length) for (var i = 0; i < message.clusterIds.length; ++i) writer.uint32(/* id 1, wireType 2 =*/10).string(message.clusterIds[i]); if (message.rowAffinity != null && Object.hasOwnProperty.call(message, "rowAffinity")) - $root.google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny.RowAffinity.encode(message.rowAffinity, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + $root.google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny.RowAffinity.encode(message.rowAffinity, writer.uint32(/* id 3, wireType 2 =*/26).fork(), q + 1).ldelim(); return writer; }; @@ -15366,7 +15874,7 @@ * @returns {$protobuf.Writer} Writer */ MultiClusterRoutingUseAny.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -15443,14 +15951,14 @@ if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; var properties = {}; - if (message.clusterIds != null && message.hasOwnProperty("clusterIds")) { + if (message.clusterIds != null && Object.hasOwnProperty.call(message, "clusterIds")) { if (!Array.isArray(message.clusterIds)) return "clusterIds: array expected"; for (var i = 0; i < message.clusterIds.length; ++i) if (!$util.isString(message.clusterIds[i])) return "clusterIds: string[] expected"; } - if (message.rowAffinity != null && message.hasOwnProperty("rowAffinity")) { + if (message.rowAffinity != null && Object.hasOwnProperty.call(message, "rowAffinity")) { properties.affinity = 1; { var error = $root.google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny.RowAffinity.verify(message.rowAffinity, long + 1); @@ -15472,6 +15980,8 @@ MultiClusterRoutingUseAny.fromObject = function fromObject(object, long) { if (object instanceof $root.google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny) return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -15485,7 +15995,7 @@ message.clusterIds[i] = String(object.clusterIds[i]); } if (object.rowAffinity != null) { - if (typeof object.rowAffinity !== "object") + if (!$util.isObject(object.rowAffinity)) throw TypeError(".google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny.rowAffinity: object expected"); message.rowAffinity = $root.google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny.RowAffinity.fromObject(object.rowAffinity, long + 1); } @@ -15501,9 +16011,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - MultiClusterRoutingUseAny.toObject = function toObject(message, options) { + MultiClusterRoutingUseAny.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.clusterIds = []; @@ -15512,8 +16026,8 @@ for (var j = 0; j < message.clusterIds.length; ++j) object.clusterIds[j] = message.clusterIds[j]; } - if (message.rowAffinity != null && message.hasOwnProperty("rowAffinity")) { - object.rowAffinity = $root.google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny.RowAffinity.toObject(message.rowAffinity, options); + if (message.rowAffinity != null && Object.hasOwnProperty.call(message, "rowAffinity")) { + object.rowAffinity = $root.google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny.RowAffinity.toObject(message.rowAffinity, options, q + 1); if (options.oneofs) object.affinity = "rowAffinity"; } @@ -15590,9 +16104,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - RowAffinity.encode = function encode(message, writer) { + RowAffinity.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); return writer; }; @@ -15606,7 +16124,7 @@ * @returns {$protobuf.Writer} Writer */ RowAffinity.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -15686,10 +16204,6 @@ RowAffinity.fromObject = function fromObject(object, long) { if (object instanceof $root.google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny.RowAffinity) return object; - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - throw Error("maximum nesting depth exceeded"); return new $root.google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny.RowAffinity(); }; @@ -15800,9 +16314,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SingleClusterRouting.encode = function encode(message, writer) { + SingleClusterRouting.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.clusterId != null && Object.hasOwnProperty.call(message, "clusterId")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.clusterId); if (message.allowTransactionalWrites != null && Object.hasOwnProperty.call(message, "allowTransactionalWrites")) @@ -15820,7 +16338,7 @@ * @returns {$protobuf.Writer} Writer */ SingleClusterRouting.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -15894,10 +16412,10 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.clusterId != null && message.hasOwnProperty("clusterId")) + if (message.clusterId != null && Object.hasOwnProperty.call(message, "clusterId")) if (!$util.isString(message.clusterId)) return "clusterId: string expected"; - if (message.allowTransactionalWrites != null && message.hasOwnProperty("allowTransactionalWrites")) + if (message.allowTransactionalWrites != null && Object.hasOwnProperty.call(message, "allowTransactionalWrites")) if (typeof message.allowTransactionalWrites !== "boolean") return "allowTransactionalWrites: boolean expected"; return null; @@ -15914,6 +16432,8 @@ SingleClusterRouting.fromObject = function fromObject(object, long) { if (object instanceof $root.google.bigtable.admin.v2.AppProfile.SingleClusterRouting) return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.admin.v2.AppProfile.SingleClusterRouting: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -15935,17 +16455,21 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - SingleClusterRouting.toObject = function toObject(message, options) { + SingleClusterRouting.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.clusterId = ""; object.allowTransactionalWrites = false; } - if (message.clusterId != null && message.hasOwnProperty("clusterId")) + if (message.clusterId != null && Object.hasOwnProperty.call(message, "clusterId")) object.clusterId = message.clusterId; - if (message.allowTransactionalWrites != null && message.hasOwnProperty("allowTransactionalWrites")) + if (message.allowTransactionalWrites != null && Object.hasOwnProperty.call(message, "allowTransactionalWrites")) object.allowTransactionalWrites = message.allowTransactionalWrites; return object; }; @@ -16050,9 +16574,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - StandardIsolation.encode = function encode(message, writer) { + StandardIsolation.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.priority != null && Object.hasOwnProperty.call(message, "priority")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.priority); return writer; @@ -16068,7 +16596,7 @@ * @returns {$protobuf.Writer} Writer */ StandardIsolation.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -16138,7 +16666,7 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.priority != null && message.hasOwnProperty("priority")) + if (message.priority != null && Object.hasOwnProperty.call(message, "priority")) switch (message.priority) { default: return "priority: enum value expected"; @@ -16162,6 +16690,8 @@ StandardIsolation.fromObject = function fromObject(object, long) { if (object instanceof $root.google.bigtable.admin.v2.AppProfile.StandardIsolation) return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.admin.v2.AppProfile.StandardIsolation: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -16203,13 +16733,17 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - StandardIsolation.toObject = function toObject(message, options) { + StandardIsolation.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) object.priority = options.enums === String ? "PRIORITY_UNSPECIFIED" : 0; - if (message.priority != null && message.hasOwnProperty("priority")) + if (message.priority != null && Object.hasOwnProperty.call(message, "priority")) object.priority = options.enums === String ? $root.google.bigtable.admin.v2.AppProfile.Priority[message.priority] === undefined ? message.priority : $root.google.bigtable.admin.v2.AppProfile.Priority[message.priority] : message.priority; return object; }; @@ -16305,9 +16839,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DataBoostIsolationReadOnly.encode = function encode(message, writer) { + DataBoostIsolationReadOnly.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.computeBillingOwner != null && Object.hasOwnProperty.call(message, "computeBillingOwner")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.computeBillingOwner); return writer; @@ -16323,7 +16861,7 @@ * @returns {$protobuf.Writer} Writer */ DataBoostIsolationReadOnly.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -16394,7 +16932,7 @@ if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; var properties = {}; - if (message.computeBillingOwner != null && message.hasOwnProperty("computeBillingOwner")) { + if (message.computeBillingOwner != null && Object.hasOwnProperty.call(message, "computeBillingOwner")) { properties._computeBillingOwner = 1; switch (message.computeBillingOwner) { default: @@ -16418,6 +16956,8 @@ DataBoostIsolationReadOnly.fromObject = function fromObject(object, long) { if (object instanceof $root.google.bigtable.admin.v2.AppProfile.DataBoostIsolationReadOnly) return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.admin.v2.AppProfile.DataBoostIsolationReadOnly: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -16451,11 +16991,15 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DataBoostIsolationReadOnly.toObject = function toObject(message, options) { + DataBoostIsolationReadOnly.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; - if (message.computeBillingOwner != null && message.hasOwnProperty("computeBillingOwner")) { + if (message.computeBillingOwner != null && Object.hasOwnProperty.call(message, "computeBillingOwner")) { object.computeBillingOwner = options.enums === String ? $root.google.bigtable.admin.v2.AppProfile.DataBoostIsolationReadOnly.ComputeBillingOwner[message.computeBillingOwner] === undefined ? message.computeBillingOwner : $root.google.bigtable.admin.v2.AppProfile.DataBoostIsolationReadOnly.ComputeBillingOwner[message.computeBillingOwner] : message.computeBillingOwner; if (options.oneofs) object._computeBillingOwner = "computeBillingOwner"; @@ -16616,17 +17160,21 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - HotTablet.encode = function encode(message, writer) { + HotTablet.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); if (message.tableName != null && Object.hasOwnProperty.call(message, "tableName")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.tableName); if (message.startTime != null && Object.hasOwnProperty.call(message, "startTime")) - $root.google.protobuf.Timestamp.encode(message.startTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + $root.google.protobuf.Timestamp.encode(message.startTime, writer.uint32(/* id 3, wireType 2 =*/26).fork(), q + 1).ldelim(); if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) - $root.google.protobuf.Timestamp.encode(message.endTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + $root.google.protobuf.Timestamp.encode(message.endTime, writer.uint32(/* id 4, wireType 2 =*/34).fork(), q + 1).ldelim(); if (message.startKey != null && Object.hasOwnProperty.call(message, "startKey")) writer.uint32(/* id 5, wireType 2 =*/42).string(message.startKey); if (message.endKey != null && Object.hasOwnProperty.call(message, "endKey")) @@ -16646,7 +17194,7 @@ * @returns {$protobuf.Writer} Writer */ HotTablet.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -16740,29 +17288,29 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) if (!$util.isString(message.name)) return "name: string expected"; - if (message.tableName != null && message.hasOwnProperty("tableName")) + if (message.tableName != null && Object.hasOwnProperty.call(message, "tableName")) if (!$util.isString(message.tableName)) return "tableName: string expected"; - if (message.startTime != null && message.hasOwnProperty("startTime")) { + if (message.startTime != null && Object.hasOwnProperty.call(message, "startTime")) { var error = $root.google.protobuf.Timestamp.verify(message.startTime, long + 1); if (error) return "startTime." + error; } - if (message.endTime != null && message.hasOwnProperty("endTime")) { + if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) { var error = $root.google.protobuf.Timestamp.verify(message.endTime, long + 1); if (error) return "endTime." + error; } - if (message.startKey != null && message.hasOwnProperty("startKey")) + if (message.startKey != null && Object.hasOwnProperty.call(message, "startKey")) if (!$util.isString(message.startKey)) return "startKey: string expected"; - if (message.endKey != null && message.hasOwnProperty("endKey")) + if (message.endKey != null && Object.hasOwnProperty.call(message, "endKey")) if (!$util.isString(message.endKey)) return "endKey: string expected"; - if (message.nodeCpuUsagePercent != null && message.hasOwnProperty("nodeCpuUsagePercent")) + if (message.nodeCpuUsagePercent != null && Object.hasOwnProperty.call(message, "nodeCpuUsagePercent")) if (typeof message.nodeCpuUsagePercent !== "number") return "nodeCpuUsagePercent: number expected"; return null; @@ -16779,6 +17327,8 @@ HotTablet.fromObject = function fromObject(object, long) { if (object instanceof $root.google.bigtable.admin.v2.HotTablet) return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.admin.v2.HotTablet: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -16789,12 +17339,12 @@ if (object.tableName != null) message.tableName = String(object.tableName); if (object.startTime != null) { - if (typeof object.startTime !== "object") + if (!$util.isObject(object.startTime)) throw TypeError(".google.bigtable.admin.v2.HotTablet.startTime: object expected"); message.startTime = $root.google.protobuf.Timestamp.fromObject(object.startTime, long + 1); } if (object.endTime != null) { - if (typeof object.endTime !== "object") + if (!$util.isObject(object.endTime)) throw TypeError(".google.bigtable.admin.v2.HotTablet.endTime: object expected"); message.endTime = $root.google.protobuf.Timestamp.fromObject(object.endTime, long + 1); } @@ -16816,9 +17366,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - HotTablet.toObject = function toObject(message, options) { + HotTablet.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.name = ""; @@ -16829,19 +17383,19 @@ object.endKey = ""; object.nodeCpuUsagePercent = 0; } - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) object.name = message.name; - if (message.tableName != null && message.hasOwnProperty("tableName")) + if (message.tableName != null && Object.hasOwnProperty.call(message, "tableName")) object.tableName = message.tableName; - if (message.startTime != null && message.hasOwnProperty("startTime")) - object.startTime = $root.google.protobuf.Timestamp.toObject(message.startTime, options); - if (message.endTime != null && message.hasOwnProperty("endTime")) - object.endTime = $root.google.protobuf.Timestamp.toObject(message.endTime, options); - if (message.startKey != null && message.hasOwnProperty("startKey")) + if (message.startTime != null && Object.hasOwnProperty.call(message, "startTime")) + object.startTime = $root.google.protobuf.Timestamp.toObject(message.startTime, options, q + 1); + if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) + object.endTime = $root.google.protobuf.Timestamp.toObject(message.endTime, options, q + 1); + if (message.startKey != null && Object.hasOwnProperty.call(message, "startKey")) object.startKey = message.startKey; - if (message.endKey != null && message.hasOwnProperty("endKey")) + if (message.endKey != null && Object.hasOwnProperty.call(message, "endKey")) object.endKey = message.endKey; - if (message.nodeCpuUsagePercent != null && message.hasOwnProperty("nodeCpuUsagePercent")) + if (message.nodeCpuUsagePercent != null && Object.hasOwnProperty.call(message, "nodeCpuUsagePercent")) object.nodeCpuUsagePercent = options.json && !isFinite(message.nodeCpuUsagePercent) ? String(message.nodeCpuUsagePercent) : message.nodeCpuUsagePercent; return object; }; @@ -16955,9 +17509,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - LogicalView.encode = function encode(message, writer) { + LogicalView.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); if (message.query != null && Object.hasOwnProperty.call(message, "query")) @@ -16979,7 +17537,7 @@ * @returns {$protobuf.Writer} Writer */ LogicalView.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -17061,16 +17619,16 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) if (!$util.isString(message.name)) return "name: string expected"; - if (message.query != null && message.hasOwnProperty("query")) + if (message.query != null && Object.hasOwnProperty.call(message, "query")) if (!$util.isString(message.query)) return "query: string expected"; - if (message.etag != null && message.hasOwnProperty("etag")) + if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) if (!$util.isString(message.etag)) return "etag: string expected"; - if (message.deletionProtection != null && message.hasOwnProperty("deletionProtection")) + if (message.deletionProtection != null && Object.hasOwnProperty.call(message, "deletionProtection")) if (typeof message.deletionProtection !== "boolean") return "deletionProtection: boolean expected"; return null; @@ -17087,6 +17645,8 @@ LogicalView.fromObject = function fromObject(object, long) { if (object instanceof $root.google.bigtable.admin.v2.LogicalView) return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.admin.v2.LogicalView: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -17112,9 +17672,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - LogicalView.toObject = function toObject(message, options) { + LogicalView.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.name = ""; @@ -17122,13 +17686,13 @@ object.etag = ""; object.deletionProtection = false; } - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) object.name = message.name; - if (message.query != null && message.hasOwnProperty("query")) + if (message.query != null && Object.hasOwnProperty.call(message, "query")) object.query = message.query; - if (message.etag != null && message.hasOwnProperty("etag")) + if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) object.etag = message.etag; - if (message.deletionProtection != null && message.hasOwnProperty("deletionProtection")) + if (message.deletionProtection != null && Object.hasOwnProperty.call(message, "deletionProtection")) object.deletionProtection = message.deletionProtection; return object; }; @@ -17242,9 +17806,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MaterializedView.encode = function encode(message, writer) { + MaterializedView.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); if (message.query != null && Object.hasOwnProperty.call(message, "query")) @@ -17266,7 +17834,7 @@ * @returns {$protobuf.Writer} Writer */ MaterializedView.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -17348,16 +17916,16 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) if (!$util.isString(message.name)) return "name: string expected"; - if (message.query != null && message.hasOwnProperty("query")) + if (message.query != null && Object.hasOwnProperty.call(message, "query")) if (!$util.isString(message.query)) return "query: string expected"; - if (message.etag != null && message.hasOwnProperty("etag")) + if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) if (!$util.isString(message.etag)) return "etag: string expected"; - if (message.deletionProtection != null && message.hasOwnProperty("deletionProtection")) + if (message.deletionProtection != null && Object.hasOwnProperty.call(message, "deletionProtection")) if (typeof message.deletionProtection !== "boolean") return "deletionProtection: boolean expected"; return null; @@ -17374,6 +17942,8 @@ MaterializedView.fromObject = function fromObject(object, long) { if (object instanceof $root.google.bigtable.admin.v2.MaterializedView) return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.admin.v2.MaterializedView: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -17399,9 +17969,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - MaterializedView.toObject = function toObject(message, options) { + MaterializedView.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.name = ""; @@ -17409,13 +17983,13 @@ object.etag = ""; object.deletionProtection = false; } - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) object.name = message.name; - if (message.query != null && message.hasOwnProperty("query")) + if (message.query != null && Object.hasOwnProperty.call(message, "query")) object.query = message.query; - if (message.etag != null && message.hasOwnProperty("etag")) + if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) object.etag = message.etag; - if (message.deletionProtection != null && message.hasOwnProperty("deletionProtection")) + if (message.deletionProtection != null && Object.hasOwnProperty.call(message, "deletionProtection")) object.deletionProtection = message.deletionProtection; return object; }; @@ -17536,15 +18110,19 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - OperationProgress.encode = function encode(message, writer) { + OperationProgress.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.progressPercent != null && Object.hasOwnProperty.call(message, "progressPercent")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.progressPercent); if (message.startTime != null && Object.hasOwnProperty.call(message, "startTime")) - $root.google.protobuf.Timestamp.encode(message.startTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + $root.google.protobuf.Timestamp.encode(message.startTime, writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) - $root.google.protobuf.Timestamp.encode(message.endTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + $root.google.protobuf.Timestamp.encode(message.endTime, writer.uint32(/* id 3, wireType 2 =*/26).fork(), q + 1).ldelim(); return writer; }; @@ -17558,7 +18136,7 @@ * @returns {$protobuf.Writer} Writer */ OperationProgress.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -17636,15 +18214,15 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.progressPercent != null && message.hasOwnProperty("progressPercent")) + if (message.progressPercent != null && Object.hasOwnProperty.call(message, "progressPercent")) if (!$util.isInteger(message.progressPercent)) return "progressPercent: integer expected"; - if (message.startTime != null && message.hasOwnProperty("startTime")) { + if (message.startTime != null && Object.hasOwnProperty.call(message, "startTime")) { var error = $root.google.protobuf.Timestamp.verify(message.startTime, long + 1); if (error) return "startTime." + error; } - if (message.endTime != null && message.hasOwnProperty("endTime")) { + if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) { var error = $root.google.protobuf.Timestamp.verify(message.endTime, long + 1); if (error) return "endTime." + error; @@ -17663,6 +18241,8 @@ OperationProgress.fromObject = function fromObject(object, long) { if (object instanceof $root.google.bigtable.admin.v2.OperationProgress) return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.admin.v2.OperationProgress: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -17671,12 +18251,12 @@ if (object.progressPercent != null) message.progressPercent = object.progressPercent | 0; if (object.startTime != null) { - if (typeof object.startTime !== "object") + if (!$util.isObject(object.startTime)) throw TypeError(".google.bigtable.admin.v2.OperationProgress.startTime: object expected"); message.startTime = $root.google.protobuf.Timestamp.fromObject(object.startTime, long + 1); } if (object.endTime != null) { - if (typeof object.endTime !== "object") + if (!$util.isObject(object.endTime)) throw TypeError(".google.bigtable.admin.v2.OperationProgress.endTime: object expected"); message.endTime = $root.google.protobuf.Timestamp.fromObject(object.endTime, long + 1); } @@ -17692,21 +18272,25 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - OperationProgress.toObject = function toObject(message, options) { + OperationProgress.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.progressPercent = 0; object.startTime = null; object.endTime = null; } - if (message.progressPercent != null && message.hasOwnProperty("progressPercent")) + if (message.progressPercent != null && Object.hasOwnProperty.call(message, "progressPercent")) object.progressPercent = message.progressPercent; - if (message.startTime != null && message.hasOwnProperty("startTime")) - object.startTime = $root.google.protobuf.Timestamp.toObject(message.startTime, options); - if (message.endTime != null && message.hasOwnProperty("endTime")) - object.endTime = $root.google.protobuf.Timestamp.toObject(message.endTime, options); + if (message.startTime != null && Object.hasOwnProperty.call(message, "startTime")) + object.startTime = $root.google.protobuf.Timestamp.toObject(message.startTime, options, q + 1); + if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) + object.endTime = $root.google.protobuf.Timestamp.toObject(message.endTime, options, q + 1); return object; }; @@ -17791,7 +18375,7 @@ * @variation 1 */ Object.defineProperty(BigtableTableAdmin.prototype.createTable = function createTable(request, callback) { - return this.rpcCall(createTable, $root.google.bigtable.admin.v2.CreateTableRequest, $root.google.bigtable.admin.v2.Table, request, callback); + return $protobuf.rpc.Service.prototype.rpcCall.call(this, createTable, $root.google.bigtable.admin.v2.CreateTableRequest, $root.google.bigtable.admin.v2.Table, request, callback); }, "name", { value: "CreateTable" }); /** @@ -17824,7 +18408,7 @@ * @variation 1 */ Object.defineProperty(BigtableTableAdmin.prototype.createTableFromSnapshot = function createTableFromSnapshot(request, callback) { - return this.rpcCall(createTableFromSnapshot, $root.google.bigtable.admin.v2.CreateTableFromSnapshotRequest, $root.google.longrunning.Operation, request, callback); + return $protobuf.rpc.Service.prototype.rpcCall.call(this, createTableFromSnapshot, $root.google.bigtable.admin.v2.CreateTableFromSnapshotRequest, $root.google.longrunning.Operation, request, callback); }, "name", { value: "CreateTableFromSnapshot" }); /** @@ -17857,7 +18441,7 @@ * @variation 1 */ Object.defineProperty(BigtableTableAdmin.prototype.listTables = function listTables(request, callback) { - return this.rpcCall(listTables, $root.google.bigtable.admin.v2.ListTablesRequest, $root.google.bigtable.admin.v2.ListTablesResponse, request, callback); + return $protobuf.rpc.Service.prototype.rpcCall.call(this, listTables, $root.google.bigtable.admin.v2.ListTablesRequest, $root.google.bigtable.admin.v2.ListTablesResponse, request, callback); }, "name", { value: "ListTables" }); /** @@ -17890,7 +18474,7 @@ * @variation 1 */ Object.defineProperty(BigtableTableAdmin.prototype.getTable = function getTable(request, callback) { - return this.rpcCall(getTable, $root.google.bigtable.admin.v2.GetTableRequest, $root.google.bigtable.admin.v2.Table, request, callback); + return $protobuf.rpc.Service.prototype.rpcCall.call(this, getTable, $root.google.bigtable.admin.v2.GetTableRequest, $root.google.bigtable.admin.v2.Table, request, callback); }, "name", { value: "GetTable" }); /** @@ -17923,7 +18507,7 @@ * @variation 1 */ Object.defineProperty(BigtableTableAdmin.prototype.updateTable = function updateTable(request, callback) { - return this.rpcCall(updateTable, $root.google.bigtable.admin.v2.UpdateTableRequest, $root.google.longrunning.Operation, request, callback); + return $protobuf.rpc.Service.prototype.rpcCall.call(this, updateTable, $root.google.bigtable.admin.v2.UpdateTableRequest, $root.google.longrunning.Operation, request, callback); }, "name", { value: "UpdateTable" }); /** @@ -17956,7 +18540,7 @@ * @variation 1 */ Object.defineProperty(BigtableTableAdmin.prototype.deleteTable = function deleteTable(request, callback) { - return this.rpcCall(deleteTable, $root.google.bigtable.admin.v2.DeleteTableRequest, $root.google.protobuf.Empty, request, callback); + return $protobuf.rpc.Service.prototype.rpcCall.call(this, deleteTable, $root.google.bigtable.admin.v2.DeleteTableRequest, $root.google.protobuf.Empty, request, callback); }, "name", { value: "DeleteTable" }); /** @@ -17989,7 +18573,7 @@ * @variation 1 */ Object.defineProperty(BigtableTableAdmin.prototype.undeleteTable = function undeleteTable(request, callback) { - return this.rpcCall(undeleteTable, $root.google.bigtable.admin.v2.UndeleteTableRequest, $root.google.longrunning.Operation, request, callback); + return $protobuf.rpc.Service.prototype.rpcCall.call(this, undeleteTable, $root.google.bigtable.admin.v2.UndeleteTableRequest, $root.google.longrunning.Operation, request, callback); }, "name", { value: "UndeleteTable" }); /** @@ -18022,7 +18606,7 @@ * @variation 1 */ Object.defineProperty(BigtableTableAdmin.prototype.createAuthorizedView = function createAuthorizedView(request, callback) { - return this.rpcCall(createAuthorizedView, $root.google.bigtable.admin.v2.CreateAuthorizedViewRequest, $root.google.longrunning.Operation, request, callback); + return $protobuf.rpc.Service.prototype.rpcCall.call(this, createAuthorizedView, $root.google.bigtable.admin.v2.CreateAuthorizedViewRequest, $root.google.longrunning.Operation, request, callback); }, "name", { value: "CreateAuthorizedView" }); /** @@ -18055,7 +18639,7 @@ * @variation 1 */ Object.defineProperty(BigtableTableAdmin.prototype.listAuthorizedViews = function listAuthorizedViews(request, callback) { - return this.rpcCall(listAuthorizedViews, $root.google.bigtable.admin.v2.ListAuthorizedViewsRequest, $root.google.bigtable.admin.v2.ListAuthorizedViewsResponse, request, callback); + return $protobuf.rpc.Service.prototype.rpcCall.call(this, listAuthorizedViews, $root.google.bigtable.admin.v2.ListAuthorizedViewsRequest, $root.google.bigtable.admin.v2.ListAuthorizedViewsResponse, request, callback); }, "name", { value: "ListAuthorizedViews" }); /** @@ -18088,7 +18672,7 @@ * @variation 1 */ Object.defineProperty(BigtableTableAdmin.prototype.getAuthorizedView = function getAuthorizedView(request, callback) { - return this.rpcCall(getAuthorizedView, $root.google.bigtable.admin.v2.GetAuthorizedViewRequest, $root.google.bigtable.admin.v2.AuthorizedView, request, callback); + return $protobuf.rpc.Service.prototype.rpcCall.call(this, getAuthorizedView, $root.google.bigtable.admin.v2.GetAuthorizedViewRequest, $root.google.bigtable.admin.v2.AuthorizedView, request, callback); }, "name", { value: "GetAuthorizedView" }); /** @@ -18121,7 +18705,7 @@ * @variation 1 */ Object.defineProperty(BigtableTableAdmin.prototype.updateAuthorizedView = function updateAuthorizedView(request, callback) { - return this.rpcCall(updateAuthorizedView, $root.google.bigtable.admin.v2.UpdateAuthorizedViewRequest, $root.google.longrunning.Operation, request, callback); + return $protobuf.rpc.Service.prototype.rpcCall.call(this, updateAuthorizedView, $root.google.bigtable.admin.v2.UpdateAuthorizedViewRequest, $root.google.longrunning.Operation, request, callback); }, "name", { value: "UpdateAuthorizedView" }); /** @@ -18154,7 +18738,7 @@ * @variation 1 */ Object.defineProperty(BigtableTableAdmin.prototype.deleteAuthorizedView = function deleteAuthorizedView(request, callback) { - return this.rpcCall(deleteAuthorizedView, $root.google.bigtable.admin.v2.DeleteAuthorizedViewRequest, $root.google.protobuf.Empty, request, callback); + return $protobuf.rpc.Service.prototype.rpcCall.call(this, deleteAuthorizedView, $root.google.bigtable.admin.v2.DeleteAuthorizedViewRequest, $root.google.protobuf.Empty, request, callback); }, "name", { value: "DeleteAuthorizedView" }); /** @@ -18187,7 +18771,7 @@ * @variation 1 */ Object.defineProperty(BigtableTableAdmin.prototype.modifyColumnFamilies = function modifyColumnFamilies(request, callback) { - return this.rpcCall(modifyColumnFamilies, $root.google.bigtable.admin.v2.ModifyColumnFamiliesRequest, $root.google.bigtable.admin.v2.Table, request, callback); + return $protobuf.rpc.Service.prototype.rpcCall.call(this, modifyColumnFamilies, $root.google.bigtable.admin.v2.ModifyColumnFamiliesRequest, $root.google.bigtable.admin.v2.Table, request, callback); }, "name", { value: "ModifyColumnFamilies" }); /** @@ -18220,7 +18804,7 @@ * @variation 1 */ Object.defineProperty(BigtableTableAdmin.prototype.dropRowRange = function dropRowRange(request, callback) { - return this.rpcCall(dropRowRange, $root.google.bigtable.admin.v2.DropRowRangeRequest, $root.google.protobuf.Empty, request, callback); + return $protobuf.rpc.Service.prototype.rpcCall.call(this, dropRowRange, $root.google.bigtable.admin.v2.DropRowRangeRequest, $root.google.protobuf.Empty, request, callback); }, "name", { value: "DropRowRange" }); /** @@ -18253,7 +18837,7 @@ * @variation 1 */ Object.defineProperty(BigtableTableAdmin.prototype.generateConsistencyToken = function generateConsistencyToken(request, callback) { - return this.rpcCall(generateConsistencyToken, $root.google.bigtable.admin.v2.GenerateConsistencyTokenRequest, $root.google.bigtable.admin.v2.GenerateConsistencyTokenResponse, request, callback); + return $protobuf.rpc.Service.prototype.rpcCall.call(this, generateConsistencyToken, $root.google.bigtable.admin.v2.GenerateConsistencyTokenRequest, $root.google.bigtable.admin.v2.GenerateConsistencyTokenResponse, request, callback); }, "name", { value: "GenerateConsistencyToken" }); /** @@ -18286,7 +18870,7 @@ * @variation 1 */ Object.defineProperty(BigtableTableAdmin.prototype.checkConsistency = function checkConsistency(request, callback) { - return this.rpcCall(checkConsistency, $root.google.bigtable.admin.v2.CheckConsistencyRequest, $root.google.bigtable.admin.v2.CheckConsistencyResponse, request, callback); + return $protobuf.rpc.Service.prototype.rpcCall.call(this, checkConsistency, $root.google.bigtable.admin.v2.CheckConsistencyRequest, $root.google.bigtable.admin.v2.CheckConsistencyResponse, request, callback); }, "name", { value: "CheckConsistency" }); /** @@ -18319,7 +18903,7 @@ * @variation 1 */ Object.defineProperty(BigtableTableAdmin.prototype.snapshotTable = function snapshotTable(request, callback) { - return this.rpcCall(snapshotTable, $root.google.bigtable.admin.v2.SnapshotTableRequest, $root.google.longrunning.Operation, request, callback); + return $protobuf.rpc.Service.prototype.rpcCall.call(this, snapshotTable, $root.google.bigtable.admin.v2.SnapshotTableRequest, $root.google.longrunning.Operation, request, callback); }, "name", { value: "SnapshotTable" }); /** @@ -18352,7 +18936,7 @@ * @variation 1 */ Object.defineProperty(BigtableTableAdmin.prototype.getSnapshot = function getSnapshot(request, callback) { - return this.rpcCall(getSnapshot, $root.google.bigtable.admin.v2.GetSnapshotRequest, $root.google.bigtable.admin.v2.Snapshot, request, callback); + return $protobuf.rpc.Service.prototype.rpcCall.call(this, getSnapshot, $root.google.bigtable.admin.v2.GetSnapshotRequest, $root.google.bigtable.admin.v2.Snapshot, request, callback); }, "name", { value: "GetSnapshot" }); /** @@ -18385,7 +18969,7 @@ * @variation 1 */ Object.defineProperty(BigtableTableAdmin.prototype.listSnapshots = function listSnapshots(request, callback) { - return this.rpcCall(listSnapshots, $root.google.bigtable.admin.v2.ListSnapshotsRequest, $root.google.bigtable.admin.v2.ListSnapshotsResponse, request, callback); + return $protobuf.rpc.Service.prototype.rpcCall.call(this, listSnapshots, $root.google.bigtable.admin.v2.ListSnapshotsRequest, $root.google.bigtable.admin.v2.ListSnapshotsResponse, request, callback); }, "name", { value: "ListSnapshots" }); /** @@ -18418,7 +19002,7 @@ * @variation 1 */ Object.defineProperty(BigtableTableAdmin.prototype.deleteSnapshot = function deleteSnapshot(request, callback) { - return this.rpcCall(deleteSnapshot, $root.google.bigtable.admin.v2.DeleteSnapshotRequest, $root.google.protobuf.Empty, request, callback); + return $protobuf.rpc.Service.prototype.rpcCall.call(this, deleteSnapshot, $root.google.bigtable.admin.v2.DeleteSnapshotRequest, $root.google.protobuf.Empty, request, callback); }, "name", { value: "DeleteSnapshot" }); /** @@ -18451,7 +19035,7 @@ * @variation 1 */ Object.defineProperty(BigtableTableAdmin.prototype.createBackup = function createBackup(request, callback) { - return this.rpcCall(createBackup, $root.google.bigtable.admin.v2.CreateBackupRequest, $root.google.longrunning.Operation, request, callback); + return $protobuf.rpc.Service.prototype.rpcCall.call(this, createBackup, $root.google.bigtable.admin.v2.CreateBackupRequest, $root.google.longrunning.Operation, request, callback); }, "name", { value: "CreateBackup" }); /** @@ -18484,7 +19068,7 @@ * @variation 1 */ Object.defineProperty(BigtableTableAdmin.prototype.getBackup = function getBackup(request, callback) { - return this.rpcCall(getBackup, $root.google.bigtable.admin.v2.GetBackupRequest, $root.google.bigtable.admin.v2.Backup, request, callback); + return $protobuf.rpc.Service.prototype.rpcCall.call(this, getBackup, $root.google.bigtable.admin.v2.GetBackupRequest, $root.google.bigtable.admin.v2.Backup, request, callback); }, "name", { value: "GetBackup" }); /** @@ -18517,7 +19101,7 @@ * @variation 1 */ Object.defineProperty(BigtableTableAdmin.prototype.updateBackup = function updateBackup(request, callback) { - return this.rpcCall(updateBackup, $root.google.bigtable.admin.v2.UpdateBackupRequest, $root.google.bigtable.admin.v2.Backup, request, callback); + return $protobuf.rpc.Service.prototype.rpcCall.call(this, updateBackup, $root.google.bigtable.admin.v2.UpdateBackupRequest, $root.google.bigtable.admin.v2.Backup, request, callback); }, "name", { value: "UpdateBackup" }); /** @@ -18550,7 +19134,7 @@ * @variation 1 */ Object.defineProperty(BigtableTableAdmin.prototype.deleteBackup = function deleteBackup(request, callback) { - return this.rpcCall(deleteBackup, $root.google.bigtable.admin.v2.DeleteBackupRequest, $root.google.protobuf.Empty, request, callback); + return $protobuf.rpc.Service.prototype.rpcCall.call(this, deleteBackup, $root.google.bigtable.admin.v2.DeleteBackupRequest, $root.google.protobuf.Empty, request, callback); }, "name", { value: "DeleteBackup" }); /** @@ -18583,7 +19167,7 @@ * @variation 1 */ Object.defineProperty(BigtableTableAdmin.prototype.listBackups = function listBackups(request, callback) { - return this.rpcCall(listBackups, $root.google.bigtable.admin.v2.ListBackupsRequest, $root.google.bigtable.admin.v2.ListBackupsResponse, request, callback); + return $protobuf.rpc.Service.prototype.rpcCall.call(this, listBackups, $root.google.bigtable.admin.v2.ListBackupsRequest, $root.google.bigtable.admin.v2.ListBackupsResponse, request, callback); }, "name", { value: "ListBackups" }); /** @@ -18616,7 +19200,7 @@ * @variation 1 */ Object.defineProperty(BigtableTableAdmin.prototype.restoreTable = function restoreTable(request, callback) { - return this.rpcCall(restoreTable, $root.google.bigtable.admin.v2.RestoreTableRequest, $root.google.longrunning.Operation, request, callback); + return $protobuf.rpc.Service.prototype.rpcCall.call(this, restoreTable, $root.google.bigtable.admin.v2.RestoreTableRequest, $root.google.longrunning.Operation, request, callback); }, "name", { value: "RestoreTable" }); /** @@ -18649,7 +19233,7 @@ * @variation 1 */ Object.defineProperty(BigtableTableAdmin.prototype.copyBackup = function copyBackup(request, callback) { - return this.rpcCall(copyBackup, $root.google.bigtable.admin.v2.CopyBackupRequest, $root.google.longrunning.Operation, request, callback); + return $protobuf.rpc.Service.prototype.rpcCall.call(this, copyBackup, $root.google.bigtable.admin.v2.CopyBackupRequest, $root.google.longrunning.Operation, request, callback); }, "name", { value: "CopyBackup" }); /** @@ -18682,7 +19266,7 @@ * @variation 1 */ Object.defineProperty(BigtableTableAdmin.prototype.getIamPolicy = function getIamPolicy(request, callback) { - return this.rpcCall(getIamPolicy, $root.google.iam.v1.GetIamPolicyRequest, $root.google.iam.v1.Policy, request, callback); + return $protobuf.rpc.Service.prototype.rpcCall.call(this, getIamPolicy, $root.google.iam.v1.GetIamPolicyRequest, $root.google.iam.v1.Policy, request, callback); }, "name", { value: "GetIamPolicy" }); /** @@ -18715,7 +19299,7 @@ * @variation 1 */ Object.defineProperty(BigtableTableAdmin.prototype.setIamPolicy = function setIamPolicy(request, callback) { - return this.rpcCall(setIamPolicy, $root.google.iam.v1.SetIamPolicyRequest, $root.google.iam.v1.Policy, request, callback); + return $protobuf.rpc.Service.prototype.rpcCall.call(this, setIamPolicy, $root.google.iam.v1.SetIamPolicyRequest, $root.google.iam.v1.Policy, request, callback); }, "name", { value: "SetIamPolicy" }); /** @@ -18748,7 +19332,7 @@ * @variation 1 */ Object.defineProperty(BigtableTableAdmin.prototype.testIamPermissions = function testIamPermissions(request, callback) { - return this.rpcCall(testIamPermissions, $root.google.iam.v1.TestIamPermissionsRequest, $root.google.iam.v1.TestIamPermissionsResponse, request, callback); + return $protobuf.rpc.Service.prototype.rpcCall.call(this, testIamPermissions, $root.google.iam.v1.TestIamPermissionsRequest, $root.google.iam.v1.TestIamPermissionsResponse, request, callback); }, "name", { value: "TestIamPermissions" }); /** @@ -18781,7 +19365,7 @@ * @variation 1 */ Object.defineProperty(BigtableTableAdmin.prototype.createSchemaBundle = function createSchemaBundle(request, callback) { - return this.rpcCall(createSchemaBundle, $root.google.bigtable.admin.v2.CreateSchemaBundleRequest, $root.google.longrunning.Operation, request, callback); + return $protobuf.rpc.Service.prototype.rpcCall.call(this, createSchemaBundle, $root.google.bigtable.admin.v2.CreateSchemaBundleRequest, $root.google.longrunning.Operation, request, callback); }, "name", { value: "CreateSchemaBundle" }); /** @@ -18814,7 +19398,7 @@ * @variation 1 */ Object.defineProperty(BigtableTableAdmin.prototype.updateSchemaBundle = function updateSchemaBundle(request, callback) { - return this.rpcCall(updateSchemaBundle, $root.google.bigtable.admin.v2.UpdateSchemaBundleRequest, $root.google.longrunning.Operation, request, callback); + return $protobuf.rpc.Service.prototype.rpcCall.call(this, updateSchemaBundle, $root.google.bigtable.admin.v2.UpdateSchemaBundleRequest, $root.google.longrunning.Operation, request, callback); }, "name", { value: "UpdateSchemaBundle" }); /** @@ -18847,7 +19431,7 @@ * @variation 1 */ Object.defineProperty(BigtableTableAdmin.prototype.getSchemaBundle = function getSchemaBundle(request, callback) { - return this.rpcCall(getSchemaBundle, $root.google.bigtable.admin.v2.GetSchemaBundleRequest, $root.google.bigtable.admin.v2.SchemaBundle, request, callback); + return $protobuf.rpc.Service.prototype.rpcCall.call(this, getSchemaBundle, $root.google.bigtable.admin.v2.GetSchemaBundleRequest, $root.google.bigtable.admin.v2.SchemaBundle, request, callback); }, "name", { value: "GetSchemaBundle" }); /** @@ -18880,7 +19464,7 @@ * @variation 1 */ Object.defineProperty(BigtableTableAdmin.prototype.listSchemaBundles = function listSchemaBundles(request, callback) { - return this.rpcCall(listSchemaBundles, $root.google.bigtable.admin.v2.ListSchemaBundlesRequest, $root.google.bigtable.admin.v2.ListSchemaBundlesResponse, request, callback); + return $protobuf.rpc.Service.prototype.rpcCall.call(this, listSchemaBundles, $root.google.bigtable.admin.v2.ListSchemaBundlesRequest, $root.google.bigtable.admin.v2.ListSchemaBundlesResponse, request, callback); }, "name", { value: "ListSchemaBundles" }); /** @@ -18913,7 +19497,7 @@ * @variation 1 */ Object.defineProperty(BigtableTableAdmin.prototype.deleteSchemaBundle = function deleteSchemaBundle(request, callback) { - return this.rpcCall(deleteSchemaBundle, $root.google.bigtable.admin.v2.DeleteSchemaBundleRequest, $root.google.protobuf.Empty, request, callback); + return $protobuf.rpc.Service.prototype.rpcCall.call(this, deleteSchemaBundle, $root.google.bigtable.admin.v2.DeleteSchemaBundleRequest, $root.google.protobuf.Empty, request, callback); }, "name", { value: "DeleteSchemaBundle" }); /** @@ -19014,9 +19598,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - RestoreTableRequest.encode = function encode(message, writer) { + RestoreTableRequest.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); if (message.tableId != null && Object.hasOwnProperty.call(message, "tableId")) @@ -19036,7 +19624,7 @@ * @returns {$protobuf.Writer} Writer */ RestoreTableRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -19115,13 +19703,13 @@ if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; var properties = {}; - if (message.parent != null && message.hasOwnProperty("parent")) + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) if (!$util.isString(message.parent)) return "parent: string expected"; - if (message.tableId != null && message.hasOwnProperty("tableId")) + if (message.tableId != null && Object.hasOwnProperty.call(message, "tableId")) if (!$util.isString(message.tableId)) return "tableId: string expected"; - if (message.backup != null && message.hasOwnProperty("backup")) { + if (message.backup != null && Object.hasOwnProperty.call(message, "backup")) { properties.source = 1; if (!$util.isString(message.backup)) return "backup: string expected"; @@ -19140,6 +19728,8 @@ RestoreTableRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.google.bigtable.admin.v2.RestoreTableRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.admin.v2.RestoreTableRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -19163,19 +19753,23 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - RestoreTableRequest.toObject = function toObject(message, options) { + RestoreTableRequest.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.parent = ""; object.tableId = ""; } - if (message.parent != null && message.hasOwnProperty("parent")) + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) object.parent = message.parent; - if (message.tableId != null && message.hasOwnProperty("tableId")) + if (message.tableId != null && Object.hasOwnProperty.call(message, "tableId")) object.tableId = message.tableId; - if (message.backup != null && message.hasOwnProperty("backup")) { + if (message.backup != null && Object.hasOwnProperty.call(message, "backup")) { object.backup = message.backup; if (options.oneofs) object.source = "backup"; @@ -19315,19 +19909,23 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - RestoreTableMetadata.encode = function encode(message, writer) { + RestoreTableMetadata.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); if (message.sourceType != null && Object.hasOwnProperty.call(message, "sourceType")) writer.uint32(/* id 2, wireType 0 =*/16).int32(message.sourceType); if (message.backupInfo != null && Object.hasOwnProperty.call(message, "backupInfo")) - $root.google.bigtable.admin.v2.BackupInfo.encode(message.backupInfo, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + $root.google.bigtable.admin.v2.BackupInfo.encode(message.backupInfo, writer.uint32(/* id 3, wireType 2 =*/26).fork(), q + 1).ldelim(); if (message.optimizeTableOperationName != null && Object.hasOwnProperty.call(message, "optimizeTableOperationName")) writer.uint32(/* id 4, wireType 2 =*/34).string(message.optimizeTableOperationName); if (message.progress != null && Object.hasOwnProperty.call(message, "progress")) - $root.google.bigtable.admin.v2.OperationProgress.encode(message.progress, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + $root.google.bigtable.admin.v2.OperationProgress.encode(message.progress, writer.uint32(/* id 5, wireType 2 =*/42).fork(), q + 1).ldelim(); return writer; }; @@ -19341,7 +19939,7 @@ * @returns {$protobuf.Writer} Writer */ RestoreTableMetadata.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -19428,10 +20026,10 @@ if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; var properties = {}; - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) if (!$util.isString(message.name)) return "name: string expected"; - if (message.sourceType != null && message.hasOwnProperty("sourceType")) + if (message.sourceType != null && Object.hasOwnProperty.call(message, "sourceType")) switch (message.sourceType) { default: return "sourceType: enum value expected"; @@ -19439,7 +20037,7 @@ case 1: break; } - if (message.backupInfo != null && message.hasOwnProperty("backupInfo")) { + if (message.backupInfo != null && Object.hasOwnProperty.call(message, "backupInfo")) { properties.sourceInfo = 1; { var error = $root.google.bigtable.admin.v2.BackupInfo.verify(message.backupInfo, long + 1); @@ -19447,10 +20045,10 @@ return "backupInfo." + error; } } - if (message.optimizeTableOperationName != null && message.hasOwnProperty("optimizeTableOperationName")) + if (message.optimizeTableOperationName != null && Object.hasOwnProperty.call(message, "optimizeTableOperationName")) if (!$util.isString(message.optimizeTableOperationName)) return "optimizeTableOperationName: string expected"; - if (message.progress != null && message.hasOwnProperty("progress")) { + if (message.progress != null && Object.hasOwnProperty.call(message, "progress")) { var error = $root.google.bigtable.admin.v2.OperationProgress.verify(message.progress, long + 1); if (error) return "progress." + error; @@ -19469,6 +20067,8 @@ RestoreTableMetadata.fromObject = function fromObject(object, long) { if (object instanceof $root.google.bigtable.admin.v2.RestoreTableMetadata) return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.admin.v2.RestoreTableMetadata: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -19493,14 +20093,14 @@ break; } if (object.backupInfo != null) { - if (typeof object.backupInfo !== "object") + if (!$util.isObject(object.backupInfo)) throw TypeError(".google.bigtable.admin.v2.RestoreTableMetadata.backupInfo: object expected"); message.backupInfo = $root.google.bigtable.admin.v2.BackupInfo.fromObject(object.backupInfo, long + 1); } if (object.optimizeTableOperationName != null) message.optimizeTableOperationName = String(object.optimizeTableOperationName); if (object.progress != null) { - if (typeof object.progress !== "object") + if (!$util.isObject(object.progress)) throw TypeError(".google.bigtable.admin.v2.RestoreTableMetadata.progress: object expected"); message.progress = $root.google.bigtable.admin.v2.OperationProgress.fromObject(object.progress, long + 1); } @@ -19516,9 +20116,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - RestoreTableMetadata.toObject = function toObject(message, options) { + RestoreTableMetadata.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.name = ""; @@ -19526,19 +20130,19 @@ object.optimizeTableOperationName = ""; object.progress = null; } - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) object.name = message.name; - if (message.sourceType != null && message.hasOwnProperty("sourceType")) + if (message.sourceType != null && Object.hasOwnProperty.call(message, "sourceType")) object.sourceType = options.enums === String ? $root.google.bigtable.admin.v2.RestoreSourceType[message.sourceType] === undefined ? message.sourceType : $root.google.bigtable.admin.v2.RestoreSourceType[message.sourceType] : message.sourceType; - if (message.backupInfo != null && message.hasOwnProperty("backupInfo")) { - object.backupInfo = $root.google.bigtable.admin.v2.BackupInfo.toObject(message.backupInfo, options); + if (message.backupInfo != null && Object.hasOwnProperty.call(message, "backupInfo")) { + object.backupInfo = $root.google.bigtable.admin.v2.BackupInfo.toObject(message.backupInfo, options, q + 1); if (options.oneofs) object.sourceInfo = "backupInfo"; } - if (message.optimizeTableOperationName != null && message.hasOwnProperty("optimizeTableOperationName")) + if (message.optimizeTableOperationName != null && Object.hasOwnProperty.call(message, "optimizeTableOperationName")) object.optimizeTableOperationName = message.optimizeTableOperationName; - if (message.progress != null && message.hasOwnProperty("progress")) - object.progress = $root.google.bigtable.admin.v2.OperationProgress.toObject(message.progress, options); + if (message.progress != null && Object.hasOwnProperty.call(message, "progress")) + object.progress = $root.google.bigtable.admin.v2.OperationProgress.toObject(message.progress, options, q + 1); return object; }; @@ -19633,13 +20237,17 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - OptimizeRestoredTableMetadata.encode = function encode(message, writer) { + OptimizeRestoredTableMetadata.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); if (message.progress != null && Object.hasOwnProperty.call(message, "progress")) - $root.google.bigtable.admin.v2.OperationProgress.encode(message.progress, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + $root.google.bigtable.admin.v2.OperationProgress.encode(message.progress, writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); return writer; }; @@ -19653,7 +20261,7 @@ * @returns {$protobuf.Writer} Writer */ OptimizeRestoredTableMetadata.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -19727,10 +20335,10 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) if (!$util.isString(message.name)) return "name: string expected"; - if (message.progress != null && message.hasOwnProperty("progress")) { + if (message.progress != null && Object.hasOwnProperty.call(message, "progress")) { var error = $root.google.bigtable.admin.v2.OperationProgress.verify(message.progress, long + 1); if (error) return "progress." + error; @@ -19749,6 +20357,8 @@ OptimizeRestoredTableMetadata.fromObject = function fromObject(object, long) { if (object instanceof $root.google.bigtable.admin.v2.OptimizeRestoredTableMetadata) return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.admin.v2.OptimizeRestoredTableMetadata: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -19757,7 +20367,7 @@ if (object.name != null) message.name = String(object.name); if (object.progress != null) { - if (typeof object.progress !== "object") + if (!$util.isObject(object.progress)) throw TypeError(".google.bigtable.admin.v2.OptimizeRestoredTableMetadata.progress: object expected"); message.progress = $root.google.bigtable.admin.v2.OperationProgress.fromObject(object.progress, long + 1); } @@ -19773,18 +20383,22 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - OptimizeRestoredTableMetadata.toObject = function toObject(message, options) { + OptimizeRestoredTableMetadata.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.name = ""; object.progress = null; } - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) object.name = message.name; - if (message.progress != null && message.hasOwnProperty("progress")) - object.progress = $root.google.bigtable.admin.v2.OperationProgress.toObject(message.progress, options); + if (message.progress != null && Object.hasOwnProperty.call(message, "progress")) + object.progress = $root.google.bigtable.admin.v2.OperationProgress.toObject(message.progress, options, q + 1); return object; }; @@ -19898,18 +20512,22 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateTableRequest.encode = function encode(message, writer) { + CreateTableRequest.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); if (message.tableId != null && Object.hasOwnProperty.call(message, "tableId")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.tableId); if (message.table != null && Object.hasOwnProperty.call(message, "table")) - $root.google.bigtable.admin.v2.Table.encode(message.table, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + $root.google.bigtable.admin.v2.Table.encode(message.table, writer.uint32(/* id 3, wireType 2 =*/26).fork(), q + 1).ldelim(); if (message.initialSplits != null && message.initialSplits.length) for (var i = 0; i < message.initialSplits.length; ++i) - $root.google.bigtable.admin.v2.CreateTableRequest.Split.encode(message.initialSplits[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + $root.google.bigtable.admin.v2.CreateTableRequest.Split.encode(message.initialSplits[i], writer.uint32(/* id 4, wireType 2 =*/34).fork(), q + 1).ldelim(); return writer; }; @@ -19923,7 +20541,7 @@ * @returns {$protobuf.Writer} Writer */ CreateTableRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -20007,18 +20625,18 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.parent != null && message.hasOwnProperty("parent")) + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) if (!$util.isString(message.parent)) return "parent: string expected"; - if (message.tableId != null && message.hasOwnProperty("tableId")) + if (message.tableId != null && Object.hasOwnProperty.call(message, "tableId")) if (!$util.isString(message.tableId)) return "tableId: string expected"; - if (message.table != null && message.hasOwnProperty("table")) { + if (message.table != null && Object.hasOwnProperty.call(message, "table")) { var error = $root.google.bigtable.admin.v2.Table.verify(message.table, long + 1); if (error) return "table." + error; } - if (message.initialSplits != null && message.hasOwnProperty("initialSplits")) { + if (message.initialSplits != null && Object.hasOwnProperty.call(message, "initialSplits")) { if (!Array.isArray(message.initialSplits)) return "initialSplits: array expected"; for (var i = 0; i < message.initialSplits.length; ++i) { @@ -20041,6 +20659,8 @@ CreateTableRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.google.bigtable.admin.v2.CreateTableRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.admin.v2.CreateTableRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -20051,7 +20671,7 @@ if (object.tableId != null) message.tableId = String(object.tableId); if (object.table != null) { - if (typeof object.table !== "object") + if (!$util.isObject(object.table)) throw TypeError(".google.bigtable.admin.v2.CreateTableRequest.table: object expected"); message.table = $root.google.bigtable.admin.v2.Table.fromObject(object.table, long + 1); } @@ -20060,7 +20680,7 @@ throw TypeError(".google.bigtable.admin.v2.CreateTableRequest.initialSplits: array expected"); message.initialSplits = []; for (var i = 0; i < object.initialSplits.length; ++i) { - if (typeof object.initialSplits[i] !== "object") + if (!$util.isObject(object.initialSplits[i])) throw TypeError(".google.bigtable.admin.v2.CreateTableRequest.initialSplits: object expected"); message.initialSplits[i] = $root.google.bigtable.admin.v2.CreateTableRequest.Split.fromObject(object.initialSplits[i], long + 1); } @@ -20077,9 +20697,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CreateTableRequest.toObject = function toObject(message, options) { + CreateTableRequest.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.initialSplits = []; @@ -20088,16 +20712,16 @@ object.tableId = ""; object.table = null; } - if (message.parent != null && message.hasOwnProperty("parent")) + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) object.parent = message.parent; - if (message.tableId != null && message.hasOwnProperty("tableId")) + if (message.tableId != null && Object.hasOwnProperty.call(message, "tableId")) object.tableId = message.tableId; - if (message.table != null && message.hasOwnProperty("table")) - object.table = $root.google.bigtable.admin.v2.Table.toObject(message.table, options); + if (message.table != null && Object.hasOwnProperty.call(message, "table")) + object.table = $root.google.bigtable.admin.v2.Table.toObject(message.table, options, q + 1); if (message.initialSplits && message.initialSplits.length) { object.initialSplits = []; for (var j = 0; j < message.initialSplits.length; ++j) - object.initialSplits[j] = $root.google.bigtable.admin.v2.CreateTableRequest.Split.toObject(message.initialSplits[j], options); + object.initialSplits[j] = $root.google.bigtable.admin.v2.CreateTableRequest.Split.toObject(message.initialSplits[j], options, q + 1); } return object; }; @@ -20181,9 +20805,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Split.encode = function encode(message, writer) { + Split.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.key != null && Object.hasOwnProperty.call(message, "key")) writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.key); return writer; @@ -20199,7 +20827,7 @@ * @returns {$protobuf.Writer} Writer */ Split.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -20269,7 +20897,7 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.key != null && message.hasOwnProperty("key")) + if (message.key != null && Object.hasOwnProperty.call(message, "key")) if (!(message.key && typeof message.key.length === "number" || $util.isString(message.key))) return "key: buffer expected"; return null; @@ -20286,6 +20914,8 @@ Split.fromObject = function fromObject(object, long) { if (object instanceof $root.google.bigtable.admin.v2.CreateTableRequest.Split) return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.admin.v2.CreateTableRequest.Split: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -20308,9 +20938,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Split.toObject = function toObject(message, options) { + Split.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) if (options.bytes === String) @@ -20320,7 +20954,7 @@ if (options.bytes !== Array) object.key = $util.newBuffer(object.key); } - if (message.key != null && message.hasOwnProperty("key")) + if (message.key != null && Object.hasOwnProperty.call(message, "key")) object.key = options.bytes === String ? $util.base64.encode(message.key, 0, message.key.length) : options.bytes === Array ? Array.prototype.slice.call(message.key) : message.key; return object; }; @@ -20428,9 +21062,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateTableFromSnapshotRequest.encode = function encode(message, writer) { + CreateTableFromSnapshotRequest.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); if (message.tableId != null && Object.hasOwnProperty.call(message, "tableId")) @@ -20450,7 +21088,7 @@ * @returns {$protobuf.Writer} Writer */ CreateTableFromSnapshotRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -20528,13 +21166,13 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.parent != null && message.hasOwnProperty("parent")) + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) if (!$util.isString(message.parent)) return "parent: string expected"; - if (message.tableId != null && message.hasOwnProperty("tableId")) + if (message.tableId != null && Object.hasOwnProperty.call(message, "tableId")) if (!$util.isString(message.tableId)) return "tableId: string expected"; - if (message.sourceSnapshot != null && message.hasOwnProperty("sourceSnapshot")) + if (message.sourceSnapshot != null && Object.hasOwnProperty.call(message, "sourceSnapshot")) if (!$util.isString(message.sourceSnapshot)) return "sourceSnapshot: string expected"; return null; @@ -20551,6 +21189,8 @@ CreateTableFromSnapshotRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.google.bigtable.admin.v2.CreateTableFromSnapshotRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.admin.v2.CreateTableFromSnapshotRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -20574,20 +21214,24 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CreateTableFromSnapshotRequest.toObject = function toObject(message, options) { + CreateTableFromSnapshotRequest.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.parent = ""; object.tableId = ""; object.sourceSnapshot = ""; } - if (message.parent != null && message.hasOwnProperty("parent")) + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) object.parent = message.parent; - if (message.tableId != null && message.hasOwnProperty("tableId")) + if (message.tableId != null && Object.hasOwnProperty.call(message, "tableId")) object.tableId = message.tableId; - if (message.sourceSnapshot != null && message.hasOwnProperty("sourceSnapshot")) + if (message.sourceSnapshot != null && Object.hasOwnProperty.call(message, "sourceSnapshot")) object.sourceSnapshot = message.sourceSnapshot; return object; }; @@ -20706,9 +21350,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DropRowRangeRequest.encode = function encode(message, writer) { + DropRowRangeRequest.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); if (message.rowKeyPrefix != null && Object.hasOwnProperty.call(message, "rowKeyPrefix")) @@ -20728,7 +21376,7 @@ * @returns {$protobuf.Writer} Writer */ DropRowRangeRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -20807,15 +21455,15 @@ if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; var properties = {}; - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) if (!$util.isString(message.name)) return "name: string expected"; - if (message.rowKeyPrefix != null && message.hasOwnProperty("rowKeyPrefix")) { + if (message.rowKeyPrefix != null && Object.hasOwnProperty.call(message, "rowKeyPrefix")) { properties.target = 1; if (!(message.rowKeyPrefix && typeof message.rowKeyPrefix.length === "number" || $util.isString(message.rowKeyPrefix))) return "rowKeyPrefix: buffer expected"; } - if (message.deleteAllDataFromTable != null && message.hasOwnProperty("deleteAllDataFromTable")) { + if (message.deleteAllDataFromTable != null && Object.hasOwnProperty.call(message, "deleteAllDataFromTable")) { if (properties.target === 1) return "target: multiple values"; properties.target = 1; @@ -20836,6 +21484,8 @@ DropRowRangeRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.google.bigtable.admin.v2.DropRowRangeRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.admin.v2.DropRowRangeRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -20862,20 +21512,24 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DropRowRangeRequest.toObject = function toObject(message, options) { + DropRowRangeRequest.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) object.name = message.name; - if (message.rowKeyPrefix != null && message.hasOwnProperty("rowKeyPrefix")) { + if (message.rowKeyPrefix != null && Object.hasOwnProperty.call(message, "rowKeyPrefix")) { object.rowKeyPrefix = options.bytes === String ? $util.base64.encode(message.rowKeyPrefix, 0, message.rowKeyPrefix.length) : options.bytes === Array ? Array.prototype.slice.call(message.rowKeyPrefix) : message.rowKeyPrefix; if (options.oneofs) object.target = "rowKeyPrefix"; } - if (message.deleteAllDataFromTable != null && message.hasOwnProperty("deleteAllDataFromTable")) { + if (message.deleteAllDataFromTable != null && Object.hasOwnProperty.call(message, "deleteAllDataFromTable")) { object.deleteAllDataFromTable = message.deleteAllDataFromTable; if (options.oneofs) object.target = "deleteAllDataFromTable"; @@ -20992,9 +21646,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListTablesRequest.encode = function encode(message, writer) { + ListTablesRequest.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); if (message.view != null && Object.hasOwnProperty.call(message, "view")) @@ -21016,7 +21674,7 @@ * @returns {$protobuf.Writer} Writer */ ListTablesRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -21098,10 +21756,10 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.parent != null && message.hasOwnProperty("parent")) + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) if (!$util.isString(message.parent)) return "parent: string expected"; - if (message.view != null && message.hasOwnProperty("view")) + if (message.view != null && Object.hasOwnProperty.call(message, "view")) switch (message.view) { default: return "view: enum value expected"; @@ -21113,10 +21771,10 @@ case 4: break; } - if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) if (!$util.isInteger(message.pageSize)) return "pageSize: integer expected"; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) if (!$util.isString(message.pageToken)) return "pageToken: string expected"; return null; @@ -21133,6 +21791,8 @@ ListTablesRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.google.bigtable.admin.v2.ListTablesRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.admin.v2.ListTablesRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -21188,9 +21848,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListTablesRequest.toObject = function toObject(message, options) { + ListTablesRequest.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.parent = ""; @@ -21198,13 +21862,13 @@ object.pageToken = ""; object.pageSize = 0; } - if (message.parent != null && message.hasOwnProperty("parent")) + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) object.parent = message.parent; - if (message.view != null && message.hasOwnProperty("view")) + if (message.view != null && Object.hasOwnProperty.call(message, "view")) object.view = options.enums === String ? $root.google.bigtable.admin.v2.Table.View[message.view] === undefined ? message.view : $root.google.bigtable.admin.v2.Table.View[message.view] : message.view; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) object.pageToken = message.pageToken; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) object.pageSize = message.pageSize; return object; }; @@ -21301,12 +21965,16 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListTablesResponse.encode = function encode(message, writer) { + ListTablesResponse.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.tables != null && message.tables.length) for (var i = 0; i < message.tables.length; ++i) - $root.google.bigtable.admin.v2.Table.encode(message.tables[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + $root.google.bigtable.admin.v2.Table.encode(message.tables[i], writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); return writer; @@ -21322,7 +21990,7 @@ * @returns {$protobuf.Writer} Writer */ ListTablesResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -21398,7 +22066,7 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.tables != null && message.hasOwnProperty("tables")) { + if (message.tables != null && Object.hasOwnProperty.call(message, "tables")) { if (!Array.isArray(message.tables)) return "tables: array expected"; for (var i = 0; i < message.tables.length; ++i) { @@ -21407,7 +22075,7 @@ return "tables." + error; } } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) if (!$util.isString(message.nextPageToken)) return "nextPageToken: string expected"; return null; @@ -21424,6 +22092,8 @@ ListTablesResponse.fromObject = function fromObject(object, long) { if (object instanceof $root.google.bigtable.admin.v2.ListTablesResponse) return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.admin.v2.ListTablesResponse: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -21434,7 +22104,7 @@ throw TypeError(".google.bigtable.admin.v2.ListTablesResponse.tables: array expected"); message.tables = []; for (var i = 0; i < object.tables.length; ++i) { - if (typeof object.tables[i] !== "object") + if (!$util.isObject(object.tables[i])) throw TypeError(".google.bigtable.admin.v2.ListTablesResponse.tables: object expected"); message.tables[i] = $root.google.bigtable.admin.v2.Table.fromObject(object.tables[i], long + 1); } @@ -21453,9 +22123,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListTablesResponse.toObject = function toObject(message, options) { + ListTablesResponse.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.tables = []; @@ -21464,9 +22138,9 @@ if (message.tables && message.tables.length) { object.tables = []; for (var j = 0; j < message.tables.length; ++j) - object.tables[j] = $root.google.bigtable.admin.v2.Table.toObject(message.tables[j], options); + object.tables[j] = $root.google.bigtable.admin.v2.Table.toObject(message.tables[j], options, q + 1); } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) object.nextPageToken = message.nextPageToken; return object; }; @@ -21562,9 +22236,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetTableRequest.encode = function encode(message, writer) { + GetTableRequest.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); if (message.view != null && Object.hasOwnProperty.call(message, "view")) @@ -21582,7 +22260,7 @@ * @returns {$protobuf.Writer} Writer */ GetTableRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -21656,10 +22334,10 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) if (!$util.isString(message.name)) return "name: string expected"; - if (message.view != null && message.hasOwnProperty("view")) + if (message.view != null && Object.hasOwnProperty.call(message, "view")) switch (message.view) { default: return "view: enum value expected"; @@ -21685,6 +22363,8 @@ GetTableRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.google.bigtable.admin.v2.GetTableRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.admin.v2.GetTableRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -21736,17 +22416,21 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetTableRequest.toObject = function toObject(message, options) { + GetTableRequest.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.name = ""; object.view = options.enums === String ? "VIEW_UNSPECIFIED" : 0; } - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) object.name = message.name; - if (message.view != null && message.hasOwnProperty("view")) + if (message.view != null && Object.hasOwnProperty.call(message, "view")) object.view = options.enums === String ? $root.google.bigtable.admin.v2.Table.View[message.view] === undefined ? message.view : $root.google.bigtable.admin.v2.Table.View[message.view] : message.view; return object; }; @@ -21851,13 +22535,17 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateTableRequest.encode = function encode(message, writer) { + UpdateTableRequest.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.table != null && Object.hasOwnProperty.call(message, "table")) - $root.google.bigtable.admin.v2.Table.encode(message.table, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + $root.google.bigtable.admin.v2.Table.encode(message.table, writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) - $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); if (message.ignoreWarnings != null && Object.hasOwnProperty.call(message, "ignoreWarnings")) writer.uint32(/* id 3, wireType 0 =*/24).bool(message.ignoreWarnings); return writer; @@ -21873,7 +22561,7 @@ * @returns {$protobuf.Writer} Writer */ UpdateTableRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -21951,17 +22639,17 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.table != null && message.hasOwnProperty("table")) { + if (message.table != null && Object.hasOwnProperty.call(message, "table")) { var error = $root.google.bigtable.admin.v2.Table.verify(message.table, long + 1); if (error) return "table." + error; } - if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) { var error = $root.google.protobuf.FieldMask.verify(message.updateMask, long + 1); if (error) return "updateMask." + error; } - if (message.ignoreWarnings != null && message.hasOwnProperty("ignoreWarnings")) + if (message.ignoreWarnings != null && Object.hasOwnProperty.call(message, "ignoreWarnings")) if (typeof message.ignoreWarnings !== "boolean") return "ignoreWarnings: boolean expected"; return null; @@ -21978,18 +22666,20 @@ UpdateTableRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.google.bigtable.admin.v2.UpdateTableRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.admin.v2.UpdateTableRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) throw Error("maximum nesting depth exceeded"); var message = new $root.google.bigtable.admin.v2.UpdateTableRequest(); if (object.table != null) { - if (typeof object.table !== "object") + if (!$util.isObject(object.table)) throw TypeError(".google.bigtable.admin.v2.UpdateTableRequest.table: object expected"); message.table = $root.google.bigtable.admin.v2.Table.fromObject(object.table, long + 1); } if (object.updateMask != null) { - if (typeof object.updateMask !== "object") + if (!$util.isObject(object.updateMask)) throw TypeError(".google.bigtable.admin.v2.UpdateTableRequest.updateMask: object expected"); message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask, long + 1); } @@ -22007,20 +22697,24 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - UpdateTableRequest.toObject = function toObject(message, options) { + UpdateTableRequest.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.table = null; object.updateMask = null; object.ignoreWarnings = false; } - if (message.table != null && message.hasOwnProperty("table")) - object.table = $root.google.bigtable.admin.v2.Table.toObject(message.table, options); - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); - if (message.ignoreWarnings != null && message.hasOwnProperty("ignoreWarnings")) + if (message.table != null && Object.hasOwnProperty.call(message, "table")) + object.table = $root.google.bigtable.admin.v2.Table.toObject(message.table, options, q + 1); + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options, q + 1); + if (message.ignoreWarnings != null && Object.hasOwnProperty.call(message, "ignoreWarnings")) object.ignoreWarnings = message.ignoreWarnings; return object; }; @@ -22125,15 +22819,19 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateTableMetadata.encode = function encode(message, writer) { + UpdateTableMetadata.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); if (message.startTime != null && Object.hasOwnProperty.call(message, "startTime")) - $root.google.protobuf.Timestamp.encode(message.startTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + $root.google.protobuf.Timestamp.encode(message.startTime, writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) - $root.google.protobuf.Timestamp.encode(message.endTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + $root.google.protobuf.Timestamp.encode(message.endTime, writer.uint32(/* id 3, wireType 2 =*/26).fork(), q + 1).ldelim(); return writer; }; @@ -22147,7 +22845,7 @@ * @returns {$protobuf.Writer} Writer */ UpdateTableMetadata.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -22225,15 +22923,15 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) if (!$util.isString(message.name)) return "name: string expected"; - if (message.startTime != null && message.hasOwnProperty("startTime")) { + if (message.startTime != null && Object.hasOwnProperty.call(message, "startTime")) { var error = $root.google.protobuf.Timestamp.verify(message.startTime, long + 1); if (error) return "startTime." + error; } - if (message.endTime != null && message.hasOwnProperty("endTime")) { + if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) { var error = $root.google.protobuf.Timestamp.verify(message.endTime, long + 1); if (error) return "endTime." + error; @@ -22252,6 +22950,8 @@ UpdateTableMetadata.fromObject = function fromObject(object, long) { if (object instanceof $root.google.bigtable.admin.v2.UpdateTableMetadata) return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.admin.v2.UpdateTableMetadata: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -22260,12 +22960,12 @@ if (object.name != null) message.name = String(object.name); if (object.startTime != null) { - if (typeof object.startTime !== "object") + if (!$util.isObject(object.startTime)) throw TypeError(".google.bigtable.admin.v2.UpdateTableMetadata.startTime: object expected"); message.startTime = $root.google.protobuf.Timestamp.fromObject(object.startTime, long + 1); } if (object.endTime != null) { - if (typeof object.endTime !== "object") + if (!$util.isObject(object.endTime)) throw TypeError(".google.bigtable.admin.v2.UpdateTableMetadata.endTime: object expected"); message.endTime = $root.google.protobuf.Timestamp.fromObject(object.endTime, long + 1); } @@ -22281,21 +22981,25 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - UpdateTableMetadata.toObject = function toObject(message, options) { + UpdateTableMetadata.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.name = ""; object.startTime = null; object.endTime = null; } - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) object.name = message.name; - if (message.startTime != null && message.hasOwnProperty("startTime")) - object.startTime = $root.google.protobuf.Timestamp.toObject(message.startTime, options); - if (message.endTime != null && message.hasOwnProperty("endTime")) - object.endTime = $root.google.protobuf.Timestamp.toObject(message.endTime, options); + if (message.startTime != null && Object.hasOwnProperty.call(message, "startTime")) + object.startTime = $root.google.protobuf.Timestamp.toObject(message.startTime, options, q + 1); + if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) + object.endTime = $root.google.protobuf.Timestamp.toObject(message.endTime, options, q + 1); return object; }; @@ -22381,9 +23085,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteTableRequest.encode = function encode(message, writer) { + DeleteTableRequest.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); return writer; @@ -22399,7 +23107,7 @@ * @returns {$protobuf.Writer} Writer */ DeleteTableRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -22469,7 +23177,7 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) if (!$util.isString(message.name)) return "name: string expected"; return null; @@ -22486,6 +23194,8 @@ DeleteTableRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.google.bigtable.admin.v2.DeleteTableRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.admin.v2.DeleteTableRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -22505,13 +23215,17 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DeleteTableRequest.toObject = function toObject(message, options) { + DeleteTableRequest.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) object.name = message.name; return object; }; @@ -22598,9 +23312,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UndeleteTableRequest.encode = function encode(message, writer) { + UndeleteTableRequest.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); return writer; @@ -22616,7 +23334,7 @@ * @returns {$protobuf.Writer} Writer */ UndeleteTableRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -22686,7 +23404,7 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) if (!$util.isString(message.name)) return "name: string expected"; return null; @@ -22703,6 +23421,8 @@ UndeleteTableRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.google.bigtable.admin.v2.UndeleteTableRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.admin.v2.UndeleteTableRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -22722,13 +23442,17 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - UndeleteTableRequest.toObject = function toObject(message, options) { + UndeleteTableRequest.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) object.name = message.name; return object; }; @@ -22833,15 +23557,19 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UndeleteTableMetadata.encode = function encode(message, writer) { + UndeleteTableMetadata.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); if (message.startTime != null && Object.hasOwnProperty.call(message, "startTime")) - $root.google.protobuf.Timestamp.encode(message.startTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + $root.google.protobuf.Timestamp.encode(message.startTime, writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) - $root.google.protobuf.Timestamp.encode(message.endTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + $root.google.protobuf.Timestamp.encode(message.endTime, writer.uint32(/* id 3, wireType 2 =*/26).fork(), q + 1).ldelim(); return writer; }; @@ -22855,7 +23583,7 @@ * @returns {$protobuf.Writer} Writer */ UndeleteTableMetadata.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -22933,15 +23661,15 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) if (!$util.isString(message.name)) return "name: string expected"; - if (message.startTime != null && message.hasOwnProperty("startTime")) { + if (message.startTime != null && Object.hasOwnProperty.call(message, "startTime")) { var error = $root.google.protobuf.Timestamp.verify(message.startTime, long + 1); if (error) return "startTime." + error; } - if (message.endTime != null && message.hasOwnProperty("endTime")) { + if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) { var error = $root.google.protobuf.Timestamp.verify(message.endTime, long + 1); if (error) return "endTime." + error; @@ -22960,6 +23688,8 @@ UndeleteTableMetadata.fromObject = function fromObject(object, long) { if (object instanceof $root.google.bigtable.admin.v2.UndeleteTableMetadata) return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.admin.v2.UndeleteTableMetadata: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -22968,12 +23698,12 @@ if (object.name != null) message.name = String(object.name); if (object.startTime != null) { - if (typeof object.startTime !== "object") + if (!$util.isObject(object.startTime)) throw TypeError(".google.bigtable.admin.v2.UndeleteTableMetadata.startTime: object expected"); message.startTime = $root.google.protobuf.Timestamp.fromObject(object.startTime, long + 1); } if (object.endTime != null) { - if (typeof object.endTime !== "object") + if (!$util.isObject(object.endTime)) throw TypeError(".google.bigtable.admin.v2.UndeleteTableMetadata.endTime: object expected"); message.endTime = $root.google.protobuf.Timestamp.fromObject(object.endTime, long + 1); } @@ -22989,21 +23719,25 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - UndeleteTableMetadata.toObject = function toObject(message, options) { + UndeleteTableMetadata.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.name = ""; object.startTime = null; object.endTime = null; } - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) object.name = message.name; - if (message.startTime != null && message.hasOwnProperty("startTime")) - object.startTime = $root.google.protobuf.Timestamp.toObject(message.startTime, options); - if (message.endTime != null && message.hasOwnProperty("endTime")) - object.endTime = $root.google.protobuf.Timestamp.toObject(message.endTime, options); + if (message.startTime != null && Object.hasOwnProperty.call(message, "startTime")) + object.startTime = $root.google.protobuf.Timestamp.toObject(message.startTime, options, q + 1); + if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) + object.endTime = $root.google.protobuf.Timestamp.toObject(message.endTime, options, q + 1); return object; }; @@ -23108,14 +23842,18 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ModifyColumnFamiliesRequest.encode = function encode(message, writer) { + ModifyColumnFamiliesRequest.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); if (message.modifications != null && message.modifications.length) for (var i = 0; i < message.modifications.length; ++i) - $root.google.bigtable.admin.v2.ModifyColumnFamiliesRequest.Modification.encode(message.modifications[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + $root.google.bigtable.admin.v2.ModifyColumnFamiliesRequest.Modification.encode(message.modifications[i], writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); if (message.ignoreWarnings != null && Object.hasOwnProperty.call(message, "ignoreWarnings")) writer.uint32(/* id 3, wireType 0 =*/24).bool(message.ignoreWarnings); return writer; @@ -23131,7 +23869,7 @@ * @returns {$protobuf.Writer} Writer */ ModifyColumnFamiliesRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -23211,10 +23949,10 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) if (!$util.isString(message.name)) return "name: string expected"; - if (message.modifications != null && message.hasOwnProperty("modifications")) { + if (message.modifications != null && Object.hasOwnProperty.call(message, "modifications")) { if (!Array.isArray(message.modifications)) return "modifications: array expected"; for (var i = 0; i < message.modifications.length; ++i) { @@ -23223,7 +23961,7 @@ return "modifications." + error; } } - if (message.ignoreWarnings != null && message.hasOwnProperty("ignoreWarnings")) + if (message.ignoreWarnings != null && Object.hasOwnProperty.call(message, "ignoreWarnings")) if (typeof message.ignoreWarnings !== "boolean") return "ignoreWarnings: boolean expected"; return null; @@ -23240,6 +23978,8 @@ ModifyColumnFamiliesRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.google.bigtable.admin.v2.ModifyColumnFamiliesRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.admin.v2.ModifyColumnFamiliesRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -23252,7 +23992,7 @@ throw TypeError(".google.bigtable.admin.v2.ModifyColumnFamiliesRequest.modifications: array expected"); message.modifications = []; for (var i = 0; i < object.modifications.length; ++i) { - if (typeof object.modifications[i] !== "object") + if (!$util.isObject(object.modifications[i])) throw TypeError(".google.bigtable.admin.v2.ModifyColumnFamiliesRequest.modifications: object expected"); message.modifications[i] = $root.google.bigtable.admin.v2.ModifyColumnFamiliesRequest.Modification.fromObject(object.modifications[i], long + 1); } @@ -23271,9 +24011,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ModifyColumnFamiliesRequest.toObject = function toObject(message, options) { + ModifyColumnFamiliesRequest.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.modifications = []; @@ -23281,14 +24025,14 @@ object.name = ""; object.ignoreWarnings = false; } - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) object.name = message.name; if (message.modifications && message.modifications.length) { object.modifications = []; for (var j = 0; j < message.modifications.length; ++j) - object.modifications[j] = $root.google.bigtable.admin.v2.ModifyColumnFamiliesRequest.Modification.toObject(message.modifications[j], options); + object.modifications[j] = $root.google.bigtable.admin.v2.ModifyColumnFamiliesRequest.Modification.toObject(message.modifications[j], options, q + 1); } - if (message.ignoreWarnings != null && message.hasOwnProperty("ignoreWarnings")) + if (message.ignoreWarnings != null && Object.hasOwnProperty.call(message, "ignoreWarnings")) object.ignoreWarnings = message.ignoreWarnings; return object; }; @@ -23422,19 +24166,23 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Modification.encode = function encode(message, writer) { + Modification.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.id != null && Object.hasOwnProperty.call(message, "id")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.id); if (message.create != null && Object.hasOwnProperty.call(message, "create")) - $root.google.bigtable.admin.v2.ColumnFamily.encode(message.create, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + $root.google.bigtable.admin.v2.ColumnFamily.encode(message.create, writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); if (message.update != null && Object.hasOwnProperty.call(message, "update")) - $root.google.bigtable.admin.v2.ColumnFamily.encode(message.update, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + $root.google.bigtable.admin.v2.ColumnFamily.encode(message.update, writer.uint32(/* id 3, wireType 2 =*/26).fork(), q + 1).ldelim(); if (message.drop != null && Object.hasOwnProperty.call(message, "drop")) writer.uint32(/* id 4, wireType 0 =*/32).bool(message.drop); if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) - $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 6, wireType 2 =*/50).fork(), q + 1).ldelim(); return writer; }; @@ -23448,7 +24196,7 @@ * @returns {$protobuf.Writer} Writer */ Modification.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -23535,10 +24283,10 @@ if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; var properties = {}; - if (message.id != null && message.hasOwnProperty("id")) + if (message.id != null && Object.hasOwnProperty.call(message, "id")) if (!$util.isString(message.id)) return "id: string expected"; - if (message.create != null && message.hasOwnProperty("create")) { + if (message.create != null && Object.hasOwnProperty.call(message, "create")) { properties.mod = 1; { var error = $root.google.bigtable.admin.v2.ColumnFamily.verify(message.create, long + 1); @@ -23546,7 +24294,7 @@ return "create." + error; } } - if (message.update != null && message.hasOwnProperty("update")) { + if (message.update != null && Object.hasOwnProperty.call(message, "update")) { if (properties.mod === 1) return "mod: multiple values"; properties.mod = 1; @@ -23556,14 +24304,14 @@ return "update." + error; } } - if (message.drop != null && message.hasOwnProperty("drop")) { + if (message.drop != null && Object.hasOwnProperty.call(message, "drop")) { if (properties.mod === 1) return "mod: multiple values"; properties.mod = 1; if (typeof message.drop !== "boolean") return "drop: boolean expected"; } - if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) { var error = $root.google.protobuf.FieldMask.verify(message.updateMask, long + 1); if (error) return "updateMask." + error; @@ -23582,6 +24330,8 @@ Modification.fromObject = function fromObject(object, long) { if (object instanceof $root.google.bigtable.admin.v2.ModifyColumnFamiliesRequest.Modification) return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.admin.v2.ModifyColumnFamiliesRequest.Modification: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -23590,19 +24340,19 @@ if (object.id != null) message.id = String(object.id); if (object.create != null) { - if (typeof object.create !== "object") + if (!$util.isObject(object.create)) throw TypeError(".google.bigtable.admin.v2.ModifyColumnFamiliesRequest.Modification.create: object expected"); message.create = $root.google.bigtable.admin.v2.ColumnFamily.fromObject(object.create, long + 1); } if (object.update != null) { - if (typeof object.update !== "object") + if (!$util.isObject(object.update)) throw TypeError(".google.bigtable.admin.v2.ModifyColumnFamiliesRequest.Modification.update: object expected"); message.update = $root.google.bigtable.admin.v2.ColumnFamily.fromObject(object.update, long + 1); } if (object.drop != null) message.drop = Boolean(object.drop); if (object.updateMask != null) { - if (typeof object.updateMask !== "object") + if (!$util.isObject(object.updateMask)) throw TypeError(".google.bigtable.admin.v2.ModifyColumnFamiliesRequest.Modification.updateMask: object expected"); message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask, long + 1); } @@ -23618,33 +24368,37 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Modification.toObject = function toObject(message, options) { + Modification.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.id = ""; object.updateMask = null; } - if (message.id != null && message.hasOwnProperty("id")) + if (message.id != null && Object.hasOwnProperty.call(message, "id")) object.id = message.id; - if (message.create != null && message.hasOwnProperty("create")) { - object.create = $root.google.bigtable.admin.v2.ColumnFamily.toObject(message.create, options); + if (message.create != null && Object.hasOwnProperty.call(message, "create")) { + object.create = $root.google.bigtable.admin.v2.ColumnFamily.toObject(message.create, options, q + 1); if (options.oneofs) object.mod = "create"; } - if (message.update != null && message.hasOwnProperty("update")) { - object.update = $root.google.bigtable.admin.v2.ColumnFamily.toObject(message.update, options); + if (message.update != null && Object.hasOwnProperty.call(message, "update")) { + object.update = $root.google.bigtable.admin.v2.ColumnFamily.toObject(message.update, options, q + 1); if (options.oneofs) object.mod = "update"; } - if (message.drop != null && message.hasOwnProperty("drop")) { + if (message.drop != null && Object.hasOwnProperty.call(message, "drop")) { object.drop = message.drop; if (options.oneofs) object.mod = "drop"; } - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options, q + 1); return object; }; @@ -23733,9 +24487,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GenerateConsistencyTokenRequest.encode = function encode(message, writer) { + GenerateConsistencyTokenRequest.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); return writer; @@ -23751,7 +24509,7 @@ * @returns {$protobuf.Writer} Writer */ GenerateConsistencyTokenRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -23821,7 +24579,7 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) if (!$util.isString(message.name)) return "name: string expected"; return null; @@ -23838,6 +24596,8 @@ GenerateConsistencyTokenRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.google.bigtable.admin.v2.GenerateConsistencyTokenRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.admin.v2.GenerateConsistencyTokenRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -23857,13 +24617,17 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GenerateConsistencyTokenRequest.toObject = function toObject(message, options) { + GenerateConsistencyTokenRequest.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) object.name = message.name; return object; }; @@ -23950,9 +24714,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GenerateConsistencyTokenResponse.encode = function encode(message, writer) { + GenerateConsistencyTokenResponse.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.consistencyToken != null && Object.hasOwnProperty.call(message, "consistencyToken")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.consistencyToken); return writer; @@ -23968,7 +24736,7 @@ * @returns {$protobuf.Writer} Writer */ GenerateConsistencyTokenResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -24038,7 +24806,7 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.consistencyToken != null && message.hasOwnProperty("consistencyToken")) + if (message.consistencyToken != null && Object.hasOwnProperty.call(message, "consistencyToken")) if (!$util.isString(message.consistencyToken)) return "consistencyToken: string expected"; return null; @@ -24055,6 +24823,8 @@ GenerateConsistencyTokenResponse.fromObject = function fromObject(object, long) { if (object instanceof $root.google.bigtable.admin.v2.GenerateConsistencyTokenResponse) return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.admin.v2.GenerateConsistencyTokenResponse: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -24074,13 +24844,17 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GenerateConsistencyTokenResponse.toObject = function toObject(message, options) { + GenerateConsistencyTokenResponse.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) object.consistencyToken = ""; - if (message.consistencyToken != null && message.hasOwnProperty("consistencyToken")) + if (message.consistencyToken != null && Object.hasOwnProperty.call(message, "consistencyToken")) object.consistencyToken = message.consistencyToken; return object; }; @@ -24208,17 +24982,21 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CheckConsistencyRequest.encode = function encode(message, writer) { + CheckConsistencyRequest.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); if (message.consistencyToken != null && Object.hasOwnProperty.call(message, "consistencyToken")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.consistencyToken); if (message.standardReadRemoteWrites != null && Object.hasOwnProperty.call(message, "standardReadRemoteWrites")) - $root.google.bigtable.admin.v2.StandardReadRemoteWrites.encode(message.standardReadRemoteWrites, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + $root.google.bigtable.admin.v2.StandardReadRemoteWrites.encode(message.standardReadRemoteWrites, writer.uint32(/* id 3, wireType 2 =*/26).fork(), q + 1).ldelim(); if (message.dataBoostReadLocalWrites != null && Object.hasOwnProperty.call(message, "dataBoostReadLocalWrites")) - $root.google.bigtable.admin.v2.DataBoostReadLocalWrites.encode(message.dataBoostReadLocalWrites, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + $root.google.bigtable.admin.v2.DataBoostReadLocalWrites.encode(message.dataBoostReadLocalWrites, writer.uint32(/* id 4, wireType 2 =*/34).fork(), q + 1).ldelim(); return writer; }; @@ -24232,7 +25010,7 @@ * @returns {$protobuf.Writer} Writer */ CheckConsistencyRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -24315,13 +25093,13 @@ if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; var properties = {}; - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) if (!$util.isString(message.name)) return "name: string expected"; - if (message.consistencyToken != null && message.hasOwnProperty("consistencyToken")) + if (message.consistencyToken != null && Object.hasOwnProperty.call(message, "consistencyToken")) if (!$util.isString(message.consistencyToken)) return "consistencyToken: string expected"; - if (message.standardReadRemoteWrites != null && message.hasOwnProperty("standardReadRemoteWrites")) { + if (message.standardReadRemoteWrites != null && Object.hasOwnProperty.call(message, "standardReadRemoteWrites")) { properties.mode = 1; { var error = $root.google.bigtable.admin.v2.StandardReadRemoteWrites.verify(message.standardReadRemoteWrites, long + 1); @@ -24329,7 +25107,7 @@ return "standardReadRemoteWrites." + error; } } - if (message.dataBoostReadLocalWrites != null && message.hasOwnProperty("dataBoostReadLocalWrites")) { + if (message.dataBoostReadLocalWrites != null && Object.hasOwnProperty.call(message, "dataBoostReadLocalWrites")) { if (properties.mode === 1) return "mode: multiple values"; properties.mode = 1; @@ -24353,6 +25131,8 @@ CheckConsistencyRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.google.bigtable.admin.v2.CheckConsistencyRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.admin.v2.CheckConsistencyRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -24363,12 +25143,12 @@ if (object.consistencyToken != null) message.consistencyToken = String(object.consistencyToken); if (object.standardReadRemoteWrites != null) { - if (typeof object.standardReadRemoteWrites !== "object") + if (!$util.isObject(object.standardReadRemoteWrites)) throw TypeError(".google.bigtable.admin.v2.CheckConsistencyRequest.standardReadRemoteWrites: object expected"); message.standardReadRemoteWrites = $root.google.bigtable.admin.v2.StandardReadRemoteWrites.fromObject(object.standardReadRemoteWrites, long + 1); } if (object.dataBoostReadLocalWrites != null) { - if (typeof object.dataBoostReadLocalWrites !== "object") + if (!$util.isObject(object.dataBoostReadLocalWrites)) throw TypeError(".google.bigtable.admin.v2.CheckConsistencyRequest.dataBoostReadLocalWrites: object expected"); message.dataBoostReadLocalWrites = $root.google.bigtable.admin.v2.DataBoostReadLocalWrites.fromObject(object.dataBoostReadLocalWrites, long + 1); } @@ -24384,25 +25164,29 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CheckConsistencyRequest.toObject = function toObject(message, options) { + CheckConsistencyRequest.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.name = ""; object.consistencyToken = ""; } - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) object.name = message.name; - if (message.consistencyToken != null && message.hasOwnProperty("consistencyToken")) + if (message.consistencyToken != null && Object.hasOwnProperty.call(message, "consistencyToken")) object.consistencyToken = message.consistencyToken; - if (message.standardReadRemoteWrites != null && message.hasOwnProperty("standardReadRemoteWrites")) { - object.standardReadRemoteWrites = $root.google.bigtable.admin.v2.StandardReadRemoteWrites.toObject(message.standardReadRemoteWrites, options); + if (message.standardReadRemoteWrites != null && Object.hasOwnProperty.call(message, "standardReadRemoteWrites")) { + object.standardReadRemoteWrites = $root.google.bigtable.admin.v2.StandardReadRemoteWrites.toObject(message.standardReadRemoteWrites, options, q + 1); if (options.oneofs) object.mode = "standardReadRemoteWrites"; } - if (message.dataBoostReadLocalWrites != null && message.hasOwnProperty("dataBoostReadLocalWrites")) { - object.dataBoostReadLocalWrites = $root.google.bigtable.admin.v2.DataBoostReadLocalWrites.toObject(message.dataBoostReadLocalWrites, options); + if (message.dataBoostReadLocalWrites != null && Object.hasOwnProperty.call(message, "dataBoostReadLocalWrites")) { + object.dataBoostReadLocalWrites = $root.google.bigtable.admin.v2.DataBoostReadLocalWrites.toObject(message.dataBoostReadLocalWrites, options, q + 1); if (options.oneofs) object.mode = "dataBoostReadLocalWrites"; } @@ -24482,9 +25266,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - StandardReadRemoteWrites.encode = function encode(message, writer) { + StandardReadRemoteWrites.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); return writer; }; @@ -24498,7 +25286,7 @@ * @returns {$protobuf.Writer} Writer */ StandardReadRemoteWrites.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -24578,10 +25366,6 @@ StandardReadRemoteWrites.fromObject = function fromObject(object, long) { if (object instanceof $root.google.bigtable.admin.v2.StandardReadRemoteWrites) return object; - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - throw Error("maximum nesting depth exceeded"); return new $root.google.bigtable.admin.v2.StandardReadRemoteWrites(); }; @@ -24671,9 +25455,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DataBoostReadLocalWrites.encode = function encode(message, writer) { + DataBoostReadLocalWrites.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); return writer; }; @@ -24687,7 +25475,7 @@ * @returns {$protobuf.Writer} Writer */ DataBoostReadLocalWrites.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -24767,10 +25555,6 @@ DataBoostReadLocalWrites.fromObject = function fromObject(object, long) { if (object instanceof $root.google.bigtable.admin.v2.DataBoostReadLocalWrites) return object; - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - throw Error("maximum nesting depth exceeded"); return new $root.google.bigtable.admin.v2.DataBoostReadLocalWrites(); }; @@ -24869,9 +25653,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CheckConsistencyResponse.encode = function encode(message, writer) { + CheckConsistencyResponse.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.consistent != null && Object.hasOwnProperty.call(message, "consistent")) writer.uint32(/* id 1, wireType 0 =*/8).bool(message.consistent); return writer; @@ -24887,7 +25675,7 @@ * @returns {$protobuf.Writer} Writer */ CheckConsistencyResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -24957,7 +25745,7 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.consistent != null && message.hasOwnProperty("consistent")) + if (message.consistent != null && Object.hasOwnProperty.call(message, "consistent")) if (typeof message.consistent !== "boolean") return "consistent: boolean expected"; return null; @@ -24974,6 +25762,8 @@ CheckConsistencyResponse.fromObject = function fromObject(object, long) { if (object instanceof $root.google.bigtable.admin.v2.CheckConsistencyResponse) return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.admin.v2.CheckConsistencyResponse: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -24993,13 +25783,17 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CheckConsistencyResponse.toObject = function toObject(message, options) { + CheckConsistencyResponse.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) object.consistent = false; - if (message.consistent != null && message.hasOwnProperty("consistent")) + if (message.consistent != null && Object.hasOwnProperty.call(message, "consistent")) object.consistent = message.consistent; return object; }; @@ -25122,9 +25916,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SnapshotTableRequest.encode = function encode(message, writer) { + SnapshotTableRequest.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); if (message.cluster != null && Object.hasOwnProperty.call(message, "cluster")) @@ -25132,7 +25930,7 @@ if (message.snapshotId != null && Object.hasOwnProperty.call(message, "snapshotId")) writer.uint32(/* id 3, wireType 2 =*/26).string(message.snapshotId); if (message.ttl != null && Object.hasOwnProperty.call(message, "ttl")) - $root.google.protobuf.Duration.encode(message.ttl, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + $root.google.protobuf.Duration.encode(message.ttl, writer.uint32(/* id 4, wireType 2 =*/34).fork(), q + 1).ldelim(); if (message.description != null && Object.hasOwnProperty.call(message, "description")) writer.uint32(/* id 5, wireType 2 =*/42).string(message.description); return writer; @@ -25148,7 +25946,7 @@ * @returns {$protobuf.Writer} Writer */ SnapshotTableRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -25234,21 +26032,21 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) if (!$util.isString(message.name)) return "name: string expected"; - if (message.cluster != null && message.hasOwnProperty("cluster")) + if (message.cluster != null && Object.hasOwnProperty.call(message, "cluster")) if (!$util.isString(message.cluster)) return "cluster: string expected"; - if (message.snapshotId != null && message.hasOwnProperty("snapshotId")) + if (message.snapshotId != null && Object.hasOwnProperty.call(message, "snapshotId")) if (!$util.isString(message.snapshotId)) return "snapshotId: string expected"; - if (message.ttl != null && message.hasOwnProperty("ttl")) { + if (message.ttl != null && Object.hasOwnProperty.call(message, "ttl")) { var error = $root.google.protobuf.Duration.verify(message.ttl, long + 1); if (error) return "ttl." + error; } - if (message.description != null && message.hasOwnProperty("description")) + if (message.description != null && Object.hasOwnProperty.call(message, "description")) if (!$util.isString(message.description)) return "description: string expected"; return null; @@ -25265,6 +26063,8 @@ SnapshotTableRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.google.bigtable.admin.v2.SnapshotTableRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.admin.v2.SnapshotTableRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -25277,7 +26077,7 @@ if (object.snapshotId != null) message.snapshotId = String(object.snapshotId); if (object.ttl != null) { - if (typeof object.ttl !== "object") + if (!$util.isObject(object.ttl)) throw TypeError(".google.bigtable.admin.v2.SnapshotTableRequest.ttl: object expected"); message.ttl = $root.google.protobuf.Duration.fromObject(object.ttl, long + 1); } @@ -25295,9 +26095,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - SnapshotTableRequest.toObject = function toObject(message, options) { + SnapshotTableRequest.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.name = ""; @@ -25306,15 +26110,15 @@ object.ttl = null; object.description = ""; } - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) object.name = message.name; - if (message.cluster != null && message.hasOwnProperty("cluster")) + if (message.cluster != null && Object.hasOwnProperty.call(message, "cluster")) object.cluster = message.cluster; - if (message.snapshotId != null && message.hasOwnProperty("snapshotId")) + if (message.snapshotId != null && Object.hasOwnProperty.call(message, "snapshotId")) object.snapshotId = message.snapshotId; - if (message.ttl != null && message.hasOwnProperty("ttl")) - object.ttl = $root.google.protobuf.Duration.toObject(message.ttl, options); - if (message.description != null && message.hasOwnProperty("description")) + if (message.ttl != null && Object.hasOwnProperty.call(message, "ttl")) + object.ttl = $root.google.protobuf.Duration.toObject(message.ttl, options, q + 1); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) object.description = message.description; return object; }; @@ -25401,9 +26205,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetSnapshotRequest.encode = function encode(message, writer) { + GetSnapshotRequest.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); return writer; @@ -25419,7 +26227,7 @@ * @returns {$protobuf.Writer} Writer */ GetSnapshotRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -25489,7 +26297,7 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) if (!$util.isString(message.name)) return "name: string expected"; return null; @@ -25506,6 +26314,8 @@ GetSnapshotRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.google.bigtable.admin.v2.GetSnapshotRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.admin.v2.GetSnapshotRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -25525,13 +26335,17 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetSnapshotRequest.toObject = function toObject(message, options) { + GetSnapshotRequest.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) object.name = message.name; return object; }; @@ -25636,9 +26450,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListSnapshotsRequest.encode = function encode(message, writer) { + ListSnapshotsRequest.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) @@ -25658,7 +26476,7 @@ * @returns {$protobuf.Writer} Writer */ ListSnapshotsRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -25736,13 +26554,13 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.parent != null && message.hasOwnProperty("parent")) + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) if (!$util.isString(message.parent)) return "parent: string expected"; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) if (!$util.isInteger(message.pageSize)) return "pageSize: integer expected"; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) if (!$util.isString(message.pageToken)) return "pageToken: string expected"; return null; @@ -25759,6 +26577,8 @@ ListSnapshotsRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.google.bigtable.admin.v2.ListSnapshotsRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.admin.v2.ListSnapshotsRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -25782,20 +26602,24 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListSnapshotsRequest.toObject = function toObject(message, options) { + ListSnapshotsRequest.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.parent = ""; object.pageSize = 0; object.pageToken = ""; } - if (message.parent != null && message.hasOwnProperty("parent")) + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) object.parent = message.parent; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) object.pageSize = message.pageSize; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) object.pageToken = message.pageToken; return object; }; @@ -25892,12 +26716,16 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListSnapshotsResponse.encode = function encode(message, writer) { + ListSnapshotsResponse.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.snapshots != null && message.snapshots.length) for (var i = 0; i < message.snapshots.length; ++i) - $root.google.bigtable.admin.v2.Snapshot.encode(message.snapshots[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + $root.google.bigtable.admin.v2.Snapshot.encode(message.snapshots[i], writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); return writer; @@ -25913,7 +26741,7 @@ * @returns {$protobuf.Writer} Writer */ ListSnapshotsResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -25989,7 +26817,7 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.snapshots != null && message.hasOwnProperty("snapshots")) { + if (message.snapshots != null && Object.hasOwnProperty.call(message, "snapshots")) { if (!Array.isArray(message.snapshots)) return "snapshots: array expected"; for (var i = 0; i < message.snapshots.length; ++i) { @@ -25998,7 +26826,7 @@ return "snapshots." + error; } } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) if (!$util.isString(message.nextPageToken)) return "nextPageToken: string expected"; return null; @@ -26015,6 +26843,8 @@ ListSnapshotsResponse.fromObject = function fromObject(object, long) { if (object instanceof $root.google.bigtable.admin.v2.ListSnapshotsResponse) return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.admin.v2.ListSnapshotsResponse: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -26025,7 +26855,7 @@ throw TypeError(".google.bigtable.admin.v2.ListSnapshotsResponse.snapshots: array expected"); message.snapshots = []; for (var i = 0; i < object.snapshots.length; ++i) { - if (typeof object.snapshots[i] !== "object") + if (!$util.isObject(object.snapshots[i])) throw TypeError(".google.bigtable.admin.v2.ListSnapshotsResponse.snapshots: object expected"); message.snapshots[i] = $root.google.bigtable.admin.v2.Snapshot.fromObject(object.snapshots[i], long + 1); } @@ -26044,9 +26874,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListSnapshotsResponse.toObject = function toObject(message, options) { + ListSnapshotsResponse.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.snapshots = []; @@ -26055,9 +26889,9 @@ if (message.snapshots && message.snapshots.length) { object.snapshots = []; for (var j = 0; j < message.snapshots.length; ++j) - object.snapshots[j] = $root.google.bigtable.admin.v2.Snapshot.toObject(message.snapshots[j], options); + object.snapshots[j] = $root.google.bigtable.admin.v2.Snapshot.toObject(message.snapshots[j], options, q + 1); } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) object.nextPageToken = message.nextPageToken; return object; }; @@ -26144,9 +26978,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteSnapshotRequest.encode = function encode(message, writer) { + DeleteSnapshotRequest.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); return writer; @@ -26162,7 +27000,7 @@ * @returns {$protobuf.Writer} Writer */ DeleteSnapshotRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -26232,7 +27070,7 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) if (!$util.isString(message.name)) return "name: string expected"; return null; @@ -26249,6 +27087,8 @@ DeleteSnapshotRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.google.bigtable.admin.v2.DeleteSnapshotRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.admin.v2.DeleteSnapshotRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -26268,13 +27108,17 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DeleteSnapshotRequest.toObject = function toObject(message, options) { + DeleteSnapshotRequest.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) object.name = message.name; return object; }; @@ -26379,15 +27223,19 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SnapshotTableMetadata.encode = function encode(message, writer) { + SnapshotTableMetadata.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.originalRequest != null && Object.hasOwnProperty.call(message, "originalRequest")) - $root.google.bigtable.admin.v2.SnapshotTableRequest.encode(message.originalRequest, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + $root.google.bigtable.admin.v2.SnapshotTableRequest.encode(message.originalRequest, writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); if (message.requestTime != null && Object.hasOwnProperty.call(message, "requestTime")) - $root.google.protobuf.Timestamp.encode(message.requestTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + $root.google.protobuf.Timestamp.encode(message.requestTime, writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); if (message.finishTime != null && Object.hasOwnProperty.call(message, "finishTime")) - $root.google.protobuf.Timestamp.encode(message.finishTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + $root.google.protobuf.Timestamp.encode(message.finishTime, writer.uint32(/* id 3, wireType 2 =*/26).fork(), q + 1).ldelim(); return writer; }; @@ -26401,7 +27249,7 @@ * @returns {$protobuf.Writer} Writer */ SnapshotTableMetadata.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -26479,17 +27327,17 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.originalRequest != null && message.hasOwnProperty("originalRequest")) { + if (message.originalRequest != null && Object.hasOwnProperty.call(message, "originalRequest")) { var error = $root.google.bigtable.admin.v2.SnapshotTableRequest.verify(message.originalRequest, long + 1); if (error) return "originalRequest." + error; } - if (message.requestTime != null && message.hasOwnProperty("requestTime")) { + if (message.requestTime != null && Object.hasOwnProperty.call(message, "requestTime")) { var error = $root.google.protobuf.Timestamp.verify(message.requestTime, long + 1); if (error) return "requestTime." + error; } - if (message.finishTime != null && message.hasOwnProperty("finishTime")) { + if (message.finishTime != null && Object.hasOwnProperty.call(message, "finishTime")) { var error = $root.google.protobuf.Timestamp.verify(message.finishTime, long + 1); if (error) return "finishTime." + error; @@ -26508,23 +27356,25 @@ SnapshotTableMetadata.fromObject = function fromObject(object, long) { if (object instanceof $root.google.bigtable.admin.v2.SnapshotTableMetadata) return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.admin.v2.SnapshotTableMetadata: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) throw Error("maximum nesting depth exceeded"); var message = new $root.google.bigtable.admin.v2.SnapshotTableMetadata(); if (object.originalRequest != null) { - if (typeof object.originalRequest !== "object") + if (!$util.isObject(object.originalRequest)) throw TypeError(".google.bigtable.admin.v2.SnapshotTableMetadata.originalRequest: object expected"); message.originalRequest = $root.google.bigtable.admin.v2.SnapshotTableRequest.fromObject(object.originalRequest, long + 1); } if (object.requestTime != null) { - if (typeof object.requestTime !== "object") + if (!$util.isObject(object.requestTime)) throw TypeError(".google.bigtable.admin.v2.SnapshotTableMetadata.requestTime: object expected"); message.requestTime = $root.google.protobuf.Timestamp.fromObject(object.requestTime, long + 1); } if (object.finishTime != null) { - if (typeof object.finishTime !== "object") + if (!$util.isObject(object.finishTime)) throw TypeError(".google.bigtable.admin.v2.SnapshotTableMetadata.finishTime: object expected"); message.finishTime = $root.google.protobuf.Timestamp.fromObject(object.finishTime, long + 1); } @@ -26540,21 +27390,25 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - SnapshotTableMetadata.toObject = function toObject(message, options) { + SnapshotTableMetadata.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.originalRequest = null; object.requestTime = null; object.finishTime = null; } - if (message.originalRequest != null && message.hasOwnProperty("originalRequest")) - object.originalRequest = $root.google.bigtable.admin.v2.SnapshotTableRequest.toObject(message.originalRequest, options); - if (message.requestTime != null && message.hasOwnProperty("requestTime")) - object.requestTime = $root.google.protobuf.Timestamp.toObject(message.requestTime, options); - if (message.finishTime != null && message.hasOwnProperty("finishTime")) - object.finishTime = $root.google.protobuf.Timestamp.toObject(message.finishTime, options); + if (message.originalRequest != null && Object.hasOwnProperty.call(message, "originalRequest")) + object.originalRequest = $root.google.bigtable.admin.v2.SnapshotTableRequest.toObject(message.originalRequest, options, q + 1); + if (message.requestTime != null && Object.hasOwnProperty.call(message, "requestTime")) + object.requestTime = $root.google.protobuf.Timestamp.toObject(message.requestTime, options, q + 1); + if (message.finishTime != null && Object.hasOwnProperty.call(message, "finishTime")) + object.finishTime = $root.google.protobuf.Timestamp.toObject(message.finishTime, options, q + 1); return object; }; @@ -26658,15 +27512,19 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateTableFromSnapshotMetadata.encode = function encode(message, writer) { + CreateTableFromSnapshotMetadata.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.originalRequest != null && Object.hasOwnProperty.call(message, "originalRequest")) - $root.google.bigtable.admin.v2.CreateTableFromSnapshotRequest.encode(message.originalRequest, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + $root.google.bigtable.admin.v2.CreateTableFromSnapshotRequest.encode(message.originalRequest, writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); if (message.requestTime != null && Object.hasOwnProperty.call(message, "requestTime")) - $root.google.protobuf.Timestamp.encode(message.requestTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + $root.google.protobuf.Timestamp.encode(message.requestTime, writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); if (message.finishTime != null && Object.hasOwnProperty.call(message, "finishTime")) - $root.google.protobuf.Timestamp.encode(message.finishTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + $root.google.protobuf.Timestamp.encode(message.finishTime, writer.uint32(/* id 3, wireType 2 =*/26).fork(), q + 1).ldelim(); return writer; }; @@ -26680,7 +27538,7 @@ * @returns {$protobuf.Writer} Writer */ CreateTableFromSnapshotMetadata.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -26758,17 +27616,17 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.originalRequest != null && message.hasOwnProperty("originalRequest")) { + if (message.originalRequest != null && Object.hasOwnProperty.call(message, "originalRequest")) { var error = $root.google.bigtable.admin.v2.CreateTableFromSnapshotRequest.verify(message.originalRequest, long + 1); if (error) return "originalRequest." + error; } - if (message.requestTime != null && message.hasOwnProperty("requestTime")) { + if (message.requestTime != null && Object.hasOwnProperty.call(message, "requestTime")) { var error = $root.google.protobuf.Timestamp.verify(message.requestTime, long + 1); if (error) return "requestTime." + error; } - if (message.finishTime != null && message.hasOwnProperty("finishTime")) { + if (message.finishTime != null && Object.hasOwnProperty.call(message, "finishTime")) { var error = $root.google.protobuf.Timestamp.verify(message.finishTime, long + 1); if (error) return "finishTime." + error; @@ -26787,23 +27645,25 @@ CreateTableFromSnapshotMetadata.fromObject = function fromObject(object, long) { if (object instanceof $root.google.bigtable.admin.v2.CreateTableFromSnapshotMetadata) return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.admin.v2.CreateTableFromSnapshotMetadata: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) throw Error("maximum nesting depth exceeded"); var message = new $root.google.bigtable.admin.v2.CreateTableFromSnapshotMetadata(); if (object.originalRequest != null) { - if (typeof object.originalRequest !== "object") + if (!$util.isObject(object.originalRequest)) throw TypeError(".google.bigtable.admin.v2.CreateTableFromSnapshotMetadata.originalRequest: object expected"); message.originalRequest = $root.google.bigtable.admin.v2.CreateTableFromSnapshotRequest.fromObject(object.originalRequest, long + 1); } if (object.requestTime != null) { - if (typeof object.requestTime !== "object") + if (!$util.isObject(object.requestTime)) throw TypeError(".google.bigtable.admin.v2.CreateTableFromSnapshotMetadata.requestTime: object expected"); message.requestTime = $root.google.protobuf.Timestamp.fromObject(object.requestTime, long + 1); } if (object.finishTime != null) { - if (typeof object.finishTime !== "object") + if (!$util.isObject(object.finishTime)) throw TypeError(".google.bigtable.admin.v2.CreateTableFromSnapshotMetadata.finishTime: object expected"); message.finishTime = $root.google.protobuf.Timestamp.fromObject(object.finishTime, long + 1); } @@ -26819,21 +27679,25 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CreateTableFromSnapshotMetadata.toObject = function toObject(message, options) { + CreateTableFromSnapshotMetadata.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.originalRequest = null; object.requestTime = null; object.finishTime = null; } - if (message.originalRequest != null && message.hasOwnProperty("originalRequest")) - object.originalRequest = $root.google.bigtable.admin.v2.CreateTableFromSnapshotRequest.toObject(message.originalRequest, options); - if (message.requestTime != null && message.hasOwnProperty("requestTime")) - object.requestTime = $root.google.protobuf.Timestamp.toObject(message.requestTime, options); - if (message.finishTime != null && message.hasOwnProperty("finishTime")) - object.finishTime = $root.google.protobuf.Timestamp.toObject(message.finishTime, options); + if (message.originalRequest != null && Object.hasOwnProperty.call(message, "originalRequest")) + object.originalRequest = $root.google.bigtable.admin.v2.CreateTableFromSnapshotRequest.toObject(message.originalRequest, options, q + 1); + if (message.requestTime != null && Object.hasOwnProperty.call(message, "requestTime")) + object.requestTime = $root.google.protobuf.Timestamp.toObject(message.requestTime, options, q + 1); + if (message.finishTime != null && Object.hasOwnProperty.call(message, "finishTime")) + object.finishTime = $root.google.protobuf.Timestamp.toObject(message.finishTime, options, q + 1); return object; }; @@ -26937,15 +27801,19 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateBackupRequest.encode = function encode(message, writer) { + CreateBackupRequest.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); if (message.backupId != null && Object.hasOwnProperty.call(message, "backupId")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.backupId); if (message.backup != null && Object.hasOwnProperty.call(message, "backup")) - $root.google.bigtable.admin.v2.Backup.encode(message.backup, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + $root.google.bigtable.admin.v2.Backup.encode(message.backup, writer.uint32(/* id 3, wireType 2 =*/26).fork(), q + 1).ldelim(); return writer; }; @@ -26959,7 +27827,7 @@ * @returns {$protobuf.Writer} Writer */ CreateBackupRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -27037,13 +27905,13 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.parent != null && message.hasOwnProperty("parent")) + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) if (!$util.isString(message.parent)) return "parent: string expected"; - if (message.backupId != null && message.hasOwnProperty("backupId")) + if (message.backupId != null && Object.hasOwnProperty.call(message, "backupId")) if (!$util.isString(message.backupId)) return "backupId: string expected"; - if (message.backup != null && message.hasOwnProperty("backup")) { + if (message.backup != null && Object.hasOwnProperty.call(message, "backup")) { var error = $root.google.bigtable.admin.v2.Backup.verify(message.backup, long + 1); if (error) return "backup." + error; @@ -27062,6 +27930,8 @@ CreateBackupRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.google.bigtable.admin.v2.CreateBackupRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.admin.v2.CreateBackupRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -27072,7 +27942,7 @@ if (object.backupId != null) message.backupId = String(object.backupId); if (object.backup != null) { - if (typeof object.backup !== "object") + if (!$util.isObject(object.backup)) throw TypeError(".google.bigtable.admin.v2.CreateBackupRequest.backup: object expected"); message.backup = $root.google.bigtable.admin.v2.Backup.fromObject(object.backup, long + 1); } @@ -27088,21 +27958,25 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CreateBackupRequest.toObject = function toObject(message, options) { + CreateBackupRequest.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.parent = ""; object.backupId = ""; object.backup = null; } - if (message.parent != null && message.hasOwnProperty("parent")) + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) object.parent = message.parent; - if (message.backupId != null && message.hasOwnProperty("backupId")) + if (message.backupId != null && Object.hasOwnProperty.call(message, "backupId")) object.backupId = message.backupId; - if (message.backup != null && message.hasOwnProperty("backup")) - object.backup = $root.google.bigtable.admin.v2.Backup.toObject(message.backup, options); + if (message.backup != null && Object.hasOwnProperty.call(message, "backup")) + object.backup = $root.google.bigtable.admin.v2.Backup.toObject(message.backup, options, q + 1); return object; }; @@ -27215,17 +28089,21 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateBackupMetadata.encode = function encode(message, writer) { + CreateBackupMetadata.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); if (message.sourceTable != null && Object.hasOwnProperty.call(message, "sourceTable")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.sourceTable); if (message.startTime != null && Object.hasOwnProperty.call(message, "startTime")) - $root.google.protobuf.Timestamp.encode(message.startTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + $root.google.protobuf.Timestamp.encode(message.startTime, writer.uint32(/* id 3, wireType 2 =*/26).fork(), q + 1).ldelim(); if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) - $root.google.protobuf.Timestamp.encode(message.endTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + $root.google.protobuf.Timestamp.encode(message.endTime, writer.uint32(/* id 4, wireType 2 =*/34).fork(), q + 1).ldelim(); return writer; }; @@ -27239,7 +28117,7 @@ * @returns {$protobuf.Writer} Writer */ CreateBackupMetadata.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -27321,18 +28199,18 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) if (!$util.isString(message.name)) return "name: string expected"; - if (message.sourceTable != null && message.hasOwnProperty("sourceTable")) + if (message.sourceTable != null && Object.hasOwnProperty.call(message, "sourceTable")) if (!$util.isString(message.sourceTable)) return "sourceTable: string expected"; - if (message.startTime != null && message.hasOwnProperty("startTime")) { + if (message.startTime != null && Object.hasOwnProperty.call(message, "startTime")) { var error = $root.google.protobuf.Timestamp.verify(message.startTime, long + 1); if (error) return "startTime." + error; } - if (message.endTime != null && message.hasOwnProperty("endTime")) { + if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) { var error = $root.google.protobuf.Timestamp.verify(message.endTime, long + 1); if (error) return "endTime." + error; @@ -27351,6 +28229,8 @@ CreateBackupMetadata.fromObject = function fromObject(object, long) { if (object instanceof $root.google.bigtable.admin.v2.CreateBackupMetadata) return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.admin.v2.CreateBackupMetadata: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -27361,12 +28241,12 @@ if (object.sourceTable != null) message.sourceTable = String(object.sourceTable); if (object.startTime != null) { - if (typeof object.startTime !== "object") + if (!$util.isObject(object.startTime)) throw TypeError(".google.bigtable.admin.v2.CreateBackupMetadata.startTime: object expected"); message.startTime = $root.google.protobuf.Timestamp.fromObject(object.startTime, long + 1); } if (object.endTime != null) { - if (typeof object.endTime !== "object") + if (!$util.isObject(object.endTime)) throw TypeError(".google.bigtable.admin.v2.CreateBackupMetadata.endTime: object expected"); message.endTime = $root.google.protobuf.Timestamp.fromObject(object.endTime, long + 1); } @@ -27382,9 +28262,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CreateBackupMetadata.toObject = function toObject(message, options) { + CreateBackupMetadata.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.name = ""; @@ -27392,14 +28276,14 @@ object.startTime = null; object.endTime = null; } - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) object.name = message.name; - if (message.sourceTable != null && message.hasOwnProperty("sourceTable")) + if (message.sourceTable != null && Object.hasOwnProperty.call(message, "sourceTable")) object.sourceTable = message.sourceTable; - if (message.startTime != null && message.hasOwnProperty("startTime")) - object.startTime = $root.google.protobuf.Timestamp.toObject(message.startTime, options); - if (message.endTime != null && message.hasOwnProperty("endTime")) - object.endTime = $root.google.protobuf.Timestamp.toObject(message.endTime, options); + if (message.startTime != null && Object.hasOwnProperty.call(message, "startTime")) + object.startTime = $root.google.protobuf.Timestamp.toObject(message.startTime, options, q + 1); + if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) + object.endTime = $root.google.protobuf.Timestamp.toObject(message.endTime, options, q + 1); return object; }; @@ -27494,13 +28378,17 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateBackupRequest.encode = function encode(message, writer) { + UpdateBackupRequest.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.backup != null && Object.hasOwnProperty.call(message, "backup")) - $root.google.bigtable.admin.v2.Backup.encode(message.backup, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + $root.google.bigtable.admin.v2.Backup.encode(message.backup, writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) - $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); return writer; }; @@ -27514,7 +28402,7 @@ * @returns {$protobuf.Writer} Writer */ UpdateBackupRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -27588,12 +28476,12 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.backup != null && message.hasOwnProperty("backup")) { + if (message.backup != null && Object.hasOwnProperty.call(message, "backup")) { var error = $root.google.bigtable.admin.v2.Backup.verify(message.backup, long + 1); if (error) return "backup." + error; } - if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) { var error = $root.google.protobuf.FieldMask.verify(message.updateMask, long + 1); if (error) return "updateMask." + error; @@ -27612,18 +28500,20 @@ UpdateBackupRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.google.bigtable.admin.v2.UpdateBackupRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.admin.v2.UpdateBackupRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) throw Error("maximum nesting depth exceeded"); var message = new $root.google.bigtable.admin.v2.UpdateBackupRequest(); if (object.backup != null) { - if (typeof object.backup !== "object") + if (!$util.isObject(object.backup)) throw TypeError(".google.bigtable.admin.v2.UpdateBackupRequest.backup: object expected"); message.backup = $root.google.bigtable.admin.v2.Backup.fromObject(object.backup, long + 1); } if (object.updateMask != null) { - if (typeof object.updateMask !== "object") + if (!$util.isObject(object.updateMask)) throw TypeError(".google.bigtable.admin.v2.UpdateBackupRequest.updateMask: object expected"); message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask, long + 1); } @@ -27639,18 +28529,22 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - UpdateBackupRequest.toObject = function toObject(message, options) { + UpdateBackupRequest.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.backup = null; object.updateMask = null; } - if (message.backup != null && message.hasOwnProperty("backup")) - object.backup = $root.google.bigtable.admin.v2.Backup.toObject(message.backup, options); - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + if (message.backup != null && Object.hasOwnProperty.call(message, "backup")) + object.backup = $root.google.bigtable.admin.v2.Backup.toObject(message.backup, options, q + 1); + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options, q + 1); return object; }; @@ -27736,9 +28630,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetBackupRequest.encode = function encode(message, writer) { + GetBackupRequest.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); return writer; @@ -27754,7 +28652,7 @@ * @returns {$protobuf.Writer} Writer */ GetBackupRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -27824,7 +28722,7 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) if (!$util.isString(message.name)) return "name: string expected"; return null; @@ -27841,6 +28739,8 @@ GetBackupRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.google.bigtable.admin.v2.GetBackupRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.admin.v2.GetBackupRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -27860,13 +28760,17 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetBackupRequest.toObject = function toObject(message, options) { + GetBackupRequest.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) object.name = message.name; return object; }; @@ -27953,9 +28857,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteBackupRequest.encode = function encode(message, writer) { + DeleteBackupRequest.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); return writer; @@ -27971,7 +28879,7 @@ * @returns {$protobuf.Writer} Writer */ DeleteBackupRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -28041,7 +28949,7 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) if (!$util.isString(message.name)) return "name: string expected"; return null; @@ -28058,6 +28966,8 @@ DeleteBackupRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.google.bigtable.admin.v2.DeleteBackupRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.admin.v2.DeleteBackupRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -28077,13 +28987,17 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DeleteBackupRequest.toObject = function toObject(message, options) { + DeleteBackupRequest.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) object.name = message.name; return object; }; @@ -28206,9 +29120,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListBackupsRequest.encode = function encode(message, writer) { + ListBackupsRequest.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) @@ -28232,7 +29150,7 @@ * @returns {$protobuf.Writer} Writer */ ListBackupsRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -28318,19 +29236,19 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.parent != null && message.hasOwnProperty("parent")) + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) if (!$util.isString(message.parent)) return "parent: string expected"; - if (message.filter != null && message.hasOwnProperty("filter")) + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) if (!$util.isString(message.filter)) return "filter: string expected"; - if (message.orderBy != null && message.hasOwnProperty("orderBy")) + if (message.orderBy != null && Object.hasOwnProperty.call(message, "orderBy")) if (!$util.isString(message.orderBy)) return "orderBy: string expected"; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) if (!$util.isInteger(message.pageSize)) return "pageSize: integer expected"; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) if (!$util.isString(message.pageToken)) return "pageToken: string expected"; return null; @@ -28347,6 +29265,8 @@ ListBackupsRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.google.bigtable.admin.v2.ListBackupsRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.admin.v2.ListBackupsRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -28374,9 +29294,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListBackupsRequest.toObject = function toObject(message, options) { + ListBackupsRequest.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.parent = ""; @@ -28385,15 +29309,15 @@ object.pageSize = 0; object.pageToken = ""; } - if (message.parent != null && message.hasOwnProperty("parent")) + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) object.parent = message.parent; - if (message.filter != null && message.hasOwnProperty("filter")) + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) object.filter = message.filter; - if (message.orderBy != null && message.hasOwnProperty("orderBy")) + if (message.orderBy != null && Object.hasOwnProperty.call(message, "orderBy")) object.orderBy = message.orderBy; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) object.pageSize = message.pageSize; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) object.pageToken = message.pageToken; return object; }; @@ -28490,12 +29414,16 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListBackupsResponse.encode = function encode(message, writer) { + ListBackupsResponse.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.backups != null && message.backups.length) for (var i = 0; i < message.backups.length; ++i) - $root.google.bigtable.admin.v2.Backup.encode(message.backups[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + $root.google.bigtable.admin.v2.Backup.encode(message.backups[i], writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); return writer; @@ -28511,7 +29439,7 @@ * @returns {$protobuf.Writer} Writer */ ListBackupsResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -28587,7 +29515,7 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.backups != null && message.hasOwnProperty("backups")) { + if (message.backups != null && Object.hasOwnProperty.call(message, "backups")) { if (!Array.isArray(message.backups)) return "backups: array expected"; for (var i = 0; i < message.backups.length; ++i) { @@ -28596,7 +29524,7 @@ return "backups." + error; } } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) if (!$util.isString(message.nextPageToken)) return "nextPageToken: string expected"; return null; @@ -28613,6 +29541,8 @@ ListBackupsResponse.fromObject = function fromObject(object, long) { if (object instanceof $root.google.bigtable.admin.v2.ListBackupsResponse) return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.admin.v2.ListBackupsResponse: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -28623,7 +29553,7 @@ throw TypeError(".google.bigtable.admin.v2.ListBackupsResponse.backups: array expected"); message.backups = []; for (var i = 0; i < object.backups.length; ++i) { - if (typeof object.backups[i] !== "object") + if (!$util.isObject(object.backups[i])) throw TypeError(".google.bigtable.admin.v2.ListBackupsResponse.backups: object expected"); message.backups[i] = $root.google.bigtable.admin.v2.Backup.fromObject(object.backups[i], long + 1); } @@ -28642,9 +29572,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListBackupsResponse.toObject = function toObject(message, options) { + ListBackupsResponse.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.backups = []; @@ -28653,9 +29587,9 @@ if (message.backups && message.backups.length) { object.backups = []; for (var j = 0; j < message.backups.length; ++j) - object.backups[j] = $root.google.bigtable.admin.v2.Backup.toObject(message.backups[j], options); + object.backups[j] = $root.google.bigtable.admin.v2.Backup.toObject(message.backups[j], options, q + 1); } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) object.nextPageToken = message.nextPageToken; return object; }; @@ -28769,9 +29703,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CopyBackupRequest.encode = function encode(message, writer) { + CopyBackupRequest.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); if (message.backupId != null && Object.hasOwnProperty.call(message, "backupId")) @@ -28779,7 +29717,7 @@ if (message.sourceBackup != null && Object.hasOwnProperty.call(message, "sourceBackup")) writer.uint32(/* id 3, wireType 2 =*/26).string(message.sourceBackup); if (message.expireTime != null && Object.hasOwnProperty.call(message, "expireTime")) - $root.google.protobuf.Timestamp.encode(message.expireTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + $root.google.protobuf.Timestamp.encode(message.expireTime, writer.uint32(/* id 4, wireType 2 =*/34).fork(), q + 1).ldelim(); return writer; }; @@ -28793,7 +29731,7 @@ * @returns {$protobuf.Writer} Writer */ CopyBackupRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -28875,16 +29813,16 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.parent != null && message.hasOwnProperty("parent")) + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) if (!$util.isString(message.parent)) return "parent: string expected"; - if (message.backupId != null && message.hasOwnProperty("backupId")) + if (message.backupId != null && Object.hasOwnProperty.call(message, "backupId")) if (!$util.isString(message.backupId)) return "backupId: string expected"; - if (message.sourceBackup != null && message.hasOwnProperty("sourceBackup")) + if (message.sourceBackup != null && Object.hasOwnProperty.call(message, "sourceBackup")) if (!$util.isString(message.sourceBackup)) return "sourceBackup: string expected"; - if (message.expireTime != null && message.hasOwnProperty("expireTime")) { + if (message.expireTime != null && Object.hasOwnProperty.call(message, "expireTime")) { var error = $root.google.protobuf.Timestamp.verify(message.expireTime, long + 1); if (error) return "expireTime." + error; @@ -28903,6 +29841,8 @@ CopyBackupRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.google.bigtable.admin.v2.CopyBackupRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.admin.v2.CopyBackupRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -28915,7 +29855,7 @@ if (object.sourceBackup != null) message.sourceBackup = String(object.sourceBackup); if (object.expireTime != null) { - if (typeof object.expireTime !== "object") + if (!$util.isObject(object.expireTime)) throw TypeError(".google.bigtable.admin.v2.CopyBackupRequest.expireTime: object expected"); message.expireTime = $root.google.protobuf.Timestamp.fromObject(object.expireTime, long + 1); } @@ -28931,9 +29871,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CopyBackupRequest.toObject = function toObject(message, options) { + CopyBackupRequest.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.parent = ""; @@ -28941,14 +29885,14 @@ object.sourceBackup = ""; object.expireTime = null; } - if (message.parent != null && message.hasOwnProperty("parent")) + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) object.parent = message.parent; - if (message.backupId != null && message.hasOwnProperty("backupId")) + if (message.backupId != null && Object.hasOwnProperty.call(message, "backupId")) object.backupId = message.backupId; - if (message.sourceBackup != null && message.hasOwnProperty("sourceBackup")) + if (message.sourceBackup != null && Object.hasOwnProperty.call(message, "sourceBackup")) object.sourceBackup = message.sourceBackup; - if (message.expireTime != null && message.hasOwnProperty("expireTime")) - object.expireTime = $root.google.protobuf.Timestamp.toObject(message.expireTime, options); + if (message.expireTime != null && Object.hasOwnProperty.call(message, "expireTime")) + object.expireTime = $root.google.protobuf.Timestamp.toObject(message.expireTime, options, q + 1); return object; }; @@ -29052,15 +29996,19 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CopyBackupMetadata.encode = function encode(message, writer) { + CopyBackupMetadata.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); if (message.sourceBackupInfo != null && Object.hasOwnProperty.call(message, "sourceBackupInfo")) - $root.google.bigtable.admin.v2.BackupInfo.encode(message.sourceBackupInfo, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + $root.google.bigtable.admin.v2.BackupInfo.encode(message.sourceBackupInfo, writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); if (message.progress != null && Object.hasOwnProperty.call(message, "progress")) - $root.google.bigtable.admin.v2.OperationProgress.encode(message.progress, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + $root.google.bigtable.admin.v2.OperationProgress.encode(message.progress, writer.uint32(/* id 3, wireType 2 =*/26).fork(), q + 1).ldelim(); return writer; }; @@ -29074,7 +30022,7 @@ * @returns {$protobuf.Writer} Writer */ CopyBackupMetadata.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -29152,15 +30100,15 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) if (!$util.isString(message.name)) return "name: string expected"; - if (message.sourceBackupInfo != null && message.hasOwnProperty("sourceBackupInfo")) { + if (message.sourceBackupInfo != null && Object.hasOwnProperty.call(message, "sourceBackupInfo")) { var error = $root.google.bigtable.admin.v2.BackupInfo.verify(message.sourceBackupInfo, long + 1); if (error) return "sourceBackupInfo." + error; } - if (message.progress != null && message.hasOwnProperty("progress")) { + if (message.progress != null && Object.hasOwnProperty.call(message, "progress")) { var error = $root.google.bigtable.admin.v2.OperationProgress.verify(message.progress, long + 1); if (error) return "progress." + error; @@ -29179,6 +30127,8 @@ CopyBackupMetadata.fromObject = function fromObject(object, long) { if (object instanceof $root.google.bigtable.admin.v2.CopyBackupMetadata) return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.admin.v2.CopyBackupMetadata: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -29187,12 +30137,12 @@ if (object.name != null) message.name = String(object.name); if (object.sourceBackupInfo != null) { - if (typeof object.sourceBackupInfo !== "object") + if (!$util.isObject(object.sourceBackupInfo)) throw TypeError(".google.bigtable.admin.v2.CopyBackupMetadata.sourceBackupInfo: object expected"); message.sourceBackupInfo = $root.google.bigtable.admin.v2.BackupInfo.fromObject(object.sourceBackupInfo, long + 1); } if (object.progress != null) { - if (typeof object.progress !== "object") + if (!$util.isObject(object.progress)) throw TypeError(".google.bigtable.admin.v2.CopyBackupMetadata.progress: object expected"); message.progress = $root.google.bigtable.admin.v2.OperationProgress.fromObject(object.progress, long + 1); } @@ -29208,21 +30158,25 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CopyBackupMetadata.toObject = function toObject(message, options) { + CopyBackupMetadata.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.name = ""; object.sourceBackupInfo = null; object.progress = null; } - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) object.name = message.name; - if (message.sourceBackupInfo != null && message.hasOwnProperty("sourceBackupInfo")) - object.sourceBackupInfo = $root.google.bigtable.admin.v2.BackupInfo.toObject(message.sourceBackupInfo, options); - if (message.progress != null && message.hasOwnProperty("progress")) - object.progress = $root.google.bigtable.admin.v2.OperationProgress.toObject(message.progress, options); + if (message.sourceBackupInfo != null && Object.hasOwnProperty.call(message, "sourceBackupInfo")) + object.sourceBackupInfo = $root.google.bigtable.admin.v2.BackupInfo.toObject(message.sourceBackupInfo, options, q + 1); + if (message.progress != null && Object.hasOwnProperty.call(message, "progress")) + object.progress = $root.google.bigtable.admin.v2.OperationProgress.toObject(message.progress, options, q + 1); return object; }; @@ -29326,15 +30280,19 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateAuthorizedViewRequest.encode = function encode(message, writer) { + CreateAuthorizedViewRequest.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); if (message.authorizedViewId != null && Object.hasOwnProperty.call(message, "authorizedViewId")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.authorizedViewId); if (message.authorizedView != null && Object.hasOwnProperty.call(message, "authorizedView")) - $root.google.bigtable.admin.v2.AuthorizedView.encode(message.authorizedView, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + $root.google.bigtable.admin.v2.AuthorizedView.encode(message.authorizedView, writer.uint32(/* id 3, wireType 2 =*/26).fork(), q + 1).ldelim(); return writer; }; @@ -29348,7 +30306,7 @@ * @returns {$protobuf.Writer} Writer */ CreateAuthorizedViewRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -29426,13 +30384,13 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.parent != null && message.hasOwnProperty("parent")) + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) if (!$util.isString(message.parent)) return "parent: string expected"; - if (message.authorizedViewId != null && message.hasOwnProperty("authorizedViewId")) + if (message.authorizedViewId != null && Object.hasOwnProperty.call(message, "authorizedViewId")) if (!$util.isString(message.authorizedViewId)) return "authorizedViewId: string expected"; - if (message.authorizedView != null && message.hasOwnProperty("authorizedView")) { + if (message.authorizedView != null && Object.hasOwnProperty.call(message, "authorizedView")) { var error = $root.google.bigtable.admin.v2.AuthorizedView.verify(message.authorizedView, long + 1); if (error) return "authorizedView." + error; @@ -29451,6 +30409,8 @@ CreateAuthorizedViewRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.google.bigtable.admin.v2.CreateAuthorizedViewRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.admin.v2.CreateAuthorizedViewRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -29461,7 +30421,7 @@ if (object.authorizedViewId != null) message.authorizedViewId = String(object.authorizedViewId); if (object.authorizedView != null) { - if (typeof object.authorizedView !== "object") + if (!$util.isObject(object.authorizedView)) throw TypeError(".google.bigtable.admin.v2.CreateAuthorizedViewRequest.authorizedView: object expected"); message.authorizedView = $root.google.bigtable.admin.v2.AuthorizedView.fromObject(object.authorizedView, long + 1); } @@ -29477,21 +30437,25 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CreateAuthorizedViewRequest.toObject = function toObject(message, options) { + CreateAuthorizedViewRequest.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.parent = ""; object.authorizedViewId = ""; object.authorizedView = null; } - if (message.parent != null && message.hasOwnProperty("parent")) + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) object.parent = message.parent; - if (message.authorizedViewId != null && message.hasOwnProperty("authorizedViewId")) + if (message.authorizedViewId != null && Object.hasOwnProperty.call(message, "authorizedViewId")) object.authorizedViewId = message.authorizedViewId; - if (message.authorizedView != null && message.hasOwnProperty("authorizedView")) - object.authorizedView = $root.google.bigtable.admin.v2.AuthorizedView.toObject(message.authorizedView, options); + if (message.authorizedView != null && Object.hasOwnProperty.call(message, "authorizedView")) + object.authorizedView = $root.google.bigtable.admin.v2.AuthorizedView.toObject(message.authorizedView, options, q + 1); return object; }; @@ -29595,15 +30559,19 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateAuthorizedViewMetadata.encode = function encode(message, writer) { + CreateAuthorizedViewMetadata.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.originalRequest != null && Object.hasOwnProperty.call(message, "originalRequest")) - $root.google.bigtable.admin.v2.CreateAuthorizedViewRequest.encode(message.originalRequest, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + $root.google.bigtable.admin.v2.CreateAuthorizedViewRequest.encode(message.originalRequest, writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); if (message.requestTime != null && Object.hasOwnProperty.call(message, "requestTime")) - $root.google.protobuf.Timestamp.encode(message.requestTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + $root.google.protobuf.Timestamp.encode(message.requestTime, writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); if (message.finishTime != null && Object.hasOwnProperty.call(message, "finishTime")) - $root.google.protobuf.Timestamp.encode(message.finishTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + $root.google.protobuf.Timestamp.encode(message.finishTime, writer.uint32(/* id 3, wireType 2 =*/26).fork(), q + 1).ldelim(); return writer; }; @@ -29617,7 +30585,7 @@ * @returns {$protobuf.Writer} Writer */ CreateAuthorizedViewMetadata.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -29695,17 +30663,17 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.originalRequest != null && message.hasOwnProperty("originalRequest")) { + if (message.originalRequest != null && Object.hasOwnProperty.call(message, "originalRequest")) { var error = $root.google.bigtable.admin.v2.CreateAuthorizedViewRequest.verify(message.originalRequest, long + 1); if (error) return "originalRequest." + error; } - if (message.requestTime != null && message.hasOwnProperty("requestTime")) { + if (message.requestTime != null && Object.hasOwnProperty.call(message, "requestTime")) { var error = $root.google.protobuf.Timestamp.verify(message.requestTime, long + 1); if (error) return "requestTime." + error; } - if (message.finishTime != null && message.hasOwnProperty("finishTime")) { + if (message.finishTime != null && Object.hasOwnProperty.call(message, "finishTime")) { var error = $root.google.protobuf.Timestamp.verify(message.finishTime, long + 1); if (error) return "finishTime." + error; @@ -29724,23 +30692,25 @@ CreateAuthorizedViewMetadata.fromObject = function fromObject(object, long) { if (object instanceof $root.google.bigtable.admin.v2.CreateAuthorizedViewMetadata) return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.admin.v2.CreateAuthorizedViewMetadata: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) throw Error("maximum nesting depth exceeded"); var message = new $root.google.bigtable.admin.v2.CreateAuthorizedViewMetadata(); if (object.originalRequest != null) { - if (typeof object.originalRequest !== "object") + if (!$util.isObject(object.originalRequest)) throw TypeError(".google.bigtable.admin.v2.CreateAuthorizedViewMetadata.originalRequest: object expected"); message.originalRequest = $root.google.bigtable.admin.v2.CreateAuthorizedViewRequest.fromObject(object.originalRequest, long + 1); } if (object.requestTime != null) { - if (typeof object.requestTime !== "object") + if (!$util.isObject(object.requestTime)) throw TypeError(".google.bigtable.admin.v2.CreateAuthorizedViewMetadata.requestTime: object expected"); message.requestTime = $root.google.protobuf.Timestamp.fromObject(object.requestTime, long + 1); } if (object.finishTime != null) { - if (typeof object.finishTime !== "object") + if (!$util.isObject(object.finishTime)) throw TypeError(".google.bigtable.admin.v2.CreateAuthorizedViewMetadata.finishTime: object expected"); message.finishTime = $root.google.protobuf.Timestamp.fromObject(object.finishTime, long + 1); } @@ -29756,21 +30726,25 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CreateAuthorizedViewMetadata.toObject = function toObject(message, options) { + CreateAuthorizedViewMetadata.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.originalRequest = null; object.requestTime = null; object.finishTime = null; } - if (message.originalRequest != null && message.hasOwnProperty("originalRequest")) - object.originalRequest = $root.google.bigtable.admin.v2.CreateAuthorizedViewRequest.toObject(message.originalRequest, options); - if (message.requestTime != null && message.hasOwnProperty("requestTime")) - object.requestTime = $root.google.protobuf.Timestamp.toObject(message.requestTime, options); - if (message.finishTime != null && message.hasOwnProperty("finishTime")) - object.finishTime = $root.google.protobuf.Timestamp.toObject(message.finishTime, options); + if (message.originalRequest != null && Object.hasOwnProperty.call(message, "originalRequest")) + object.originalRequest = $root.google.bigtable.admin.v2.CreateAuthorizedViewRequest.toObject(message.originalRequest, options, q + 1); + if (message.requestTime != null && Object.hasOwnProperty.call(message, "requestTime")) + object.requestTime = $root.google.protobuf.Timestamp.toObject(message.requestTime, options, q + 1); + if (message.finishTime != null && Object.hasOwnProperty.call(message, "finishTime")) + object.finishTime = $root.google.protobuf.Timestamp.toObject(message.finishTime, options, q + 1); return object; }; @@ -29883,9 +30857,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListAuthorizedViewsRequest.encode = function encode(message, writer) { + ListAuthorizedViewsRequest.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) @@ -29907,7 +30885,7 @@ * @returns {$protobuf.Writer} Writer */ ListAuthorizedViewsRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -29989,16 +30967,16 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.parent != null && message.hasOwnProperty("parent")) + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) if (!$util.isString(message.parent)) return "parent: string expected"; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) if (!$util.isInteger(message.pageSize)) return "pageSize: integer expected"; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) if (!$util.isString(message.pageToken)) return "pageToken: string expected"; - if (message.view != null && message.hasOwnProperty("view")) + if (message.view != null && Object.hasOwnProperty.call(message, "view")) switch (message.view) { default: return "view: enum value expected"; @@ -30022,6 +31000,8 @@ ListAuthorizedViewsRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.google.bigtable.admin.v2.ListAuthorizedViewsRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.admin.v2.ListAuthorizedViewsRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -30069,9 +31049,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListAuthorizedViewsRequest.toObject = function toObject(message, options) { + ListAuthorizedViewsRequest.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.parent = ""; @@ -30079,13 +31063,13 @@ object.pageToken = ""; object.view = options.enums === String ? "RESPONSE_VIEW_UNSPECIFIED" : 0; } - if (message.parent != null && message.hasOwnProperty("parent")) + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) object.parent = message.parent; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) object.pageSize = message.pageSize; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) object.pageToken = message.pageToken; - if (message.view != null && message.hasOwnProperty("view")) + if (message.view != null && Object.hasOwnProperty.call(message, "view")) object.view = options.enums === String ? $root.google.bigtable.admin.v2.AuthorizedView.ResponseView[message.view] === undefined ? message.view : $root.google.bigtable.admin.v2.AuthorizedView.ResponseView[message.view] : message.view; return object; }; @@ -30182,12 +31166,16 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListAuthorizedViewsResponse.encode = function encode(message, writer) { + ListAuthorizedViewsResponse.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.authorizedViews != null && message.authorizedViews.length) for (var i = 0; i < message.authorizedViews.length; ++i) - $root.google.bigtable.admin.v2.AuthorizedView.encode(message.authorizedViews[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + $root.google.bigtable.admin.v2.AuthorizedView.encode(message.authorizedViews[i], writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); return writer; @@ -30203,7 +31191,7 @@ * @returns {$protobuf.Writer} Writer */ ListAuthorizedViewsResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -30279,7 +31267,7 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.authorizedViews != null && message.hasOwnProperty("authorizedViews")) { + if (message.authorizedViews != null && Object.hasOwnProperty.call(message, "authorizedViews")) { if (!Array.isArray(message.authorizedViews)) return "authorizedViews: array expected"; for (var i = 0; i < message.authorizedViews.length; ++i) { @@ -30288,7 +31276,7 @@ return "authorizedViews." + error; } } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) if (!$util.isString(message.nextPageToken)) return "nextPageToken: string expected"; return null; @@ -30305,6 +31293,8 @@ ListAuthorizedViewsResponse.fromObject = function fromObject(object, long) { if (object instanceof $root.google.bigtable.admin.v2.ListAuthorizedViewsResponse) return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.admin.v2.ListAuthorizedViewsResponse: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -30315,7 +31305,7 @@ throw TypeError(".google.bigtable.admin.v2.ListAuthorizedViewsResponse.authorizedViews: array expected"); message.authorizedViews = []; for (var i = 0; i < object.authorizedViews.length; ++i) { - if (typeof object.authorizedViews[i] !== "object") + if (!$util.isObject(object.authorizedViews[i])) throw TypeError(".google.bigtable.admin.v2.ListAuthorizedViewsResponse.authorizedViews: object expected"); message.authorizedViews[i] = $root.google.bigtable.admin.v2.AuthorizedView.fromObject(object.authorizedViews[i], long + 1); } @@ -30334,9 +31324,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListAuthorizedViewsResponse.toObject = function toObject(message, options) { + ListAuthorizedViewsResponse.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.authorizedViews = []; @@ -30345,9 +31339,9 @@ if (message.authorizedViews && message.authorizedViews.length) { object.authorizedViews = []; for (var j = 0; j < message.authorizedViews.length; ++j) - object.authorizedViews[j] = $root.google.bigtable.admin.v2.AuthorizedView.toObject(message.authorizedViews[j], options); + object.authorizedViews[j] = $root.google.bigtable.admin.v2.AuthorizedView.toObject(message.authorizedViews[j], options, q + 1); } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) object.nextPageToken = message.nextPageToken; return object; }; @@ -30443,9 +31437,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetAuthorizedViewRequest.encode = function encode(message, writer) { + GetAuthorizedViewRequest.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); if (message.view != null && Object.hasOwnProperty.call(message, "view")) @@ -30463,7 +31461,7 @@ * @returns {$protobuf.Writer} Writer */ GetAuthorizedViewRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -30537,10 +31535,10 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) if (!$util.isString(message.name)) return "name: string expected"; - if (message.view != null && message.hasOwnProperty("view")) + if (message.view != null && Object.hasOwnProperty.call(message, "view")) switch (message.view) { default: return "view: enum value expected"; @@ -30564,6 +31562,8 @@ GetAuthorizedViewRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.google.bigtable.admin.v2.GetAuthorizedViewRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.admin.v2.GetAuthorizedViewRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -30607,17 +31607,21 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetAuthorizedViewRequest.toObject = function toObject(message, options) { + GetAuthorizedViewRequest.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.name = ""; object.view = options.enums === String ? "RESPONSE_VIEW_UNSPECIFIED" : 0; } - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) object.name = message.name; - if (message.view != null && message.hasOwnProperty("view")) + if (message.view != null && Object.hasOwnProperty.call(message, "view")) object.view = options.enums === String ? $root.google.bigtable.admin.v2.AuthorizedView.ResponseView[message.view] === undefined ? message.view : $root.google.bigtable.admin.v2.AuthorizedView.ResponseView[message.view] : message.view; return object; }; @@ -30722,13 +31726,17 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateAuthorizedViewRequest.encode = function encode(message, writer) { + UpdateAuthorizedViewRequest.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.authorizedView != null && Object.hasOwnProperty.call(message, "authorizedView")) - $root.google.bigtable.admin.v2.AuthorizedView.encode(message.authorizedView, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + $root.google.bigtable.admin.v2.AuthorizedView.encode(message.authorizedView, writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) - $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); if (message.ignoreWarnings != null && Object.hasOwnProperty.call(message, "ignoreWarnings")) writer.uint32(/* id 3, wireType 0 =*/24).bool(message.ignoreWarnings); return writer; @@ -30744,7 +31752,7 @@ * @returns {$protobuf.Writer} Writer */ UpdateAuthorizedViewRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -30822,17 +31830,17 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.authorizedView != null && message.hasOwnProperty("authorizedView")) { + if (message.authorizedView != null && Object.hasOwnProperty.call(message, "authorizedView")) { var error = $root.google.bigtable.admin.v2.AuthorizedView.verify(message.authorizedView, long + 1); if (error) return "authorizedView." + error; } - if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) { var error = $root.google.protobuf.FieldMask.verify(message.updateMask, long + 1); if (error) return "updateMask." + error; } - if (message.ignoreWarnings != null && message.hasOwnProperty("ignoreWarnings")) + if (message.ignoreWarnings != null && Object.hasOwnProperty.call(message, "ignoreWarnings")) if (typeof message.ignoreWarnings !== "boolean") return "ignoreWarnings: boolean expected"; return null; @@ -30849,18 +31857,20 @@ UpdateAuthorizedViewRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.google.bigtable.admin.v2.UpdateAuthorizedViewRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.admin.v2.UpdateAuthorizedViewRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) throw Error("maximum nesting depth exceeded"); var message = new $root.google.bigtable.admin.v2.UpdateAuthorizedViewRequest(); if (object.authorizedView != null) { - if (typeof object.authorizedView !== "object") + if (!$util.isObject(object.authorizedView)) throw TypeError(".google.bigtable.admin.v2.UpdateAuthorizedViewRequest.authorizedView: object expected"); message.authorizedView = $root.google.bigtable.admin.v2.AuthorizedView.fromObject(object.authorizedView, long + 1); } if (object.updateMask != null) { - if (typeof object.updateMask !== "object") + if (!$util.isObject(object.updateMask)) throw TypeError(".google.bigtable.admin.v2.UpdateAuthorizedViewRequest.updateMask: object expected"); message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask, long + 1); } @@ -30878,20 +31888,24 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - UpdateAuthorizedViewRequest.toObject = function toObject(message, options) { + UpdateAuthorizedViewRequest.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.authorizedView = null; object.updateMask = null; object.ignoreWarnings = false; } - if (message.authorizedView != null && message.hasOwnProperty("authorizedView")) - object.authorizedView = $root.google.bigtable.admin.v2.AuthorizedView.toObject(message.authorizedView, options); - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); - if (message.ignoreWarnings != null && message.hasOwnProperty("ignoreWarnings")) + if (message.authorizedView != null && Object.hasOwnProperty.call(message, "authorizedView")) + object.authorizedView = $root.google.bigtable.admin.v2.AuthorizedView.toObject(message.authorizedView, options, q + 1); + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options, q + 1); + if (message.ignoreWarnings != null && Object.hasOwnProperty.call(message, "ignoreWarnings")) object.ignoreWarnings = message.ignoreWarnings; return object; }; @@ -30996,15 +32010,19 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateAuthorizedViewMetadata.encode = function encode(message, writer) { + UpdateAuthorizedViewMetadata.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.originalRequest != null && Object.hasOwnProperty.call(message, "originalRequest")) - $root.google.bigtable.admin.v2.UpdateAuthorizedViewRequest.encode(message.originalRequest, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + $root.google.bigtable.admin.v2.UpdateAuthorizedViewRequest.encode(message.originalRequest, writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); if (message.requestTime != null && Object.hasOwnProperty.call(message, "requestTime")) - $root.google.protobuf.Timestamp.encode(message.requestTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + $root.google.protobuf.Timestamp.encode(message.requestTime, writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); if (message.finishTime != null && Object.hasOwnProperty.call(message, "finishTime")) - $root.google.protobuf.Timestamp.encode(message.finishTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + $root.google.protobuf.Timestamp.encode(message.finishTime, writer.uint32(/* id 3, wireType 2 =*/26).fork(), q + 1).ldelim(); return writer; }; @@ -31018,7 +32036,7 @@ * @returns {$protobuf.Writer} Writer */ UpdateAuthorizedViewMetadata.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -31096,17 +32114,17 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.originalRequest != null && message.hasOwnProperty("originalRequest")) { + if (message.originalRequest != null && Object.hasOwnProperty.call(message, "originalRequest")) { var error = $root.google.bigtable.admin.v2.UpdateAuthorizedViewRequest.verify(message.originalRequest, long + 1); if (error) return "originalRequest." + error; } - if (message.requestTime != null && message.hasOwnProperty("requestTime")) { + if (message.requestTime != null && Object.hasOwnProperty.call(message, "requestTime")) { var error = $root.google.protobuf.Timestamp.verify(message.requestTime, long + 1); if (error) return "requestTime." + error; } - if (message.finishTime != null && message.hasOwnProperty("finishTime")) { + if (message.finishTime != null && Object.hasOwnProperty.call(message, "finishTime")) { var error = $root.google.protobuf.Timestamp.verify(message.finishTime, long + 1); if (error) return "finishTime." + error; @@ -31125,23 +32143,25 @@ UpdateAuthorizedViewMetadata.fromObject = function fromObject(object, long) { if (object instanceof $root.google.bigtable.admin.v2.UpdateAuthorizedViewMetadata) return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.admin.v2.UpdateAuthorizedViewMetadata: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) throw Error("maximum nesting depth exceeded"); var message = new $root.google.bigtable.admin.v2.UpdateAuthorizedViewMetadata(); if (object.originalRequest != null) { - if (typeof object.originalRequest !== "object") + if (!$util.isObject(object.originalRequest)) throw TypeError(".google.bigtable.admin.v2.UpdateAuthorizedViewMetadata.originalRequest: object expected"); message.originalRequest = $root.google.bigtable.admin.v2.UpdateAuthorizedViewRequest.fromObject(object.originalRequest, long + 1); } if (object.requestTime != null) { - if (typeof object.requestTime !== "object") + if (!$util.isObject(object.requestTime)) throw TypeError(".google.bigtable.admin.v2.UpdateAuthorizedViewMetadata.requestTime: object expected"); message.requestTime = $root.google.protobuf.Timestamp.fromObject(object.requestTime, long + 1); } if (object.finishTime != null) { - if (typeof object.finishTime !== "object") + if (!$util.isObject(object.finishTime)) throw TypeError(".google.bigtable.admin.v2.UpdateAuthorizedViewMetadata.finishTime: object expected"); message.finishTime = $root.google.protobuf.Timestamp.fromObject(object.finishTime, long + 1); } @@ -31157,21 +32177,25 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - UpdateAuthorizedViewMetadata.toObject = function toObject(message, options) { + UpdateAuthorizedViewMetadata.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.originalRequest = null; object.requestTime = null; object.finishTime = null; } - if (message.originalRequest != null && message.hasOwnProperty("originalRequest")) - object.originalRequest = $root.google.bigtable.admin.v2.UpdateAuthorizedViewRequest.toObject(message.originalRequest, options); - if (message.requestTime != null && message.hasOwnProperty("requestTime")) - object.requestTime = $root.google.protobuf.Timestamp.toObject(message.requestTime, options); - if (message.finishTime != null && message.hasOwnProperty("finishTime")) - object.finishTime = $root.google.protobuf.Timestamp.toObject(message.finishTime, options); + if (message.originalRequest != null && Object.hasOwnProperty.call(message, "originalRequest")) + object.originalRequest = $root.google.bigtable.admin.v2.UpdateAuthorizedViewRequest.toObject(message.originalRequest, options, q + 1); + if (message.requestTime != null && Object.hasOwnProperty.call(message, "requestTime")) + object.requestTime = $root.google.protobuf.Timestamp.toObject(message.requestTime, options, q + 1); + if (message.finishTime != null && Object.hasOwnProperty.call(message, "finishTime")) + object.finishTime = $root.google.protobuf.Timestamp.toObject(message.finishTime, options, q + 1); return object; }; @@ -31266,9 +32290,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteAuthorizedViewRequest.encode = function encode(message, writer) { + DeleteAuthorizedViewRequest.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) @@ -31286,7 +32314,7 @@ * @returns {$protobuf.Writer} Writer */ DeleteAuthorizedViewRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -31360,10 +32388,10 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) if (!$util.isString(message.name)) return "name: string expected"; - if (message.etag != null && message.hasOwnProperty("etag")) + if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) if (!$util.isString(message.etag)) return "etag: string expected"; return null; @@ -31380,6 +32408,8 @@ DeleteAuthorizedViewRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.google.bigtable.admin.v2.DeleteAuthorizedViewRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.admin.v2.DeleteAuthorizedViewRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -31401,17 +32431,21 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DeleteAuthorizedViewRequest.toObject = function toObject(message, options) { + DeleteAuthorizedViewRequest.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.name = ""; object.etag = ""; } - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) object.name = message.name; - if (message.etag != null && message.hasOwnProperty("etag")) + if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) object.etag = message.etag; return object; }; @@ -31516,15 +32550,19 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateSchemaBundleRequest.encode = function encode(message, writer) { + CreateSchemaBundleRequest.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); if (message.schemaBundleId != null && Object.hasOwnProperty.call(message, "schemaBundleId")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.schemaBundleId); if (message.schemaBundle != null && Object.hasOwnProperty.call(message, "schemaBundle")) - $root.google.bigtable.admin.v2.SchemaBundle.encode(message.schemaBundle, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + $root.google.bigtable.admin.v2.SchemaBundle.encode(message.schemaBundle, writer.uint32(/* id 3, wireType 2 =*/26).fork(), q + 1).ldelim(); return writer; }; @@ -31538,7 +32576,7 @@ * @returns {$protobuf.Writer} Writer */ CreateSchemaBundleRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -31616,13 +32654,13 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.parent != null && message.hasOwnProperty("parent")) + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) if (!$util.isString(message.parent)) return "parent: string expected"; - if (message.schemaBundleId != null && message.hasOwnProperty("schemaBundleId")) + if (message.schemaBundleId != null && Object.hasOwnProperty.call(message, "schemaBundleId")) if (!$util.isString(message.schemaBundleId)) return "schemaBundleId: string expected"; - if (message.schemaBundle != null && message.hasOwnProperty("schemaBundle")) { + if (message.schemaBundle != null && Object.hasOwnProperty.call(message, "schemaBundle")) { var error = $root.google.bigtable.admin.v2.SchemaBundle.verify(message.schemaBundle, long + 1); if (error) return "schemaBundle." + error; @@ -31641,6 +32679,8 @@ CreateSchemaBundleRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.google.bigtable.admin.v2.CreateSchemaBundleRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.admin.v2.CreateSchemaBundleRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -31651,7 +32691,7 @@ if (object.schemaBundleId != null) message.schemaBundleId = String(object.schemaBundleId); if (object.schemaBundle != null) { - if (typeof object.schemaBundle !== "object") + if (!$util.isObject(object.schemaBundle)) throw TypeError(".google.bigtable.admin.v2.CreateSchemaBundleRequest.schemaBundle: object expected"); message.schemaBundle = $root.google.bigtable.admin.v2.SchemaBundle.fromObject(object.schemaBundle, long + 1); } @@ -31667,21 +32707,25 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CreateSchemaBundleRequest.toObject = function toObject(message, options) { + CreateSchemaBundleRequest.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.parent = ""; object.schemaBundleId = ""; object.schemaBundle = null; } - if (message.parent != null && message.hasOwnProperty("parent")) + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) object.parent = message.parent; - if (message.schemaBundleId != null && message.hasOwnProperty("schemaBundleId")) + if (message.schemaBundleId != null && Object.hasOwnProperty.call(message, "schemaBundleId")) object.schemaBundleId = message.schemaBundleId; - if (message.schemaBundle != null && message.hasOwnProperty("schemaBundle")) - object.schemaBundle = $root.google.bigtable.admin.v2.SchemaBundle.toObject(message.schemaBundle, options); + if (message.schemaBundle != null && Object.hasOwnProperty.call(message, "schemaBundle")) + object.schemaBundle = $root.google.bigtable.admin.v2.SchemaBundle.toObject(message.schemaBundle, options, q + 1); return object; }; @@ -31785,15 +32829,19 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateSchemaBundleMetadata.encode = function encode(message, writer) { + CreateSchemaBundleMetadata.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); if (message.startTime != null && Object.hasOwnProperty.call(message, "startTime")) - $root.google.protobuf.Timestamp.encode(message.startTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + $root.google.protobuf.Timestamp.encode(message.startTime, writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) - $root.google.protobuf.Timestamp.encode(message.endTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + $root.google.protobuf.Timestamp.encode(message.endTime, writer.uint32(/* id 3, wireType 2 =*/26).fork(), q + 1).ldelim(); return writer; }; @@ -31807,7 +32855,7 @@ * @returns {$protobuf.Writer} Writer */ CreateSchemaBundleMetadata.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -31885,15 +32933,15 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) if (!$util.isString(message.name)) return "name: string expected"; - if (message.startTime != null && message.hasOwnProperty("startTime")) { + if (message.startTime != null && Object.hasOwnProperty.call(message, "startTime")) { var error = $root.google.protobuf.Timestamp.verify(message.startTime, long + 1); if (error) return "startTime." + error; } - if (message.endTime != null && message.hasOwnProperty("endTime")) { + if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) { var error = $root.google.protobuf.Timestamp.verify(message.endTime, long + 1); if (error) return "endTime." + error; @@ -31912,6 +32960,8 @@ CreateSchemaBundleMetadata.fromObject = function fromObject(object, long) { if (object instanceof $root.google.bigtable.admin.v2.CreateSchemaBundleMetadata) return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.admin.v2.CreateSchemaBundleMetadata: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -31920,12 +32970,12 @@ if (object.name != null) message.name = String(object.name); if (object.startTime != null) { - if (typeof object.startTime !== "object") + if (!$util.isObject(object.startTime)) throw TypeError(".google.bigtable.admin.v2.CreateSchemaBundleMetadata.startTime: object expected"); message.startTime = $root.google.protobuf.Timestamp.fromObject(object.startTime, long + 1); } if (object.endTime != null) { - if (typeof object.endTime !== "object") + if (!$util.isObject(object.endTime)) throw TypeError(".google.bigtable.admin.v2.CreateSchemaBundleMetadata.endTime: object expected"); message.endTime = $root.google.protobuf.Timestamp.fromObject(object.endTime, long + 1); } @@ -31941,21 +32991,25 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CreateSchemaBundleMetadata.toObject = function toObject(message, options) { + CreateSchemaBundleMetadata.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.name = ""; object.startTime = null; object.endTime = null; } - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) object.name = message.name; - if (message.startTime != null && message.hasOwnProperty("startTime")) - object.startTime = $root.google.protobuf.Timestamp.toObject(message.startTime, options); - if (message.endTime != null && message.hasOwnProperty("endTime")) - object.endTime = $root.google.protobuf.Timestamp.toObject(message.endTime, options); + if (message.startTime != null && Object.hasOwnProperty.call(message, "startTime")) + object.startTime = $root.google.protobuf.Timestamp.toObject(message.startTime, options, q + 1); + if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) + object.endTime = $root.google.protobuf.Timestamp.toObject(message.endTime, options, q + 1); return object; }; @@ -32059,13 +33113,17 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateSchemaBundleRequest.encode = function encode(message, writer) { + UpdateSchemaBundleRequest.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.schemaBundle != null && Object.hasOwnProperty.call(message, "schemaBundle")) - $root.google.bigtable.admin.v2.SchemaBundle.encode(message.schemaBundle, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + $root.google.bigtable.admin.v2.SchemaBundle.encode(message.schemaBundle, writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) - $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); if (message.ignoreWarnings != null && Object.hasOwnProperty.call(message, "ignoreWarnings")) writer.uint32(/* id 3, wireType 0 =*/24).bool(message.ignoreWarnings); return writer; @@ -32081,7 +33139,7 @@ * @returns {$protobuf.Writer} Writer */ UpdateSchemaBundleRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -32159,17 +33217,17 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.schemaBundle != null && message.hasOwnProperty("schemaBundle")) { + if (message.schemaBundle != null && Object.hasOwnProperty.call(message, "schemaBundle")) { var error = $root.google.bigtable.admin.v2.SchemaBundle.verify(message.schemaBundle, long + 1); if (error) return "schemaBundle." + error; } - if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) { var error = $root.google.protobuf.FieldMask.verify(message.updateMask, long + 1); if (error) return "updateMask." + error; } - if (message.ignoreWarnings != null && message.hasOwnProperty("ignoreWarnings")) + if (message.ignoreWarnings != null && Object.hasOwnProperty.call(message, "ignoreWarnings")) if (typeof message.ignoreWarnings !== "boolean") return "ignoreWarnings: boolean expected"; return null; @@ -32186,18 +33244,20 @@ UpdateSchemaBundleRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.google.bigtable.admin.v2.UpdateSchemaBundleRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.admin.v2.UpdateSchemaBundleRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) throw Error("maximum nesting depth exceeded"); var message = new $root.google.bigtable.admin.v2.UpdateSchemaBundleRequest(); if (object.schemaBundle != null) { - if (typeof object.schemaBundle !== "object") + if (!$util.isObject(object.schemaBundle)) throw TypeError(".google.bigtable.admin.v2.UpdateSchemaBundleRequest.schemaBundle: object expected"); message.schemaBundle = $root.google.bigtable.admin.v2.SchemaBundle.fromObject(object.schemaBundle, long + 1); } if (object.updateMask != null) { - if (typeof object.updateMask !== "object") + if (!$util.isObject(object.updateMask)) throw TypeError(".google.bigtable.admin.v2.UpdateSchemaBundleRequest.updateMask: object expected"); message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask, long + 1); } @@ -32215,20 +33275,24 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - UpdateSchemaBundleRequest.toObject = function toObject(message, options) { + UpdateSchemaBundleRequest.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.schemaBundle = null; object.updateMask = null; object.ignoreWarnings = false; } - if (message.schemaBundle != null && message.hasOwnProperty("schemaBundle")) - object.schemaBundle = $root.google.bigtable.admin.v2.SchemaBundle.toObject(message.schemaBundle, options); - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); - if (message.ignoreWarnings != null && message.hasOwnProperty("ignoreWarnings")) + if (message.schemaBundle != null && Object.hasOwnProperty.call(message, "schemaBundle")) + object.schemaBundle = $root.google.bigtable.admin.v2.SchemaBundle.toObject(message.schemaBundle, options, q + 1); + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options, q + 1); + if (message.ignoreWarnings != null && Object.hasOwnProperty.call(message, "ignoreWarnings")) object.ignoreWarnings = message.ignoreWarnings; return object; }; @@ -32333,15 +33397,19 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateSchemaBundleMetadata.encode = function encode(message, writer) { + UpdateSchemaBundleMetadata.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); if (message.startTime != null && Object.hasOwnProperty.call(message, "startTime")) - $root.google.protobuf.Timestamp.encode(message.startTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + $root.google.protobuf.Timestamp.encode(message.startTime, writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) - $root.google.protobuf.Timestamp.encode(message.endTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + $root.google.protobuf.Timestamp.encode(message.endTime, writer.uint32(/* id 3, wireType 2 =*/26).fork(), q + 1).ldelim(); return writer; }; @@ -32355,7 +33423,7 @@ * @returns {$protobuf.Writer} Writer */ UpdateSchemaBundleMetadata.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -32433,15 +33501,15 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) if (!$util.isString(message.name)) return "name: string expected"; - if (message.startTime != null && message.hasOwnProperty("startTime")) { + if (message.startTime != null && Object.hasOwnProperty.call(message, "startTime")) { var error = $root.google.protobuf.Timestamp.verify(message.startTime, long + 1); if (error) return "startTime." + error; } - if (message.endTime != null && message.hasOwnProperty("endTime")) { + if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) { var error = $root.google.protobuf.Timestamp.verify(message.endTime, long + 1); if (error) return "endTime." + error; @@ -32460,6 +33528,8 @@ UpdateSchemaBundleMetadata.fromObject = function fromObject(object, long) { if (object instanceof $root.google.bigtable.admin.v2.UpdateSchemaBundleMetadata) return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.admin.v2.UpdateSchemaBundleMetadata: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -32468,12 +33538,12 @@ if (object.name != null) message.name = String(object.name); if (object.startTime != null) { - if (typeof object.startTime !== "object") + if (!$util.isObject(object.startTime)) throw TypeError(".google.bigtable.admin.v2.UpdateSchemaBundleMetadata.startTime: object expected"); message.startTime = $root.google.protobuf.Timestamp.fromObject(object.startTime, long + 1); } if (object.endTime != null) { - if (typeof object.endTime !== "object") + if (!$util.isObject(object.endTime)) throw TypeError(".google.bigtable.admin.v2.UpdateSchemaBundleMetadata.endTime: object expected"); message.endTime = $root.google.protobuf.Timestamp.fromObject(object.endTime, long + 1); } @@ -32489,21 +33559,25 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - UpdateSchemaBundleMetadata.toObject = function toObject(message, options) { + UpdateSchemaBundleMetadata.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.name = ""; object.startTime = null; object.endTime = null; } - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) object.name = message.name; - if (message.startTime != null && message.hasOwnProperty("startTime")) - object.startTime = $root.google.protobuf.Timestamp.toObject(message.startTime, options); - if (message.endTime != null && message.hasOwnProperty("endTime")) - object.endTime = $root.google.protobuf.Timestamp.toObject(message.endTime, options); + if (message.startTime != null && Object.hasOwnProperty.call(message, "startTime")) + object.startTime = $root.google.protobuf.Timestamp.toObject(message.startTime, options, q + 1); + if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) + object.endTime = $root.google.protobuf.Timestamp.toObject(message.endTime, options, q + 1); return object; }; @@ -32589,9 +33663,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetSchemaBundleRequest.encode = function encode(message, writer) { + GetSchemaBundleRequest.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); return writer; @@ -32607,7 +33685,7 @@ * @returns {$protobuf.Writer} Writer */ GetSchemaBundleRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -32677,7 +33755,7 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) if (!$util.isString(message.name)) return "name: string expected"; return null; @@ -32694,6 +33772,8 @@ GetSchemaBundleRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.google.bigtable.admin.v2.GetSchemaBundleRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.admin.v2.GetSchemaBundleRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -32713,13 +33793,17 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetSchemaBundleRequest.toObject = function toObject(message, options) { + GetSchemaBundleRequest.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) object.name = message.name; return object; }; @@ -32824,9 +33908,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListSchemaBundlesRequest.encode = function encode(message, writer) { + ListSchemaBundlesRequest.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) @@ -32846,7 +33934,7 @@ * @returns {$protobuf.Writer} Writer */ ListSchemaBundlesRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -32924,13 +34012,13 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.parent != null && message.hasOwnProperty("parent")) + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) if (!$util.isString(message.parent)) return "parent: string expected"; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) if (!$util.isInteger(message.pageSize)) return "pageSize: integer expected"; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) if (!$util.isString(message.pageToken)) return "pageToken: string expected"; return null; @@ -32947,6 +34035,8 @@ ListSchemaBundlesRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.google.bigtable.admin.v2.ListSchemaBundlesRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.admin.v2.ListSchemaBundlesRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -32970,20 +34060,24 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListSchemaBundlesRequest.toObject = function toObject(message, options) { + ListSchemaBundlesRequest.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.parent = ""; object.pageSize = 0; object.pageToken = ""; } - if (message.parent != null && message.hasOwnProperty("parent")) + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) object.parent = message.parent; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) object.pageSize = message.pageSize; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) object.pageToken = message.pageToken; return object; }; @@ -33080,12 +34174,16 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListSchemaBundlesResponse.encode = function encode(message, writer) { + ListSchemaBundlesResponse.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.schemaBundles != null && message.schemaBundles.length) for (var i = 0; i < message.schemaBundles.length; ++i) - $root.google.bigtable.admin.v2.SchemaBundle.encode(message.schemaBundles[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + $root.google.bigtable.admin.v2.SchemaBundle.encode(message.schemaBundles[i], writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); return writer; @@ -33101,7 +34199,7 @@ * @returns {$protobuf.Writer} Writer */ ListSchemaBundlesResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -33177,7 +34275,7 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.schemaBundles != null && message.hasOwnProperty("schemaBundles")) { + if (message.schemaBundles != null && Object.hasOwnProperty.call(message, "schemaBundles")) { if (!Array.isArray(message.schemaBundles)) return "schemaBundles: array expected"; for (var i = 0; i < message.schemaBundles.length; ++i) { @@ -33186,7 +34284,7 @@ return "schemaBundles." + error; } } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) if (!$util.isString(message.nextPageToken)) return "nextPageToken: string expected"; return null; @@ -33203,6 +34301,8 @@ ListSchemaBundlesResponse.fromObject = function fromObject(object, long) { if (object instanceof $root.google.bigtable.admin.v2.ListSchemaBundlesResponse) return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.admin.v2.ListSchemaBundlesResponse: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -33213,7 +34313,7 @@ throw TypeError(".google.bigtable.admin.v2.ListSchemaBundlesResponse.schemaBundles: array expected"); message.schemaBundles = []; for (var i = 0; i < object.schemaBundles.length; ++i) { - if (typeof object.schemaBundles[i] !== "object") + if (!$util.isObject(object.schemaBundles[i])) throw TypeError(".google.bigtable.admin.v2.ListSchemaBundlesResponse.schemaBundles: object expected"); message.schemaBundles[i] = $root.google.bigtable.admin.v2.SchemaBundle.fromObject(object.schemaBundles[i], long + 1); } @@ -33232,9 +34332,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListSchemaBundlesResponse.toObject = function toObject(message, options) { + ListSchemaBundlesResponse.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.schemaBundles = []; @@ -33243,9 +34347,9 @@ if (message.schemaBundles && message.schemaBundles.length) { object.schemaBundles = []; for (var j = 0; j < message.schemaBundles.length; ++j) - object.schemaBundles[j] = $root.google.bigtable.admin.v2.SchemaBundle.toObject(message.schemaBundles[j], options); + object.schemaBundles[j] = $root.google.bigtable.admin.v2.SchemaBundle.toObject(message.schemaBundles[j], options, q + 1); } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) object.nextPageToken = message.nextPageToken; return object; }; @@ -33341,9 +34445,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteSchemaBundleRequest.encode = function encode(message, writer) { + DeleteSchemaBundleRequest.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) @@ -33361,7 +34469,7 @@ * @returns {$protobuf.Writer} Writer */ DeleteSchemaBundleRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -33435,10 +34543,10 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) if (!$util.isString(message.name)) return "name: string expected"; - if (message.etag != null && message.hasOwnProperty("etag")) + if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) if (!$util.isString(message.etag)) return "etag: string expected"; return null; @@ -33455,6 +34563,8 @@ DeleteSchemaBundleRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.google.bigtable.admin.v2.DeleteSchemaBundleRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.admin.v2.DeleteSchemaBundleRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -33476,17 +34586,21 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DeleteSchemaBundleRequest.toObject = function toObject(message, options) { + DeleteSchemaBundleRequest.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.name = ""; object.etag = ""; } - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) object.name = message.name; - if (message.etag != null && message.hasOwnProperty("etag")) + if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) object.etag = message.etag; return object; }; @@ -33596,13 +34710,17 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - RestoreInfo.encode = function encode(message, writer) { + RestoreInfo.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.sourceType != null && Object.hasOwnProperty.call(message, "sourceType")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.sourceType); if (message.backupInfo != null && Object.hasOwnProperty.call(message, "backupInfo")) - $root.google.bigtable.admin.v2.BackupInfo.encode(message.backupInfo, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + $root.google.bigtable.admin.v2.BackupInfo.encode(message.backupInfo, writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); return writer; }; @@ -33616,7 +34734,7 @@ * @returns {$protobuf.Writer} Writer */ RestoreInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -33691,7 +34809,7 @@ if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; var properties = {}; - if (message.sourceType != null && message.hasOwnProperty("sourceType")) + if (message.sourceType != null && Object.hasOwnProperty.call(message, "sourceType")) switch (message.sourceType) { default: return "sourceType: enum value expected"; @@ -33699,7 +34817,7 @@ case 1: break; } - if (message.backupInfo != null && message.hasOwnProperty("backupInfo")) { + if (message.backupInfo != null && Object.hasOwnProperty.call(message, "backupInfo")) { properties.sourceInfo = 1; { var error = $root.google.bigtable.admin.v2.BackupInfo.verify(message.backupInfo, long + 1); @@ -33721,6 +34839,8 @@ RestoreInfo.fromObject = function fromObject(object, long) { if (object instanceof $root.google.bigtable.admin.v2.RestoreInfo) return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.admin.v2.RestoreInfo: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -33743,7 +34863,7 @@ break; } if (object.backupInfo != null) { - if (typeof object.backupInfo !== "object") + if (!$util.isObject(object.backupInfo)) throw TypeError(".google.bigtable.admin.v2.RestoreInfo.backupInfo: object expected"); message.backupInfo = $root.google.bigtable.admin.v2.BackupInfo.fromObject(object.backupInfo, long + 1); } @@ -33759,16 +34879,20 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - RestoreInfo.toObject = function toObject(message, options) { + RestoreInfo.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) object.sourceType = options.enums === String ? "RESTORE_SOURCE_TYPE_UNSPECIFIED" : 0; - if (message.sourceType != null && message.hasOwnProperty("sourceType")) + if (message.sourceType != null && Object.hasOwnProperty.call(message, "sourceType")) object.sourceType = options.enums === String ? $root.google.bigtable.admin.v2.RestoreSourceType[message.sourceType] === undefined ? message.sourceType : $root.google.bigtable.admin.v2.RestoreSourceType[message.sourceType] : message.sourceType; - if (message.backupInfo != null && message.hasOwnProperty("backupInfo")) { - object.backupInfo = $root.google.bigtable.admin.v2.BackupInfo.toObject(message.backupInfo, options); + if (message.backupInfo != null && Object.hasOwnProperty.call(message, "backupInfo")) { + object.backupInfo = $root.google.bigtable.admin.v2.BackupInfo.toObject(message.backupInfo, options, q + 1); if (options.oneofs) object.sourceInfo = "backupInfo"; } @@ -33857,11 +34981,15 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ChangeStreamConfig.encode = function encode(message, writer) { + ChangeStreamConfig.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.retentionPeriod != null && Object.hasOwnProperty.call(message, "retentionPeriod")) - $root.google.protobuf.Duration.encode(message.retentionPeriod, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + $root.google.protobuf.Duration.encode(message.retentionPeriod, writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); return writer; }; @@ -33875,7 +35003,7 @@ * @returns {$protobuf.Writer} Writer */ ChangeStreamConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -33945,7 +35073,7 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.retentionPeriod != null && message.hasOwnProperty("retentionPeriod")) { + if (message.retentionPeriod != null && Object.hasOwnProperty.call(message, "retentionPeriod")) { var error = $root.google.protobuf.Duration.verify(message.retentionPeriod, long + 1); if (error) return "retentionPeriod." + error; @@ -33964,13 +35092,15 @@ ChangeStreamConfig.fromObject = function fromObject(object, long) { if (object instanceof $root.google.bigtable.admin.v2.ChangeStreamConfig) return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.admin.v2.ChangeStreamConfig: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) throw Error("maximum nesting depth exceeded"); var message = new $root.google.bigtable.admin.v2.ChangeStreamConfig(); if (object.retentionPeriod != null) { - if (typeof object.retentionPeriod !== "object") + if (!$util.isObject(object.retentionPeriod)) throw TypeError(".google.bigtable.admin.v2.ChangeStreamConfig.retentionPeriod: object expected"); message.retentionPeriod = $root.google.protobuf.Duration.fromObject(object.retentionPeriod, long + 1); } @@ -33986,14 +35116,18 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ChangeStreamConfig.toObject = function toObject(message, options) { + ChangeStreamConfig.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) object.retentionPeriod = null; - if (message.retentionPeriod != null && message.hasOwnProperty("retentionPeriod")) - object.retentionPeriod = $root.google.protobuf.Duration.toObject(message.retentionPeriod, options); + if (message.retentionPeriod != null && Object.hasOwnProperty.call(message, "retentionPeriod")) + object.retentionPeriod = $root.google.protobuf.Duration.toObject(message.retentionPeriod, options, q + 1); return object; }; @@ -34167,33 +35301,37 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Table.encode = function encode(message, writer) { + Table.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); if (message.clusterStates != null && Object.hasOwnProperty.call(message, "clusterStates")) for (var keys = Object.keys(message.clusterStates), i = 0; i < keys.length; ++i) { writer.uint32(/* id 2, wireType 2 =*/18).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); - $root.google.bigtable.admin.v2.Table.ClusterState.encode(message.clusterStates[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); + $root.google.bigtable.admin.v2.Table.ClusterState.encode(message.clusterStates[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim().ldelim(); } if (message.columnFamilies != null && Object.hasOwnProperty.call(message, "columnFamilies")) for (var keys = Object.keys(message.columnFamilies), i = 0; i < keys.length; ++i) { writer.uint32(/* id 3, wireType 2 =*/26).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); - $root.google.bigtable.admin.v2.ColumnFamily.encode(message.columnFamilies[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); + $root.google.bigtable.admin.v2.ColumnFamily.encode(message.columnFamilies[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim().ldelim(); } if (message.granularity != null && Object.hasOwnProperty.call(message, "granularity")) writer.uint32(/* id 4, wireType 0 =*/32).int32(message.granularity); if (message.restoreInfo != null && Object.hasOwnProperty.call(message, "restoreInfo")) - $root.google.bigtable.admin.v2.RestoreInfo.encode(message.restoreInfo, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + $root.google.bigtable.admin.v2.RestoreInfo.encode(message.restoreInfo, writer.uint32(/* id 6, wireType 2 =*/50).fork(), q + 1).ldelim(); if (message.changeStreamConfig != null && Object.hasOwnProperty.call(message, "changeStreamConfig")) - $root.google.bigtable.admin.v2.ChangeStreamConfig.encode(message.changeStreamConfig, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + $root.google.bigtable.admin.v2.ChangeStreamConfig.encode(message.changeStreamConfig, writer.uint32(/* id 8, wireType 2 =*/66).fork(), q + 1).ldelim(); if (message.deletionProtection != null && Object.hasOwnProperty.call(message, "deletionProtection")) writer.uint32(/* id 9, wireType 0 =*/72).bool(message.deletionProtection); if (message.automatedBackupPolicy != null && Object.hasOwnProperty.call(message, "automatedBackupPolicy")) - $root.google.bigtable.admin.v2.Table.AutomatedBackupPolicy.encode(message.automatedBackupPolicy, writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim(); + $root.google.bigtable.admin.v2.Table.AutomatedBackupPolicy.encode(message.automatedBackupPolicy, writer.uint32(/* id 13, wireType 2 =*/106).fork(), q + 1).ldelim(); if (message.rowKeySchema != null && Object.hasOwnProperty.call(message, "rowKeySchema")) - $root.google.bigtable.admin.v2.Type.Struct.encode(message.rowKeySchema, writer.uint32(/* id 15, wireType 2 =*/122).fork()).ldelim(); + $root.google.bigtable.admin.v2.Type.Struct.encode(message.rowKeySchema, writer.uint32(/* id 15, wireType 2 =*/122).fork(), q + 1).ldelim(); return writer; }; @@ -34207,7 +35345,7 @@ * @returns {$protobuf.Writer} Writer */ Table.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -34352,10 +35490,10 @@ if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; var properties = {}; - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) if (!$util.isString(message.name)) return "name: string expected"; - if (message.clusterStates != null && message.hasOwnProperty("clusterStates")) { + if (message.clusterStates != null && Object.hasOwnProperty.call(message, "clusterStates")) { if (!$util.isObject(message.clusterStates)) return "clusterStates: object expected"; var key = Object.keys(message.clusterStates); @@ -34365,7 +35503,7 @@ return "clusterStates." + error; } } - if (message.columnFamilies != null && message.hasOwnProperty("columnFamilies")) { + if (message.columnFamilies != null && Object.hasOwnProperty.call(message, "columnFamilies")) { if (!$util.isObject(message.columnFamilies)) return "columnFamilies: object expected"; var key = Object.keys(message.columnFamilies); @@ -34375,7 +35513,7 @@ return "columnFamilies." + error; } } - if (message.granularity != null && message.hasOwnProperty("granularity")) + if (message.granularity != null && Object.hasOwnProperty.call(message, "granularity")) switch (message.granularity) { default: return "granularity: enum value expected"; @@ -34383,20 +35521,20 @@ case 1: break; } - if (message.restoreInfo != null && message.hasOwnProperty("restoreInfo")) { + if (message.restoreInfo != null && Object.hasOwnProperty.call(message, "restoreInfo")) { var error = $root.google.bigtable.admin.v2.RestoreInfo.verify(message.restoreInfo, long + 1); if (error) return "restoreInfo." + error; } - if (message.changeStreamConfig != null && message.hasOwnProperty("changeStreamConfig")) { + if (message.changeStreamConfig != null && Object.hasOwnProperty.call(message, "changeStreamConfig")) { var error = $root.google.bigtable.admin.v2.ChangeStreamConfig.verify(message.changeStreamConfig, long + 1); if (error) return "changeStreamConfig." + error; } - if (message.deletionProtection != null && message.hasOwnProperty("deletionProtection")) + if (message.deletionProtection != null && Object.hasOwnProperty.call(message, "deletionProtection")) if (typeof message.deletionProtection !== "boolean") return "deletionProtection: boolean expected"; - if (message.automatedBackupPolicy != null && message.hasOwnProperty("automatedBackupPolicy")) { + if (message.automatedBackupPolicy != null && Object.hasOwnProperty.call(message, "automatedBackupPolicy")) { properties.automatedBackupConfig = 1; { var error = $root.google.bigtable.admin.v2.Table.AutomatedBackupPolicy.verify(message.automatedBackupPolicy, long + 1); @@ -34404,7 +35542,7 @@ return "automatedBackupPolicy." + error; } } - if (message.rowKeySchema != null && message.hasOwnProperty("rowKeySchema")) { + if (message.rowKeySchema != null && Object.hasOwnProperty.call(message, "rowKeySchema")) { var error = $root.google.bigtable.admin.v2.Type.Struct.verify(message.rowKeySchema, long + 1); if (error) return "rowKeySchema." + error; @@ -34423,6 +35561,8 @@ Table.fromObject = function fromObject(object, long) { if (object instanceof $root.google.bigtable.admin.v2.Table) return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.admin.v2.Table: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -34431,25 +35571,25 @@ if (object.name != null) message.name = String(object.name); if (object.clusterStates) { - if (typeof object.clusterStates !== "object") + if (!$util.isObject(object.clusterStates)) throw TypeError(".google.bigtable.admin.v2.Table.clusterStates: object expected"); message.clusterStates = {}; for (var keys = Object.keys(object.clusterStates), i = 0; i < keys.length; ++i) { if (keys[i] === "__proto__") $util.makeProp(message.clusterStates, keys[i]); - if (typeof object.clusterStates[keys[i]] !== "object") + if (!$util.isObject(object.clusterStates[keys[i]])) throw TypeError(".google.bigtable.admin.v2.Table.clusterStates: object expected"); message.clusterStates[keys[i]] = $root.google.bigtable.admin.v2.Table.ClusterState.fromObject(object.clusterStates[keys[i]], long + 1); } } if (object.columnFamilies) { - if (typeof object.columnFamilies !== "object") + if (!$util.isObject(object.columnFamilies)) throw TypeError(".google.bigtable.admin.v2.Table.columnFamilies: object expected"); message.columnFamilies = {}; for (var keys = Object.keys(object.columnFamilies), i = 0; i < keys.length; ++i) { if (keys[i] === "__proto__") $util.makeProp(message.columnFamilies, keys[i]); - if (typeof object.columnFamilies[keys[i]] !== "object") + if (!$util.isObject(object.columnFamilies[keys[i]])) throw TypeError(".google.bigtable.admin.v2.Table.columnFamilies: object expected"); message.columnFamilies[keys[i]] = $root.google.bigtable.admin.v2.ColumnFamily.fromObject(object.columnFamilies[keys[i]], long + 1); } @@ -34471,24 +35611,24 @@ break; } if (object.restoreInfo != null) { - if (typeof object.restoreInfo !== "object") + if (!$util.isObject(object.restoreInfo)) throw TypeError(".google.bigtable.admin.v2.Table.restoreInfo: object expected"); message.restoreInfo = $root.google.bigtable.admin.v2.RestoreInfo.fromObject(object.restoreInfo, long + 1); } if (object.changeStreamConfig != null) { - if (typeof object.changeStreamConfig !== "object") + if (!$util.isObject(object.changeStreamConfig)) throw TypeError(".google.bigtable.admin.v2.Table.changeStreamConfig: object expected"); message.changeStreamConfig = $root.google.bigtable.admin.v2.ChangeStreamConfig.fromObject(object.changeStreamConfig, long + 1); } if (object.deletionProtection != null) message.deletionProtection = Boolean(object.deletionProtection); if (object.automatedBackupPolicy != null) { - if (typeof object.automatedBackupPolicy !== "object") + if (!$util.isObject(object.automatedBackupPolicy)) throw TypeError(".google.bigtable.admin.v2.Table.automatedBackupPolicy: object expected"); message.automatedBackupPolicy = $root.google.bigtable.admin.v2.Table.AutomatedBackupPolicy.fromObject(object.automatedBackupPolicy, long + 1); } if (object.rowKeySchema != null) { - if (typeof object.rowKeySchema !== "object") + if (!$util.isObject(object.rowKeySchema)) throw TypeError(".google.bigtable.admin.v2.Table.rowKeySchema: object expected"); message.rowKeySchema = $root.google.bigtable.admin.v2.Type.Struct.fromObject(object.rowKeySchema, long + 1); } @@ -34504,9 +35644,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Table.toObject = function toObject(message, options) { + Table.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.objects || options.defaults) { object.clusterStates = {}; @@ -34520,7 +35664,7 @@ object.deletionProtection = false; object.rowKeySchema = null; } - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) object.name = message.name; var keys2; if (message.clusterStates && (keys2 = Object.keys(message.clusterStates)).length) { @@ -34528,7 +35672,7 @@ for (var j = 0; j < keys2.length; ++j) { if (keys2[j] === "__proto__") $util.makeProp(object.clusterStates, keys2[j]); - object.clusterStates[keys2[j]] = $root.google.bigtable.admin.v2.Table.ClusterState.toObject(message.clusterStates[keys2[j]], options); + object.clusterStates[keys2[j]] = $root.google.bigtable.admin.v2.Table.ClusterState.toObject(message.clusterStates[keys2[j]], options, q + 1); } } if (message.columnFamilies && (keys2 = Object.keys(message.columnFamilies)).length) { @@ -34536,24 +35680,24 @@ for (var j = 0; j < keys2.length; ++j) { if (keys2[j] === "__proto__") $util.makeProp(object.columnFamilies, keys2[j]); - object.columnFamilies[keys2[j]] = $root.google.bigtable.admin.v2.ColumnFamily.toObject(message.columnFamilies[keys2[j]], options); + object.columnFamilies[keys2[j]] = $root.google.bigtable.admin.v2.ColumnFamily.toObject(message.columnFamilies[keys2[j]], options, q + 1); } } - if (message.granularity != null && message.hasOwnProperty("granularity")) + if (message.granularity != null && Object.hasOwnProperty.call(message, "granularity")) object.granularity = options.enums === String ? $root.google.bigtable.admin.v2.Table.TimestampGranularity[message.granularity] === undefined ? message.granularity : $root.google.bigtable.admin.v2.Table.TimestampGranularity[message.granularity] : message.granularity; - if (message.restoreInfo != null && message.hasOwnProperty("restoreInfo")) - object.restoreInfo = $root.google.bigtable.admin.v2.RestoreInfo.toObject(message.restoreInfo, options); - if (message.changeStreamConfig != null && message.hasOwnProperty("changeStreamConfig")) - object.changeStreamConfig = $root.google.bigtable.admin.v2.ChangeStreamConfig.toObject(message.changeStreamConfig, options); - if (message.deletionProtection != null && message.hasOwnProperty("deletionProtection")) + if (message.restoreInfo != null && Object.hasOwnProperty.call(message, "restoreInfo")) + object.restoreInfo = $root.google.bigtable.admin.v2.RestoreInfo.toObject(message.restoreInfo, options, q + 1); + if (message.changeStreamConfig != null && Object.hasOwnProperty.call(message, "changeStreamConfig")) + object.changeStreamConfig = $root.google.bigtable.admin.v2.ChangeStreamConfig.toObject(message.changeStreamConfig, options, q + 1); + if (message.deletionProtection != null && Object.hasOwnProperty.call(message, "deletionProtection")) object.deletionProtection = message.deletionProtection; - if (message.automatedBackupPolicy != null && message.hasOwnProperty("automatedBackupPolicy")) { - object.automatedBackupPolicy = $root.google.bigtable.admin.v2.Table.AutomatedBackupPolicy.toObject(message.automatedBackupPolicy, options); + if (message.automatedBackupPolicy != null && Object.hasOwnProperty.call(message, "automatedBackupPolicy")) { + object.automatedBackupPolicy = $root.google.bigtable.admin.v2.Table.AutomatedBackupPolicy.toObject(message.automatedBackupPolicy, options, q + 1); if (options.oneofs) object.automatedBackupConfig = "automatedBackupPolicy"; } - if (message.rowKeySchema != null && message.hasOwnProperty("rowKeySchema")) - object.rowKeySchema = $root.google.bigtable.admin.v2.Type.Struct.toObject(message.rowKeySchema, options); + if (message.rowKeySchema != null && Object.hasOwnProperty.call(message, "rowKeySchema")) + object.rowKeySchema = $root.google.bigtable.admin.v2.Type.Struct.toObject(message.rowKeySchema, options, q + 1); return object; }; @@ -34646,14 +35790,18 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ClusterState.encode = function encode(message, writer) { + ClusterState.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.replicationState != null && Object.hasOwnProperty.call(message, "replicationState")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.replicationState); if (message.encryptionInfo != null && message.encryptionInfo.length) for (var i = 0; i < message.encryptionInfo.length; ++i) - $root.google.bigtable.admin.v2.EncryptionInfo.encode(message.encryptionInfo[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + $root.google.bigtable.admin.v2.EncryptionInfo.encode(message.encryptionInfo[i], writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); return writer; }; @@ -34667,7 +35815,7 @@ * @returns {$protobuf.Writer} Writer */ ClusterState.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -34743,7 +35891,7 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.replicationState != null && message.hasOwnProperty("replicationState")) + if (message.replicationState != null && Object.hasOwnProperty.call(message, "replicationState")) switch (message.replicationState) { default: return "replicationState: enum value expected"; @@ -34755,7 +35903,7 @@ case 5: break; } - if (message.encryptionInfo != null && message.hasOwnProperty("encryptionInfo")) { + if (message.encryptionInfo != null && Object.hasOwnProperty.call(message, "encryptionInfo")) { if (!Array.isArray(message.encryptionInfo)) return "encryptionInfo: array expected"; for (var i = 0; i < message.encryptionInfo.length; ++i) { @@ -34778,6 +35926,8 @@ ClusterState.fromObject = function fromObject(object, long) { if (object instanceof $root.google.bigtable.admin.v2.Table.ClusterState) return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.admin.v2.Table.ClusterState: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -34820,7 +35970,7 @@ throw TypeError(".google.bigtable.admin.v2.Table.ClusterState.encryptionInfo: array expected"); message.encryptionInfo = []; for (var i = 0; i < object.encryptionInfo.length; ++i) { - if (typeof object.encryptionInfo[i] !== "object") + if (!$util.isObject(object.encryptionInfo[i])) throw TypeError(".google.bigtable.admin.v2.Table.ClusterState.encryptionInfo: object expected"); message.encryptionInfo[i] = $root.google.bigtable.admin.v2.EncryptionInfo.fromObject(object.encryptionInfo[i], long + 1); } @@ -34837,20 +35987,24 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ClusterState.toObject = function toObject(message, options) { + ClusterState.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.encryptionInfo = []; if (options.defaults) object.replicationState = options.enums === String ? "STATE_NOT_KNOWN" : 0; - if (message.replicationState != null && message.hasOwnProperty("replicationState")) + if (message.replicationState != null && Object.hasOwnProperty.call(message, "replicationState")) object.replicationState = options.enums === String ? $root.google.bigtable.admin.v2.Table.ClusterState.ReplicationState[message.replicationState] === undefined ? message.replicationState : $root.google.bigtable.admin.v2.Table.ClusterState.ReplicationState[message.replicationState] : message.replicationState; if (message.encryptionInfo && message.encryptionInfo.length) { object.encryptionInfo = []; for (var j = 0; j < message.encryptionInfo.length; ++j) - object.encryptionInfo[j] = $root.google.bigtable.admin.v2.EncryptionInfo.toObject(message.encryptionInfo[j], options); + object.encryptionInfo[j] = $root.google.bigtable.admin.v2.EncryptionInfo.toObject(message.encryptionInfo[j], options, q + 1); } return object; }; @@ -35004,13 +36158,17 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AutomatedBackupPolicy.encode = function encode(message, writer) { + AutomatedBackupPolicy.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.retentionPeriod != null && Object.hasOwnProperty.call(message, "retentionPeriod")) - $root.google.protobuf.Duration.encode(message.retentionPeriod, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + $root.google.protobuf.Duration.encode(message.retentionPeriod, writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); if (message.frequency != null && Object.hasOwnProperty.call(message, "frequency")) - $root.google.protobuf.Duration.encode(message.frequency, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + $root.google.protobuf.Duration.encode(message.frequency, writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); return writer; }; @@ -35024,7 +36182,7 @@ * @returns {$protobuf.Writer} Writer */ AutomatedBackupPolicy.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -35098,12 +36256,12 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.retentionPeriod != null && message.hasOwnProperty("retentionPeriod")) { + if (message.retentionPeriod != null && Object.hasOwnProperty.call(message, "retentionPeriod")) { var error = $root.google.protobuf.Duration.verify(message.retentionPeriod, long + 1); if (error) return "retentionPeriod." + error; } - if (message.frequency != null && message.hasOwnProperty("frequency")) { + if (message.frequency != null && Object.hasOwnProperty.call(message, "frequency")) { var error = $root.google.protobuf.Duration.verify(message.frequency, long + 1); if (error) return "frequency." + error; @@ -35122,18 +36280,20 @@ AutomatedBackupPolicy.fromObject = function fromObject(object, long) { if (object instanceof $root.google.bigtable.admin.v2.Table.AutomatedBackupPolicy) return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.admin.v2.Table.AutomatedBackupPolicy: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) throw Error("maximum nesting depth exceeded"); var message = new $root.google.bigtable.admin.v2.Table.AutomatedBackupPolicy(); if (object.retentionPeriod != null) { - if (typeof object.retentionPeriod !== "object") + if (!$util.isObject(object.retentionPeriod)) throw TypeError(".google.bigtable.admin.v2.Table.AutomatedBackupPolicy.retentionPeriod: object expected"); message.retentionPeriod = $root.google.protobuf.Duration.fromObject(object.retentionPeriod, long + 1); } if (object.frequency != null) { - if (typeof object.frequency !== "object") + if (!$util.isObject(object.frequency)) throw TypeError(".google.bigtable.admin.v2.Table.AutomatedBackupPolicy.frequency: object expected"); message.frequency = $root.google.protobuf.Duration.fromObject(object.frequency, long + 1); } @@ -35149,18 +36309,22 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - AutomatedBackupPolicy.toObject = function toObject(message, options) { + AutomatedBackupPolicy.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.retentionPeriod = null; object.frequency = null; } - if (message.retentionPeriod != null && message.hasOwnProperty("retentionPeriod")) - object.retentionPeriod = $root.google.protobuf.Duration.toObject(message.retentionPeriod, options); - if (message.frequency != null && message.hasOwnProperty("frequency")) - object.frequency = $root.google.protobuf.Duration.toObject(message.frequency, options); + if (message.retentionPeriod != null && Object.hasOwnProperty.call(message, "retentionPeriod")) + object.retentionPeriod = $root.google.protobuf.Duration.toObject(message.retentionPeriod, options, q + 1); + if (message.frequency != null && Object.hasOwnProperty.call(message, "frequency")) + object.frequency = $root.google.protobuf.Duration.toObject(message.frequency, options, q + 1); return object; }; @@ -35290,13 +36454,17 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AuthorizedView.encode = function encode(message, writer) { + AuthorizedView.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); if (message.subsetView != null && Object.hasOwnProperty.call(message, "subsetView")) - $root.google.bigtable.admin.v2.AuthorizedView.SubsetView.encode(message.subsetView, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + $root.google.bigtable.admin.v2.AuthorizedView.SubsetView.encode(message.subsetView, writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) writer.uint32(/* id 3, wireType 2 =*/26).string(message.etag); if (message.deletionProtection != null && Object.hasOwnProperty.call(message, "deletionProtection")) @@ -35314,7 +36482,7 @@ * @returns {$protobuf.Writer} Writer */ AuthorizedView.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -35397,10 +36565,10 @@ if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; var properties = {}; - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) if (!$util.isString(message.name)) return "name: string expected"; - if (message.subsetView != null && message.hasOwnProperty("subsetView")) { + if (message.subsetView != null && Object.hasOwnProperty.call(message, "subsetView")) { properties.authorizedView = 1; { var error = $root.google.bigtable.admin.v2.AuthorizedView.SubsetView.verify(message.subsetView, long + 1); @@ -35408,10 +36576,10 @@ return "subsetView." + error; } } - if (message.etag != null && message.hasOwnProperty("etag")) + if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) if (!$util.isString(message.etag)) return "etag: string expected"; - if (message.deletionProtection != null && message.hasOwnProperty("deletionProtection")) + if (message.deletionProtection != null && Object.hasOwnProperty.call(message, "deletionProtection")) if (typeof message.deletionProtection !== "boolean") return "deletionProtection: boolean expected"; return null; @@ -35428,6 +36596,8 @@ AuthorizedView.fromObject = function fromObject(object, long) { if (object instanceof $root.google.bigtable.admin.v2.AuthorizedView) return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.admin.v2.AuthorizedView: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -35436,7 +36606,7 @@ if (object.name != null) message.name = String(object.name); if (object.subsetView != null) { - if (typeof object.subsetView !== "object") + if (!$util.isObject(object.subsetView)) throw TypeError(".google.bigtable.admin.v2.AuthorizedView.subsetView: object expected"); message.subsetView = $root.google.bigtable.admin.v2.AuthorizedView.SubsetView.fromObject(object.subsetView, long + 1); } @@ -35456,25 +36626,29 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - AuthorizedView.toObject = function toObject(message, options) { + AuthorizedView.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.name = ""; object.etag = ""; object.deletionProtection = false; } - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) object.name = message.name; - if (message.subsetView != null && message.hasOwnProperty("subsetView")) { - object.subsetView = $root.google.bigtable.admin.v2.AuthorizedView.SubsetView.toObject(message.subsetView, options); + if (message.subsetView != null && Object.hasOwnProperty.call(message, "subsetView")) { + object.subsetView = $root.google.bigtable.admin.v2.AuthorizedView.SubsetView.toObject(message.subsetView, options, q + 1); if (options.oneofs) object.authorizedView = "subsetView"; } - if (message.etag != null && message.hasOwnProperty("etag")) + if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) object.etag = message.etag; - if (message.deletionProtection != null && message.hasOwnProperty("deletionProtection")) + if (message.deletionProtection != null && Object.hasOwnProperty.call(message, "deletionProtection")) object.deletionProtection = message.deletionProtection; return object; }; @@ -35569,9 +36743,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FamilySubsets.encode = function encode(message, writer) { + FamilySubsets.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.qualifiers != null && message.qualifiers.length) for (var i = 0; i < message.qualifiers.length; ++i) writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.qualifiers[i]); @@ -35591,7 +36769,7 @@ * @returns {$protobuf.Writer} Writer */ FamilySubsets.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -35669,14 +36847,14 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.qualifiers != null && message.hasOwnProperty("qualifiers")) { + if (message.qualifiers != null && Object.hasOwnProperty.call(message, "qualifiers")) { if (!Array.isArray(message.qualifiers)) return "qualifiers: array expected"; for (var i = 0; i < message.qualifiers.length; ++i) if (!(message.qualifiers[i] && typeof message.qualifiers[i].length === "number" || $util.isString(message.qualifiers[i]))) return "qualifiers: buffer[] expected"; } - if (message.qualifierPrefixes != null && message.hasOwnProperty("qualifierPrefixes")) { + if (message.qualifierPrefixes != null && Object.hasOwnProperty.call(message, "qualifierPrefixes")) { if (!Array.isArray(message.qualifierPrefixes)) return "qualifierPrefixes: array expected"; for (var i = 0; i < message.qualifierPrefixes.length; ++i) @@ -35697,6 +36875,8 @@ FamilySubsets.fromObject = function fromObject(object, long) { if (object instanceof $root.google.bigtable.admin.v2.AuthorizedView.FamilySubsets) return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.admin.v2.AuthorizedView.FamilySubsets: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -35734,9 +36914,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - FamilySubsets.toObject = function toObject(message, options) { + FamilySubsets.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) { object.qualifiers = []; @@ -35848,16 +37032,20 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SubsetView.encode = function encode(message, writer) { + SubsetView.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.rowPrefixes != null && message.rowPrefixes.length) for (var i = 0; i < message.rowPrefixes.length; ++i) writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.rowPrefixes[i]); if (message.familySubsets != null && Object.hasOwnProperty.call(message, "familySubsets")) for (var keys = Object.keys(message.familySubsets), i = 0; i < keys.length; ++i) { writer.uint32(/* id 2, wireType 2 =*/18).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); - $root.google.bigtable.admin.v2.AuthorizedView.FamilySubsets.encode(message.familySubsets[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); + $root.google.bigtable.admin.v2.AuthorizedView.FamilySubsets.encode(message.familySubsets[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim().ldelim(); } return writer; }; @@ -35872,7 +37060,7 @@ * @returns {$protobuf.Writer} Writer */ SubsetView.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -35969,14 +37157,14 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.rowPrefixes != null && message.hasOwnProperty("rowPrefixes")) { + if (message.rowPrefixes != null && Object.hasOwnProperty.call(message, "rowPrefixes")) { if (!Array.isArray(message.rowPrefixes)) return "rowPrefixes: array expected"; for (var i = 0; i < message.rowPrefixes.length; ++i) if (!(message.rowPrefixes[i] && typeof message.rowPrefixes[i].length === "number" || $util.isString(message.rowPrefixes[i]))) return "rowPrefixes: buffer[] expected"; } - if (message.familySubsets != null && message.hasOwnProperty("familySubsets")) { + if (message.familySubsets != null && Object.hasOwnProperty.call(message, "familySubsets")) { if (!$util.isObject(message.familySubsets)) return "familySubsets: object expected"; var key = Object.keys(message.familySubsets); @@ -36000,6 +37188,8 @@ SubsetView.fromObject = function fromObject(object, long) { if (object instanceof $root.google.bigtable.admin.v2.AuthorizedView.SubsetView) return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.admin.v2.AuthorizedView.SubsetView: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -36016,13 +37206,13 @@ message.rowPrefixes[i] = object.rowPrefixes[i]; } if (object.familySubsets) { - if (typeof object.familySubsets !== "object") + if (!$util.isObject(object.familySubsets)) throw TypeError(".google.bigtable.admin.v2.AuthorizedView.SubsetView.familySubsets: object expected"); message.familySubsets = {}; for (var keys = Object.keys(object.familySubsets), i = 0; i < keys.length; ++i) { if (keys[i] === "__proto__") $util.makeProp(message.familySubsets, keys[i]); - if (typeof object.familySubsets[keys[i]] !== "object") + if (!$util.isObject(object.familySubsets[keys[i]])) throw TypeError(".google.bigtable.admin.v2.AuthorizedView.SubsetView.familySubsets: object expected"); message.familySubsets[keys[i]] = $root.google.bigtable.admin.v2.AuthorizedView.FamilySubsets.fromObject(object.familySubsets[keys[i]], long + 1); } @@ -36039,9 +37229,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - SubsetView.toObject = function toObject(message, options) { + SubsetView.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.rowPrefixes = []; @@ -36058,7 +37252,7 @@ for (var j = 0; j < keys2.length; ++j) { if (keys2[j] === "__proto__") $util.makeProp(object.familySubsets, keys2[j]); - object.familySubsets[keys2[j]] = $root.google.bigtable.admin.v2.AuthorizedView.FamilySubsets.toObject(message.familySubsets[keys2[j]], options); + object.familySubsets[keys2[j]] = $root.google.bigtable.admin.v2.AuthorizedView.FamilySubsets.toObject(message.familySubsets[keys2[j]], options, q + 1); } } return object; @@ -36176,13 +37370,17 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ColumnFamily.encode = function encode(message, writer) { + ColumnFamily.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.gcRule != null && Object.hasOwnProperty.call(message, "gcRule")) - $root.google.bigtable.admin.v2.GcRule.encode(message.gcRule, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + $root.google.bigtable.admin.v2.GcRule.encode(message.gcRule, writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); if (message.valueType != null && Object.hasOwnProperty.call(message, "valueType")) - $root.google.bigtable.admin.v2.Type.encode(message.valueType, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + $root.google.bigtable.admin.v2.Type.encode(message.valueType, writer.uint32(/* id 3, wireType 2 =*/26).fork(), q + 1).ldelim(); return writer; }; @@ -36196,7 +37394,7 @@ * @returns {$protobuf.Writer} Writer */ ColumnFamily.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -36270,12 +37468,12 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.gcRule != null && message.hasOwnProperty("gcRule")) { + if (message.gcRule != null && Object.hasOwnProperty.call(message, "gcRule")) { var error = $root.google.bigtable.admin.v2.GcRule.verify(message.gcRule, long + 1); if (error) return "gcRule." + error; } - if (message.valueType != null && message.hasOwnProperty("valueType")) { + if (message.valueType != null && Object.hasOwnProperty.call(message, "valueType")) { var error = $root.google.bigtable.admin.v2.Type.verify(message.valueType, long + 1); if (error) return "valueType." + error; @@ -36294,18 +37492,20 @@ ColumnFamily.fromObject = function fromObject(object, long) { if (object instanceof $root.google.bigtable.admin.v2.ColumnFamily) return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.admin.v2.ColumnFamily: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) throw Error("maximum nesting depth exceeded"); var message = new $root.google.bigtable.admin.v2.ColumnFamily(); if (object.gcRule != null) { - if (typeof object.gcRule !== "object") + if (!$util.isObject(object.gcRule)) throw TypeError(".google.bigtable.admin.v2.ColumnFamily.gcRule: object expected"); message.gcRule = $root.google.bigtable.admin.v2.GcRule.fromObject(object.gcRule, long + 1); } if (object.valueType != null) { - if (typeof object.valueType !== "object") + if (!$util.isObject(object.valueType)) throw TypeError(".google.bigtable.admin.v2.ColumnFamily.valueType: object expected"); message.valueType = $root.google.bigtable.admin.v2.Type.fromObject(object.valueType, long + 1); } @@ -36321,18 +37521,22 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ColumnFamily.toObject = function toObject(message, options) { + ColumnFamily.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.gcRule = null; object.valueType = null; } - if (message.gcRule != null && message.hasOwnProperty("gcRule")) - object.gcRule = $root.google.bigtable.admin.v2.GcRule.toObject(message.gcRule, options); - if (message.valueType != null && message.hasOwnProperty("valueType")) - object.valueType = $root.google.bigtable.admin.v2.Type.toObject(message.valueType, options); + if (message.gcRule != null && Object.hasOwnProperty.call(message, "gcRule")) + object.gcRule = $root.google.bigtable.admin.v2.GcRule.toObject(message.gcRule, options, q + 1); + if (message.valueType != null && Object.hasOwnProperty.call(message, "valueType")) + object.valueType = $root.google.bigtable.admin.v2.Type.toObject(message.valueType, options, q + 1); return object; }; @@ -36459,17 +37663,21 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GcRule.encode = function encode(message, writer) { + GcRule.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.maxNumVersions != null && Object.hasOwnProperty.call(message, "maxNumVersions")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.maxNumVersions); if (message.maxAge != null && Object.hasOwnProperty.call(message, "maxAge")) - $root.google.protobuf.Duration.encode(message.maxAge, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + $root.google.protobuf.Duration.encode(message.maxAge, writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); if (message.intersection != null && Object.hasOwnProperty.call(message, "intersection")) - $root.google.bigtable.admin.v2.GcRule.Intersection.encode(message.intersection, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + $root.google.bigtable.admin.v2.GcRule.Intersection.encode(message.intersection, writer.uint32(/* id 3, wireType 2 =*/26).fork(), q + 1).ldelim(); if (message.union != null && Object.hasOwnProperty.call(message, "union")) - $root.google.bigtable.admin.v2.GcRule.Union.encode(message.union, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + $root.google.bigtable.admin.v2.GcRule.Union.encode(message.union, writer.uint32(/* id 4, wireType 2 =*/34).fork(), q + 1).ldelim(); return writer; }; @@ -36483,7 +37691,7 @@ * @returns {$protobuf.Writer} Writer */ GcRule.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -36566,12 +37774,12 @@ if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; var properties = {}; - if (message.maxNumVersions != null && message.hasOwnProperty("maxNumVersions")) { + if (message.maxNumVersions != null && Object.hasOwnProperty.call(message, "maxNumVersions")) { properties.rule = 1; if (!$util.isInteger(message.maxNumVersions)) return "maxNumVersions: integer expected"; } - if (message.maxAge != null && message.hasOwnProperty("maxAge")) { + if (message.maxAge != null && Object.hasOwnProperty.call(message, "maxAge")) { if (properties.rule === 1) return "rule: multiple values"; properties.rule = 1; @@ -36581,7 +37789,7 @@ return "maxAge." + error; } } - if (message.intersection != null && message.hasOwnProperty("intersection")) { + if (message.intersection != null && Object.hasOwnProperty.call(message, "intersection")) { if (properties.rule === 1) return "rule: multiple values"; properties.rule = 1; @@ -36591,7 +37799,7 @@ return "intersection." + error; } } - if (message.union != null && message.hasOwnProperty("union")) { + if (message.union != null && Object.hasOwnProperty.call(message, "union")) { if (properties.rule === 1) return "rule: multiple values"; properties.rule = 1; @@ -36615,6 +37823,8 @@ GcRule.fromObject = function fromObject(object, long) { if (object instanceof $root.google.bigtable.admin.v2.GcRule) return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.admin.v2.GcRule: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -36623,17 +37833,17 @@ if (object.maxNumVersions != null) message.maxNumVersions = object.maxNumVersions | 0; if (object.maxAge != null) { - if (typeof object.maxAge !== "object") + if (!$util.isObject(object.maxAge)) throw TypeError(".google.bigtable.admin.v2.GcRule.maxAge: object expected"); message.maxAge = $root.google.protobuf.Duration.fromObject(object.maxAge, long + 1); } if (object.intersection != null) { - if (typeof object.intersection !== "object") + if (!$util.isObject(object.intersection)) throw TypeError(".google.bigtable.admin.v2.GcRule.intersection: object expected"); message.intersection = $root.google.bigtable.admin.v2.GcRule.Intersection.fromObject(object.intersection, long + 1); } if (object.union != null) { - if (typeof object.union !== "object") + if (!$util.isObject(object.union)) throw TypeError(".google.bigtable.admin.v2.GcRule.union: object expected"); message.union = $root.google.bigtable.admin.v2.GcRule.Union.fromObject(object.union, long + 1); } @@ -36649,27 +37859,31 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GcRule.toObject = function toObject(message, options) { + GcRule.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; - if (message.maxNumVersions != null && message.hasOwnProperty("maxNumVersions")) { + if (message.maxNumVersions != null && Object.hasOwnProperty.call(message, "maxNumVersions")) { object.maxNumVersions = message.maxNumVersions; if (options.oneofs) object.rule = "maxNumVersions"; } - if (message.maxAge != null && message.hasOwnProperty("maxAge")) { - object.maxAge = $root.google.protobuf.Duration.toObject(message.maxAge, options); + if (message.maxAge != null && Object.hasOwnProperty.call(message, "maxAge")) { + object.maxAge = $root.google.protobuf.Duration.toObject(message.maxAge, options, q + 1); if (options.oneofs) object.rule = "maxAge"; } - if (message.intersection != null && message.hasOwnProperty("intersection")) { - object.intersection = $root.google.bigtable.admin.v2.GcRule.Intersection.toObject(message.intersection, options); + if (message.intersection != null && Object.hasOwnProperty.call(message, "intersection")) { + object.intersection = $root.google.bigtable.admin.v2.GcRule.Intersection.toObject(message.intersection, options, q + 1); if (options.oneofs) object.rule = "intersection"; } - if (message.union != null && message.hasOwnProperty("union")) { - object.union = $root.google.bigtable.admin.v2.GcRule.Union.toObject(message.union, options); + if (message.union != null && Object.hasOwnProperty.call(message, "union")) { + object.union = $root.google.bigtable.admin.v2.GcRule.Union.toObject(message.union, options, q + 1); if (options.oneofs) object.rule = "union"; } @@ -36756,12 +37970,16 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Intersection.encode = function encode(message, writer) { + Intersection.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.rules != null && message.rules.length) for (var i = 0; i < message.rules.length; ++i) - $root.google.bigtable.admin.v2.GcRule.encode(message.rules[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + $root.google.bigtable.admin.v2.GcRule.encode(message.rules[i], writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); return writer; }; @@ -36775,7 +37993,7 @@ * @returns {$protobuf.Writer} Writer */ Intersection.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -36847,7 +38065,7 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.rules != null && message.hasOwnProperty("rules")) { + if (message.rules != null && Object.hasOwnProperty.call(message, "rules")) { if (!Array.isArray(message.rules)) return "rules: array expected"; for (var i = 0; i < message.rules.length; ++i) { @@ -36870,6 +38088,8 @@ Intersection.fromObject = function fromObject(object, long) { if (object instanceof $root.google.bigtable.admin.v2.GcRule.Intersection) return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.admin.v2.GcRule.Intersection: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -36880,7 +38100,7 @@ throw TypeError(".google.bigtable.admin.v2.GcRule.Intersection.rules: array expected"); message.rules = []; for (var i = 0; i < object.rules.length; ++i) { - if (typeof object.rules[i] !== "object") + if (!$util.isObject(object.rules[i])) throw TypeError(".google.bigtable.admin.v2.GcRule.Intersection.rules: object expected"); message.rules[i] = $root.google.bigtable.admin.v2.GcRule.fromObject(object.rules[i], long + 1); } @@ -36897,16 +38117,20 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Intersection.toObject = function toObject(message, options) { + Intersection.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.rules = []; if (message.rules && message.rules.length) { object.rules = []; for (var j = 0; j < message.rules.length; ++j) - object.rules[j] = $root.google.bigtable.admin.v2.GcRule.toObject(message.rules[j], options); + object.rules[j] = $root.google.bigtable.admin.v2.GcRule.toObject(message.rules[j], options, q + 1); } return object; }; @@ -36994,12 +38218,16 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Union.encode = function encode(message, writer) { + Union.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.rules != null && message.rules.length) for (var i = 0; i < message.rules.length; ++i) - $root.google.bigtable.admin.v2.GcRule.encode(message.rules[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + $root.google.bigtable.admin.v2.GcRule.encode(message.rules[i], writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); return writer; }; @@ -37013,7 +38241,7 @@ * @returns {$protobuf.Writer} Writer */ Union.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -37085,7 +38313,7 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.rules != null && message.hasOwnProperty("rules")) { + if (message.rules != null && Object.hasOwnProperty.call(message, "rules")) { if (!Array.isArray(message.rules)) return "rules: array expected"; for (var i = 0; i < message.rules.length; ++i) { @@ -37108,6 +38336,8 @@ Union.fromObject = function fromObject(object, long) { if (object instanceof $root.google.bigtable.admin.v2.GcRule.Union) return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.admin.v2.GcRule.Union: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -37118,7 +38348,7 @@ throw TypeError(".google.bigtable.admin.v2.GcRule.Union.rules: array expected"); message.rules = []; for (var i = 0; i < object.rules.length; ++i) { - if (typeof object.rules[i] !== "object") + if (!$util.isObject(object.rules[i])) throw TypeError(".google.bigtable.admin.v2.GcRule.Union.rules: object expected"); message.rules[i] = $root.google.bigtable.admin.v2.GcRule.fromObject(object.rules[i], long + 1); } @@ -37135,16 +38365,20 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Union.toObject = function toObject(message, options) { + Union.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.rules = []; if (message.rules && message.rules.length) { object.rules = []; for (var j = 0; j < message.rules.length; ++j) - object.rules[j] = $root.google.bigtable.admin.v2.GcRule.toObject(message.rules[j], options); + object.rules[j] = $root.google.bigtable.admin.v2.GcRule.toObject(message.rules[j], options, q + 1); } return object; }; @@ -37252,15 +38486,19 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - EncryptionInfo.encode = function encode(message, writer) { + EncryptionInfo.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.kmsKeyVersion != null && Object.hasOwnProperty.call(message, "kmsKeyVersion")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.kmsKeyVersion); if (message.encryptionType != null && Object.hasOwnProperty.call(message, "encryptionType")) writer.uint32(/* id 3, wireType 0 =*/24).int32(message.encryptionType); if (message.encryptionStatus != null && Object.hasOwnProperty.call(message, "encryptionStatus")) - $root.google.rpc.Status.encode(message.encryptionStatus, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + $root.google.rpc.Status.encode(message.encryptionStatus, writer.uint32(/* id 4, wireType 2 =*/34).fork(), q + 1).ldelim(); return writer; }; @@ -37274,7 +38512,7 @@ * @returns {$protobuf.Writer} Writer */ EncryptionInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -37352,7 +38590,7 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.encryptionType != null && message.hasOwnProperty("encryptionType")) + if (message.encryptionType != null && Object.hasOwnProperty.call(message, "encryptionType")) switch (message.encryptionType) { default: return "encryptionType: enum value expected"; @@ -37361,12 +38599,12 @@ case 2: break; } - if (message.encryptionStatus != null && message.hasOwnProperty("encryptionStatus")) { + if (message.encryptionStatus != null && Object.hasOwnProperty.call(message, "encryptionStatus")) { var error = $root.google.rpc.Status.verify(message.encryptionStatus, long + 1); if (error) return "encryptionStatus." + error; } - if (message.kmsKeyVersion != null && message.hasOwnProperty("kmsKeyVersion")) + if (message.kmsKeyVersion != null && Object.hasOwnProperty.call(message, "kmsKeyVersion")) if (!$util.isString(message.kmsKeyVersion)) return "kmsKeyVersion: string expected"; return null; @@ -37383,6 +38621,8 @@ EncryptionInfo.fromObject = function fromObject(object, long) { if (object instanceof $root.google.bigtable.admin.v2.EncryptionInfo) return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.admin.v2.EncryptionInfo: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -37409,7 +38649,7 @@ break; } if (object.encryptionStatus != null) { - if (typeof object.encryptionStatus !== "object") + if (!$util.isObject(object.encryptionStatus)) throw TypeError(".google.bigtable.admin.v2.EncryptionInfo.encryptionStatus: object expected"); message.encryptionStatus = $root.google.rpc.Status.fromObject(object.encryptionStatus, long + 1); } @@ -37427,21 +38667,25 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - EncryptionInfo.toObject = function toObject(message, options) { + EncryptionInfo.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.kmsKeyVersion = ""; object.encryptionType = options.enums === String ? "ENCRYPTION_TYPE_UNSPECIFIED" : 0; object.encryptionStatus = null; } - if (message.kmsKeyVersion != null && message.hasOwnProperty("kmsKeyVersion")) + if (message.kmsKeyVersion != null && Object.hasOwnProperty.call(message, "kmsKeyVersion")) object.kmsKeyVersion = message.kmsKeyVersion; - if (message.encryptionType != null && message.hasOwnProperty("encryptionType")) + if (message.encryptionType != null && Object.hasOwnProperty.call(message, "encryptionType")) object.encryptionType = options.enums === String ? $root.google.bigtable.admin.v2.EncryptionInfo.EncryptionType[message.encryptionType] === undefined ? message.encryptionType : $root.google.bigtable.admin.v2.EncryptionInfo.EncryptionType[message.encryptionType] : message.encryptionType; - if (message.encryptionStatus != null && message.hasOwnProperty("encryptionStatus")) - object.encryptionStatus = $root.google.rpc.Status.toObject(message.encryptionStatus, options); + if (message.encryptionStatus != null && Object.hasOwnProperty.call(message, "encryptionStatus")) + object.encryptionStatus = $root.google.rpc.Status.toObject(message.encryptionStatus, options, q + 1); return object; }; @@ -37597,19 +38841,23 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Snapshot.encode = function encode(message, writer) { + Snapshot.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); if (message.sourceTable != null && Object.hasOwnProperty.call(message, "sourceTable")) - $root.google.bigtable.admin.v2.Table.encode(message.sourceTable, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + $root.google.bigtable.admin.v2.Table.encode(message.sourceTable, writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); if (message.dataSizeBytes != null && Object.hasOwnProperty.call(message, "dataSizeBytes")) writer.uint32(/* id 3, wireType 0 =*/24).int64(message.dataSizeBytes); if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) - $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 4, wireType 2 =*/34).fork(), q + 1).ldelim(); if (message.deleteTime != null && Object.hasOwnProperty.call(message, "deleteTime")) - $root.google.protobuf.Timestamp.encode(message.deleteTime, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + $root.google.protobuf.Timestamp.encode(message.deleteTime, writer.uint32(/* id 5, wireType 2 =*/42).fork(), q + 1).ldelim(); if (message.state != null && Object.hasOwnProperty.call(message, "state")) writer.uint32(/* id 6, wireType 0 =*/48).int32(message.state); if (message.description != null && Object.hasOwnProperty.call(message, "description")) @@ -37627,7 +38875,7 @@ * @returns {$protobuf.Writer} Writer */ Snapshot.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -37721,28 +38969,28 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) if (!$util.isString(message.name)) return "name: string expected"; - if (message.sourceTable != null && message.hasOwnProperty("sourceTable")) { + if (message.sourceTable != null && Object.hasOwnProperty.call(message, "sourceTable")) { var error = $root.google.bigtable.admin.v2.Table.verify(message.sourceTable, long + 1); if (error) return "sourceTable." + error; } - if (message.dataSizeBytes != null && message.hasOwnProperty("dataSizeBytes")) + if (message.dataSizeBytes != null && Object.hasOwnProperty.call(message, "dataSizeBytes")) if (!$util.isInteger(message.dataSizeBytes) && !(message.dataSizeBytes && $util.isInteger(message.dataSizeBytes.low) && $util.isInteger(message.dataSizeBytes.high))) return "dataSizeBytes: integer|Long expected"; - if (message.createTime != null && message.hasOwnProperty("createTime")) { + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) { var error = $root.google.protobuf.Timestamp.verify(message.createTime, long + 1); if (error) return "createTime." + error; } - if (message.deleteTime != null && message.hasOwnProperty("deleteTime")) { + if (message.deleteTime != null && Object.hasOwnProperty.call(message, "deleteTime")) { var error = $root.google.protobuf.Timestamp.verify(message.deleteTime, long + 1); if (error) return "deleteTime." + error; } - if (message.state != null && message.hasOwnProperty("state")) + if (message.state != null && Object.hasOwnProperty.call(message, "state")) switch (message.state) { default: return "state: enum value expected"; @@ -37751,7 +38999,7 @@ case 2: break; } - if (message.description != null && message.hasOwnProperty("description")) + if (message.description != null && Object.hasOwnProperty.call(message, "description")) if (!$util.isString(message.description)) return "description: string expected"; return null; @@ -37768,6 +39016,8 @@ Snapshot.fromObject = function fromObject(object, long) { if (object instanceof $root.google.bigtable.admin.v2.Snapshot) return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.admin.v2.Snapshot: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -37776,13 +39026,13 @@ if (object.name != null) message.name = String(object.name); if (object.sourceTable != null) { - if (typeof object.sourceTable !== "object") + if (!$util.isObject(object.sourceTable)) throw TypeError(".google.bigtable.admin.v2.Snapshot.sourceTable: object expected"); message.sourceTable = $root.google.bigtable.admin.v2.Table.fromObject(object.sourceTable, long + 1); } if (object.dataSizeBytes != null) if ($util.Long) - (message.dataSizeBytes = $util.Long.fromValue(object.dataSizeBytes)).unsigned = false; + message.dataSizeBytes = $util.Long.fromValue(object.dataSizeBytes, false); else if (typeof object.dataSizeBytes === "string") message.dataSizeBytes = parseInt(object.dataSizeBytes, 10); else if (typeof object.dataSizeBytes === "number") @@ -37790,12 +39040,12 @@ else if (typeof object.dataSizeBytes === "object") message.dataSizeBytes = new $util.LongBits(object.dataSizeBytes.low >>> 0, object.dataSizeBytes.high >>> 0).toNumber(); if (object.createTime != null) { - if (typeof object.createTime !== "object") + if (!$util.isObject(object.createTime)) throw TypeError(".google.bigtable.admin.v2.Snapshot.createTime: object expected"); message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime, long + 1); } if (object.deleteTime != null) { - if (typeof object.deleteTime !== "object") + if (!$util.isObject(object.deleteTime)) throw TypeError(".google.bigtable.admin.v2.Snapshot.deleteTime: object expected"); message.deleteTime = $root.google.protobuf.Timestamp.fromObject(object.deleteTime, long + 1); } @@ -37833,39 +39083,45 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Snapshot.toObject = function toObject(message, options) { + Snapshot.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.name = ""; object.sourceTable = null; if ($util.Long) { var long = new $util.Long(0, 0, false); - object.dataSizeBytes = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.dataSizeBytes = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : typeof BigInt !== "undefined" && options.longs === BigInt ? long.toBigInt() : long; } else - object.dataSizeBytes = options.longs === String ? "0" : 0; + object.dataSizeBytes = options.longs === String ? "0" : typeof BigInt !== "undefined" && options.longs === BigInt ? BigInt("0") : 0; object.createTime = null; object.deleteTime = null; object.state = options.enums === String ? "STATE_NOT_KNOWN" : 0; object.description = ""; } - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) object.name = message.name; - if (message.sourceTable != null && message.hasOwnProperty("sourceTable")) - object.sourceTable = $root.google.bigtable.admin.v2.Table.toObject(message.sourceTable, options); - if (message.dataSizeBytes != null && message.hasOwnProperty("dataSizeBytes")) - if (typeof message.dataSizeBytes === "number") + if (message.sourceTable != null && Object.hasOwnProperty.call(message, "sourceTable")) + object.sourceTable = $root.google.bigtable.admin.v2.Table.toObject(message.sourceTable, options, q + 1); + if (message.dataSizeBytes != null && Object.hasOwnProperty.call(message, "dataSizeBytes")) + if (typeof BigInt !== "undefined" && options.longs === BigInt) + object.dataSizeBytes = typeof message.dataSizeBytes === "number" ? BigInt(message.dataSizeBytes) : $util.Long.fromBits(message.dataSizeBytes.low >>> 0, message.dataSizeBytes.high >>> 0, false).toBigInt(); + else if (typeof message.dataSizeBytes === "number") object.dataSizeBytes = options.longs === String ? String(message.dataSizeBytes) : message.dataSizeBytes; else object.dataSizeBytes = options.longs === String ? $util.Long.prototype.toString.call(message.dataSizeBytes) : options.longs === Number ? new $util.LongBits(message.dataSizeBytes.low >>> 0, message.dataSizeBytes.high >>> 0).toNumber() : message.dataSizeBytes; - if (message.createTime != null && message.hasOwnProperty("createTime")) - object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); - if (message.deleteTime != null && message.hasOwnProperty("deleteTime")) - object.deleteTime = $root.google.protobuf.Timestamp.toObject(message.deleteTime, options); - if (message.state != null && message.hasOwnProperty("state")) + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options, q + 1); + if (message.deleteTime != null && Object.hasOwnProperty.call(message, "deleteTime")) + object.deleteTime = $root.google.protobuf.Timestamp.toObject(message.deleteTime, options, q + 1); + if (message.state != null && Object.hasOwnProperty.call(message, "state")) object.state = options.enums === String ? $root.google.bigtable.admin.v2.Snapshot.State[message.state] === undefined ? message.state : $root.google.bigtable.admin.v2.Snapshot.State[message.state] : message.state; - if (message.description != null && message.hasOwnProperty("description")) + if (message.description != null && Object.hasOwnProperty.call(message, "description")) object.description = message.description; return object; }; @@ -38058,31 +39314,35 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Backup.encode = function encode(message, writer) { + Backup.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); if (message.sourceTable != null && Object.hasOwnProperty.call(message, "sourceTable")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.sourceTable); if (message.expireTime != null && Object.hasOwnProperty.call(message, "expireTime")) - $root.google.protobuf.Timestamp.encode(message.expireTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + $root.google.protobuf.Timestamp.encode(message.expireTime, writer.uint32(/* id 3, wireType 2 =*/26).fork(), q + 1).ldelim(); if (message.startTime != null && Object.hasOwnProperty.call(message, "startTime")) - $root.google.protobuf.Timestamp.encode(message.startTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + $root.google.protobuf.Timestamp.encode(message.startTime, writer.uint32(/* id 4, wireType 2 =*/34).fork(), q + 1).ldelim(); if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) - $root.google.protobuf.Timestamp.encode(message.endTime, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + $root.google.protobuf.Timestamp.encode(message.endTime, writer.uint32(/* id 5, wireType 2 =*/42).fork(), q + 1).ldelim(); if (message.sizeBytes != null && Object.hasOwnProperty.call(message, "sizeBytes")) writer.uint32(/* id 6, wireType 0 =*/48).int64(message.sizeBytes); if (message.state != null && Object.hasOwnProperty.call(message, "state")) writer.uint32(/* id 7, wireType 0 =*/56).int32(message.state); if (message.encryptionInfo != null && Object.hasOwnProperty.call(message, "encryptionInfo")) - $root.google.bigtable.admin.v2.EncryptionInfo.encode(message.encryptionInfo, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + $root.google.bigtable.admin.v2.EncryptionInfo.encode(message.encryptionInfo, writer.uint32(/* id 9, wireType 2 =*/74).fork(), q + 1).ldelim(); if (message.sourceBackup != null && Object.hasOwnProperty.call(message, "sourceBackup")) writer.uint32(/* id 10, wireType 2 =*/82).string(message.sourceBackup); if (message.backupType != null && Object.hasOwnProperty.call(message, "backupType")) writer.uint32(/* id 11, wireType 0 =*/88).int32(message.backupType); if (message.hotToStandardTime != null && Object.hasOwnProperty.call(message, "hotToStandardTime")) - $root.google.protobuf.Timestamp.encode(message.hotToStandardTime, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); + $root.google.protobuf.Timestamp.encode(message.hotToStandardTime, writer.uint32(/* id 12, wireType 2 =*/98).fork(), q + 1).ldelim(); return writer; }; @@ -38096,7 +39356,7 @@ * @returns {$protobuf.Writer} Writer */ Backup.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -38206,34 +39466,34 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) if (!$util.isString(message.name)) return "name: string expected"; - if (message.sourceTable != null && message.hasOwnProperty("sourceTable")) + if (message.sourceTable != null && Object.hasOwnProperty.call(message, "sourceTable")) if (!$util.isString(message.sourceTable)) return "sourceTable: string expected"; - if (message.sourceBackup != null && message.hasOwnProperty("sourceBackup")) + if (message.sourceBackup != null && Object.hasOwnProperty.call(message, "sourceBackup")) if (!$util.isString(message.sourceBackup)) return "sourceBackup: string expected"; - if (message.expireTime != null && message.hasOwnProperty("expireTime")) { + if (message.expireTime != null && Object.hasOwnProperty.call(message, "expireTime")) { var error = $root.google.protobuf.Timestamp.verify(message.expireTime, long + 1); if (error) return "expireTime." + error; } - if (message.startTime != null && message.hasOwnProperty("startTime")) { + if (message.startTime != null && Object.hasOwnProperty.call(message, "startTime")) { var error = $root.google.protobuf.Timestamp.verify(message.startTime, long + 1); if (error) return "startTime." + error; } - if (message.endTime != null && message.hasOwnProperty("endTime")) { + if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) { var error = $root.google.protobuf.Timestamp.verify(message.endTime, long + 1); if (error) return "endTime." + error; } - if (message.sizeBytes != null && message.hasOwnProperty("sizeBytes")) + if (message.sizeBytes != null && Object.hasOwnProperty.call(message, "sizeBytes")) if (!$util.isInteger(message.sizeBytes) && !(message.sizeBytes && $util.isInteger(message.sizeBytes.low) && $util.isInteger(message.sizeBytes.high))) return "sizeBytes: integer|Long expected"; - if (message.state != null && message.hasOwnProperty("state")) + if (message.state != null && Object.hasOwnProperty.call(message, "state")) switch (message.state) { default: return "state: enum value expected"; @@ -38242,12 +39502,12 @@ case 2: break; } - if (message.encryptionInfo != null && message.hasOwnProperty("encryptionInfo")) { + if (message.encryptionInfo != null && Object.hasOwnProperty.call(message, "encryptionInfo")) { var error = $root.google.bigtable.admin.v2.EncryptionInfo.verify(message.encryptionInfo, long + 1); if (error) return "encryptionInfo." + error; } - if (message.backupType != null && message.hasOwnProperty("backupType")) + if (message.backupType != null && Object.hasOwnProperty.call(message, "backupType")) switch (message.backupType) { default: return "backupType: enum value expected"; @@ -38256,7 +39516,7 @@ case 2: break; } - if (message.hotToStandardTime != null && message.hasOwnProperty("hotToStandardTime")) { + if (message.hotToStandardTime != null && Object.hasOwnProperty.call(message, "hotToStandardTime")) { var error = $root.google.protobuf.Timestamp.verify(message.hotToStandardTime, long + 1); if (error) return "hotToStandardTime." + error; @@ -38275,6 +39535,8 @@ Backup.fromObject = function fromObject(object, long) { if (object instanceof $root.google.bigtable.admin.v2.Backup) return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.admin.v2.Backup: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -38287,23 +39549,23 @@ if (object.sourceBackup != null) message.sourceBackup = String(object.sourceBackup); if (object.expireTime != null) { - if (typeof object.expireTime !== "object") + if (!$util.isObject(object.expireTime)) throw TypeError(".google.bigtable.admin.v2.Backup.expireTime: object expected"); message.expireTime = $root.google.protobuf.Timestamp.fromObject(object.expireTime, long + 1); } if (object.startTime != null) { - if (typeof object.startTime !== "object") + if (!$util.isObject(object.startTime)) throw TypeError(".google.bigtable.admin.v2.Backup.startTime: object expected"); message.startTime = $root.google.protobuf.Timestamp.fromObject(object.startTime, long + 1); } if (object.endTime != null) { - if (typeof object.endTime !== "object") + if (!$util.isObject(object.endTime)) throw TypeError(".google.bigtable.admin.v2.Backup.endTime: object expected"); message.endTime = $root.google.protobuf.Timestamp.fromObject(object.endTime, long + 1); } if (object.sizeBytes != null) if ($util.Long) - (message.sizeBytes = $util.Long.fromValue(object.sizeBytes)).unsigned = false; + message.sizeBytes = $util.Long.fromValue(object.sizeBytes, false); else if (typeof object.sizeBytes === "string") message.sizeBytes = parseInt(object.sizeBytes, 10); else if (typeof object.sizeBytes === "number") @@ -38331,7 +39593,7 @@ break; } if (object.encryptionInfo != null) { - if (typeof object.encryptionInfo !== "object") + if (!$util.isObject(object.encryptionInfo)) throw TypeError(".google.bigtable.admin.v2.Backup.encryptionInfo: object expected"); message.encryptionInfo = $root.google.bigtable.admin.v2.EncryptionInfo.fromObject(object.encryptionInfo, long + 1); } @@ -38356,7 +39618,7 @@ break; } if (object.hotToStandardTime != null) { - if (typeof object.hotToStandardTime !== "object") + if (!$util.isObject(object.hotToStandardTime)) throw TypeError(".google.bigtable.admin.v2.Backup.hotToStandardTime: object expected"); message.hotToStandardTime = $root.google.protobuf.Timestamp.fromObject(object.hotToStandardTime, long + 1); } @@ -38372,9 +39634,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Backup.toObject = function toObject(message, options) { + Backup.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.name = ""; @@ -38384,40 +39650,42 @@ object.endTime = null; if ($util.Long) { var long = new $util.Long(0, 0, false); - object.sizeBytes = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.sizeBytes = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : typeof BigInt !== "undefined" && options.longs === BigInt ? long.toBigInt() : long; } else - object.sizeBytes = options.longs === String ? "0" : 0; + object.sizeBytes = options.longs === String ? "0" : typeof BigInt !== "undefined" && options.longs === BigInt ? BigInt("0") : 0; object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; object.encryptionInfo = null; object.sourceBackup = ""; object.backupType = options.enums === String ? "BACKUP_TYPE_UNSPECIFIED" : 0; object.hotToStandardTime = null; } - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) object.name = message.name; - if (message.sourceTable != null && message.hasOwnProperty("sourceTable")) + if (message.sourceTable != null && Object.hasOwnProperty.call(message, "sourceTable")) object.sourceTable = message.sourceTable; - if (message.expireTime != null && message.hasOwnProperty("expireTime")) - object.expireTime = $root.google.protobuf.Timestamp.toObject(message.expireTime, options); - if (message.startTime != null && message.hasOwnProperty("startTime")) - object.startTime = $root.google.protobuf.Timestamp.toObject(message.startTime, options); - if (message.endTime != null && message.hasOwnProperty("endTime")) - object.endTime = $root.google.protobuf.Timestamp.toObject(message.endTime, options); - if (message.sizeBytes != null && message.hasOwnProperty("sizeBytes")) - if (typeof message.sizeBytes === "number") + if (message.expireTime != null && Object.hasOwnProperty.call(message, "expireTime")) + object.expireTime = $root.google.protobuf.Timestamp.toObject(message.expireTime, options, q + 1); + if (message.startTime != null && Object.hasOwnProperty.call(message, "startTime")) + object.startTime = $root.google.protobuf.Timestamp.toObject(message.startTime, options, q + 1); + if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) + object.endTime = $root.google.protobuf.Timestamp.toObject(message.endTime, options, q + 1); + if (message.sizeBytes != null && Object.hasOwnProperty.call(message, "sizeBytes")) + if (typeof BigInt !== "undefined" && options.longs === BigInt) + object.sizeBytes = typeof message.sizeBytes === "number" ? BigInt(message.sizeBytes) : $util.Long.fromBits(message.sizeBytes.low >>> 0, message.sizeBytes.high >>> 0, false).toBigInt(); + else if (typeof message.sizeBytes === "number") object.sizeBytes = options.longs === String ? String(message.sizeBytes) : message.sizeBytes; else object.sizeBytes = options.longs === String ? $util.Long.prototype.toString.call(message.sizeBytes) : options.longs === Number ? new $util.LongBits(message.sizeBytes.low >>> 0, message.sizeBytes.high >>> 0).toNumber() : message.sizeBytes; - if (message.state != null && message.hasOwnProperty("state")) + if (message.state != null && Object.hasOwnProperty.call(message, "state")) object.state = options.enums === String ? $root.google.bigtable.admin.v2.Backup.State[message.state] === undefined ? message.state : $root.google.bigtable.admin.v2.Backup.State[message.state] : message.state; - if (message.encryptionInfo != null && message.hasOwnProperty("encryptionInfo")) - object.encryptionInfo = $root.google.bigtable.admin.v2.EncryptionInfo.toObject(message.encryptionInfo, options); - if (message.sourceBackup != null && message.hasOwnProperty("sourceBackup")) + if (message.encryptionInfo != null && Object.hasOwnProperty.call(message, "encryptionInfo")) + object.encryptionInfo = $root.google.bigtable.admin.v2.EncryptionInfo.toObject(message.encryptionInfo, options, q + 1); + if (message.sourceBackup != null && Object.hasOwnProperty.call(message, "sourceBackup")) object.sourceBackup = message.sourceBackup; - if (message.backupType != null && message.hasOwnProperty("backupType")) + if (message.backupType != null && Object.hasOwnProperty.call(message, "backupType")) object.backupType = options.enums === String ? $root.google.bigtable.admin.v2.Backup.BackupType[message.backupType] === undefined ? message.backupType : $root.google.bigtable.admin.v2.Backup.BackupType[message.backupType] : message.backupType; - if (message.hotToStandardTime != null && message.hasOwnProperty("hotToStandardTime")) - object.hotToStandardTime = $root.google.protobuf.Timestamp.toObject(message.hotToStandardTime, options); + if (message.hotToStandardTime != null && Object.hasOwnProperty.call(message, "hotToStandardTime")) + object.hotToStandardTime = $root.google.protobuf.Timestamp.toObject(message.hotToStandardTime, options, q + 1); return object; }; @@ -38571,15 +39839,19 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - BackupInfo.encode = function encode(message, writer) { + BackupInfo.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.backup != null && Object.hasOwnProperty.call(message, "backup")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.backup); if (message.startTime != null && Object.hasOwnProperty.call(message, "startTime")) - $root.google.protobuf.Timestamp.encode(message.startTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + $root.google.protobuf.Timestamp.encode(message.startTime, writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) - $root.google.protobuf.Timestamp.encode(message.endTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + $root.google.protobuf.Timestamp.encode(message.endTime, writer.uint32(/* id 3, wireType 2 =*/26).fork(), q + 1).ldelim(); if (message.sourceTable != null && Object.hasOwnProperty.call(message, "sourceTable")) writer.uint32(/* id 4, wireType 2 =*/34).string(message.sourceTable); if (message.sourceBackup != null && Object.hasOwnProperty.call(message, "sourceBackup")) @@ -38597,7 +39869,7 @@ * @returns {$protobuf.Writer} Writer */ BackupInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -38683,23 +39955,23 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.backup != null && message.hasOwnProperty("backup")) + if (message.backup != null && Object.hasOwnProperty.call(message, "backup")) if (!$util.isString(message.backup)) return "backup: string expected"; - if (message.startTime != null && message.hasOwnProperty("startTime")) { + if (message.startTime != null && Object.hasOwnProperty.call(message, "startTime")) { var error = $root.google.protobuf.Timestamp.verify(message.startTime, long + 1); if (error) return "startTime." + error; } - if (message.endTime != null && message.hasOwnProperty("endTime")) { + if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) { var error = $root.google.protobuf.Timestamp.verify(message.endTime, long + 1); if (error) return "endTime." + error; } - if (message.sourceTable != null && message.hasOwnProperty("sourceTable")) + if (message.sourceTable != null && Object.hasOwnProperty.call(message, "sourceTable")) if (!$util.isString(message.sourceTable)) return "sourceTable: string expected"; - if (message.sourceBackup != null && message.hasOwnProperty("sourceBackup")) + if (message.sourceBackup != null && Object.hasOwnProperty.call(message, "sourceBackup")) if (!$util.isString(message.sourceBackup)) return "sourceBackup: string expected"; return null; @@ -38716,6 +39988,8 @@ BackupInfo.fromObject = function fromObject(object, long) { if (object instanceof $root.google.bigtable.admin.v2.BackupInfo) return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.admin.v2.BackupInfo: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -38724,12 +39998,12 @@ if (object.backup != null) message.backup = String(object.backup); if (object.startTime != null) { - if (typeof object.startTime !== "object") + if (!$util.isObject(object.startTime)) throw TypeError(".google.bigtable.admin.v2.BackupInfo.startTime: object expected"); message.startTime = $root.google.protobuf.Timestamp.fromObject(object.startTime, long + 1); } if (object.endTime != null) { - if (typeof object.endTime !== "object") + if (!$util.isObject(object.endTime)) throw TypeError(".google.bigtable.admin.v2.BackupInfo.endTime: object expected"); message.endTime = $root.google.protobuf.Timestamp.fromObject(object.endTime, long + 1); } @@ -38749,9 +40023,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - BackupInfo.toObject = function toObject(message, options) { + BackupInfo.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.backup = ""; @@ -38760,15 +40038,15 @@ object.sourceTable = ""; object.sourceBackup = ""; } - if (message.backup != null && message.hasOwnProperty("backup")) + if (message.backup != null && Object.hasOwnProperty.call(message, "backup")) object.backup = message.backup; - if (message.startTime != null && message.hasOwnProperty("startTime")) - object.startTime = $root.google.protobuf.Timestamp.toObject(message.startTime, options); - if (message.endTime != null && message.hasOwnProperty("endTime")) - object.endTime = $root.google.protobuf.Timestamp.toObject(message.endTime, options); - if (message.sourceTable != null && message.hasOwnProperty("sourceTable")) + if (message.startTime != null && Object.hasOwnProperty.call(message, "startTime")) + object.startTime = $root.google.protobuf.Timestamp.toObject(message.startTime, options, q + 1); + if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) + object.endTime = $root.google.protobuf.Timestamp.toObject(message.endTime, options, q + 1); + if (message.sourceTable != null && Object.hasOwnProperty.call(message, "sourceTable")) object.sourceTable = message.sourceTable; - if (message.sourceBackup != null && message.hasOwnProperty("sourceBackup")) + if (message.sourceBackup != null && Object.hasOwnProperty.call(message, "sourceBackup")) object.sourceBackup = message.sourceBackup; return object; }; @@ -38869,9 +40147,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ProtoSchema.encode = function encode(message, writer) { + ProtoSchema.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.protoDescriptors != null && Object.hasOwnProperty.call(message, "protoDescriptors")) writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.protoDescriptors); return writer; @@ -38887,7 +40169,7 @@ * @returns {$protobuf.Writer} Writer */ ProtoSchema.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -38957,7 +40239,7 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.protoDescriptors != null && message.hasOwnProperty("protoDescriptors")) + if (message.protoDescriptors != null && Object.hasOwnProperty.call(message, "protoDescriptors")) if (!(message.protoDescriptors && typeof message.protoDescriptors.length === "number" || $util.isString(message.protoDescriptors))) return "protoDescriptors: buffer expected"; return null; @@ -38974,6 +40256,8 @@ ProtoSchema.fromObject = function fromObject(object, long) { if (object instanceof $root.google.bigtable.admin.v2.ProtoSchema) return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.admin.v2.ProtoSchema: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -38996,9 +40280,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ProtoSchema.toObject = function toObject(message, options) { + ProtoSchema.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) if (options.bytes === String) @@ -39008,7 +40296,7 @@ if (options.bytes !== Array) object.protoDescriptors = $util.newBuffer(object.protoDescriptors); } - if (message.protoDescriptors != null && message.hasOwnProperty("protoDescriptors")) + if (message.protoDescriptors != null && Object.hasOwnProperty.call(message, "protoDescriptors")) object.protoDescriptors = options.bytes === String ? $util.base64.encode(message.protoDescriptors, 0, message.protoDescriptors.length) : options.bytes === Array ? Array.prototype.slice.call(message.protoDescriptors) : message.protoDescriptors; return object; }; @@ -39127,13 +40415,17 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SchemaBundle.encode = function encode(message, writer) { + SchemaBundle.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); if (message.protoSchema != null && Object.hasOwnProperty.call(message, "protoSchema")) - $root.google.bigtable.admin.v2.ProtoSchema.encode(message.protoSchema, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + $root.google.bigtable.admin.v2.ProtoSchema.encode(message.protoSchema, writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) writer.uint32(/* id 3, wireType 2 =*/26).string(message.etag); return writer; @@ -39149,7 +40441,7 @@ * @returns {$protobuf.Writer} Writer */ SchemaBundle.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -39228,10 +40520,10 @@ if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; var properties = {}; - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) if (!$util.isString(message.name)) return "name: string expected"; - if (message.protoSchema != null && message.hasOwnProperty("protoSchema")) { + if (message.protoSchema != null && Object.hasOwnProperty.call(message, "protoSchema")) { properties.type = 1; { var error = $root.google.bigtable.admin.v2.ProtoSchema.verify(message.protoSchema, long + 1); @@ -39239,7 +40531,7 @@ return "protoSchema." + error; } } - if (message.etag != null && message.hasOwnProperty("etag")) + if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) if (!$util.isString(message.etag)) return "etag: string expected"; return null; @@ -39256,6 +40548,8 @@ SchemaBundle.fromObject = function fromObject(object, long) { if (object instanceof $root.google.bigtable.admin.v2.SchemaBundle) return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.admin.v2.SchemaBundle: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -39264,7 +40558,7 @@ if (object.name != null) message.name = String(object.name); if (object.protoSchema != null) { - if (typeof object.protoSchema !== "object") + if (!$util.isObject(object.protoSchema)) throw TypeError(".google.bigtable.admin.v2.SchemaBundle.protoSchema: object expected"); message.protoSchema = $root.google.bigtable.admin.v2.ProtoSchema.fromObject(object.protoSchema, long + 1); } @@ -39282,22 +40576,26 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - SchemaBundle.toObject = function toObject(message, options) { + SchemaBundle.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.name = ""; object.etag = ""; } - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) object.name = message.name; - if (message.protoSchema != null && message.hasOwnProperty("protoSchema")) { - object.protoSchema = $root.google.bigtable.admin.v2.ProtoSchema.toObject(message.protoSchema, options); + if (message.protoSchema != null && Object.hasOwnProperty.call(message, "protoSchema")) { + object.protoSchema = $root.google.bigtable.admin.v2.ProtoSchema.toObject(message.protoSchema, options, q + 1); if (options.oneofs) object.type = "protoSchema"; } - if (message.etag != null && message.hasOwnProperty("etag")) + if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) object.etag = message.etag; return object; }; @@ -39515,37 +40813,41 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Type.encode = function encode(message, writer) { + Type.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.bytesType != null && Object.hasOwnProperty.call(message, "bytesType")) - $root.google.bigtable.admin.v2.Type.Bytes.encode(message.bytesType, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + $root.google.bigtable.admin.v2.Type.Bytes.encode(message.bytesType, writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); if (message.stringType != null && Object.hasOwnProperty.call(message, "stringType")) - $root.google.bigtable.admin.v2.Type.String.encode(message.stringType, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + $root.google.bigtable.admin.v2.Type.String.encode(message.stringType, writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); if (message.arrayType != null && Object.hasOwnProperty.call(message, "arrayType")) - $root.google.bigtable.admin.v2.Type.Array.encode(message.arrayType, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + $root.google.bigtable.admin.v2.Type.Array.encode(message.arrayType, writer.uint32(/* id 3, wireType 2 =*/26).fork(), q + 1).ldelim(); if (message.mapType != null && Object.hasOwnProperty.call(message, "mapType")) - $root.google.bigtable.admin.v2.Type.Map.encode(message.mapType, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + $root.google.bigtable.admin.v2.Type.Map.encode(message.mapType, writer.uint32(/* id 4, wireType 2 =*/34).fork(), q + 1).ldelim(); if (message.int64Type != null && Object.hasOwnProperty.call(message, "int64Type")) - $root.google.bigtable.admin.v2.Type.Int64.encode(message.int64Type, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + $root.google.bigtable.admin.v2.Type.Int64.encode(message.int64Type, writer.uint32(/* id 5, wireType 2 =*/42).fork(), q + 1).ldelim(); if (message.aggregateType != null && Object.hasOwnProperty.call(message, "aggregateType")) - $root.google.bigtable.admin.v2.Type.Aggregate.encode(message.aggregateType, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + $root.google.bigtable.admin.v2.Type.Aggregate.encode(message.aggregateType, writer.uint32(/* id 6, wireType 2 =*/50).fork(), q + 1).ldelim(); if (message.structType != null && Object.hasOwnProperty.call(message, "structType")) - $root.google.bigtable.admin.v2.Type.Struct.encode(message.structType, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + $root.google.bigtable.admin.v2.Type.Struct.encode(message.structType, writer.uint32(/* id 7, wireType 2 =*/58).fork(), q + 1).ldelim(); if (message.boolType != null && Object.hasOwnProperty.call(message, "boolType")) - $root.google.bigtable.admin.v2.Type.Bool.encode(message.boolType, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + $root.google.bigtable.admin.v2.Type.Bool.encode(message.boolType, writer.uint32(/* id 8, wireType 2 =*/66).fork(), q + 1).ldelim(); if (message.float64Type != null && Object.hasOwnProperty.call(message, "float64Type")) - $root.google.bigtable.admin.v2.Type.Float64.encode(message.float64Type, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + $root.google.bigtable.admin.v2.Type.Float64.encode(message.float64Type, writer.uint32(/* id 9, wireType 2 =*/74).fork(), q + 1).ldelim(); if (message.timestampType != null && Object.hasOwnProperty.call(message, "timestampType")) - $root.google.bigtable.admin.v2.Type.Timestamp.encode(message.timestampType, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + $root.google.bigtable.admin.v2.Type.Timestamp.encode(message.timestampType, writer.uint32(/* id 10, wireType 2 =*/82).fork(), q + 1).ldelim(); if (message.dateType != null && Object.hasOwnProperty.call(message, "dateType")) - $root.google.bigtable.admin.v2.Type.Date.encode(message.dateType, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + $root.google.bigtable.admin.v2.Type.Date.encode(message.dateType, writer.uint32(/* id 11, wireType 2 =*/90).fork(), q + 1).ldelim(); if (message.float32Type != null && Object.hasOwnProperty.call(message, "float32Type")) - $root.google.bigtable.admin.v2.Type.Float32.encode(message.float32Type, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); + $root.google.bigtable.admin.v2.Type.Float32.encode(message.float32Type, writer.uint32(/* id 12, wireType 2 =*/98).fork(), q + 1).ldelim(); if (message.protoType != null && Object.hasOwnProperty.call(message, "protoType")) - $root.google.bigtable.admin.v2.Type.Proto.encode(message.protoType, writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim(); + $root.google.bigtable.admin.v2.Type.Proto.encode(message.protoType, writer.uint32(/* id 13, wireType 2 =*/106).fork(), q + 1).ldelim(); if (message.enumType != null && Object.hasOwnProperty.call(message, "enumType")) - $root.google.bigtable.admin.v2.Type.Enum.encode(message.enumType, writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim(); + $root.google.bigtable.admin.v2.Type.Enum.encode(message.enumType, writer.uint32(/* id 14, wireType 2 =*/114).fork(), q + 1).ldelim(); return writer; }; @@ -39559,7 +40861,7 @@ * @returns {$protobuf.Writer} Writer */ Type.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -39682,7 +40984,7 @@ if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; var properties = {}; - if (message.bytesType != null && message.hasOwnProperty("bytesType")) { + if (message.bytesType != null && Object.hasOwnProperty.call(message, "bytesType")) { properties.kind = 1; { var error = $root.google.bigtable.admin.v2.Type.Bytes.verify(message.bytesType, long + 1); @@ -39690,7 +40992,7 @@ return "bytesType." + error; } } - if (message.stringType != null && message.hasOwnProperty("stringType")) { + if (message.stringType != null && Object.hasOwnProperty.call(message, "stringType")) { if (properties.kind === 1) return "kind: multiple values"; properties.kind = 1; @@ -39700,7 +41002,7 @@ return "stringType." + error; } } - if (message.int64Type != null && message.hasOwnProperty("int64Type")) { + if (message.int64Type != null && Object.hasOwnProperty.call(message, "int64Type")) { if (properties.kind === 1) return "kind: multiple values"; properties.kind = 1; @@ -39710,7 +41012,7 @@ return "int64Type." + error; } } - if (message.float32Type != null && message.hasOwnProperty("float32Type")) { + if (message.float32Type != null && Object.hasOwnProperty.call(message, "float32Type")) { if (properties.kind === 1) return "kind: multiple values"; properties.kind = 1; @@ -39720,7 +41022,7 @@ return "float32Type." + error; } } - if (message.float64Type != null && message.hasOwnProperty("float64Type")) { + if (message.float64Type != null && Object.hasOwnProperty.call(message, "float64Type")) { if (properties.kind === 1) return "kind: multiple values"; properties.kind = 1; @@ -39730,7 +41032,7 @@ return "float64Type." + error; } } - if (message.boolType != null && message.hasOwnProperty("boolType")) { + if (message.boolType != null && Object.hasOwnProperty.call(message, "boolType")) { if (properties.kind === 1) return "kind: multiple values"; properties.kind = 1; @@ -39740,7 +41042,7 @@ return "boolType." + error; } } - if (message.timestampType != null && message.hasOwnProperty("timestampType")) { + if (message.timestampType != null && Object.hasOwnProperty.call(message, "timestampType")) { if (properties.kind === 1) return "kind: multiple values"; properties.kind = 1; @@ -39750,7 +41052,7 @@ return "timestampType." + error; } } - if (message.dateType != null && message.hasOwnProperty("dateType")) { + if (message.dateType != null && Object.hasOwnProperty.call(message, "dateType")) { if (properties.kind === 1) return "kind: multiple values"; properties.kind = 1; @@ -39760,7 +41062,7 @@ return "dateType." + error; } } - if (message.aggregateType != null && message.hasOwnProperty("aggregateType")) { + if (message.aggregateType != null && Object.hasOwnProperty.call(message, "aggregateType")) { if (properties.kind === 1) return "kind: multiple values"; properties.kind = 1; @@ -39770,7 +41072,7 @@ return "aggregateType." + error; } } - if (message.structType != null && message.hasOwnProperty("structType")) { + if (message.structType != null && Object.hasOwnProperty.call(message, "structType")) { if (properties.kind === 1) return "kind: multiple values"; properties.kind = 1; @@ -39780,7 +41082,7 @@ return "structType." + error; } } - if (message.arrayType != null && message.hasOwnProperty("arrayType")) { + if (message.arrayType != null && Object.hasOwnProperty.call(message, "arrayType")) { if (properties.kind === 1) return "kind: multiple values"; properties.kind = 1; @@ -39790,7 +41092,7 @@ return "arrayType." + error; } } - if (message.mapType != null && message.hasOwnProperty("mapType")) { + if (message.mapType != null && Object.hasOwnProperty.call(message, "mapType")) { if (properties.kind === 1) return "kind: multiple values"; properties.kind = 1; @@ -39800,7 +41102,7 @@ return "mapType." + error; } } - if (message.protoType != null && message.hasOwnProperty("protoType")) { + if (message.protoType != null && Object.hasOwnProperty.call(message, "protoType")) { if (properties.kind === 1) return "kind: multiple values"; properties.kind = 1; @@ -39810,7 +41112,7 @@ return "protoType." + error; } } - if (message.enumType != null && message.hasOwnProperty("enumType")) { + if (message.enumType != null && Object.hasOwnProperty.call(message, "enumType")) { if (properties.kind === 1) return "kind: multiple values"; properties.kind = 1; @@ -39834,78 +41136,80 @@ Type.fromObject = function fromObject(object, long) { if (object instanceof $root.google.bigtable.admin.v2.Type) return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.admin.v2.Type: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) throw Error("maximum nesting depth exceeded"); var message = new $root.google.bigtable.admin.v2.Type(); if (object.bytesType != null) { - if (typeof object.bytesType !== "object") + if (!$util.isObject(object.bytesType)) throw TypeError(".google.bigtable.admin.v2.Type.bytesType: object expected"); message.bytesType = $root.google.bigtable.admin.v2.Type.Bytes.fromObject(object.bytesType, long + 1); } if (object.stringType != null) { - if (typeof object.stringType !== "object") + if (!$util.isObject(object.stringType)) throw TypeError(".google.bigtable.admin.v2.Type.stringType: object expected"); message.stringType = $root.google.bigtable.admin.v2.Type.String.fromObject(object.stringType, long + 1); } if (object.int64Type != null) { - if (typeof object.int64Type !== "object") + if (!$util.isObject(object.int64Type)) throw TypeError(".google.bigtable.admin.v2.Type.int64Type: object expected"); message.int64Type = $root.google.bigtable.admin.v2.Type.Int64.fromObject(object.int64Type, long + 1); } if (object.float32Type != null) { - if (typeof object.float32Type !== "object") + if (!$util.isObject(object.float32Type)) throw TypeError(".google.bigtable.admin.v2.Type.float32Type: object expected"); message.float32Type = $root.google.bigtable.admin.v2.Type.Float32.fromObject(object.float32Type, long + 1); } if (object.float64Type != null) { - if (typeof object.float64Type !== "object") + if (!$util.isObject(object.float64Type)) throw TypeError(".google.bigtable.admin.v2.Type.float64Type: object expected"); message.float64Type = $root.google.bigtable.admin.v2.Type.Float64.fromObject(object.float64Type, long + 1); } if (object.boolType != null) { - if (typeof object.boolType !== "object") + if (!$util.isObject(object.boolType)) throw TypeError(".google.bigtable.admin.v2.Type.boolType: object expected"); message.boolType = $root.google.bigtable.admin.v2.Type.Bool.fromObject(object.boolType, long + 1); } if (object.timestampType != null) { - if (typeof object.timestampType !== "object") + if (!$util.isObject(object.timestampType)) throw TypeError(".google.bigtable.admin.v2.Type.timestampType: object expected"); message.timestampType = $root.google.bigtable.admin.v2.Type.Timestamp.fromObject(object.timestampType, long + 1); } if (object.dateType != null) { - if (typeof object.dateType !== "object") + if (!$util.isObject(object.dateType)) throw TypeError(".google.bigtable.admin.v2.Type.dateType: object expected"); message.dateType = $root.google.bigtable.admin.v2.Type.Date.fromObject(object.dateType, long + 1); } if (object.aggregateType != null) { - if (typeof object.aggregateType !== "object") + if (!$util.isObject(object.aggregateType)) throw TypeError(".google.bigtable.admin.v2.Type.aggregateType: object expected"); message.aggregateType = $root.google.bigtable.admin.v2.Type.Aggregate.fromObject(object.aggregateType, long + 1); } if (object.structType != null) { - if (typeof object.structType !== "object") + if (!$util.isObject(object.structType)) throw TypeError(".google.bigtable.admin.v2.Type.structType: object expected"); message.structType = $root.google.bigtable.admin.v2.Type.Struct.fromObject(object.structType, long + 1); } if (object.arrayType != null) { - if (typeof object.arrayType !== "object") + if (!$util.isObject(object.arrayType)) throw TypeError(".google.bigtable.admin.v2.Type.arrayType: object expected"); message.arrayType = $root.google.bigtable.admin.v2.Type.Array.fromObject(object.arrayType, long + 1); } if (object.mapType != null) { - if (typeof object.mapType !== "object") + if (!$util.isObject(object.mapType)) throw TypeError(".google.bigtable.admin.v2.Type.mapType: object expected"); message.mapType = $root.google.bigtable.admin.v2.Type.Map.fromObject(object.mapType, long + 1); } if (object.protoType != null) { - if (typeof object.protoType !== "object") + if (!$util.isObject(object.protoType)) throw TypeError(".google.bigtable.admin.v2.Type.protoType: object expected"); message.protoType = $root.google.bigtable.admin.v2.Type.Proto.fromObject(object.protoType, long + 1); } if (object.enumType != null) { - if (typeof object.enumType !== "object") + if (!$util.isObject(object.enumType)) throw TypeError(".google.bigtable.admin.v2.Type.enumType: object expected"); message.enumType = $root.google.bigtable.admin.v2.Type.Enum.fromObject(object.enumType, long + 1); } @@ -39921,77 +41225,81 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Type.toObject = function toObject(message, options) { + Type.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; - if (message.bytesType != null && message.hasOwnProperty("bytesType")) { - object.bytesType = $root.google.bigtable.admin.v2.Type.Bytes.toObject(message.bytesType, options); + if (message.bytesType != null && Object.hasOwnProperty.call(message, "bytesType")) { + object.bytesType = $root.google.bigtable.admin.v2.Type.Bytes.toObject(message.bytesType, options, q + 1); if (options.oneofs) object.kind = "bytesType"; } - if (message.stringType != null && message.hasOwnProperty("stringType")) { - object.stringType = $root.google.bigtable.admin.v2.Type.String.toObject(message.stringType, options); + if (message.stringType != null && Object.hasOwnProperty.call(message, "stringType")) { + object.stringType = $root.google.bigtable.admin.v2.Type.String.toObject(message.stringType, options, q + 1); if (options.oneofs) object.kind = "stringType"; } - if (message.arrayType != null && message.hasOwnProperty("arrayType")) { - object.arrayType = $root.google.bigtable.admin.v2.Type.Array.toObject(message.arrayType, options); + if (message.arrayType != null && Object.hasOwnProperty.call(message, "arrayType")) { + object.arrayType = $root.google.bigtable.admin.v2.Type.Array.toObject(message.arrayType, options, q + 1); if (options.oneofs) object.kind = "arrayType"; } - if (message.mapType != null && message.hasOwnProperty("mapType")) { - object.mapType = $root.google.bigtable.admin.v2.Type.Map.toObject(message.mapType, options); + if (message.mapType != null && Object.hasOwnProperty.call(message, "mapType")) { + object.mapType = $root.google.bigtable.admin.v2.Type.Map.toObject(message.mapType, options, q + 1); if (options.oneofs) object.kind = "mapType"; } - if (message.int64Type != null && message.hasOwnProperty("int64Type")) { - object.int64Type = $root.google.bigtable.admin.v2.Type.Int64.toObject(message.int64Type, options); + if (message.int64Type != null && Object.hasOwnProperty.call(message, "int64Type")) { + object.int64Type = $root.google.bigtable.admin.v2.Type.Int64.toObject(message.int64Type, options, q + 1); if (options.oneofs) object.kind = "int64Type"; } - if (message.aggregateType != null && message.hasOwnProperty("aggregateType")) { - object.aggregateType = $root.google.bigtable.admin.v2.Type.Aggregate.toObject(message.aggregateType, options); + if (message.aggregateType != null && Object.hasOwnProperty.call(message, "aggregateType")) { + object.aggregateType = $root.google.bigtable.admin.v2.Type.Aggregate.toObject(message.aggregateType, options, q + 1); if (options.oneofs) object.kind = "aggregateType"; } - if (message.structType != null && message.hasOwnProperty("structType")) { - object.structType = $root.google.bigtable.admin.v2.Type.Struct.toObject(message.structType, options); + if (message.structType != null && Object.hasOwnProperty.call(message, "structType")) { + object.structType = $root.google.bigtable.admin.v2.Type.Struct.toObject(message.structType, options, q + 1); if (options.oneofs) object.kind = "structType"; } - if (message.boolType != null && message.hasOwnProperty("boolType")) { - object.boolType = $root.google.bigtable.admin.v2.Type.Bool.toObject(message.boolType, options); + if (message.boolType != null && Object.hasOwnProperty.call(message, "boolType")) { + object.boolType = $root.google.bigtable.admin.v2.Type.Bool.toObject(message.boolType, options, q + 1); if (options.oneofs) object.kind = "boolType"; } - if (message.float64Type != null && message.hasOwnProperty("float64Type")) { - object.float64Type = $root.google.bigtable.admin.v2.Type.Float64.toObject(message.float64Type, options); + if (message.float64Type != null && Object.hasOwnProperty.call(message, "float64Type")) { + object.float64Type = $root.google.bigtable.admin.v2.Type.Float64.toObject(message.float64Type, options, q + 1); if (options.oneofs) object.kind = "float64Type"; } - if (message.timestampType != null && message.hasOwnProperty("timestampType")) { - object.timestampType = $root.google.bigtable.admin.v2.Type.Timestamp.toObject(message.timestampType, options); + if (message.timestampType != null && Object.hasOwnProperty.call(message, "timestampType")) { + object.timestampType = $root.google.bigtable.admin.v2.Type.Timestamp.toObject(message.timestampType, options, q + 1); if (options.oneofs) object.kind = "timestampType"; } - if (message.dateType != null && message.hasOwnProperty("dateType")) { - object.dateType = $root.google.bigtable.admin.v2.Type.Date.toObject(message.dateType, options); + if (message.dateType != null && Object.hasOwnProperty.call(message, "dateType")) { + object.dateType = $root.google.bigtable.admin.v2.Type.Date.toObject(message.dateType, options, q + 1); if (options.oneofs) object.kind = "dateType"; } - if (message.float32Type != null && message.hasOwnProperty("float32Type")) { - object.float32Type = $root.google.bigtable.admin.v2.Type.Float32.toObject(message.float32Type, options); + if (message.float32Type != null && Object.hasOwnProperty.call(message, "float32Type")) { + object.float32Type = $root.google.bigtable.admin.v2.Type.Float32.toObject(message.float32Type, options, q + 1); if (options.oneofs) object.kind = "float32Type"; } - if (message.protoType != null && message.hasOwnProperty("protoType")) { - object.protoType = $root.google.bigtable.admin.v2.Type.Proto.toObject(message.protoType, options); + if (message.protoType != null && Object.hasOwnProperty.call(message, "protoType")) { + object.protoType = $root.google.bigtable.admin.v2.Type.Proto.toObject(message.protoType, options, q + 1); if (options.oneofs) object.kind = "protoType"; } - if (message.enumType != null && message.hasOwnProperty("enumType")) { - object.enumType = $root.google.bigtable.admin.v2.Type.Enum.toObject(message.enumType, options); + if (message.enumType != null && Object.hasOwnProperty.call(message, "enumType")) { + object.enumType = $root.google.bigtable.admin.v2.Type.Enum.toObject(message.enumType, options, q + 1); if (options.oneofs) object.kind = "enumType"; } @@ -40077,11 +41385,15 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Bytes.encode = function encode(message, writer) { + Bytes.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.encoding != null && Object.hasOwnProperty.call(message, "encoding")) - $root.google.bigtable.admin.v2.Type.Bytes.Encoding.encode(message.encoding, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + $root.google.bigtable.admin.v2.Type.Bytes.Encoding.encode(message.encoding, writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); return writer; }; @@ -40095,7 +41407,7 @@ * @returns {$protobuf.Writer} Writer */ Bytes.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -40165,7 +41477,7 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.encoding != null && message.hasOwnProperty("encoding")) { + if (message.encoding != null && Object.hasOwnProperty.call(message, "encoding")) { var error = $root.google.bigtable.admin.v2.Type.Bytes.Encoding.verify(message.encoding, long + 1); if (error) return "encoding." + error; @@ -40184,13 +41496,15 @@ Bytes.fromObject = function fromObject(object, long) { if (object instanceof $root.google.bigtable.admin.v2.Type.Bytes) return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.admin.v2.Type.Bytes: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) throw Error("maximum nesting depth exceeded"); var message = new $root.google.bigtable.admin.v2.Type.Bytes(); if (object.encoding != null) { - if (typeof object.encoding !== "object") + if (!$util.isObject(object.encoding)) throw TypeError(".google.bigtable.admin.v2.Type.Bytes.encoding: object expected"); message.encoding = $root.google.bigtable.admin.v2.Type.Bytes.Encoding.fromObject(object.encoding, long + 1); } @@ -40206,14 +41520,18 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Bytes.toObject = function toObject(message, options) { + Bytes.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) object.encoding = null; - if (message.encoding != null && message.hasOwnProperty("encoding")) - object.encoding = $root.google.bigtable.admin.v2.Type.Bytes.Encoding.toObject(message.encoding, options); + if (message.encoding != null && Object.hasOwnProperty.call(message, "encoding")) + object.encoding = $root.google.bigtable.admin.v2.Type.Bytes.Encoding.toObject(message.encoding, options, q + 1); return object; }; @@ -40310,11 +41628,15 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Encoding.encode = function encode(message, writer) { + Encoding.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.raw != null && Object.hasOwnProperty.call(message, "raw")) - $root.google.bigtable.admin.v2.Type.Bytes.Encoding.Raw.encode(message.raw, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + $root.google.bigtable.admin.v2.Type.Bytes.Encoding.Raw.encode(message.raw, writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); return writer; }; @@ -40328,7 +41650,7 @@ * @returns {$protobuf.Writer} Writer */ Encoding.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -40399,7 +41721,7 @@ if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; var properties = {}; - if (message.raw != null && message.hasOwnProperty("raw")) { + if (message.raw != null && Object.hasOwnProperty.call(message, "raw")) { properties.encoding = 1; { var error = $root.google.bigtable.admin.v2.Type.Bytes.Encoding.Raw.verify(message.raw, long + 1); @@ -40421,13 +41743,15 @@ Encoding.fromObject = function fromObject(object, long) { if (object instanceof $root.google.bigtable.admin.v2.Type.Bytes.Encoding) return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.admin.v2.Type.Bytes.Encoding: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) throw Error("maximum nesting depth exceeded"); var message = new $root.google.bigtable.admin.v2.Type.Bytes.Encoding(); if (object.raw != null) { - if (typeof object.raw !== "object") + if (!$util.isObject(object.raw)) throw TypeError(".google.bigtable.admin.v2.Type.Bytes.Encoding.raw: object expected"); message.raw = $root.google.bigtable.admin.v2.Type.Bytes.Encoding.Raw.fromObject(object.raw, long + 1); } @@ -40443,12 +41767,16 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Encoding.toObject = function toObject(message, options) { + Encoding.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; - if (message.raw != null && message.hasOwnProperty("raw")) { - object.raw = $root.google.bigtable.admin.v2.Type.Bytes.Encoding.Raw.toObject(message.raw, options); + if (message.raw != null && Object.hasOwnProperty.call(message, "raw")) { + object.raw = $root.google.bigtable.admin.v2.Type.Bytes.Encoding.Raw.toObject(message.raw, options, q + 1); if (options.oneofs) object.encoding = "raw"; } @@ -40525,9 +41853,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Raw.encode = function encode(message, writer) { + Raw.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); return writer; }; @@ -40541,7 +41873,7 @@ * @returns {$protobuf.Writer} Writer */ Raw.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -40621,10 +41953,6 @@ Raw.fromObject = function fromObject(object, long) { if (object instanceof $root.google.bigtable.admin.v2.Type.Bytes.Encoding.Raw) return object; - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - throw Error("maximum nesting depth exceeded"); return new $root.google.bigtable.admin.v2.Type.Bytes.Encoding.Raw(); }; @@ -40729,11 +42057,15 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - String.encode = function encode(message, writer) { + String.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.encoding != null && Object.hasOwnProperty.call(message, "encoding")) - $root.google.bigtable.admin.v2.Type.String.Encoding.encode(message.encoding, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + $root.google.bigtable.admin.v2.Type.String.Encoding.encode(message.encoding, writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); return writer; }; @@ -40747,7 +42079,7 @@ * @returns {$protobuf.Writer} Writer */ String.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -40817,7 +42149,7 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.encoding != null && message.hasOwnProperty("encoding")) { + if (message.encoding != null && Object.hasOwnProperty.call(message, "encoding")) { var error = $root.google.bigtable.admin.v2.Type.String.Encoding.verify(message.encoding, long + 1); if (error) return "encoding." + error; @@ -40836,13 +42168,15 @@ String.fromObject = function fromObject(object, long) { if (object instanceof $root.google.bigtable.admin.v2.Type.String) return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.admin.v2.Type.String: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) throw Error("maximum nesting depth exceeded"); var message = new $root.google.bigtable.admin.v2.Type.String(); if (object.encoding != null) { - if (typeof object.encoding !== "object") + if (!$util.isObject(object.encoding)) throw TypeError(".google.bigtable.admin.v2.Type.String.encoding: object expected"); message.encoding = $root.google.bigtable.admin.v2.Type.String.Encoding.fromObject(object.encoding, long + 1); } @@ -40858,14 +42192,18 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - String.toObject = function toObject(message, options) { + String.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) object.encoding = null; - if (message.encoding != null && message.hasOwnProperty("encoding")) - object.encoding = $root.google.bigtable.admin.v2.Type.String.Encoding.toObject(message.encoding, options); + if (message.encoding != null && Object.hasOwnProperty.call(message, "encoding")) + object.encoding = $root.google.bigtable.admin.v2.Type.String.Encoding.toObject(message.encoding, options, q + 1); return object; }; @@ -40971,13 +42309,17 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Encoding.encode = function encode(message, writer) { + Encoding.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.utf8Raw != null && Object.hasOwnProperty.call(message, "utf8Raw")) - $root.google.bigtable.admin.v2.Type.String.Encoding.Utf8Raw.encode(message.utf8Raw, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + $root.google.bigtable.admin.v2.Type.String.Encoding.Utf8Raw.encode(message.utf8Raw, writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); if (message.utf8Bytes != null && Object.hasOwnProperty.call(message, "utf8Bytes")) - $root.google.bigtable.admin.v2.Type.String.Encoding.Utf8Bytes.encode(message.utf8Bytes, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + $root.google.bigtable.admin.v2.Type.String.Encoding.Utf8Bytes.encode(message.utf8Bytes, writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); return writer; }; @@ -40991,7 +42333,7 @@ * @returns {$protobuf.Writer} Writer */ Encoding.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -41066,7 +42408,7 @@ if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; var properties = {}; - if (message.utf8Raw != null && message.hasOwnProperty("utf8Raw")) { + if (message.utf8Raw != null && Object.hasOwnProperty.call(message, "utf8Raw")) { properties.encoding = 1; { var error = $root.google.bigtable.admin.v2.Type.String.Encoding.Utf8Raw.verify(message.utf8Raw, long + 1); @@ -41074,7 +42416,7 @@ return "utf8Raw." + error; } } - if (message.utf8Bytes != null && message.hasOwnProperty("utf8Bytes")) { + if (message.utf8Bytes != null && Object.hasOwnProperty.call(message, "utf8Bytes")) { if (properties.encoding === 1) return "encoding: multiple values"; properties.encoding = 1; @@ -41098,18 +42440,20 @@ Encoding.fromObject = function fromObject(object, long) { if (object instanceof $root.google.bigtable.admin.v2.Type.String.Encoding) return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.admin.v2.Type.String.Encoding: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) throw Error("maximum nesting depth exceeded"); var message = new $root.google.bigtable.admin.v2.Type.String.Encoding(); if (object.utf8Raw != null) { - if (typeof object.utf8Raw !== "object") + if (!$util.isObject(object.utf8Raw)) throw TypeError(".google.bigtable.admin.v2.Type.String.Encoding.utf8Raw: object expected"); message.utf8Raw = $root.google.bigtable.admin.v2.Type.String.Encoding.Utf8Raw.fromObject(object.utf8Raw, long + 1); } if (object.utf8Bytes != null) { - if (typeof object.utf8Bytes !== "object") + if (!$util.isObject(object.utf8Bytes)) throw TypeError(".google.bigtable.admin.v2.Type.String.Encoding.utf8Bytes: object expected"); message.utf8Bytes = $root.google.bigtable.admin.v2.Type.String.Encoding.Utf8Bytes.fromObject(object.utf8Bytes, long + 1); } @@ -41125,17 +42469,21 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Encoding.toObject = function toObject(message, options) { + Encoding.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; - if (message.utf8Raw != null && message.hasOwnProperty("utf8Raw")) { - object.utf8Raw = $root.google.bigtable.admin.v2.Type.String.Encoding.Utf8Raw.toObject(message.utf8Raw, options); + if (message.utf8Raw != null && Object.hasOwnProperty.call(message, "utf8Raw")) { + object.utf8Raw = $root.google.bigtable.admin.v2.Type.String.Encoding.Utf8Raw.toObject(message.utf8Raw, options, q + 1); if (options.oneofs) object.encoding = "utf8Raw"; } - if (message.utf8Bytes != null && message.hasOwnProperty("utf8Bytes")) { - object.utf8Bytes = $root.google.bigtable.admin.v2.Type.String.Encoding.Utf8Bytes.toObject(message.utf8Bytes, options); + if (message.utf8Bytes != null && Object.hasOwnProperty.call(message, "utf8Bytes")) { + object.utf8Bytes = $root.google.bigtable.admin.v2.Type.String.Encoding.Utf8Bytes.toObject(message.utf8Bytes, options, q + 1); if (options.oneofs) object.encoding = "utf8Bytes"; } @@ -41212,9 +42560,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Utf8Raw.encode = function encode(message, writer) { + Utf8Raw.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); return writer; }; @@ -41228,7 +42580,7 @@ * @returns {$protobuf.Writer} Writer */ Utf8Raw.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -41308,10 +42660,6 @@ Utf8Raw.fromObject = function fromObject(object, long) { if (object instanceof $root.google.bigtable.admin.v2.Type.String.Encoding.Utf8Raw) return object; - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - throw Error("maximum nesting depth exceeded"); return new $root.google.bigtable.admin.v2.Type.String.Encoding.Utf8Raw(); }; @@ -41401,9 +42749,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Utf8Bytes.encode = function encode(message, writer) { + Utf8Bytes.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); return writer; }; @@ -41417,7 +42769,7 @@ * @returns {$protobuf.Writer} Writer */ Utf8Bytes.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -41497,10 +42849,6 @@ Utf8Bytes.fromObject = function fromObject(object, long) { if (object instanceof $root.google.bigtable.admin.v2.Type.String.Encoding.Utf8Bytes) return object; - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - throw Error("maximum nesting depth exceeded"); return new $root.google.bigtable.admin.v2.Type.String.Encoding.Utf8Bytes(); }; @@ -41605,11 +42953,15 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Int64.encode = function encode(message, writer) { + Int64.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.encoding != null && Object.hasOwnProperty.call(message, "encoding")) - $root.google.bigtable.admin.v2.Type.Int64.Encoding.encode(message.encoding, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + $root.google.bigtable.admin.v2.Type.Int64.Encoding.encode(message.encoding, writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); return writer; }; @@ -41623,7 +42975,7 @@ * @returns {$protobuf.Writer} Writer */ Int64.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -41693,7 +43045,7 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.encoding != null && message.hasOwnProperty("encoding")) { + if (message.encoding != null && Object.hasOwnProperty.call(message, "encoding")) { var error = $root.google.bigtable.admin.v2.Type.Int64.Encoding.verify(message.encoding, long + 1); if (error) return "encoding." + error; @@ -41712,13 +43064,15 @@ Int64.fromObject = function fromObject(object, long) { if (object instanceof $root.google.bigtable.admin.v2.Type.Int64) return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.admin.v2.Type.Int64: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) throw Error("maximum nesting depth exceeded"); var message = new $root.google.bigtable.admin.v2.Type.Int64(); if (object.encoding != null) { - if (typeof object.encoding !== "object") + if (!$util.isObject(object.encoding)) throw TypeError(".google.bigtable.admin.v2.Type.Int64.encoding: object expected"); message.encoding = $root.google.bigtable.admin.v2.Type.Int64.Encoding.fromObject(object.encoding, long + 1); } @@ -41734,14 +43088,18 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Int64.toObject = function toObject(message, options) { + Int64.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) object.encoding = null; - if (message.encoding != null && message.hasOwnProperty("encoding")) - object.encoding = $root.google.bigtable.admin.v2.Type.Int64.Encoding.toObject(message.encoding, options); + if (message.encoding != null && Object.hasOwnProperty.call(message, "encoding")) + object.encoding = $root.google.bigtable.admin.v2.Type.Int64.Encoding.toObject(message.encoding, options, q + 1); return object; }; @@ -41847,13 +43205,17 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Encoding.encode = function encode(message, writer) { + Encoding.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.bigEndianBytes != null && Object.hasOwnProperty.call(message, "bigEndianBytes")) - $root.google.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytes.encode(message.bigEndianBytes, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + $root.google.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytes.encode(message.bigEndianBytes, writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); if (message.orderedCodeBytes != null && Object.hasOwnProperty.call(message, "orderedCodeBytes")) - $root.google.bigtable.admin.v2.Type.Int64.Encoding.OrderedCodeBytes.encode(message.orderedCodeBytes, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + $root.google.bigtable.admin.v2.Type.Int64.Encoding.OrderedCodeBytes.encode(message.orderedCodeBytes, writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); return writer; }; @@ -41867,7 +43229,7 @@ * @returns {$protobuf.Writer} Writer */ Encoding.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -41942,7 +43304,7 @@ if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; var properties = {}; - if (message.bigEndianBytes != null && message.hasOwnProperty("bigEndianBytes")) { + if (message.bigEndianBytes != null && Object.hasOwnProperty.call(message, "bigEndianBytes")) { properties.encoding = 1; { var error = $root.google.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytes.verify(message.bigEndianBytes, long + 1); @@ -41950,7 +43312,7 @@ return "bigEndianBytes." + error; } } - if (message.orderedCodeBytes != null && message.hasOwnProperty("orderedCodeBytes")) { + if (message.orderedCodeBytes != null && Object.hasOwnProperty.call(message, "orderedCodeBytes")) { if (properties.encoding === 1) return "encoding: multiple values"; properties.encoding = 1; @@ -41974,18 +43336,20 @@ Encoding.fromObject = function fromObject(object, long) { if (object instanceof $root.google.bigtable.admin.v2.Type.Int64.Encoding) return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.admin.v2.Type.Int64.Encoding: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) throw Error("maximum nesting depth exceeded"); var message = new $root.google.bigtable.admin.v2.Type.Int64.Encoding(); if (object.bigEndianBytes != null) { - if (typeof object.bigEndianBytes !== "object") + if (!$util.isObject(object.bigEndianBytes)) throw TypeError(".google.bigtable.admin.v2.Type.Int64.Encoding.bigEndianBytes: object expected"); message.bigEndianBytes = $root.google.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytes.fromObject(object.bigEndianBytes, long + 1); } if (object.orderedCodeBytes != null) { - if (typeof object.orderedCodeBytes !== "object") + if (!$util.isObject(object.orderedCodeBytes)) throw TypeError(".google.bigtable.admin.v2.Type.Int64.Encoding.orderedCodeBytes: object expected"); message.orderedCodeBytes = $root.google.bigtable.admin.v2.Type.Int64.Encoding.OrderedCodeBytes.fromObject(object.orderedCodeBytes, long + 1); } @@ -42001,17 +43365,21 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Encoding.toObject = function toObject(message, options) { + Encoding.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; - if (message.bigEndianBytes != null && message.hasOwnProperty("bigEndianBytes")) { - object.bigEndianBytes = $root.google.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytes.toObject(message.bigEndianBytes, options); + if (message.bigEndianBytes != null && Object.hasOwnProperty.call(message, "bigEndianBytes")) { + object.bigEndianBytes = $root.google.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytes.toObject(message.bigEndianBytes, options, q + 1); if (options.oneofs) object.encoding = "bigEndianBytes"; } - if (message.orderedCodeBytes != null && message.hasOwnProperty("orderedCodeBytes")) { - object.orderedCodeBytes = $root.google.bigtable.admin.v2.Type.Int64.Encoding.OrderedCodeBytes.toObject(message.orderedCodeBytes, options); + if (message.orderedCodeBytes != null && Object.hasOwnProperty.call(message, "orderedCodeBytes")) { + object.orderedCodeBytes = $root.google.bigtable.admin.v2.Type.Int64.Encoding.OrderedCodeBytes.toObject(message.orderedCodeBytes, options, q + 1); if (options.oneofs) object.encoding = "orderedCodeBytes"; } @@ -42097,11 +43465,15 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - BigEndianBytes.encode = function encode(message, writer) { + BigEndianBytes.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.bytesType != null && Object.hasOwnProperty.call(message, "bytesType")) - $root.google.bigtable.admin.v2.Type.Bytes.encode(message.bytesType, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + $root.google.bigtable.admin.v2.Type.Bytes.encode(message.bytesType, writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); return writer; }; @@ -42115,7 +43487,7 @@ * @returns {$protobuf.Writer} Writer */ BigEndianBytes.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -42185,7 +43557,7 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.bytesType != null && message.hasOwnProperty("bytesType")) { + if (message.bytesType != null && Object.hasOwnProperty.call(message, "bytesType")) { var error = $root.google.bigtable.admin.v2.Type.Bytes.verify(message.bytesType, long + 1); if (error) return "bytesType." + error; @@ -42204,13 +43576,15 @@ BigEndianBytes.fromObject = function fromObject(object, long) { if (object instanceof $root.google.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytes) return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytes: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) throw Error("maximum nesting depth exceeded"); var message = new $root.google.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytes(); if (object.bytesType != null) { - if (typeof object.bytesType !== "object") + if (!$util.isObject(object.bytesType)) throw TypeError(".google.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytes.bytesType: object expected"); message.bytesType = $root.google.bigtable.admin.v2.Type.Bytes.fromObject(object.bytesType, long + 1); } @@ -42226,14 +43600,18 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - BigEndianBytes.toObject = function toObject(message, options) { + BigEndianBytes.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) object.bytesType = null; - if (message.bytesType != null && message.hasOwnProperty("bytesType")) - object.bytesType = $root.google.bigtable.admin.v2.Type.Bytes.toObject(message.bytesType, options); + if (message.bytesType != null && Object.hasOwnProperty.call(message, "bytesType")) + object.bytesType = $root.google.bigtable.admin.v2.Type.Bytes.toObject(message.bytesType, options, q + 1); return object; }; @@ -42310,9 +43688,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - OrderedCodeBytes.encode = function encode(message, writer) { + OrderedCodeBytes.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); return writer; }; @@ -42326,7 +43708,7 @@ * @returns {$protobuf.Writer} Writer */ OrderedCodeBytes.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -42406,10 +43788,6 @@ OrderedCodeBytes.fromObject = function fromObject(object, long) { if (object instanceof $root.google.bigtable.admin.v2.Type.Int64.Encoding.OrderedCodeBytes) return object; - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - throw Error("maximum nesting depth exceeded"); return new $root.google.bigtable.admin.v2.Type.Int64.Encoding.OrderedCodeBytes(); }; @@ -42505,9 +43883,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Bool.encode = function encode(message, writer) { + Bool.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); return writer; }; @@ -42521,7 +43903,7 @@ * @returns {$protobuf.Writer} Writer */ Bool.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -42601,10 +43983,6 @@ Bool.fromObject = function fromObject(object, long) { if (object instanceof $root.google.bigtable.admin.v2.Type.Bool) return object; - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - throw Error("maximum nesting depth exceeded"); return new $root.google.bigtable.admin.v2.Type.Bool(); }; @@ -42694,9 +44072,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Float32.encode = function encode(message, writer) { + Float32.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); return writer; }; @@ -42710,7 +44092,7 @@ * @returns {$protobuf.Writer} Writer */ Float32.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -42790,10 +44172,6 @@ Float32.fromObject = function fromObject(object, long) { if (object instanceof $root.google.bigtable.admin.v2.Type.Float32) return object; - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - throw Error("maximum nesting depth exceeded"); return new $root.google.bigtable.admin.v2.Type.Float32(); }; @@ -42883,9 +44261,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Float64.encode = function encode(message, writer) { + Float64.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); return writer; }; @@ -42899,7 +44281,7 @@ * @returns {$protobuf.Writer} Writer */ Float64.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -42979,10 +44361,6 @@ Float64.fromObject = function fromObject(object, long) { if (object instanceof $root.google.bigtable.admin.v2.Type.Float64) return object; - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - throw Error("maximum nesting depth exceeded"); return new $root.google.bigtable.admin.v2.Type.Float64(); }; @@ -43081,11 +44459,15 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Timestamp.encode = function encode(message, writer) { + Timestamp.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.encoding != null && Object.hasOwnProperty.call(message, "encoding")) - $root.google.bigtable.admin.v2.Type.Timestamp.Encoding.encode(message.encoding, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + $root.google.bigtable.admin.v2.Type.Timestamp.Encoding.encode(message.encoding, writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); return writer; }; @@ -43099,7 +44481,7 @@ * @returns {$protobuf.Writer} Writer */ Timestamp.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -43169,7 +44551,7 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.encoding != null && message.hasOwnProperty("encoding")) { + if (message.encoding != null && Object.hasOwnProperty.call(message, "encoding")) { var error = $root.google.bigtable.admin.v2.Type.Timestamp.Encoding.verify(message.encoding, long + 1); if (error) return "encoding." + error; @@ -43188,13 +44570,15 @@ Timestamp.fromObject = function fromObject(object, long) { if (object instanceof $root.google.bigtable.admin.v2.Type.Timestamp) return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.admin.v2.Type.Timestamp: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) throw Error("maximum nesting depth exceeded"); var message = new $root.google.bigtable.admin.v2.Type.Timestamp(); if (object.encoding != null) { - if (typeof object.encoding !== "object") + if (!$util.isObject(object.encoding)) throw TypeError(".google.bigtable.admin.v2.Type.Timestamp.encoding: object expected"); message.encoding = $root.google.bigtable.admin.v2.Type.Timestamp.Encoding.fromObject(object.encoding, long + 1); } @@ -43210,14 +44594,18 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Timestamp.toObject = function toObject(message, options) { + Timestamp.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) object.encoding = null; - if (message.encoding != null && message.hasOwnProperty("encoding")) - object.encoding = $root.google.bigtable.admin.v2.Type.Timestamp.Encoding.toObject(message.encoding, options); + if (message.encoding != null && Object.hasOwnProperty.call(message, "encoding")) + object.encoding = $root.google.bigtable.admin.v2.Type.Timestamp.Encoding.toObject(message.encoding, options, q + 1); return object; }; @@ -43314,11 +44702,15 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Encoding.encode = function encode(message, writer) { + Encoding.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.unixMicrosInt64 != null && Object.hasOwnProperty.call(message, "unixMicrosInt64")) - $root.google.bigtable.admin.v2.Type.Int64.Encoding.encode(message.unixMicrosInt64, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + $root.google.bigtable.admin.v2.Type.Int64.Encoding.encode(message.unixMicrosInt64, writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); return writer; }; @@ -43332,7 +44724,7 @@ * @returns {$protobuf.Writer} Writer */ Encoding.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -43403,7 +44795,7 @@ if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; var properties = {}; - if (message.unixMicrosInt64 != null && message.hasOwnProperty("unixMicrosInt64")) { + if (message.unixMicrosInt64 != null && Object.hasOwnProperty.call(message, "unixMicrosInt64")) { properties.encoding = 1; { var error = $root.google.bigtable.admin.v2.Type.Int64.Encoding.verify(message.unixMicrosInt64, long + 1); @@ -43425,13 +44817,15 @@ Encoding.fromObject = function fromObject(object, long) { if (object instanceof $root.google.bigtable.admin.v2.Type.Timestamp.Encoding) return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.admin.v2.Type.Timestamp.Encoding: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) throw Error("maximum nesting depth exceeded"); var message = new $root.google.bigtable.admin.v2.Type.Timestamp.Encoding(); if (object.unixMicrosInt64 != null) { - if (typeof object.unixMicrosInt64 !== "object") + if (!$util.isObject(object.unixMicrosInt64)) throw TypeError(".google.bigtable.admin.v2.Type.Timestamp.Encoding.unixMicrosInt64: object expected"); message.unixMicrosInt64 = $root.google.bigtable.admin.v2.Type.Int64.Encoding.fromObject(object.unixMicrosInt64, long + 1); } @@ -43447,12 +44841,16 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Encoding.toObject = function toObject(message, options) { + Encoding.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; - if (message.unixMicrosInt64 != null && message.hasOwnProperty("unixMicrosInt64")) { - object.unixMicrosInt64 = $root.google.bigtable.admin.v2.Type.Int64.Encoding.toObject(message.unixMicrosInt64, options); + if (message.unixMicrosInt64 != null && Object.hasOwnProperty.call(message, "unixMicrosInt64")) { + object.unixMicrosInt64 = $root.google.bigtable.admin.v2.Type.Int64.Encoding.toObject(message.unixMicrosInt64, options, q + 1); if (options.oneofs) object.encoding = "unixMicrosInt64"; } @@ -43535,9 +44933,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Date.encode = function encode(message, writer) { + Date.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); return writer; }; @@ -43551,7 +44953,7 @@ * @returns {$protobuf.Writer} Writer */ Date.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -43631,10 +45033,6 @@ Date.fromObject = function fromObject(object, long) { if (object instanceof $root.google.bigtable.admin.v2.Type.Date) return object; - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - throw Error("maximum nesting depth exceeded"); return new $root.google.bigtable.admin.v2.Type.Date(); }; @@ -43743,14 +45141,18 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Struct.encode = function encode(message, writer) { + Struct.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.fields != null && message.fields.length) for (var i = 0; i < message.fields.length; ++i) - $root.google.bigtable.admin.v2.Type.Struct.Field.encode(message.fields[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + $root.google.bigtable.admin.v2.Type.Struct.Field.encode(message.fields[i], writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); if (message.encoding != null && Object.hasOwnProperty.call(message, "encoding")) - $root.google.bigtable.admin.v2.Type.Struct.Encoding.encode(message.encoding, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + $root.google.bigtable.admin.v2.Type.Struct.Encoding.encode(message.encoding, writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); return writer; }; @@ -43764,7 +45166,7 @@ * @returns {$protobuf.Writer} Writer */ Struct.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -43840,7 +45242,7 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.fields != null && message.hasOwnProperty("fields")) { + if (message.fields != null && Object.hasOwnProperty.call(message, "fields")) { if (!Array.isArray(message.fields)) return "fields: array expected"; for (var i = 0; i < message.fields.length; ++i) { @@ -43849,7 +45251,7 @@ return "fields." + error; } } - if (message.encoding != null && message.hasOwnProperty("encoding")) { + if (message.encoding != null && Object.hasOwnProperty.call(message, "encoding")) { var error = $root.google.bigtable.admin.v2.Type.Struct.Encoding.verify(message.encoding, long + 1); if (error) return "encoding." + error; @@ -43868,6 +45270,8 @@ Struct.fromObject = function fromObject(object, long) { if (object instanceof $root.google.bigtable.admin.v2.Type.Struct) return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.admin.v2.Type.Struct: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -43878,13 +45282,13 @@ throw TypeError(".google.bigtable.admin.v2.Type.Struct.fields: array expected"); message.fields = []; for (var i = 0; i < object.fields.length; ++i) { - if (typeof object.fields[i] !== "object") + if (!$util.isObject(object.fields[i])) throw TypeError(".google.bigtable.admin.v2.Type.Struct.fields: object expected"); message.fields[i] = $root.google.bigtable.admin.v2.Type.Struct.Field.fromObject(object.fields[i], long + 1); } } if (object.encoding != null) { - if (typeof object.encoding !== "object") + if (!$util.isObject(object.encoding)) throw TypeError(".google.bigtable.admin.v2.Type.Struct.encoding: object expected"); message.encoding = $root.google.bigtable.admin.v2.Type.Struct.Encoding.fromObject(object.encoding, long + 1); } @@ -43900,9 +45304,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Struct.toObject = function toObject(message, options) { + Struct.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.fields = []; @@ -43911,10 +45319,10 @@ if (message.fields && message.fields.length) { object.fields = []; for (var j = 0; j < message.fields.length; ++j) - object.fields[j] = $root.google.bigtable.admin.v2.Type.Struct.Field.toObject(message.fields[j], options); + object.fields[j] = $root.google.bigtable.admin.v2.Type.Struct.Field.toObject(message.fields[j], options, q + 1); } - if (message.encoding != null && message.hasOwnProperty("encoding")) - object.encoding = $root.google.bigtable.admin.v2.Type.Struct.Encoding.toObject(message.encoding, options); + if (message.encoding != null && Object.hasOwnProperty.call(message, "encoding")) + object.encoding = $root.google.bigtable.admin.v2.Type.Struct.Encoding.toObject(message.encoding, options, q + 1); return object; }; @@ -44006,13 +45414,17 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Field.encode = function encode(message, writer) { + Field.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.fieldName != null && Object.hasOwnProperty.call(message, "fieldName")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.fieldName); if (message.type != null && Object.hasOwnProperty.call(message, "type")) - $root.google.bigtable.admin.v2.Type.encode(message.type, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + $root.google.bigtable.admin.v2.Type.encode(message.type, writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); return writer; }; @@ -44026,7 +45438,7 @@ * @returns {$protobuf.Writer} Writer */ Field.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -44100,10 +45512,10 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.fieldName != null && message.hasOwnProperty("fieldName")) + if (message.fieldName != null && Object.hasOwnProperty.call(message, "fieldName")) if (!$util.isString(message.fieldName)) return "fieldName: string expected"; - if (message.type != null && message.hasOwnProperty("type")) { + if (message.type != null && Object.hasOwnProperty.call(message, "type")) { var error = $root.google.bigtable.admin.v2.Type.verify(message.type, long + 1); if (error) return "type." + error; @@ -44122,6 +45534,8 @@ Field.fromObject = function fromObject(object, long) { if (object instanceof $root.google.bigtable.admin.v2.Type.Struct.Field) return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.admin.v2.Type.Struct.Field: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -44130,7 +45544,7 @@ if (object.fieldName != null) message.fieldName = String(object.fieldName); if (object.type != null) { - if (typeof object.type !== "object") + if (!$util.isObject(object.type)) throw TypeError(".google.bigtable.admin.v2.Type.Struct.Field.type: object expected"); message.type = $root.google.bigtable.admin.v2.Type.fromObject(object.type, long + 1); } @@ -44146,18 +45560,22 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Field.toObject = function toObject(message, options) { + Field.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.fieldName = ""; object.type = null; } - if (message.fieldName != null && message.hasOwnProperty("fieldName")) + if (message.fieldName != null && Object.hasOwnProperty.call(message, "fieldName")) object.fieldName = message.fieldName; - if (message.type != null && message.hasOwnProperty("type")) - object.type = $root.google.bigtable.admin.v2.Type.toObject(message.type, options); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + object.type = $root.google.bigtable.admin.v2.Type.toObject(message.type, options, q + 1); return object; }; @@ -44275,15 +45693,19 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Encoding.encode = function encode(message, writer) { + Encoding.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.singleton != null && Object.hasOwnProperty.call(message, "singleton")) - $root.google.bigtable.admin.v2.Type.Struct.Encoding.Singleton.encode(message.singleton, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + $root.google.bigtable.admin.v2.Type.Struct.Encoding.Singleton.encode(message.singleton, writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); if (message.delimitedBytes != null && Object.hasOwnProperty.call(message, "delimitedBytes")) - $root.google.bigtable.admin.v2.Type.Struct.Encoding.DelimitedBytes.encode(message.delimitedBytes, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + $root.google.bigtable.admin.v2.Type.Struct.Encoding.DelimitedBytes.encode(message.delimitedBytes, writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); if (message.orderedCodeBytes != null && Object.hasOwnProperty.call(message, "orderedCodeBytes")) - $root.google.bigtable.admin.v2.Type.Struct.Encoding.OrderedCodeBytes.encode(message.orderedCodeBytes, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + $root.google.bigtable.admin.v2.Type.Struct.Encoding.OrderedCodeBytes.encode(message.orderedCodeBytes, writer.uint32(/* id 3, wireType 2 =*/26).fork(), q + 1).ldelim(); return writer; }; @@ -44297,7 +45719,7 @@ * @returns {$protobuf.Writer} Writer */ Encoding.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -44376,7 +45798,7 @@ if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; var properties = {}; - if (message.singleton != null && message.hasOwnProperty("singleton")) { + if (message.singleton != null && Object.hasOwnProperty.call(message, "singleton")) { properties.encoding = 1; { var error = $root.google.bigtable.admin.v2.Type.Struct.Encoding.Singleton.verify(message.singleton, long + 1); @@ -44384,7 +45806,7 @@ return "singleton." + error; } } - if (message.delimitedBytes != null && message.hasOwnProperty("delimitedBytes")) { + if (message.delimitedBytes != null && Object.hasOwnProperty.call(message, "delimitedBytes")) { if (properties.encoding === 1) return "encoding: multiple values"; properties.encoding = 1; @@ -44394,7 +45816,7 @@ return "delimitedBytes." + error; } } - if (message.orderedCodeBytes != null && message.hasOwnProperty("orderedCodeBytes")) { + if (message.orderedCodeBytes != null && Object.hasOwnProperty.call(message, "orderedCodeBytes")) { if (properties.encoding === 1) return "encoding: multiple values"; properties.encoding = 1; @@ -44418,23 +45840,25 @@ Encoding.fromObject = function fromObject(object, long) { if (object instanceof $root.google.bigtable.admin.v2.Type.Struct.Encoding) return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.admin.v2.Type.Struct.Encoding: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) throw Error("maximum nesting depth exceeded"); var message = new $root.google.bigtable.admin.v2.Type.Struct.Encoding(); if (object.singleton != null) { - if (typeof object.singleton !== "object") + if (!$util.isObject(object.singleton)) throw TypeError(".google.bigtable.admin.v2.Type.Struct.Encoding.singleton: object expected"); message.singleton = $root.google.bigtable.admin.v2.Type.Struct.Encoding.Singleton.fromObject(object.singleton, long + 1); } if (object.delimitedBytes != null) { - if (typeof object.delimitedBytes !== "object") + if (!$util.isObject(object.delimitedBytes)) throw TypeError(".google.bigtable.admin.v2.Type.Struct.Encoding.delimitedBytes: object expected"); message.delimitedBytes = $root.google.bigtable.admin.v2.Type.Struct.Encoding.DelimitedBytes.fromObject(object.delimitedBytes, long + 1); } if (object.orderedCodeBytes != null) { - if (typeof object.orderedCodeBytes !== "object") + if (!$util.isObject(object.orderedCodeBytes)) throw TypeError(".google.bigtable.admin.v2.Type.Struct.Encoding.orderedCodeBytes: object expected"); message.orderedCodeBytes = $root.google.bigtable.admin.v2.Type.Struct.Encoding.OrderedCodeBytes.fromObject(object.orderedCodeBytes, long + 1); } @@ -44450,22 +45874,26 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Encoding.toObject = function toObject(message, options) { + Encoding.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; - if (message.singleton != null && message.hasOwnProperty("singleton")) { - object.singleton = $root.google.bigtable.admin.v2.Type.Struct.Encoding.Singleton.toObject(message.singleton, options); + if (message.singleton != null && Object.hasOwnProperty.call(message, "singleton")) { + object.singleton = $root.google.bigtable.admin.v2.Type.Struct.Encoding.Singleton.toObject(message.singleton, options, q + 1); if (options.oneofs) object.encoding = "singleton"; } - if (message.delimitedBytes != null && message.hasOwnProperty("delimitedBytes")) { - object.delimitedBytes = $root.google.bigtable.admin.v2.Type.Struct.Encoding.DelimitedBytes.toObject(message.delimitedBytes, options); + if (message.delimitedBytes != null && Object.hasOwnProperty.call(message, "delimitedBytes")) { + object.delimitedBytes = $root.google.bigtable.admin.v2.Type.Struct.Encoding.DelimitedBytes.toObject(message.delimitedBytes, options, q + 1); if (options.oneofs) object.encoding = "delimitedBytes"; } - if (message.orderedCodeBytes != null && message.hasOwnProperty("orderedCodeBytes")) { - object.orderedCodeBytes = $root.google.bigtable.admin.v2.Type.Struct.Encoding.OrderedCodeBytes.toObject(message.orderedCodeBytes, options); + if (message.orderedCodeBytes != null && Object.hasOwnProperty.call(message, "orderedCodeBytes")) { + object.orderedCodeBytes = $root.google.bigtable.admin.v2.Type.Struct.Encoding.OrderedCodeBytes.toObject(message.orderedCodeBytes, options, q + 1); if (options.oneofs) object.encoding = "orderedCodeBytes"; } @@ -44542,9 +45970,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Singleton.encode = function encode(message, writer) { + Singleton.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); return writer; }; @@ -44558,7 +45990,7 @@ * @returns {$protobuf.Writer} Writer */ Singleton.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -44638,10 +46070,6 @@ Singleton.fromObject = function fromObject(object, long) { if (object instanceof $root.google.bigtable.admin.v2.Type.Struct.Encoding.Singleton) return object; - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - throw Error("maximum nesting depth exceeded"); return new $root.google.bigtable.admin.v2.Type.Struct.Encoding.Singleton(); }; @@ -44740,9 +46168,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DelimitedBytes.encode = function encode(message, writer) { + DelimitedBytes.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.delimiter != null && Object.hasOwnProperty.call(message, "delimiter")) writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.delimiter); return writer; @@ -44758,7 +46190,7 @@ * @returns {$protobuf.Writer} Writer */ DelimitedBytes.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -44828,7 +46260,7 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.delimiter != null && message.hasOwnProperty("delimiter")) + if (message.delimiter != null && Object.hasOwnProperty.call(message, "delimiter")) if (!(message.delimiter && typeof message.delimiter.length === "number" || $util.isString(message.delimiter))) return "delimiter: buffer expected"; return null; @@ -44845,6 +46277,8 @@ DelimitedBytes.fromObject = function fromObject(object, long) { if (object instanceof $root.google.bigtable.admin.v2.Type.Struct.Encoding.DelimitedBytes) return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.admin.v2.Type.Struct.Encoding.DelimitedBytes: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -44867,9 +46301,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DelimitedBytes.toObject = function toObject(message, options) { + DelimitedBytes.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) if (options.bytes === String) @@ -44879,7 +46317,7 @@ if (options.bytes !== Array) object.delimiter = $util.newBuffer(object.delimiter); } - if (message.delimiter != null && message.hasOwnProperty("delimiter")) + if (message.delimiter != null && Object.hasOwnProperty.call(message, "delimiter")) object.delimiter = options.bytes === String ? $util.base64.encode(message.delimiter, 0, message.delimiter.length) : options.bytes === Array ? Array.prototype.slice.call(message.delimiter) : message.delimiter; return object; }; @@ -44957,9 +46395,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - OrderedCodeBytes.encode = function encode(message, writer) { + OrderedCodeBytes.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); return writer; }; @@ -44973,7 +46415,7 @@ * @returns {$protobuf.Writer} Writer */ OrderedCodeBytes.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -45053,10 +46495,6 @@ OrderedCodeBytes.fromObject = function fromObject(object, long) { if (object instanceof $root.google.bigtable.admin.v2.Type.Struct.Encoding.OrderedCodeBytes) return object; - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - throw Error("maximum nesting depth exceeded"); return new $root.google.bigtable.admin.v2.Type.Struct.Encoding.OrderedCodeBytes(); }; @@ -45170,9 +46608,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Proto.encode = function encode(message, writer) { + Proto.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.schemaBundleId != null && Object.hasOwnProperty.call(message, "schemaBundleId")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.schemaBundleId); if (message.messageName != null && Object.hasOwnProperty.call(message, "messageName")) @@ -45190,7 +46632,7 @@ * @returns {$protobuf.Writer} Writer */ Proto.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -45264,10 +46706,10 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.schemaBundleId != null && message.hasOwnProperty("schemaBundleId")) + if (message.schemaBundleId != null && Object.hasOwnProperty.call(message, "schemaBundleId")) if (!$util.isString(message.schemaBundleId)) return "schemaBundleId: string expected"; - if (message.messageName != null && message.hasOwnProperty("messageName")) + if (message.messageName != null && Object.hasOwnProperty.call(message, "messageName")) if (!$util.isString(message.messageName)) return "messageName: string expected"; return null; @@ -45284,6 +46726,8 @@ Proto.fromObject = function fromObject(object, long) { if (object instanceof $root.google.bigtable.admin.v2.Type.Proto) return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.admin.v2.Type.Proto: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -45305,17 +46749,21 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Proto.toObject = function toObject(message, options) { + Proto.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.schemaBundleId = ""; object.messageName = ""; } - if (message.schemaBundleId != null && message.hasOwnProperty("schemaBundleId")) + if (message.schemaBundleId != null && Object.hasOwnProperty.call(message, "schemaBundleId")) object.schemaBundleId = message.schemaBundleId; - if (message.messageName != null && message.hasOwnProperty("messageName")) + if (message.messageName != null && Object.hasOwnProperty.call(message, "messageName")) object.messageName = message.messageName; return object; }; @@ -45411,9 +46859,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Enum.encode = function encode(message, writer) { + Enum.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.schemaBundleId != null && Object.hasOwnProperty.call(message, "schemaBundleId")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.schemaBundleId); if (message.enumName != null && Object.hasOwnProperty.call(message, "enumName")) @@ -45431,7 +46883,7 @@ * @returns {$protobuf.Writer} Writer */ Enum.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -45505,10 +46957,10 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.schemaBundleId != null && message.hasOwnProperty("schemaBundleId")) + if (message.schemaBundleId != null && Object.hasOwnProperty.call(message, "schemaBundleId")) if (!$util.isString(message.schemaBundleId)) return "schemaBundleId: string expected"; - if (message.enumName != null && message.hasOwnProperty("enumName")) + if (message.enumName != null && Object.hasOwnProperty.call(message, "enumName")) if (!$util.isString(message.enumName)) return "enumName: string expected"; return null; @@ -45525,6 +46977,8 @@ Enum.fromObject = function fromObject(object, long) { if (object instanceof $root.google.bigtable.admin.v2.Type.Enum) return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.admin.v2.Type.Enum: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -45546,17 +47000,21 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Enum.toObject = function toObject(message, options) { + Enum.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.schemaBundleId = ""; object.enumName = ""; } - if (message.schemaBundleId != null && message.hasOwnProperty("schemaBundleId")) + if (message.schemaBundleId != null && Object.hasOwnProperty.call(message, "schemaBundleId")) object.schemaBundleId = message.schemaBundleId; - if (message.enumName != null && message.hasOwnProperty("enumName")) + if (message.enumName != null && Object.hasOwnProperty.call(message, "enumName")) object.enumName = message.enumName; return object; }; @@ -45643,11 +47101,15 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Array.encode = function encode(message, writer) { + Array.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.elementType != null && Object.hasOwnProperty.call(message, "elementType")) - $root.google.bigtable.admin.v2.Type.encode(message.elementType, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + $root.google.bigtable.admin.v2.Type.encode(message.elementType, writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); return writer; }; @@ -45661,7 +47123,7 @@ * @returns {$protobuf.Writer} Writer */ Array.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -45731,7 +47193,7 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.elementType != null && message.hasOwnProperty("elementType")) { + if (message.elementType != null && Object.hasOwnProperty.call(message, "elementType")) { var error = $root.google.bigtable.admin.v2.Type.verify(message.elementType, long + 1); if (error) return "elementType." + error; @@ -45750,13 +47212,15 @@ Array.fromObject = function fromObject(object, long) { if (object instanceof $root.google.bigtable.admin.v2.Type.Array) return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.admin.v2.Type.Array: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) throw Error("maximum nesting depth exceeded"); var message = new $root.google.bigtable.admin.v2.Type.Array(); if (object.elementType != null) { - if (typeof object.elementType !== "object") + if (!$util.isObject(object.elementType)) throw TypeError(".google.bigtable.admin.v2.Type.Array.elementType: object expected"); message.elementType = $root.google.bigtable.admin.v2.Type.fromObject(object.elementType, long + 1); } @@ -45772,14 +47236,18 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Array.toObject = function toObject(message, options) { + Array.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) object.elementType = null; - if (message.elementType != null && message.hasOwnProperty("elementType")) - object.elementType = $root.google.bigtable.admin.v2.Type.toObject(message.elementType, options); + if (message.elementType != null && Object.hasOwnProperty.call(message, "elementType")) + object.elementType = $root.google.bigtable.admin.v2.Type.toObject(message.elementType, options, q + 1); return object; }; @@ -45874,13 +47342,17 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Map.encode = function encode(message, writer) { + Map.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.keyType != null && Object.hasOwnProperty.call(message, "keyType")) - $root.google.bigtable.admin.v2.Type.encode(message.keyType, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + $root.google.bigtable.admin.v2.Type.encode(message.keyType, writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); if (message.valueType != null && Object.hasOwnProperty.call(message, "valueType")) - $root.google.bigtable.admin.v2.Type.encode(message.valueType, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + $root.google.bigtable.admin.v2.Type.encode(message.valueType, writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); return writer; }; @@ -45894,7 +47366,7 @@ * @returns {$protobuf.Writer} Writer */ Map.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -45968,12 +47440,12 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.keyType != null && message.hasOwnProperty("keyType")) { + if (message.keyType != null && Object.hasOwnProperty.call(message, "keyType")) { var error = $root.google.bigtable.admin.v2.Type.verify(message.keyType, long + 1); if (error) return "keyType." + error; } - if (message.valueType != null && message.hasOwnProperty("valueType")) { + if (message.valueType != null && Object.hasOwnProperty.call(message, "valueType")) { var error = $root.google.bigtable.admin.v2.Type.verify(message.valueType, long + 1); if (error) return "valueType." + error; @@ -45992,18 +47464,20 @@ Map.fromObject = function fromObject(object, long) { if (object instanceof $root.google.bigtable.admin.v2.Type.Map) return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.admin.v2.Type.Map: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) throw Error("maximum nesting depth exceeded"); var message = new $root.google.bigtable.admin.v2.Type.Map(); if (object.keyType != null) { - if (typeof object.keyType !== "object") + if (!$util.isObject(object.keyType)) throw TypeError(".google.bigtable.admin.v2.Type.Map.keyType: object expected"); message.keyType = $root.google.bigtable.admin.v2.Type.fromObject(object.keyType, long + 1); } if (object.valueType != null) { - if (typeof object.valueType !== "object") + if (!$util.isObject(object.valueType)) throw TypeError(".google.bigtable.admin.v2.Type.Map.valueType: object expected"); message.valueType = $root.google.bigtable.admin.v2.Type.fromObject(object.valueType, long + 1); } @@ -46019,18 +47493,22 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Map.toObject = function toObject(message, options) { + Map.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.keyType = null; object.valueType = null; } - if (message.keyType != null && message.hasOwnProperty("keyType")) - object.keyType = $root.google.bigtable.admin.v2.Type.toObject(message.keyType, options); - if (message.valueType != null && message.hasOwnProperty("valueType")) - object.valueType = $root.google.bigtable.admin.v2.Type.toObject(message.valueType, options); + if (message.keyType != null && Object.hasOwnProperty.call(message, "keyType")) + object.keyType = $root.google.bigtable.admin.v2.Type.toObject(message.keyType, options, q + 1); + if (message.valueType != null && Object.hasOwnProperty.call(message, "valueType")) + object.valueType = $root.google.bigtable.admin.v2.Type.toObject(message.valueType, options, q + 1); return object; }; @@ -46175,21 +47653,25 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Aggregate.encode = function encode(message, writer) { + Aggregate.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.inputType != null && Object.hasOwnProperty.call(message, "inputType")) - $root.google.bigtable.admin.v2.Type.encode(message.inputType, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + $root.google.bigtable.admin.v2.Type.encode(message.inputType, writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); if (message.stateType != null && Object.hasOwnProperty.call(message, "stateType")) - $root.google.bigtable.admin.v2.Type.encode(message.stateType, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + $root.google.bigtable.admin.v2.Type.encode(message.stateType, writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); if (message.sum != null && Object.hasOwnProperty.call(message, "sum")) - $root.google.bigtable.admin.v2.Type.Aggregate.Sum.encode(message.sum, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + $root.google.bigtable.admin.v2.Type.Aggregate.Sum.encode(message.sum, writer.uint32(/* id 4, wireType 2 =*/34).fork(), q + 1).ldelim(); if (message.hllppUniqueCount != null && Object.hasOwnProperty.call(message, "hllppUniqueCount")) - $root.google.bigtable.admin.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount.encode(message.hllppUniqueCount, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + $root.google.bigtable.admin.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount.encode(message.hllppUniqueCount, writer.uint32(/* id 5, wireType 2 =*/42).fork(), q + 1).ldelim(); if (message.max != null && Object.hasOwnProperty.call(message, "max")) - $root.google.bigtable.admin.v2.Type.Aggregate.Max.encode(message.max, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + $root.google.bigtable.admin.v2.Type.Aggregate.Max.encode(message.max, writer.uint32(/* id 6, wireType 2 =*/50).fork(), q + 1).ldelim(); if (message.min != null && Object.hasOwnProperty.call(message, "min")) - $root.google.bigtable.admin.v2.Type.Aggregate.Min.encode(message.min, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + $root.google.bigtable.admin.v2.Type.Aggregate.Min.encode(message.min, writer.uint32(/* id 7, wireType 2 =*/58).fork(), q + 1).ldelim(); return writer; }; @@ -46203,7 +47685,7 @@ * @returns {$protobuf.Writer} Writer */ Aggregate.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -46294,17 +47776,17 @@ if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; var properties = {}; - if (message.inputType != null && message.hasOwnProperty("inputType")) { + if (message.inputType != null && Object.hasOwnProperty.call(message, "inputType")) { var error = $root.google.bigtable.admin.v2.Type.verify(message.inputType, long + 1); if (error) return "inputType." + error; } - if (message.stateType != null && message.hasOwnProperty("stateType")) { + if (message.stateType != null && Object.hasOwnProperty.call(message, "stateType")) { var error = $root.google.bigtable.admin.v2.Type.verify(message.stateType, long + 1); if (error) return "stateType." + error; } - if (message.sum != null && message.hasOwnProperty("sum")) { + if (message.sum != null && Object.hasOwnProperty.call(message, "sum")) { properties.aggregator = 1; { var error = $root.google.bigtable.admin.v2.Type.Aggregate.Sum.verify(message.sum, long + 1); @@ -46312,7 +47794,7 @@ return "sum." + error; } } - if (message.hllppUniqueCount != null && message.hasOwnProperty("hllppUniqueCount")) { + if (message.hllppUniqueCount != null && Object.hasOwnProperty.call(message, "hllppUniqueCount")) { if (properties.aggregator === 1) return "aggregator: multiple values"; properties.aggregator = 1; @@ -46322,7 +47804,7 @@ return "hllppUniqueCount." + error; } } - if (message.max != null && message.hasOwnProperty("max")) { + if (message.max != null && Object.hasOwnProperty.call(message, "max")) { if (properties.aggregator === 1) return "aggregator: multiple values"; properties.aggregator = 1; @@ -46332,7 +47814,7 @@ return "max." + error; } } - if (message.min != null && message.hasOwnProperty("min")) { + if (message.min != null && Object.hasOwnProperty.call(message, "min")) { if (properties.aggregator === 1) return "aggregator: multiple values"; properties.aggregator = 1; @@ -46356,38 +47838,40 @@ Aggregate.fromObject = function fromObject(object, long) { if (object instanceof $root.google.bigtable.admin.v2.Type.Aggregate) return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.admin.v2.Type.Aggregate: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) throw Error("maximum nesting depth exceeded"); var message = new $root.google.bigtable.admin.v2.Type.Aggregate(); if (object.inputType != null) { - if (typeof object.inputType !== "object") + if (!$util.isObject(object.inputType)) throw TypeError(".google.bigtable.admin.v2.Type.Aggregate.inputType: object expected"); message.inputType = $root.google.bigtable.admin.v2.Type.fromObject(object.inputType, long + 1); } if (object.stateType != null) { - if (typeof object.stateType !== "object") + if (!$util.isObject(object.stateType)) throw TypeError(".google.bigtable.admin.v2.Type.Aggregate.stateType: object expected"); message.stateType = $root.google.bigtable.admin.v2.Type.fromObject(object.stateType, long + 1); } if (object.sum != null) { - if (typeof object.sum !== "object") + if (!$util.isObject(object.sum)) throw TypeError(".google.bigtable.admin.v2.Type.Aggregate.sum: object expected"); message.sum = $root.google.bigtable.admin.v2.Type.Aggregate.Sum.fromObject(object.sum, long + 1); } if (object.hllppUniqueCount != null) { - if (typeof object.hllppUniqueCount !== "object") + if (!$util.isObject(object.hllppUniqueCount)) throw TypeError(".google.bigtable.admin.v2.Type.Aggregate.hllppUniqueCount: object expected"); message.hllppUniqueCount = $root.google.bigtable.admin.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount.fromObject(object.hllppUniqueCount, long + 1); } if (object.max != null) { - if (typeof object.max !== "object") + if (!$util.isObject(object.max)) throw TypeError(".google.bigtable.admin.v2.Type.Aggregate.max: object expected"); message.max = $root.google.bigtable.admin.v2.Type.Aggregate.Max.fromObject(object.max, long + 1); } if (object.min != null) { - if (typeof object.min !== "object") + if (!$util.isObject(object.min)) throw TypeError(".google.bigtable.admin.v2.Type.Aggregate.min: object expected"); message.min = $root.google.bigtable.admin.v2.Type.Aggregate.Min.fromObject(object.min, long + 1); } @@ -46403,35 +47887,39 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Aggregate.toObject = function toObject(message, options) { + Aggregate.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.inputType = null; object.stateType = null; } - if (message.inputType != null && message.hasOwnProperty("inputType")) - object.inputType = $root.google.bigtable.admin.v2.Type.toObject(message.inputType, options); - if (message.stateType != null && message.hasOwnProperty("stateType")) - object.stateType = $root.google.bigtable.admin.v2.Type.toObject(message.stateType, options); - if (message.sum != null && message.hasOwnProperty("sum")) { - object.sum = $root.google.bigtable.admin.v2.Type.Aggregate.Sum.toObject(message.sum, options); + if (message.inputType != null && Object.hasOwnProperty.call(message, "inputType")) + object.inputType = $root.google.bigtable.admin.v2.Type.toObject(message.inputType, options, q + 1); + if (message.stateType != null && Object.hasOwnProperty.call(message, "stateType")) + object.stateType = $root.google.bigtable.admin.v2.Type.toObject(message.stateType, options, q + 1); + if (message.sum != null && Object.hasOwnProperty.call(message, "sum")) { + object.sum = $root.google.bigtable.admin.v2.Type.Aggregate.Sum.toObject(message.sum, options, q + 1); if (options.oneofs) object.aggregator = "sum"; } - if (message.hllppUniqueCount != null && message.hasOwnProperty("hllppUniqueCount")) { - object.hllppUniqueCount = $root.google.bigtable.admin.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount.toObject(message.hllppUniqueCount, options); + if (message.hllppUniqueCount != null && Object.hasOwnProperty.call(message, "hllppUniqueCount")) { + object.hllppUniqueCount = $root.google.bigtable.admin.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount.toObject(message.hllppUniqueCount, options, q + 1); if (options.oneofs) object.aggregator = "hllppUniqueCount"; } - if (message.max != null && message.hasOwnProperty("max")) { - object.max = $root.google.bigtable.admin.v2.Type.Aggregate.Max.toObject(message.max, options); + if (message.max != null && Object.hasOwnProperty.call(message, "max")) { + object.max = $root.google.bigtable.admin.v2.Type.Aggregate.Max.toObject(message.max, options, q + 1); if (options.oneofs) object.aggregator = "max"; } - if (message.min != null && message.hasOwnProperty("min")) { - object.min = $root.google.bigtable.admin.v2.Type.Aggregate.Min.toObject(message.min, options); + if (message.min != null && Object.hasOwnProperty.call(message, "min")) { + object.min = $root.google.bigtable.admin.v2.Type.Aggregate.Min.toObject(message.min, options, q + 1); if (options.oneofs) object.aggregator = "min"; } @@ -46508,9 +47996,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Sum.encode = function encode(message, writer) { + Sum.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); return writer; }; @@ -46524,7 +48016,7 @@ * @returns {$protobuf.Writer} Writer */ Sum.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -46604,10 +48096,6 @@ Sum.fromObject = function fromObject(object, long) { if (object instanceof $root.google.bigtable.admin.v2.Type.Aggregate.Sum) return object; - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - throw Error("maximum nesting depth exceeded"); return new $root.google.bigtable.admin.v2.Type.Aggregate.Sum(); }; @@ -46697,9 +48185,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Max.encode = function encode(message, writer) { + Max.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); return writer; }; @@ -46713,7 +48205,7 @@ * @returns {$protobuf.Writer} Writer */ Max.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -46793,10 +48285,6 @@ Max.fromObject = function fromObject(object, long) { if (object instanceof $root.google.bigtable.admin.v2.Type.Aggregate.Max) return object; - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - throw Error("maximum nesting depth exceeded"); return new $root.google.bigtable.admin.v2.Type.Aggregate.Max(); }; @@ -46886,9 +48374,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Min.encode = function encode(message, writer) { + Min.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); return writer; }; @@ -46902,7 +48394,7 @@ * @returns {$protobuf.Writer} Writer */ Min.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -46982,10 +48474,6 @@ Min.fromObject = function fromObject(object, long) { if (object instanceof $root.google.bigtable.admin.v2.Type.Aggregate.Min) return object; - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - throw Error("maximum nesting depth exceeded"); return new $root.google.bigtable.admin.v2.Type.Aggregate.Min(); }; @@ -47075,9 +48563,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - HyperLogLogPlusPlusUniqueCount.encode = function encode(message, writer) { + HyperLogLogPlusPlusUniqueCount.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); return writer; }; @@ -47091,7 +48583,7 @@ * @returns {$protobuf.Writer} Writer */ HyperLogLogPlusPlusUniqueCount.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -47171,10 +48663,6 @@ HyperLogLogPlusPlusUniqueCount.fromObject = function fromObject(object, long) { if (object instanceof $root.google.bigtable.admin.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount) return object; - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - throw Error("maximum nesting depth exceeded"); return new $root.google.bigtable.admin.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount(); }; @@ -47293,7 +48781,7 @@ * @variation 1 */ Object.defineProperty(Bigtable.prototype.readRows = function readRows(request, callback) { - return this.rpcCall(readRows, $root.google.bigtable.v2.ReadRowsRequest, $root.google.bigtable.v2.ReadRowsResponse, request, callback); + return $protobuf.rpc.Service.prototype.rpcCall.call(this, readRows, $root.google.bigtable.v2.ReadRowsRequest, $root.google.bigtable.v2.ReadRowsResponse, request, callback); }, "name", { value: "ReadRows" }); /** @@ -47326,7 +48814,7 @@ * @variation 1 */ Object.defineProperty(Bigtable.prototype.sampleRowKeys = function sampleRowKeys(request, callback) { - return this.rpcCall(sampleRowKeys, $root.google.bigtable.v2.SampleRowKeysRequest, $root.google.bigtable.v2.SampleRowKeysResponse, request, callback); + return $protobuf.rpc.Service.prototype.rpcCall.call(this, sampleRowKeys, $root.google.bigtable.v2.SampleRowKeysRequest, $root.google.bigtable.v2.SampleRowKeysResponse, request, callback); }, "name", { value: "SampleRowKeys" }); /** @@ -47359,7 +48847,7 @@ * @variation 1 */ Object.defineProperty(Bigtable.prototype.mutateRow = function mutateRow(request, callback) { - return this.rpcCall(mutateRow, $root.google.bigtable.v2.MutateRowRequest, $root.google.bigtable.v2.MutateRowResponse, request, callback); + return $protobuf.rpc.Service.prototype.rpcCall.call(this, mutateRow, $root.google.bigtable.v2.MutateRowRequest, $root.google.bigtable.v2.MutateRowResponse, request, callback); }, "name", { value: "MutateRow" }); /** @@ -47392,7 +48880,7 @@ * @variation 1 */ Object.defineProperty(Bigtable.prototype.mutateRows = function mutateRows(request, callback) { - return this.rpcCall(mutateRows, $root.google.bigtable.v2.MutateRowsRequest, $root.google.bigtable.v2.MutateRowsResponse, request, callback); + return $protobuf.rpc.Service.prototype.rpcCall.call(this, mutateRows, $root.google.bigtable.v2.MutateRowsRequest, $root.google.bigtable.v2.MutateRowsResponse, request, callback); }, "name", { value: "MutateRows" }); /** @@ -47425,7 +48913,7 @@ * @variation 1 */ Object.defineProperty(Bigtable.prototype.checkAndMutateRow = function checkAndMutateRow(request, callback) { - return this.rpcCall(checkAndMutateRow, $root.google.bigtable.v2.CheckAndMutateRowRequest, $root.google.bigtable.v2.CheckAndMutateRowResponse, request, callback); + return $protobuf.rpc.Service.prototype.rpcCall.call(this, checkAndMutateRow, $root.google.bigtable.v2.CheckAndMutateRowRequest, $root.google.bigtable.v2.CheckAndMutateRowResponse, request, callback); }, "name", { value: "CheckAndMutateRow" }); /** @@ -47458,7 +48946,7 @@ * @variation 1 */ Object.defineProperty(Bigtable.prototype.pingAndWarm = function pingAndWarm(request, callback) { - return this.rpcCall(pingAndWarm, $root.google.bigtable.v2.PingAndWarmRequest, $root.google.bigtable.v2.PingAndWarmResponse, request, callback); + return $protobuf.rpc.Service.prototype.rpcCall.call(this, pingAndWarm, $root.google.bigtable.v2.PingAndWarmRequest, $root.google.bigtable.v2.PingAndWarmResponse, request, callback); }, "name", { value: "PingAndWarm" }); /** @@ -47491,7 +48979,7 @@ * @variation 1 */ Object.defineProperty(Bigtable.prototype.readModifyWriteRow = function readModifyWriteRow(request, callback) { - return this.rpcCall(readModifyWriteRow, $root.google.bigtable.v2.ReadModifyWriteRowRequest, $root.google.bigtable.v2.ReadModifyWriteRowResponse, request, callback); + return $protobuf.rpc.Service.prototype.rpcCall.call(this, readModifyWriteRow, $root.google.bigtable.v2.ReadModifyWriteRowRequest, $root.google.bigtable.v2.ReadModifyWriteRowResponse, request, callback); }, "name", { value: "ReadModifyWriteRow" }); /** @@ -47524,7 +49012,7 @@ * @variation 1 */ Object.defineProperty(Bigtable.prototype.generateInitialChangeStreamPartitions = function generateInitialChangeStreamPartitions(request, callback) { - return this.rpcCall(generateInitialChangeStreamPartitions, $root.google.bigtable.v2.GenerateInitialChangeStreamPartitionsRequest, $root.google.bigtable.v2.GenerateInitialChangeStreamPartitionsResponse, request, callback); + return $protobuf.rpc.Service.prototype.rpcCall.call(this, generateInitialChangeStreamPartitions, $root.google.bigtable.v2.GenerateInitialChangeStreamPartitionsRequest, $root.google.bigtable.v2.GenerateInitialChangeStreamPartitionsResponse, request, callback); }, "name", { value: "GenerateInitialChangeStreamPartitions" }); /** @@ -47557,7 +49045,7 @@ * @variation 1 */ Object.defineProperty(Bigtable.prototype.readChangeStream = function readChangeStream(request, callback) { - return this.rpcCall(readChangeStream, $root.google.bigtable.v2.ReadChangeStreamRequest, $root.google.bigtable.v2.ReadChangeStreamResponse, request, callback); + return $protobuf.rpc.Service.prototype.rpcCall.call(this, readChangeStream, $root.google.bigtable.v2.ReadChangeStreamRequest, $root.google.bigtable.v2.ReadChangeStreamResponse, request, callback); }, "name", { value: "ReadChangeStream" }); /** @@ -47590,7 +49078,7 @@ * @variation 1 */ Object.defineProperty(Bigtable.prototype.prepareQuery = function prepareQuery(request, callback) { - return this.rpcCall(prepareQuery, $root.google.bigtable.v2.PrepareQueryRequest, $root.google.bigtable.v2.PrepareQueryResponse, request, callback); + return $protobuf.rpc.Service.prototype.rpcCall.call(this, prepareQuery, $root.google.bigtable.v2.PrepareQueryRequest, $root.google.bigtable.v2.PrepareQueryResponse, request, callback); }, "name", { value: "PrepareQuery" }); /** @@ -47623,7 +49111,7 @@ * @variation 1 */ Object.defineProperty(Bigtable.prototype.executeQuery = function executeQuery(request, callback) { - return this.rpcCall(executeQuery, $root.google.bigtable.v2.ExecuteQueryRequest, $root.google.bigtable.v2.ExecuteQueryResponse, request, callback); + return $protobuf.rpc.Service.prototype.rpcCall.call(this, executeQuery, $root.google.bigtable.v2.ExecuteQueryRequest, $root.google.bigtable.v2.ExecuteQueryResponse, request, callback); }, "name", { value: "ExecuteQuery" }); /** @@ -47764,15 +49252,19 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ReadRowsRequest.encode = function encode(message, writer) { + ReadRowsRequest.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.tableName != null && Object.hasOwnProperty.call(message, "tableName")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.tableName); if (message.rows != null && Object.hasOwnProperty.call(message, "rows")) - $root.google.bigtable.v2.RowSet.encode(message.rows, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + $root.google.bigtable.v2.RowSet.encode(message.rows, writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) - $root.google.bigtable.v2.RowFilter.encode(message.filter, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + $root.google.bigtable.v2.RowFilter.encode(message.filter, writer.uint32(/* id 3, wireType 2 =*/26).fork(), q + 1).ldelim(); if (message.rowsLimit != null && Object.hasOwnProperty.call(message, "rowsLimit")) writer.uint32(/* id 4, wireType 0 =*/32).int64(message.rowsLimit); if (message.appProfileId != null && Object.hasOwnProperty.call(message, "appProfileId")) @@ -47798,7 +49290,7 @@ * @returns {$protobuf.Writer} Writer */ ReadRowsRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -47900,32 +49392,32 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.tableName != null && message.hasOwnProperty("tableName")) + if (message.tableName != null && Object.hasOwnProperty.call(message, "tableName")) if (!$util.isString(message.tableName)) return "tableName: string expected"; - if (message.authorizedViewName != null && message.hasOwnProperty("authorizedViewName")) + if (message.authorizedViewName != null && Object.hasOwnProperty.call(message, "authorizedViewName")) if (!$util.isString(message.authorizedViewName)) return "authorizedViewName: string expected"; - if (message.materializedViewName != null && message.hasOwnProperty("materializedViewName")) + if (message.materializedViewName != null && Object.hasOwnProperty.call(message, "materializedViewName")) if (!$util.isString(message.materializedViewName)) return "materializedViewName: string expected"; - if (message.appProfileId != null && message.hasOwnProperty("appProfileId")) + if (message.appProfileId != null && Object.hasOwnProperty.call(message, "appProfileId")) if (!$util.isString(message.appProfileId)) return "appProfileId: string expected"; - if (message.rows != null && message.hasOwnProperty("rows")) { + if (message.rows != null && Object.hasOwnProperty.call(message, "rows")) { var error = $root.google.bigtable.v2.RowSet.verify(message.rows, long + 1); if (error) return "rows." + error; } - if (message.filter != null && message.hasOwnProperty("filter")) { + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) { var error = $root.google.bigtable.v2.RowFilter.verify(message.filter, long + 1); if (error) return "filter." + error; } - if (message.rowsLimit != null && message.hasOwnProperty("rowsLimit")) + if (message.rowsLimit != null && Object.hasOwnProperty.call(message, "rowsLimit")) if (!$util.isInteger(message.rowsLimit) && !(message.rowsLimit && $util.isInteger(message.rowsLimit.low) && $util.isInteger(message.rowsLimit.high))) return "rowsLimit: integer|Long expected"; - if (message.requestStatsView != null && message.hasOwnProperty("requestStatsView")) + if (message.requestStatsView != null && Object.hasOwnProperty.call(message, "requestStatsView")) switch (message.requestStatsView) { default: return "requestStatsView: enum value expected"; @@ -47934,7 +49426,7 @@ case 2: break; } - if (message.reversed != null && message.hasOwnProperty("reversed")) + if (message.reversed != null && Object.hasOwnProperty.call(message, "reversed")) if (typeof message.reversed !== "boolean") return "reversed: boolean expected"; return null; @@ -47951,6 +49443,8 @@ ReadRowsRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.google.bigtable.v2.ReadRowsRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.v2.ReadRowsRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -47965,18 +49459,18 @@ if (object.appProfileId != null) message.appProfileId = String(object.appProfileId); if (object.rows != null) { - if (typeof object.rows !== "object") + if (!$util.isObject(object.rows)) throw TypeError(".google.bigtable.v2.ReadRowsRequest.rows: object expected"); message.rows = $root.google.bigtable.v2.RowSet.fromObject(object.rows, long + 1); } if (object.filter != null) { - if (typeof object.filter !== "object") + if (!$util.isObject(object.filter)) throw TypeError(".google.bigtable.v2.ReadRowsRequest.filter: object expected"); message.filter = $root.google.bigtable.v2.RowFilter.fromObject(object.filter, long + 1); } if (object.rowsLimit != null) if ($util.Long) - (message.rowsLimit = $util.Long.fromValue(object.rowsLimit)).unsigned = false; + message.rowsLimit = $util.Long.fromValue(object.rowsLimit, false); else if (typeof object.rowsLimit === "string") message.rowsLimit = parseInt(object.rowsLimit, 10); else if (typeof object.rowsLimit === "number") @@ -48017,9 +49511,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ReadRowsRequest.toObject = function toObject(message, options) { + ReadRowsRequest.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.tableName = ""; @@ -48027,35 +49525,37 @@ object.filter = null; if ($util.Long) { var long = new $util.Long(0, 0, false); - object.rowsLimit = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.rowsLimit = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : typeof BigInt !== "undefined" && options.longs === BigInt ? long.toBigInt() : long; } else - object.rowsLimit = options.longs === String ? "0" : 0; + object.rowsLimit = options.longs === String ? "0" : typeof BigInt !== "undefined" && options.longs === BigInt ? BigInt("0") : 0; object.appProfileId = ""; object.requestStatsView = options.enums === String ? "REQUEST_STATS_VIEW_UNSPECIFIED" : 0; object.reversed = false; object.authorizedViewName = ""; object.materializedViewName = ""; } - if (message.tableName != null && message.hasOwnProperty("tableName")) + if (message.tableName != null && Object.hasOwnProperty.call(message, "tableName")) object.tableName = message.tableName; - if (message.rows != null && message.hasOwnProperty("rows")) - object.rows = $root.google.bigtable.v2.RowSet.toObject(message.rows, options); - if (message.filter != null && message.hasOwnProperty("filter")) - object.filter = $root.google.bigtable.v2.RowFilter.toObject(message.filter, options); - if (message.rowsLimit != null && message.hasOwnProperty("rowsLimit")) - if (typeof message.rowsLimit === "number") + if (message.rows != null && Object.hasOwnProperty.call(message, "rows")) + object.rows = $root.google.bigtable.v2.RowSet.toObject(message.rows, options, q + 1); + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + object.filter = $root.google.bigtable.v2.RowFilter.toObject(message.filter, options, q + 1); + if (message.rowsLimit != null && Object.hasOwnProperty.call(message, "rowsLimit")) + if (typeof BigInt !== "undefined" && options.longs === BigInt) + object.rowsLimit = typeof message.rowsLimit === "number" ? BigInt(message.rowsLimit) : $util.Long.fromBits(message.rowsLimit.low >>> 0, message.rowsLimit.high >>> 0, false).toBigInt(); + else if (typeof message.rowsLimit === "number") object.rowsLimit = options.longs === String ? String(message.rowsLimit) : message.rowsLimit; else object.rowsLimit = options.longs === String ? $util.Long.prototype.toString.call(message.rowsLimit) : options.longs === Number ? new $util.LongBits(message.rowsLimit.low >>> 0, message.rowsLimit.high >>> 0).toNumber() : message.rowsLimit; - if (message.appProfileId != null && message.hasOwnProperty("appProfileId")) + if (message.appProfileId != null && Object.hasOwnProperty.call(message, "appProfileId")) object.appProfileId = message.appProfileId; - if (message.requestStatsView != null && message.hasOwnProperty("requestStatsView")) + if (message.requestStatsView != null && Object.hasOwnProperty.call(message, "requestStatsView")) object.requestStatsView = options.enums === String ? $root.google.bigtable.v2.ReadRowsRequest.RequestStatsView[message.requestStatsView] === undefined ? message.requestStatsView : $root.google.bigtable.v2.ReadRowsRequest.RequestStatsView[message.requestStatsView] : message.requestStatsView; - if (message.reversed != null && message.hasOwnProperty("reversed")) + if (message.reversed != null && Object.hasOwnProperty.call(message, "reversed")) object.reversed = message.reversed; - if (message.authorizedViewName != null && message.hasOwnProperty("authorizedViewName")) + if (message.authorizedViewName != null && Object.hasOwnProperty.call(message, "authorizedViewName")) object.authorizedViewName = message.authorizedViewName; - if (message.materializedViewName != null && message.hasOwnProperty("materializedViewName")) + if (message.materializedViewName != null && Object.hasOwnProperty.call(message, "materializedViewName")) object.materializedViewName = message.materializedViewName; return object; }; @@ -48177,16 +49677,20 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ReadRowsResponse.encode = function encode(message, writer) { + ReadRowsResponse.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.chunks != null && message.chunks.length) for (var i = 0; i < message.chunks.length; ++i) - $root.google.bigtable.v2.ReadRowsResponse.CellChunk.encode(message.chunks[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + $root.google.bigtable.v2.ReadRowsResponse.CellChunk.encode(message.chunks[i], writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); if (message.lastScannedRowKey != null && Object.hasOwnProperty.call(message, "lastScannedRowKey")) writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.lastScannedRowKey); if (message.requestStats != null && Object.hasOwnProperty.call(message, "requestStats")) - $root.google.bigtable.v2.RequestStats.encode(message.requestStats, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + $root.google.bigtable.v2.RequestStats.encode(message.requestStats, writer.uint32(/* id 3, wireType 2 =*/26).fork(), q + 1).ldelim(); return writer; }; @@ -48200,7 +49704,7 @@ * @returns {$protobuf.Writer} Writer */ ReadRowsResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -48280,7 +49784,7 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.chunks != null && message.hasOwnProperty("chunks")) { + if (message.chunks != null && Object.hasOwnProperty.call(message, "chunks")) { if (!Array.isArray(message.chunks)) return "chunks: array expected"; for (var i = 0; i < message.chunks.length; ++i) { @@ -48289,10 +49793,10 @@ return "chunks." + error; } } - if (message.lastScannedRowKey != null && message.hasOwnProperty("lastScannedRowKey")) + if (message.lastScannedRowKey != null && Object.hasOwnProperty.call(message, "lastScannedRowKey")) if (!(message.lastScannedRowKey && typeof message.lastScannedRowKey.length === "number" || $util.isString(message.lastScannedRowKey))) return "lastScannedRowKey: buffer expected"; - if (message.requestStats != null && message.hasOwnProperty("requestStats")) { + if (message.requestStats != null && Object.hasOwnProperty.call(message, "requestStats")) { var error = $root.google.bigtable.v2.RequestStats.verify(message.requestStats, long + 1); if (error) return "requestStats." + error; @@ -48311,6 +49815,8 @@ ReadRowsResponse.fromObject = function fromObject(object, long) { if (object instanceof $root.google.bigtable.v2.ReadRowsResponse) return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.v2.ReadRowsResponse: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -48321,7 +49827,7 @@ throw TypeError(".google.bigtable.v2.ReadRowsResponse.chunks: array expected"); message.chunks = []; for (var i = 0; i < object.chunks.length; ++i) { - if (typeof object.chunks[i] !== "object") + if (!$util.isObject(object.chunks[i])) throw TypeError(".google.bigtable.v2.ReadRowsResponse.chunks: object expected"); message.chunks[i] = $root.google.bigtable.v2.ReadRowsResponse.CellChunk.fromObject(object.chunks[i], long + 1); } @@ -48332,7 +49838,7 @@ else if (object.lastScannedRowKey.length >= 0) message.lastScannedRowKey = object.lastScannedRowKey; if (object.requestStats != null) { - if (typeof object.requestStats !== "object") + if (!$util.isObject(object.requestStats)) throw TypeError(".google.bigtable.v2.ReadRowsResponse.requestStats: object expected"); message.requestStats = $root.google.bigtable.v2.RequestStats.fromObject(object.requestStats, long + 1); } @@ -48348,9 +49854,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ReadRowsResponse.toObject = function toObject(message, options) { + ReadRowsResponse.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.chunks = []; @@ -48367,12 +49877,12 @@ if (message.chunks && message.chunks.length) { object.chunks = []; for (var j = 0; j < message.chunks.length; ++j) - object.chunks[j] = $root.google.bigtable.v2.ReadRowsResponse.CellChunk.toObject(message.chunks[j], options); + object.chunks[j] = $root.google.bigtable.v2.ReadRowsResponse.CellChunk.toObject(message.chunks[j], options, q + 1); } - if (message.lastScannedRowKey != null && message.hasOwnProperty("lastScannedRowKey")) + if (message.lastScannedRowKey != null && Object.hasOwnProperty.call(message, "lastScannedRowKey")) object.lastScannedRowKey = options.bytes === String ? $util.base64.encode(message.lastScannedRowKey, 0, message.lastScannedRowKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.lastScannedRowKey) : message.lastScannedRowKey; - if (message.requestStats != null && message.hasOwnProperty("requestStats")) - object.requestStats = $root.google.bigtable.v2.RequestStats.toObject(message.requestStats, options); + if (message.requestStats != null && Object.hasOwnProperty.call(message, "requestStats")) + object.requestStats = $root.google.bigtable.v2.RequestStats.toObject(message.requestStats, options, q + 1); return object; }; @@ -48542,15 +50052,19 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CellChunk.encode = function encode(message, writer) { + CellChunk.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.rowKey != null && Object.hasOwnProperty.call(message, "rowKey")) writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.rowKey); if (message.familyName != null && Object.hasOwnProperty.call(message, "familyName")) - $root.google.protobuf.StringValue.encode(message.familyName, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + $root.google.protobuf.StringValue.encode(message.familyName, writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); if (message.qualifier != null && Object.hasOwnProperty.call(message, "qualifier")) - $root.google.protobuf.BytesValue.encode(message.qualifier, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + $root.google.protobuf.BytesValue.encode(message.qualifier, writer.uint32(/* id 3, wireType 2 =*/26).fork(), q + 1).ldelim(); if (message.timestampMicros != null && Object.hasOwnProperty.call(message, "timestampMicros")) writer.uint32(/* id 4, wireType 0 =*/32).int64(message.timestampMicros); if (message.labels != null && message.labels.length) @@ -48577,7 +50091,7 @@ * @returns {$protobuf.Writer} Writer */ CellChunk.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -48682,41 +50196,41 @@ if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; var properties = {}; - if (message.rowKey != null && message.hasOwnProperty("rowKey")) + if (message.rowKey != null && Object.hasOwnProperty.call(message, "rowKey")) if (!(message.rowKey && typeof message.rowKey.length === "number" || $util.isString(message.rowKey))) return "rowKey: buffer expected"; - if (message.familyName != null && message.hasOwnProperty("familyName")) { + if (message.familyName != null && Object.hasOwnProperty.call(message, "familyName")) { var error = $root.google.protobuf.StringValue.verify(message.familyName, long + 1); if (error) return "familyName." + error; } - if (message.qualifier != null && message.hasOwnProperty("qualifier")) { + if (message.qualifier != null && Object.hasOwnProperty.call(message, "qualifier")) { var error = $root.google.protobuf.BytesValue.verify(message.qualifier, long + 1); if (error) return "qualifier." + error; } - if (message.timestampMicros != null && message.hasOwnProperty("timestampMicros")) + if (message.timestampMicros != null && Object.hasOwnProperty.call(message, "timestampMicros")) if (!$util.isInteger(message.timestampMicros) && !(message.timestampMicros && $util.isInteger(message.timestampMicros.low) && $util.isInteger(message.timestampMicros.high))) return "timestampMicros: integer|Long expected"; - if (message.labels != null && message.hasOwnProperty("labels")) { + if (message.labels != null && Object.hasOwnProperty.call(message, "labels")) { if (!Array.isArray(message.labels)) return "labels: array expected"; for (var i = 0; i < message.labels.length; ++i) if (!$util.isString(message.labels[i])) return "labels: string[] expected"; } - if (message.value != null && message.hasOwnProperty("value")) + if (message.value != null && Object.hasOwnProperty.call(message, "value")) if (!(message.value && typeof message.value.length === "number" || $util.isString(message.value))) return "value: buffer expected"; - if (message.valueSize != null && message.hasOwnProperty("valueSize")) + if (message.valueSize != null && Object.hasOwnProperty.call(message, "valueSize")) if (!$util.isInteger(message.valueSize)) return "valueSize: integer expected"; - if (message.resetRow != null && message.hasOwnProperty("resetRow")) { + if (message.resetRow != null && Object.hasOwnProperty.call(message, "resetRow")) { properties.rowStatus = 1; if (typeof message.resetRow !== "boolean") return "resetRow: boolean expected"; } - if (message.commitRow != null && message.hasOwnProperty("commitRow")) { + if (message.commitRow != null && Object.hasOwnProperty.call(message, "commitRow")) { if (properties.rowStatus === 1) return "rowStatus: multiple values"; properties.rowStatus = 1; @@ -48737,6 +50251,8 @@ CellChunk.fromObject = function fromObject(object, long) { if (object instanceof $root.google.bigtable.v2.ReadRowsResponse.CellChunk) return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.v2.ReadRowsResponse.CellChunk: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -48748,18 +50264,18 @@ else if (object.rowKey.length >= 0) message.rowKey = object.rowKey; if (object.familyName != null) { - if (typeof object.familyName !== "object") + if (!$util.isObject(object.familyName)) throw TypeError(".google.bigtable.v2.ReadRowsResponse.CellChunk.familyName: object expected"); message.familyName = $root.google.protobuf.StringValue.fromObject(object.familyName, long + 1); } if (object.qualifier != null) { - if (typeof object.qualifier !== "object") + if (!$util.isObject(object.qualifier)) throw TypeError(".google.bigtable.v2.ReadRowsResponse.CellChunk.qualifier: object expected"); message.qualifier = $root.google.protobuf.BytesValue.fromObject(object.qualifier, long + 1); } if (object.timestampMicros != null) if ($util.Long) - (message.timestampMicros = $util.Long.fromValue(object.timestampMicros)).unsigned = false; + message.timestampMicros = $util.Long.fromValue(object.timestampMicros, false); else if (typeof object.timestampMicros === "string") message.timestampMicros = parseInt(object.timestampMicros, 10); else if (typeof object.timestampMicros === "number") @@ -48796,9 +50312,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CellChunk.toObject = function toObject(message, options) { + CellChunk.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.labels = []; @@ -48814,9 +50334,9 @@ object.qualifier = null; if ($util.Long) { var long = new $util.Long(0, 0, false); - object.timestampMicros = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.timestampMicros = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : typeof BigInt !== "undefined" && options.longs === BigInt ? long.toBigInt() : long; } else - object.timestampMicros = options.longs === String ? "0" : 0; + object.timestampMicros = options.longs === String ? "0" : typeof BigInt !== "undefined" && options.longs === BigInt ? BigInt("0") : 0; if (options.bytes === String) object.value = ""; else { @@ -48826,14 +50346,16 @@ } object.valueSize = 0; } - if (message.rowKey != null && message.hasOwnProperty("rowKey")) + if (message.rowKey != null && Object.hasOwnProperty.call(message, "rowKey")) object.rowKey = options.bytes === String ? $util.base64.encode(message.rowKey, 0, message.rowKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.rowKey) : message.rowKey; - if (message.familyName != null && message.hasOwnProperty("familyName")) - object.familyName = $root.google.protobuf.StringValue.toObject(message.familyName, options); - if (message.qualifier != null && message.hasOwnProperty("qualifier")) - object.qualifier = $root.google.protobuf.BytesValue.toObject(message.qualifier, options); - if (message.timestampMicros != null && message.hasOwnProperty("timestampMicros")) - if (typeof message.timestampMicros === "number") + if (message.familyName != null && Object.hasOwnProperty.call(message, "familyName")) + object.familyName = $root.google.protobuf.StringValue.toObject(message.familyName, options, q + 1); + if (message.qualifier != null && Object.hasOwnProperty.call(message, "qualifier")) + object.qualifier = $root.google.protobuf.BytesValue.toObject(message.qualifier, options, q + 1); + if (message.timestampMicros != null && Object.hasOwnProperty.call(message, "timestampMicros")) + if (typeof BigInt !== "undefined" && options.longs === BigInt) + object.timestampMicros = typeof message.timestampMicros === "number" ? BigInt(message.timestampMicros) : $util.Long.fromBits(message.timestampMicros.low >>> 0, message.timestampMicros.high >>> 0, false).toBigInt(); + else if (typeof message.timestampMicros === "number") object.timestampMicros = options.longs === String ? String(message.timestampMicros) : message.timestampMicros; else object.timestampMicros = options.longs === String ? $util.Long.prototype.toString.call(message.timestampMicros) : options.longs === Number ? new $util.LongBits(message.timestampMicros.low >>> 0, message.timestampMicros.high >>> 0).toNumber() : message.timestampMicros; @@ -48842,16 +50364,16 @@ for (var j = 0; j < message.labels.length; ++j) object.labels[j] = message.labels[j]; } - if (message.value != null && message.hasOwnProperty("value")) + if (message.value != null && Object.hasOwnProperty.call(message, "value")) object.value = options.bytes === String ? $util.base64.encode(message.value, 0, message.value.length) : options.bytes === Array ? Array.prototype.slice.call(message.value) : message.value; - if (message.valueSize != null && message.hasOwnProperty("valueSize")) + if (message.valueSize != null && Object.hasOwnProperty.call(message, "valueSize")) object.valueSize = message.valueSize; - if (message.resetRow != null && message.hasOwnProperty("resetRow")) { + if (message.resetRow != null && Object.hasOwnProperty.call(message, "resetRow")) { object.resetRow = message.resetRow; if (options.oneofs) object.rowStatus = "resetRow"; } - if (message.commitRow != null && message.hasOwnProperty("commitRow")) { + if (message.commitRow != null && Object.hasOwnProperty.call(message, "commitRow")) { object.commitRow = message.commitRow; if (options.oneofs) object.rowStatus = "commitRow"; @@ -48971,9 +50493,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SampleRowKeysRequest.encode = function encode(message, writer) { + SampleRowKeysRequest.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.tableName != null && Object.hasOwnProperty.call(message, "tableName")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.tableName); if (message.appProfileId != null && Object.hasOwnProperty.call(message, "appProfileId")) @@ -48995,7 +50521,7 @@ * @returns {$protobuf.Writer} Writer */ SampleRowKeysRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -49077,16 +50603,16 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.tableName != null && message.hasOwnProperty("tableName")) + if (message.tableName != null && Object.hasOwnProperty.call(message, "tableName")) if (!$util.isString(message.tableName)) return "tableName: string expected"; - if (message.authorizedViewName != null && message.hasOwnProperty("authorizedViewName")) + if (message.authorizedViewName != null && Object.hasOwnProperty.call(message, "authorizedViewName")) if (!$util.isString(message.authorizedViewName)) return "authorizedViewName: string expected"; - if (message.materializedViewName != null && message.hasOwnProperty("materializedViewName")) + if (message.materializedViewName != null && Object.hasOwnProperty.call(message, "materializedViewName")) if (!$util.isString(message.materializedViewName)) return "materializedViewName: string expected"; - if (message.appProfileId != null && message.hasOwnProperty("appProfileId")) + if (message.appProfileId != null && Object.hasOwnProperty.call(message, "appProfileId")) if (!$util.isString(message.appProfileId)) return "appProfileId: string expected"; return null; @@ -49103,6 +50629,8 @@ SampleRowKeysRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.google.bigtable.v2.SampleRowKeysRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.v2.SampleRowKeysRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -49128,9 +50656,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - SampleRowKeysRequest.toObject = function toObject(message, options) { + SampleRowKeysRequest.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.tableName = ""; @@ -49138,13 +50670,13 @@ object.authorizedViewName = ""; object.materializedViewName = ""; } - if (message.tableName != null && message.hasOwnProperty("tableName")) + if (message.tableName != null && Object.hasOwnProperty.call(message, "tableName")) object.tableName = message.tableName; - if (message.appProfileId != null && message.hasOwnProperty("appProfileId")) + if (message.appProfileId != null && Object.hasOwnProperty.call(message, "appProfileId")) object.appProfileId = message.appProfileId; - if (message.authorizedViewName != null && message.hasOwnProperty("authorizedViewName")) + if (message.authorizedViewName != null && Object.hasOwnProperty.call(message, "authorizedViewName")) object.authorizedViewName = message.authorizedViewName; - if (message.materializedViewName != null && message.hasOwnProperty("materializedViewName")) + if (message.materializedViewName != null && Object.hasOwnProperty.call(message, "materializedViewName")) object.materializedViewName = message.materializedViewName; return object; }; @@ -49240,9 +50772,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SampleRowKeysResponse.encode = function encode(message, writer) { + SampleRowKeysResponse.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.rowKey != null && Object.hasOwnProperty.call(message, "rowKey")) writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.rowKey); if (message.offsetBytes != null && Object.hasOwnProperty.call(message, "offsetBytes")) @@ -49260,7 +50796,7 @@ * @returns {$protobuf.Writer} Writer */ SampleRowKeysResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -49334,10 +50870,10 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.rowKey != null && message.hasOwnProperty("rowKey")) + if (message.rowKey != null && Object.hasOwnProperty.call(message, "rowKey")) if (!(message.rowKey && typeof message.rowKey.length === "number" || $util.isString(message.rowKey))) return "rowKey: buffer expected"; - if (message.offsetBytes != null && message.hasOwnProperty("offsetBytes")) + if (message.offsetBytes != null && Object.hasOwnProperty.call(message, "offsetBytes")) if (!$util.isInteger(message.offsetBytes) && !(message.offsetBytes && $util.isInteger(message.offsetBytes.low) && $util.isInteger(message.offsetBytes.high))) return "offsetBytes: integer|Long expected"; return null; @@ -49354,6 +50890,8 @@ SampleRowKeysResponse.fromObject = function fromObject(object, long) { if (object instanceof $root.google.bigtable.v2.SampleRowKeysResponse) return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.v2.SampleRowKeysResponse: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -49366,7 +50904,7 @@ message.rowKey = object.rowKey; if (object.offsetBytes != null) if ($util.Long) - (message.offsetBytes = $util.Long.fromValue(object.offsetBytes)).unsigned = false; + message.offsetBytes = $util.Long.fromValue(object.offsetBytes, false); else if (typeof object.offsetBytes === "string") message.offsetBytes = parseInt(object.offsetBytes, 10); else if (typeof object.offsetBytes === "number") @@ -49385,9 +50923,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - SampleRowKeysResponse.toObject = function toObject(message, options) { + SampleRowKeysResponse.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) { if (options.bytes === String) @@ -49399,14 +50941,16 @@ } if ($util.Long) { var long = new $util.Long(0, 0, false); - object.offsetBytes = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.offsetBytes = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : typeof BigInt !== "undefined" && options.longs === BigInt ? long.toBigInt() : long; } else - object.offsetBytes = options.longs === String ? "0" : 0; + object.offsetBytes = options.longs === String ? "0" : typeof BigInt !== "undefined" && options.longs === BigInt ? BigInt("0") : 0; } - if (message.rowKey != null && message.hasOwnProperty("rowKey")) + if (message.rowKey != null && Object.hasOwnProperty.call(message, "rowKey")) object.rowKey = options.bytes === String ? $util.base64.encode(message.rowKey, 0, message.rowKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.rowKey) : message.rowKey; - if (message.offsetBytes != null && message.hasOwnProperty("offsetBytes")) - if (typeof message.offsetBytes === "number") + if (message.offsetBytes != null && Object.hasOwnProperty.call(message, "offsetBytes")) + if (typeof BigInt !== "undefined" && options.longs === BigInt) + object.offsetBytes = typeof message.offsetBytes === "number" ? BigInt(message.offsetBytes) : $util.Long.fromBits(message.offsetBytes.low >>> 0, message.offsetBytes.high >>> 0, false).toBigInt(); + else if (typeof message.offsetBytes === "number") object.offsetBytes = options.longs === String ? String(message.offsetBytes) : message.offsetBytes; else object.offsetBytes = options.longs === String ? $util.Long.prototype.toString.call(message.offsetBytes) : options.longs === Number ? new $util.LongBits(message.offsetBytes.low >>> 0, message.offsetBytes.high >>> 0).toNumber() : message.offsetBytes; @@ -49541,22 +51085,26 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MutateRowRequest.encode = function encode(message, writer) { + MutateRowRequest.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.tableName != null && Object.hasOwnProperty.call(message, "tableName")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.tableName); if (message.rowKey != null && Object.hasOwnProperty.call(message, "rowKey")) writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.rowKey); if (message.mutations != null && message.mutations.length) for (var i = 0; i < message.mutations.length; ++i) - $root.google.bigtable.v2.Mutation.encode(message.mutations[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + $root.google.bigtable.v2.Mutation.encode(message.mutations[i], writer.uint32(/* id 3, wireType 2 =*/26).fork(), q + 1).ldelim(); if (message.appProfileId != null && Object.hasOwnProperty.call(message, "appProfileId")) writer.uint32(/* id 4, wireType 2 =*/34).string(message.appProfileId); if (message.authorizedViewName != null && Object.hasOwnProperty.call(message, "authorizedViewName")) writer.uint32(/* id 6, wireType 2 =*/50).string(message.authorizedViewName); if (message.idempotency != null && Object.hasOwnProperty.call(message, "idempotency")) - $root.google.bigtable.v2.Idempotency.encode(message.idempotency, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + $root.google.bigtable.v2.Idempotency.encode(message.idempotency, writer.uint32(/* id 8, wireType 2 =*/66).fork(), q + 1).ldelim(); return writer; }; @@ -49570,7 +51118,7 @@ * @returns {$protobuf.Writer} Writer */ MutateRowRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -49662,19 +51210,19 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.tableName != null && message.hasOwnProperty("tableName")) + if (message.tableName != null && Object.hasOwnProperty.call(message, "tableName")) if (!$util.isString(message.tableName)) return "tableName: string expected"; - if (message.authorizedViewName != null && message.hasOwnProperty("authorizedViewName")) + if (message.authorizedViewName != null && Object.hasOwnProperty.call(message, "authorizedViewName")) if (!$util.isString(message.authorizedViewName)) return "authorizedViewName: string expected"; - if (message.appProfileId != null && message.hasOwnProperty("appProfileId")) + if (message.appProfileId != null && Object.hasOwnProperty.call(message, "appProfileId")) if (!$util.isString(message.appProfileId)) return "appProfileId: string expected"; - if (message.rowKey != null && message.hasOwnProperty("rowKey")) + if (message.rowKey != null && Object.hasOwnProperty.call(message, "rowKey")) if (!(message.rowKey && typeof message.rowKey.length === "number" || $util.isString(message.rowKey))) return "rowKey: buffer expected"; - if (message.mutations != null && message.hasOwnProperty("mutations")) { + if (message.mutations != null && Object.hasOwnProperty.call(message, "mutations")) { if (!Array.isArray(message.mutations)) return "mutations: array expected"; for (var i = 0; i < message.mutations.length; ++i) { @@ -49683,7 +51231,7 @@ return "mutations." + error; } } - if (message.idempotency != null && message.hasOwnProperty("idempotency")) { + if (message.idempotency != null && Object.hasOwnProperty.call(message, "idempotency")) { var error = $root.google.bigtable.v2.Idempotency.verify(message.idempotency, long + 1); if (error) return "idempotency." + error; @@ -49702,6 +51250,8 @@ MutateRowRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.google.bigtable.v2.MutateRowRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.v2.MutateRowRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -49723,13 +51273,13 @@ throw TypeError(".google.bigtable.v2.MutateRowRequest.mutations: array expected"); message.mutations = []; for (var i = 0; i < object.mutations.length; ++i) { - if (typeof object.mutations[i] !== "object") + if (!$util.isObject(object.mutations[i])) throw TypeError(".google.bigtable.v2.MutateRowRequest.mutations: object expected"); message.mutations[i] = $root.google.bigtable.v2.Mutation.fromObject(object.mutations[i], long + 1); } } if (object.idempotency != null) { - if (typeof object.idempotency !== "object") + if (!$util.isObject(object.idempotency)) throw TypeError(".google.bigtable.v2.MutateRowRequest.idempotency: object expected"); message.idempotency = $root.google.bigtable.v2.Idempotency.fromObject(object.idempotency, long + 1); } @@ -49745,9 +51295,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - MutateRowRequest.toObject = function toObject(message, options) { + MutateRowRequest.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.mutations = []; @@ -49764,21 +51318,21 @@ object.authorizedViewName = ""; object.idempotency = null; } - if (message.tableName != null && message.hasOwnProperty("tableName")) + if (message.tableName != null && Object.hasOwnProperty.call(message, "tableName")) object.tableName = message.tableName; - if (message.rowKey != null && message.hasOwnProperty("rowKey")) + if (message.rowKey != null && Object.hasOwnProperty.call(message, "rowKey")) object.rowKey = options.bytes === String ? $util.base64.encode(message.rowKey, 0, message.rowKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.rowKey) : message.rowKey; if (message.mutations && message.mutations.length) { object.mutations = []; for (var j = 0; j < message.mutations.length; ++j) - object.mutations[j] = $root.google.bigtable.v2.Mutation.toObject(message.mutations[j], options); + object.mutations[j] = $root.google.bigtable.v2.Mutation.toObject(message.mutations[j], options, q + 1); } - if (message.appProfileId != null && message.hasOwnProperty("appProfileId")) + if (message.appProfileId != null && Object.hasOwnProperty.call(message, "appProfileId")) object.appProfileId = message.appProfileId; - if (message.authorizedViewName != null && message.hasOwnProperty("authorizedViewName")) + if (message.authorizedViewName != null && Object.hasOwnProperty.call(message, "authorizedViewName")) object.authorizedViewName = message.authorizedViewName; - if (message.idempotency != null && message.hasOwnProperty("idempotency")) - object.idempotency = $root.google.bigtable.v2.Idempotency.toObject(message.idempotency, options); + if (message.idempotency != null && Object.hasOwnProperty.call(message, "idempotency")) + object.idempotency = $root.google.bigtable.v2.Idempotency.toObject(message.idempotency, options, q + 1); return object; }; @@ -49855,9 +51409,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MutateRowResponse.encode = function encode(message, writer) { + MutateRowResponse.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); return writer; }; @@ -49871,7 +51429,7 @@ * @returns {$protobuf.Writer} Writer */ MutateRowResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -49951,10 +51509,6 @@ MutateRowResponse.fromObject = function fromObject(object, long) { if (object instanceof $root.google.bigtable.v2.MutateRowResponse) return object; - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - throw Error("maximum nesting depth exceeded"); return new $root.google.bigtable.v2.MutateRowResponse(); }; @@ -50081,14 +51635,18 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MutateRowsRequest.encode = function encode(message, writer) { + MutateRowsRequest.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.tableName != null && Object.hasOwnProperty.call(message, "tableName")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.tableName); if (message.entries != null && message.entries.length) for (var i = 0; i < message.entries.length; ++i) - $root.google.bigtable.v2.MutateRowsRequest.Entry.encode(message.entries[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + $root.google.bigtable.v2.MutateRowsRequest.Entry.encode(message.entries[i], writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); if (message.appProfileId != null && Object.hasOwnProperty.call(message, "appProfileId")) writer.uint32(/* id 3, wireType 2 =*/26).string(message.appProfileId); if (message.authorizedViewName != null && Object.hasOwnProperty.call(message, "authorizedViewName")) @@ -50106,7 +51664,7 @@ * @returns {$protobuf.Writer} Writer */ MutateRowsRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -50190,16 +51748,16 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.tableName != null && message.hasOwnProperty("tableName")) + if (message.tableName != null && Object.hasOwnProperty.call(message, "tableName")) if (!$util.isString(message.tableName)) return "tableName: string expected"; - if (message.authorizedViewName != null && message.hasOwnProperty("authorizedViewName")) + if (message.authorizedViewName != null && Object.hasOwnProperty.call(message, "authorizedViewName")) if (!$util.isString(message.authorizedViewName)) return "authorizedViewName: string expected"; - if (message.appProfileId != null && message.hasOwnProperty("appProfileId")) + if (message.appProfileId != null && Object.hasOwnProperty.call(message, "appProfileId")) if (!$util.isString(message.appProfileId)) return "appProfileId: string expected"; - if (message.entries != null && message.hasOwnProperty("entries")) { + if (message.entries != null && Object.hasOwnProperty.call(message, "entries")) { if (!Array.isArray(message.entries)) return "entries: array expected"; for (var i = 0; i < message.entries.length; ++i) { @@ -50222,6 +51780,8 @@ MutateRowsRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.google.bigtable.v2.MutateRowsRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.v2.MutateRowsRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -50238,7 +51798,7 @@ throw TypeError(".google.bigtable.v2.MutateRowsRequest.entries: array expected"); message.entries = []; for (var i = 0; i < object.entries.length; ++i) { - if (typeof object.entries[i] !== "object") + if (!$util.isObject(object.entries[i])) throw TypeError(".google.bigtable.v2.MutateRowsRequest.entries: object expected"); message.entries[i] = $root.google.bigtable.v2.MutateRowsRequest.Entry.fromObject(object.entries[i], long + 1); } @@ -50255,9 +51815,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - MutateRowsRequest.toObject = function toObject(message, options) { + MutateRowsRequest.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.entries = []; @@ -50266,16 +51830,16 @@ object.appProfileId = ""; object.authorizedViewName = ""; } - if (message.tableName != null && message.hasOwnProperty("tableName")) + if (message.tableName != null && Object.hasOwnProperty.call(message, "tableName")) object.tableName = message.tableName; if (message.entries && message.entries.length) { object.entries = []; for (var j = 0; j < message.entries.length; ++j) - object.entries[j] = $root.google.bigtable.v2.MutateRowsRequest.Entry.toObject(message.entries[j], options); + object.entries[j] = $root.google.bigtable.v2.MutateRowsRequest.Entry.toObject(message.entries[j], options, q + 1); } - if (message.appProfileId != null && message.hasOwnProperty("appProfileId")) + if (message.appProfileId != null && Object.hasOwnProperty.call(message, "appProfileId")) object.appProfileId = message.appProfileId; - if (message.authorizedViewName != null && message.hasOwnProperty("authorizedViewName")) + if (message.authorizedViewName != null && Object.hasOwnProperty.call(message, "authorizedViewName")) object.authorizedViewName = message.authorizedViewName; return object; }; @@ -50378,16 +51942,20 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Entry.encode = function encode(message, writer) { + Entry.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.rowKey != null && Object.hasOwnProperty.call(message, "rowKey")) writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.rowKey); if (message.mutations != null && message.mutations.length) for (var i = 0; i < message.mutations.length; ++i) - $root.google.bigtable.v2.Mutation.encode(message.mutations[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + $root.google.bigtable.v2.Mutation.encode(message.mutations[i], writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); if (message.idempotency != null && Object.hasOwnProperty.call(message, "idempotency")) - $root.google.bigtable.v2.Idempotency.encode(message.idempotency, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + $root.google.bigtable.v2.Idempotency.encode(message.idempotency, writer.uint32(/* id 3, wireType 2 =*/26).fork(), q + 1).ldelim(); return writer; }; @@ -50401,7 +51969,7 @@ * @returns {$protobuf.Writer} Writer */ Entry.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -50481,10 +52049,10 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.rowKey != null && message.hasOwnProperty("rowKey")) + if (message.rowKey != null && Object.hasOwnProperty.call(message, "rowKey")) if (!(message.rowKey && typeof message.rowKey.length === "number" || $util.isString(message.rowKey))) return "rowKey: buffer expected"; - if (message.mutations != null && message.hasOwnProperty("mutations")) { + if (message.mutations != null && Object.hasOwnProperty.call(message, "mutations")) { if (!Array.isArray(message.mutations)) return "mutations: array expected"; for (var i = 0; i < message.mutations.length; ++i) { @@ -50493,7 +52061,7 @@ return "mutations." + error; } } - if (message.idempotency != null && message.hasOwnProperty("idempotency")) { + if (message.idempotency != null && Object.hasOwnProperty.call(message, "idempotency")) { var error = $root.google.bigtable.v2.Idempotency.verify(message.idempotency, long + 1); if (error) return "idempotency." + error; @@ -50512,6 +52080,8 @@ Entry.fromObject = function fromObject(object, long) { if (object instanceof $root.google.bigtable.v2.MutateRowsRequest.Entry) return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.v2.MutateRowsRequest.Entry: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -50527,13 +52097,13 @@ throw TypeError(".google.bigtable.v2.MutateRowsRequest.Entry.mutations: array expected"); message.mutations = []; for (var i = 0; i < object.mutations.length; ++i) { - if (typeof object.mutations[i] !== "object") + if (!$util.isObject(object.mutations[i])) throw TypeError(".google.bigtable.v2.MutateRowsRequest.Entry.mutations: object expected"); message.mutations[i] = $root.google.bigtable.v2.Mutation.fromObject(object.mutations[i], long + 1); } } if (object.idempotency != null) { - if (typeof object.idempotency !== "object") + if (!$util.isObject(object.idempotency)) throw TypeError(".google.bigtable.v2.MutateRowsRequest.Entry.idempotency: object expected"); message.idempotency = $root.google.bigtable.v2.Idempotency.fromObject(object.idempotency, long + 1); } @@ -50549,9 +52119,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Entry.toObject = function toObject(message, options) { + Entry.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.mutations = []; @@ -50565,15 +52139,15 @@ } object.idempotency = null; } - if (message.rowKey != null && message.hasOwnProperty("rowKey")) + if (message.rowKey != null && Object.hasOwnProperty.call(message, "rowKey")) object.rowKey = options.bytes === String ? $util.base64.encode(message.rowKey, 0, message.rowKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.rowKey) : message.rowKey; if (message.mutations && message.mutations.length) { object.mutations = []; for (var j = 0; j < message.mutations.length; ++j) - object.mutations[j] = $root.google.bigtable.v2.Mutation.toObject(message.mutations[j], options); + object.mutations[j] = $root.google.bigtable.v2.Mutation.toObject(message.mutations[j], options, q + 1); } - if (message.idempotency != null && message.hasOwnProperty("idempotency")) - object.idempotency = $root.google.bigtable.v2.Idempotency.toObject(message.idempotency, options); + if (message.idempotency != null && Object.hasOwnProperty.call(message, "idempotency")) + object.idempotency = $root.google.bigtable.v2.Idempotency.toObject(message.idempotency, options, q + 1); return object; }; @@ -50681,14 +52255,18 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MutateRowsResponse.encode = function encode(message, writer) { + MutateRowsResponse.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.entries != null && message.entries.length) for (var i = 0; i < message.entries.length; ++i) - $root.google.bigtable.v2.MutateRowsResponse.Entry.encode(message.entries[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + $root.google.bigtable.v2.MutateRowsResponse.Entry.encode(message.entries[i], writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); if (message.rateLimitInfo != null && Object.hasOwnProperty.call(message, "rateLimitInfo")) - $root.google.bigtable.v2.RateLimitInfo.encode(message.rateLimitInfo, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + $root.google.bigtable.v2.RateLimitInfo.encode(message.rateLimitInfo, writer.uint32(/* id 3, wireType 2 =*/26).fork(), q + 1).ldelim(); return writer; }; @@ -50702,7 +52280,7 @@ * @returns {$protobuf.Writer} Writer */ MutateRowsResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -50779,7 +52357,7 @@ if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; var properties = {}; - if (message.entries != null && message.hasOwnProperty("entries")) { + if (message.entries != null && Object.hasOwnProperty.call(message, "entries")) { if (!Array.isArray(message.entries)) return "entries: array expected"; for (var i = 0; i < message.entries.length; ++i) { @@ -50788,7 +52366,7 @@ return "entries." + error; } } - if (message.rateLimitInfo != null && message.hasOwnProperty("rateLimitInfo")) { + if (message.rateLimitInfo != null && Object.hasOwnProperty.call(message, "rateLimitInfo")) { properties._rateLimitInfo = 1; { var error = $root.google.bigtable.v2.RateLimitInfo.verify(message.rateLimitInfo, long + 1); @@ -50810,6 +52388,8 @@ MutateRowsResponse.fromObject = function fromObject(object, long) { if (object instanceof $root.google.bigtable.v2.MutateRowsResponse) return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.v2.MutateRowsResponse: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -50820,13 +52400,13 @@ throw TypeError(".google.bigtable.v2.MutateRowsResponse.entries: array expected"); message.entries = []; for (var i = 0; i < object.entries.length; ++i) { - if (typeof object.entries[i] !== "object") + if (!$util.isObject(object.entries[i])) throw TypeError(".google.bigtable.v2.MutateRowsResponse.entries: object expected"); message.entries[i] = $root.google.bigtable.v2.MutateRowsResponse.Entry.fromObject(object.entries[i], long + 1); } } if (object.rateLimitInfo != null) { - if (typeof object.rateLimitInfo !== "object") + if (!$util.isObject(object.rateLimitInfo)) throw TypeError(".google.bigtable.v2.MutateRowsResponse.rateLimitInfo: object expected"); message.rateLimitInfo = $root.google.bigtable.v2.RateLimitInfo.fromObject(object.rateLimitInfo, long + 1); } @@ -50842,19 +52422,23 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - MutateRowsResponse.toObject = function toObject(message, options) { + MutateRowsResponse.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.entries = []; if (message.entries && message.entries.length) { object.entries = []; for (var j = 0; j < message.entries.length; ++j) - object.entries[j] = $root.google.bigtable.v2.MutateRowsResponse.Entry.toObject(message.entries[j], options); + object.entries[j] = $root.google.bigtable.v2.MutateRowsResponse.Entry.toObject(message.entries[j], options, q + 1); } - if (message.rateLimitInfo != null && message.hasOwnProperty("rateLimitInfo")) { - object.rateLimitInfo = $root.google.bigtable.v2.RateLimitInfo.toObject(message.rateLimitInfo, options); + if (message.rateLimitInfo != null && Object.hasOwnProperty.call(message, "rateLimitInfo")) { + object.rateLimitInfo = $root.google.bigtable.v2.RateLimitInfo.toObject(message.rateLimitInfo, options, q + 1); if (options.oneofs) object._rateLimitInfo = "rateLimitInfo"; } @@ -50949,13 +52533,17 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Entry.encode = function encode(message, writer) { + Entry.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.index != null && Object.hasOwnProperty.call(message, "index")) writer.uint32(/* id 1, wireType 0 =*/8).int64(message.index); if (message.status != null && Object.hasOwnProperty.call(message, "status")) - $root.google.rpc.Status.encode(message.status, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + $root.google.rpc.Status.encode(message.status, writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); return writer; }; @@ -50969,7 +52557,7 @@ * @returns {$protobuf.Writer} Writer */ Entry.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -51043,10 +52631,10 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.index != null && message.hasOwnProperty("index")) + if (message.index != null && Object.hasOwnProperty.call(message, "index")) if (!$util.isInteger(message.index) && !(message.index && $util.isInteger(message.index.low) && $util.isInteger(message.index.high))) return "index: integer|Long expected"; - if (message.status != null && message.hasOwnProperty("status")) { + if (message.status != null && Object.hasOwnProperty.call(message, "status")) { var error = $root.google.rpc.Status.verify(message.status, long + 1); if (error) return "status." + error; @@ -51065,6 +52653,8 @@ Entry.fromObject = function fromObject(object, long) { if (object instanceof $root.google.bigtable.v2.MutateRowsResponse.Entry) return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.v2.MutateRowsResponse.Entry: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -51072,7 +52662,7 @@ var message = new $root.google.bigtable.v2.MutateRowsResponse.Entry(); if (object.index != null) if ($util.Long) - (message.index = $util.Long.fromValue(object.index)).unsigned = false; + message.index = $util.Long.fromValue(object.index, false); else if (typeof object.index === "string") message.index = parseInt(object.index, 10); else if (typeof object.index === "number") @@ -51080,7 +52670,7 @@ else if (typeof object.index === "object") message.index = new $util.LongBits(object.index.low >>> 0, object.index.high >>> 0).toNumber(); if (object.status != null) { - if (typeof object.status !== "object") + if (!$util.isObject(object.status)) throw TypeError(".google.bigtable.v2.MutateRowsResponse.Entry.status: object expected"); message.status = $root.google.rpc.Status.fromObject(object.status, long + 1); } @@ -51096,25 +52686,31 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Entry.toObject = function toObject(message, options) { + Entry.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) { if ($util.Long) { var long = new $util.Long(0, 0, false); - object.index = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.index = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : typeof BigInt !== "undefined" && options.longs === BigInt ? long.toBigInt() : long; } else - object.index = options.longs === String ? "0" : 0; + object.index = options.longs === String ? "0" : typeof BigInt !== "undefined" && options.longs === BigInt ? BigInt("0") : 0; object.status = null; } - if (message.index != null && message.hasOwnProperty("index")) - if (typeof message.index === "number") + if (message.index != null && Object.hasOwnProperty.call(message, "index")) + if (typeof BigInt !== "undefined" && options.longs === BigInt) + object.index = typeof message.index === "number" ? BigInt(message.index) : $util.Long.fromBits(message.index.low >>> 0, message.index.high >>> 0, false).toBigInt(); + else if (typeof message.index === "number") object.index = options.longs === String ? String(message.index) : message.index; else object.index = options.longs === String ? $util.Long.prototype.toString.call(message.index) : options.longs === Number ? new $util.LongBits(message.index.low >>> 0, message.index.high >>> 0).toNumber() : message.index; - if (message.status != null && message.hasOwnProperty("status")) - object.status = $root.google.rpc.Status.toObject(message.status, options); + if (message.status != null && Object.hasOwnProperty.call(message, "status")) + object.status = $root.google.rpc.Status.toObject(message.status, options, q + 1); return object; }; @@ -51212,11 +52808,15 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - RateLimitInfo.encode = function encode(message, writer) { + RateLimitInfo.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.period != null && Object.hasOwnProperty.call(message, "period")) - $root.google.protobuf.Duration.encode(message.period, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + $root.google.protobuf.Duration.encode(message.period, writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); if (message.factor != null && Object.hasOwnProperty.call(message, "factor")) writer.uint32(/* id 2, wireType 1 =*/17).double(message.factor); return writer; @@ -51232,7 +52832,7 @@ * @returns {$protobuf.Writer} Writer */ RateLimitInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -51306,12 +52906,12 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.period != null && message.hasOwnProperty("period")) { + if (message.period != null && Object.hasOwnProperty.call(message, "period")) { var error = $root.google.protobuf.Duration.verify(message.period, long + 1); if (error) return "period." + error; } - if (message.factor != null && message.hasOwnProperty("factor")) + if (message.factor != null && Object.hasOwnProperty.call(message, "factor")) if (typeof message.factor !== "number") return "factor: number expected"; return null; @@ -51328,13 +52928,15 @@ RateLimitInfo.fromObject = function fromObject(object, long) { if (object instanceof $root.google.bigtable.v2.RateLimitInfo) return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.v2.RateLimitInfo: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) throw Error("maximum nesting depth exceeded"); var message = new $root.google.bigtable.v2.RateLimitInfo(); if (object.period != null) { - if (typeof object.period !== "object") + if (!$util.isObject(object.period)) throw TypeError(".google.bigtable.v2.RateLimitInfo.period: object expected"); message.period = $root.google.protobuf.Duration.fromObject(object.period, long + 1); } @@ -51352,17 +52954,21 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - RateLimitInfo.toObject = function toObject(message, options) { + RateLimitInfo.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.period = null; object.factor = 0; } - if (message.period != null && message.hasOwnProperty("period")) - object.period = $root.google.protobuf.Duration.toObject(message.period, options); - if (message.factor != null && message.hasOwnProperty("factor")) + if (message.period != null && Object.hasOwnProperty.call(message, "period")) + object.period = $root.google.protobuf.Duration.toObject(message.period, options, q + 1); + if (message.factor != null && Object.hasOwnProperty.call(message, "factor")) object.factor = options.json && !isFinite(message.factor) ? String(message.factor) : message.factor; return object; }; @@ -51505,21 +53111,25 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CheckAndMutateRowRequest.encode = function encode(message, writer) { + CheckAndMutateRowRequest.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.tableName != null && Object.hasOwnProperty.call(message, "tableName")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.tableName); if (message.rowKey != null && Object.hasOwnProperty.call(message, "rowKey")) writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.rowKey); if (message.trueMutations != null && message.trueMutations.length) for (var i = 0; i < message.trueMutations.length; ++i) - $root.google.bigtable.v2.Mutation.encode(message.trueMutations[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + $root.google.bigtable.v2.Mutation.encode(message.trueMutations[i], writer.uint32(/* id 4, wireType 2 =*/34).fork(), q + 1).ldelim(); if (message.falseMutations != null && message.falseMutations.length) for (var i = 0; i < message.falseMutations.length; ++i) - $root.google.bigtable.v2.Mutation.encode(message.falseMutations[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + $root.google.bigtable.v2.Mutation.encode(message.falseMutations[i], writer.uint32(/* id 5, wireType 2 =*/42).fork(), q + 1).ldelim(); if (message.predicateFilter != null && Object.hasOwnProperty.call(message, "predicateFilter")) - $root.google.bigtable.v2.RowFilter.encode(message.predicateFilter, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + $root.google.bigtable.v2.RowFilter.encode(message.predicateFilter, writer.uint32(/* id 6, wireType 2 =*/50).fork(), q + 1).ldelim(); if (message.appProfileId != null && Object.hasOwnProperty.call(message, "appProfileId")) writer.uint32(/* id 7, wireType 2 =*/58).string(message.appProfileId); if (message.authorizedViewName != null && Object.hasOwnProperty.call(message, "authorizedViewName")) @@ -51537,7 +53147,7 @@ * @returns {$protobuf.Writer} Writer */ CheckAndMutateRowRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -51635,24 +53245,24 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.tableName != null && message.hasOwnProperty("tableName")) + if (message.tableName != null && Object.hasOwnProperty.call(message, "tableName")) if (!$util.isString(message.tableName)) return "tableName: string expected"; - if (message.authorizedViewName != null && message.hasOwnProperty("authorizedViewName")) + if (message.authorizedViewName != null && Object.hasOwnProperty.call(message, "authorizedViewName")) if (!$util.isString(message.authorizedViewName)) return "authorizedViewName: string expected"; - if (message.appProfileId != null && message.hasOwnProperty("appProfileId")) + if (message.appProfileId != null && Object.hasOwnProperty.call(message, "appProfileId")) if (!$util.isString(message.appProfileId)) return "appProfileId: string expected"; - if (message.rowKey != null && message.hasOwnProperty("rowKey")) + if (message.rowKey != null && Object.hasOwnProperty.call(message, "rowKey")) if (!(message.rowKey && typeof message.rowKey.length === "number" || $util.isString(message.rowKey))) return "rowKey: buffer expected"; - if (message.predicateFilter != null && message.hasOwnProperty("predicateFilter")) { + if (message.predicateFilter != null && Object.hasOwnProperty.call(message, "predicateFilter")) { var error = $root.google.bigtable.v2.RowFilter.verify(message.predicateFilter, long + 1); if (error) return "predicateFilter." + error; } - if (message.trueMutations != null && message.hasOwnProperty("trueMutations")) { + if (message.trueMutations != null && Object.hasOwnProperty.call(message, "trueMutations")) { if (!Array.isArray(message.trueMutations)) return "trueMutations: array expected"; for (var i = 0; i < message.trueMutations.length; ++i) { @@ -51661,7 +53271,7 @@ return "trueMutations." + error; } } - if (message.falseMutations != null && message.hasOwnProperty("falseMutations")) { + if (message.falseMutations != null && Object.hasOwnProperty.call(message, "falseMutations")) { if (!Array.isArray(message.falseMutations)) return "falseMutations: array expected"; for (var i = 0; i < message.falseMutations.length; ++i) { @@ -51684,6 +53294,8 @@ CheckAndMutateRowRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.google.bigtable.v2.CheckAndMutateRowRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.v2.CheckAndMutateRowRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -51701,7 +53313,7 @@ else if (object.rowKey.length >= 0) message.rowKey = object.rowKey; if (object.predicateFilter != null) { - if (typeof object.predicateFilter !== "object") + if (!$util.isObject(object.predicateFilter)) throw TypeError(".google.bigtable.v2.CheckAndMutateRowRequest.predicateFilter: object expected"); message.predicateFilter = $root.google.bigtable.v2.RowFilter.fromObject(object.predicateFilter, long + 1); } @@ -51710,7 +53322,7 @@ throw TypeError(".google.bigtable.v2.CheckAndMutateRowRequest.trueMutations: array expected"); message.trueMutations = []; for (var i = 0; i < object.trueMutations.length; ++i) { - if (typeof object.trueMutations[i] !== "object") + if (!$util.isObject(object.trueMutations[i])) throw TypeError(".google.bigtable.v2.CheckAndMutateRowRequest.trueMutations: object expected"); message.trueMutations[i] = $root.google.bigtable.v2.Mutation.fromObject(object.trueMutations[i], long + 1); } @@ -51720,7 +53332,7 @@ throw TypeError(".google.bigtable.v2.CheckAndMutateRowRequest.falseMutations: array expected"); message.falseMutations = []; for (var i = 0; i < object.falseMutations.length; ++i) { - if (typeof object.falseMutations[i] !== "object") + if (!$util.isObject(object.falseMutations[i])) throw TypeError(".google.bigtable.v2.CheckAndMutateRowRequest.falseMutations: object expected"); message.falseMutations[i] = $root.google.bigtable.v2.Mutation.fromObject(object.falseMutations[i], long + 1); } @@ -51737,9 +53349,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CheckAndMutateRowRequest.toObject = function toObject(message, options) { + CheckAndMutateRowRequest.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) { object.trueMutations = []; @@ -51758,25 +53374,25 @@ object.appProfileId = ""; object.authorizedViewName = ""; } - if (message.tableName != null && message.hasOwnProperty("tableName")) + if (message.tableName != null && Object.hasOwnProperty.call(message, "tableName")) object.tableName = message.tableName; - if (message.rowKey != null && message.hasOwnProperty("rowKey")) + if (message.rowKey != null && Object.hasOwnProperty.call(message, "rowKey")) object.rowKey = options.bytes === String ? $util.base64.encode(message.rowKey, 0, message.rowKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.rowKey) : message.rowKey; if (message.trueMutations && message.trueMutations.length) { object.trueMutations = []; for (var j = 0; j < message.trueMutations.length; ++j) - object.trueMutations[j] = $root.google.bigtable.v2.Mutation.toObject(message.trueMutations[j], options); + object.trueMutations[j] = $root.google.bigtable.v2.Mutation.toObject(message.trueMutations[j], options, q + 1); } if (message.falseMutations && message.falseMutations.length) { object.falseMutations = []; for (var j = 0; j < message.falseMutations.length; ++j) - object.falseMutations[j] = $root.google.bigtable.v2.Mutation.toObject(message.falseMutations[j], options); + object.falseMutations[j] = $root.google.bigtable.v2.Mutation.toObject(message.falseMutations[j], options, q + 1); } - if (message.predicateFilter != null && message.hasOwnProperty("predicateFilter")) - object.predicateFilter = $root.google.bigtable.v2.RowFilter.toObject(message.predicateFilter, options); - if (message.appProfileId != null && message.hasOwnProperty("appProfileId")) + if (message.predicateFilter != null && Object.hasOwnProperty.call(message, "predicateFilter")) + object.predicateFilter = $root.google.bigtable.v2.RowFilter.toObject(message.predicateFilter, options, q + 1); + if (message.appProfileId != null && Object.hasOwnProperty.call(message, "appProfileId")) object.appProfileId = message.appProfileId; - if (message.authorizedViewName != null && message.hasOwnProperty("authorizedViewName")) + if (message.authorizedViewName != null && Object.hasOwnProperty.call(message, "authorizedViewName")) object.authorizedViewName = message.authorizedViewName; return object; }; @@ -51863,9 +53479,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CheckAndMutateRowResponse.encode = function encode(message, writer) { + CheckAndMutateRowResponse.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.predicateMatched != null && Object.hasOwnProperty.call(message, "predicateMatched")) writer.uint32(/* id 1, wireType 0 =*/8).bool(message.predicateMatched); return writer; @@ -51881,7 +53501,7 @@ * @returns {$protobuf.Writer} Writer */ CheckAndMutateRowResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -51951,7 +53571,7 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.predicateMatched != null && message.hasOwnProperty("predicateMatched")) + if (message.predicateMatched != null && Object.hasOwnProperty.call(message, "predicateMatched")) if (typeof message.predicateMatched !== "boolean") return "predicateMatched: boolean expected"; return null; @@ -51968,6 +53588,8 @@ CheckAndMutateRowResponse.fromObject = function fromObject(object, long) { if (object instanceof $root.google.bigtable.v2.CheckAndMutateRowResponse) return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.v2.CheckAndMutateRowResponse: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -51987,13 +53609,17 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CheckAndMutateRowResponse.toObject = function toObject(message, options) { + CheckAndMutateRowResponse.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) object.predicateMatched = false; - if (message.predicateMatched != null && message.hasOwnProperty("predicateMatched")) + if (message.predicateMatched != null && Object.hasOwnProperty.call(message, "predicateMatched")) object.predicateMatched = message.predicateMatched; return object; }; @@ -52089,9 +53715,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - PingAndWarmRequest.encode = function encode(message, writer) { + PingAndWarmRequest.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); if (message.appProfileId != null && Object.hasOwnProperty.call(message, "appProfileId")) @@ -52109,7 +53739,7 @@ * @returns {$protobuf.Writer} Writer */ PingAndWarmRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -52183,10 +53813,10 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) if (!$util.isString(message.name)) return "name: string expected"; - if (message.appProfileId != null && message.hasOwnProperty("appProfileId")) + if (message.appProfileId != null && Object.hasOwnProperty.call(message, "appProfileId")) if (!$util.isString(message.appProfileId)) return "appProfileId: string expected"; return null; @@ -52203,6 +53833,8 @@ PingAndWarmRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.google.bigtable.v2.PingAndWarmRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.v2.PingAndWarmRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -52224,17 +53856,21 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - PingAndWarmRequest.toObject = function toObject(message, options) { + PingAndWarmRequest.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.name = ""; object.appProfileId = ""; } - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) object.name = message.name; - if (message.appProfileId != null && message.hasOwnProperty("appProfileId")) + if (message.appProfileId != null && Object.hasOwnProperty.call(message, "appProfileId")) object.appProfileId = message.appProfileId; return object; }; @@ -52312,9 +53948,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - PingAndWarmResponse.encode = function encode(message, writer) { + PingAndWarmResponse.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); return writer; }; @@ -52328,7 +53968,7 @@ * @returns {$protobuf.Writer} Writer */ PingAndWarmResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -52408,10 +54048,6 @@ PingAndWarmResponse.fromObject = function fromObject(object, long) { if (object instanceof $root.google.bigtable.v2.PingAndWarmResponse) return object; - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - throw Error("maximum nesting depth exceeded"); return new $root.google.bigtable.v2.PingAndWarmResponse(); }; @@ -52547,16 +54183,20 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ReadModifyWriteRowRequest.encode = function encode(message, writer) { + ReadModifyWriteRowRequest.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.tableName != null && Object.hasOwnProperty.call(message, "tableName")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.tableName); if (message.rowKey != null && Object.hasOwnProperty.call(message, "rowKey")) writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.rowKey); if (message.rules != null && message.rules.length) for (var i = 0; i < message.rules.length; ++i) - $root.google.bigtable.v2.ReadModifyWriteRule.encode(message.rules[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + $root.google.bigtable.v2.ReadModifyWriteRule.encode(message.rules[i], writer.uint32(/* id 3, wireType 2 =*/26).fork(), q + 1).ldelim(); if (message.appProfileId != null && Object.hasOwnProperty.call(message, "appProfileId")) writer.uint32(/* id 4, wireType 2 =*/34).string(message.appProfileId); if (message.authorizedViewName != null && Object.hasOwnProperty.call(message, "authorizedViewName")) @@ -52574,7 +54214,7 @@ * @returns {$protobuf.Writer} Writer */ ReadModifyWriteRowRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -52662,19 +54302,19 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.tableName != null && message.hasOwnProperty("tableName")) + if (message.tableName != null && Object.hasOwnProperty.call(message, "tableName")) if (!$util.isString(message.tableName)) return "tableName: string expected"; - if (message.authorizedViewName != null && message.hasOwnProperty("authorizedViewName")) + if (message.authorizedViewName != null && Object.hasOwnProperty.call(message, "authorizedViewName")) if (!$util.isString(message.authorizedViewName)) return "authorizedViewName: string expected"; - if (message.appProfileId != null && message.hasOwnProperty("appProfileId")) + if (message.appProfileId != null && Object.hasOwnProperty.call(message, "appProfileId")) if (!$util.isString(message.appProfileId)) return "appProfileId: string expected"; - if (message.rowKey != null && message.hasOwnProperty("rowKey")) + if (message.rowKey != null && Object.hasOwnProperty.call(message, "rowKey")) if (!(message.rowKey && typeof message.rowKey.length === "number" || $util.isString(message.rowKey))) return "rowKey: buffer expected"; - if (message.rules != null && message.hasOwnProperty("rules")) { + if (message.rules != null && Object.hasOwnProperty.call(message, "rules")) { if (!Array.isArray(message.rules)) return "rules: array expected"; for (var i = 0; i < message.rules.length; ++i) { @@ -52697,6 +54337,8 @@ ReadModifyWriteRowRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.google.bigtable.v2.ReadModifyWriteRowRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.v2.ReadModifyWriteRowRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -52718,7 +54360,7 @@ throw TypeError(".google.bigtable.v2.ReadModifyWriteRowRequest.rules: array expected"); message.rules = []; for (var i = 0; i < object.rules.length; ++i) { - if (typeof object.rules[i] !== "object") + if (!$util.isObject(object.rules[i])) throw TypeError(".google.bigtable.v2.ReadModifyWriteRowRequest.rules: object expected"); message.rules[i] = $root.google.bigtable.v2.ReadModifyWriteRule.fromObject(object.rules[i], long + 1); } @@ -52735,9 +54377,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ReadModifyWriteRowRequest.toObject = function toObject(message, options) { + ReadModifyWriteRowRequest.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.rules = []; @@ -52753,18 +54399,18 @@ object.appProfileId = ""; object.authorizedViewName = ""; } - if (message.tableName != null && message.hasOwnProperty("tableName")) + if (message.tableName != null && Object.hasOwnProperty.call(message, "tableName")) object.tableName = message.tableName; - if (message.rowKey != null && message.hasOwnProperty("rowKey")) + if (message.rowKey != null && Object.hasOwnProperty.call(message, "rowKey")) object.rowKey = options.bytes === String ? $util.base64.encode(message.rowKey, 0, message.rowKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.rowKey) : message.rowKey; if (message.rules && message.rules.length) { object.rules = []; for (var j = 0; j < message.rules.length; ++j) - object.rules[j] = $root.google.bigtable.v2.ReadModifyWriteRule.toObject(message.rules[j], options); + object.rules[j] = $root.google.bigtable.v2.ReadModifyWriteRule.toObject(message.rules[j], options, q + 1); } - if (message.appProfileId != null && message.hasOwnProperty("appProfileId")) + if (message.appProfileId != null && Object.hasOwnProperty.call(message, "appProfileId")) object.appProfileId = message.appProfileId; - if (message.authorizedViewName != null && message.hasOwnProperty("authorizedViewName")) + if (message.authorizedViewName != null && Object.hasOwnProperty.call(message, "authorizedViewName")) object.authorizedViewName = message.authorizedViewName; return object; }; @@ -52851,11 +54497,15 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ReadModifyWriteRowResponse.encode = function encode(message, writer) { + ReadModifyWriteRowResponse.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.row != null && Object.hasOwnProperty.call(message, "row")) - $root.google.bigtable.v2.Row.encode(message.row, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + $root.google.bigtable.v2.Row.encode(message.row, writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); return writer; }; @@ -52869,7 +54519,7 @@ * @returns {$protobuf.Writer} Writer */ ReadModifyWriteRowResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -52939,7 +54589,7 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.row != null && message.hasOwnProperty("row")) { + if (message.row != null && Object.hasOwnProperty.call(message, "row")) { var error = $root.google.bigtable.v2.Row.verify(message.row, long + 1); if (error) return "row." + error; @@ -52958,13 +54608,15 @@ ReadModifyWriteRowResponse.fromObject = function fromObject(object, long) { if (object instanceof $root.google.bigtable.v2.ReadModifyWriteRowResponse) return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.v2.ReadModifyWriteRowResponse: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) throw Error("maximum nesting depth exceeded"); var message = new $root.google.bigtable.v2.ReadModifyWriteRowResponse(); if (object.row != null) { - if (typeof object.row !== "object") + if (!$util.isObject(object.row)) throw TypeError(".google.bigtable.v2.ReadModifyWriteRowResponse.row: object expected"); message.row = $root.google.bigtable.v2.Row.fromObject(object.row, long + 1); } @@ -52980,14 +54632,18 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ReadModifyWriteRowResponse.toObject = function toObject(message, options) { + ReadModifyWriteRowResponse.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) object.row = null; - if (message.row != null && message.hasOwnProperty("row")) - object.row = $root.google.bigtable.v2.Row.toObject(message.row, options); + if (message.row != null && Object.hasOwnProperty.call(message, "row")) + object.row = $root.google.bigtable.v2.Row.toObject(message.row, options, q + 1); return object; }; @@ -53082,9 +54738,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GenerateInitialChangeStreamPartitionsRequest.encode = function encode(message, writer) { + GenerateInitialChangeStreamPartitionsRequest.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.tableName != null && Object.hasOwnProperty.call(message, "tableName")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.tableName); if (message.appProfileId != null && Object.hasOwnProperty.call(message, "appProfileId")) @@ -53102,7 +54762,7 @@ * @returns {$protobuf.Writer} Writer */ GenerateInitialChangeStreamPartitionsRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -53176,10 +54836,10 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.tableName != null && message.hasOwnProperty("tableName")) + if (message.tableName != null && Object.hasOwnProperty.call(message, "tableName")) if (!$util.isString(message.tableName)) return "tableName: string expected"; - if (message.appProfileId != null && message.hasOwnProperty("appProfileId")) + if (message.appProfileId != null && Object.hasOwnProperty.call(message, "appProfileId")) if (!$util.isString(message.appProfileId)) return "appProfileId: string expected"; return null; @@ -53196,6 +54856,8 @@ GenerateInitialChangeStreamPartitionsRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.google.bigtable.v2.GenerateInitialChangeStreamPartitionsRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.v2.GenerateInitialChangeStreamPartitionsRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -53217,17 +54879,21 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GenerateInitialChangeStreamPartitionsRequest.toObject = function toObject(message, options) { + GenerateInitialChangeStreamPartitionsRequest.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.tableName = ""; object.appProfileId = ""; } - if (message.tableName != null && message.hasOwnProperty("tableName")) + if (message.tableName != null && Object.hasOwnProperty.call(message, "tableName")) object.tableName = message.tableName; - if (message.appProfileId != null && message.hasOwnProperty("appProfileId")) + if (message.appProfileId != null && Object.hasOwnProperty.call(message, "appProfileId")) object.appProfileId = message.appProfileId; return object; }; @@ -53314,11 +54980,15 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GenerateInitialChangeStreamPartitionsResponse.encode = function encode(message, writer) { + GenerateInitialChangeStreamPartitionsResponse.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.partition != null && Object.hasOwnProperty.call(message, "partition")) - $root.google.bigtable.v2.StreamPartition.encode(message.partition, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + $root.google.bigtable.v2.StreamPartition.encode(message.partition, writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); return writer; }; @@ -53332,7 +55002,7 @@ * @returns {$protobuf.Writer} Writer */ GenerateInitialChangeStreamPartitionsResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -53402,7 +55072,7 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.partition != null && message.hasOwnProperty("partition")) { + if (message.partition != null && Object.hasOwnProperty.call(message, "partition")) { var error = $root.google.bigtable.v2.StreamPartition.verify(message.partition, long + 1); if (error) return "partition." + error; @@ -53421,13 +55091,15 @@ GenerateInitialChangeStreamPartitionsResponse.fromObject = function fromObject(object, long) { if (object instanceof $root.google.bigtable.v2.GenerateInitialChangeStreamPartitionsResponse) return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.v2.GenerateInitialChangeStreamPartitionsResponse: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) throw Error("maximum nesting depth exceeded"); var message = new $root.google.bigtable.v2.GenerateInitialChangeStreamPartitionsResponse(); if (object.partition != null) { - if (typeof object.partition !== "object") + if (!$util.isObject(object.partition)) throw TypeError(".google.bigtable.v2.GenerateInitialChangeStreamPartitionsResponse.partition: object expected"); message.partition = $root.google.bigtable.v2.StreamPartition.fromObject(object.partition, long + 1); } @@ -53443,14 +55115,18 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GenerateInitialChangeStreamPartitionsResponse.toObject = function toObject(message, options) { + GenerateInitialChangeStreamPartitionsResponse.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) object.partition = null; - if (message.partition != null && message.hasOwnProperty("partition")) - object.partition = $root.google.bigtable.v2.StreamPartition.toObject(message.partition, options); + if (message.partition != null && Object.hasOwnProperty.call(message, "partition")) + object.partition = $root.google.bigtable.v2.StreamPartition.toObject(message.partition, options, q + 1); return object; }; @@ -53604,23 +55280,27 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ReadChangeStreamRequest.encode = function encode(message, writer) { + ReadChangeStreamRequest.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.tableName != null && Object.hasOwnProperty.call(message, "tableName")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.tableName); if (message.appProfileId != null && Object.hasOwnProperty.call(message, "appProfileId")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.appProfileId); if (message.partition != null && Object.hasOwnProperty.call(message, "partition")) - $root.google.bigtable.v2.StreamPartition.encode(message.partition, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + $root.google.bigtable.v2.StreamPartition.encode(message.partition, writer.uint32(/* id 3, wireType 2 =*/26).fork(), q + 1).ldelim(); if (message.startTime != null && Object.hasOwnProperty.call(message, "startTime")) - $root.google.protobuf.Timestamp.encode(message.startTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + $root.google.protobuf.Timestamp.encode(message.startTime, writer.uint32(/* id 4, wireType 2 =*/34).fork(), q + 1).ldelim(); if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) - $root.google.protobuf.Timestamp.encode(message.endTime, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + $root.google.protobuf.Timestamp.encode(message.endTime, writer.uint32(/* id 5, wireType 2 =*/42).fork(), q + 1).ldelim(); if (message.continuationTokens != null && Object.hasOwnProperty.call(message, "continuationTokens")) - $root.google.bigtable.v2.StreamContinuationTokens.encode(message.continuationTokens, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + $root.google.bigtable.v2.StreamContinuationTokens.encode(message.continuationTokens, writer.uint32(/* id 6, wireType 2 =*/50).fork(), q + 1).ldelim(); if (message.heartbeatDuration != null && Object.hasOwnProperty.call(message, "heartbeatDuration")) - $root.google.protobuf.Duration.encode(message.heartbeatDuration, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + $root.google.protobuf.Duration.encode(message.heartbeatDuration, writer.uint32(/* id 7, wireType 2 =*/58).fork(), q + 1).ldelim(); return writer; }; @@ -53634,7 +55314,7 @@ * @returns {$protobuf.Writer} Writer */ ReadChangeStreamRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -53729,18 +55409,18 @@ if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; var properties = {}; - if (message.tableName != null && message.hasOwnProperty("tableName")) + if (message.tableName != null && Object.hasOwnProperty.call(message, "tableName")) if (!$util.isString(message.tableName)) return "tableName: string expected"; - if (message.appProfileId != null && message.hasOwnProperty("appProfileId")) + if (message.appProfileId != null && Object.hasOwnProperty.call(message, "appProfileId")) if (!$util.isString(message.appProfileId)) return "appProfileId: string expected"; - if (message.partition != null && message.hasOwnProperty("partition")) { + if (message.partition != null && Object.hasOwnProperty.call(message, "partition")) { var error = $root.google.bigtable.v2.StreamPartition.verify(message.partition, long + 1); if (error) return "partition." + error; } - if (message.startTime != null && message.hasOwnProperty("startTime")) { + if (message.startTime != null && Object.hasOwnProperty.call(message, "startTime")) { properties.startFrom = 1; { var error = $root.google.protobuf.Timestamp.verify(message.startTime, long + 1); @@ -53748,7 +55428,7 @@ return "startTime." + error; } } - if (message.continuationTokens != null && message.hasOwnProperty("continuationTokens")) { + if (message.continuationTokens != null && Object.hasOwnProperty.call(message, "continuationTokens")) { if (properties.startFrom === 1) return "startFrom: multiple values"; properties.startFrom = 1; @@ -53758,12 +55438,12 @@ return "continuationTokens." + error; } } - if (message.endTime != null && message.hasOwnProperty("endTime")) { + if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) { var error = $root.google.protobuf.Timestamp.verify(message.endTime, long + 1); if (error) return "endTime." + error; } - if (message.heartbeatDuration != null && message.hasOwnProperty("heartbeatDuration")) { + if (message.heartbeatDuration != null && Object.hasOwnProperty.call(message, "heartbeatDuration")) { var error = $root.google.protobuf.Duration.verify(message.heartbeatDuration, long + 1); if (error) return "heartbeatDuration." + error; @@ -53782,6 +55462,8 @@ ReadChangeStreamRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.google.bigtable.v2.ReadChangeStreamRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.v2.ReadChangeStreamRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -53792,27 +55474,27 @@ if (object.appProfileId != null) message.appProfileId = String(object.appProfileId); if (object.partition != null) { - if (typeof object.partition !== "object") + if (!$util.isObject(object.partition)) throw TypeError(".google.bigtable.v2.ReadChangeStreamRequest.partition: object expected"); message.partition = $root.google.bigtable.v2.StreamPartition.fromObject(object.partition, long + 1); } if (object.startTime != null) { - if (typeof object.startTime !== "object") + if (!$util.isObject(object.startTime)) throw TypeError(".google.bigtable.v2.ReadChangeStreamRequest.startTime: object expected"); message.startTime = $root.google.protobuf.Timestamp.fromObject(object.startTime, long + 1); } if (object.continuationTokens != null) { - if (typeof object.continuationTokens !== "object") + if (!$util.isObject(object.continuationTokens)) throw TypeError(".google.bigtable.v2.ReadChangeStreamRequest.continuationTokens: object expected"); message.continuationTokens = $root.google.bigtable.v2.StreamContinuationTokens.fromObject(object.continuationTokens, long + 1); } if (object.endTime != null) { - if (typeof object.endTime !== "object") + if (!$util.isObject(object.endTime)) throw TypeError(".google.bigtable.v2.ReadChangeStreamRequest.endTime: object expected"); message.endTime = $root.google.protobuf.Timestamp.fromObject(object.endTime, long + 1); } if (object.heartbeatDuration != null) { - if (typeof object.heartbeatDuration !== "object") + if (!$util.isObject(object.heartbeatDuration)) throw TypeError(".google.bigtable.v2.ReadChangeStreamRequest.heartbeatDuration: object expected"); message.heartbeatDuration = $root.google.protobuf.Duration.fromObject(object.heartbeatDuration, long + 1); } @@ -53828,9 +55510,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ReadChangeStreamRequest.toObject = function toObject(message, options) { + ReadChangeStreamRequest.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.tableName = ""; @@ -53839,26 +55525,26 @@ object.endTime = null; object.heartbeatDuration = null; } - if (message.tableName != null && message.hasOwnProperty("tableName")) + if (message.tableName != null && Object.hasOwnProperty.call(message, "tableName")) object.tableName = message.tableName; - if (message.appProfileId != null && message.hasOwnProperty("appProfileId")) + if (message.appProfileId != null && Object.hasOwnProperty.call(message, "appProfileId")) object.appProfileId = message.appProfileId; - if (message.partition != null && message.hasOwnProperty("partition")) - object.partition = $root.google.bigtable.v2.StreamPartition.toObject(message.partition, options); - if (message.startTime != null && message.hasOwnProperty("startTime")) { - object.startTime = $root.google.protobuf.Timestamp.toObject(message.startTime, options); + if (message.partition != null && Object.hasOwnProperty.call(message, "partition")) + object.partition = $root.google.bigtable.v2.StreamPartition.toObject(message.partition, options, q + 1); + if (message.startTime != null && Object.hasOwnProperty.call(message, "startTime")) { + object.startTime = $root.google.protobuf.Timestamp.toObject(message.startTime, options, q + 1); if (options.oneofs) object.startFrom = "startTime"; } - if (message.endTime != null && message.hasOwnProperty("endTime")) - object.endTime = $root.google.protobuf.Timestamp.toObject(message.endTime, options); - if (message.continuationTokens != null && message.hasOwnProperty("continuationTokens")) { - object.continuationTokens = $root.google.bigtable.v2.StreamContinuationTokens.toObject(message.continuationTokens, options); + if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) + object.endTime = $root.google.protobuf.Timestamp.toObject(message.endTime, options, q + 1); + if (message.continuationTokens != null && Object.hasOwnProperty.call(message, "continuationTokens")) { + object.continuationTokens = $root.google.bigtable.v2.StreamContinuationTokens.toObject(message.continuationTokens, options, q + 1); if (options.oneofs) object.startFrom = "continuationTokens"; } - if (message.heartbeatDuration != null && message.hasOwnProperty("heartbeatDuration")) - object.heartbeatDuration = $root.google.protobuf.Duration.toObject(message.heartbeatDuration, options); + if (message.heartbeatDuration != null && Object.hasOwnProperty.call(message, "heartbeatDuration")) + object.heartbeatDuration = $root.google.protobuf.Duration.toObject(message.heartbeatDuration, options, q + 1); return object; }; @@ -53976,15 +55662,19 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ReadChangeStreamResponse.encode = function encode(message, writer) { + ReadChangeStreamResponse.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.dataChange != null && Object.hasOwnProperty.call(message, "dataChange")) - $root.google.bigtable.v2.ReadChangeStreamResponse.DataChange.encode(message.dataChange, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + $root.google.bigtable.v2.ReadChangeStreamResponse.DataChange.encode(message.dataChange, writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); if (message.heartbeat != null && Object.hasOwnProperty.call(message, "heartbeat")) - $root.google.bigtable.v2.ReadChangeStreamResponse.Heartbeat.encode(message.heartbeat, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + $root.google.bigtable.v2.ReadChangeStreamResponse.Heartbeat.encode(message.heartbeat, writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); if (message.closeStream != null && Object.hasOwnProperty.call(message, "closeStream")) - $root.google.bigtable.v2.ReadChangeStreamResponse.CloseStream.encode(message.closeStream, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + $root.google.bigtable.v2.ReadChangeStreamResponse.CloseStream.encode(message.closeStream, writer.uint32(/* id 3, wireType 2 =*/26).fork(), q + 1).ldelim(); return writer; }; @@ -53998,7 +55688,7 @@ * @returns {$protobuf.Writer} Writer */ ReadChangeStreamResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -54077,7 +55767,7 @@ if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; var properties = {}; - if (message.dataChange != null && message.hasOwnProperty("dataChange")) { + if (message.dataChange != null && Object.hasOwnProperty.call(message, "dataChange")) { properties.streamRecord = 1; { var error = $root.google.bigtable.v2.ReadChangeStreamResponse.DataChange.verify(message.dataChange, long + 1); @@ -54085,7 +55775,7 @@ return "dataChange." + error; } } - if (message.heartbeat != null && message.hasOwnProperty("heartbeat")) { + if (message.heartbeat != null && Object.hasOwnProperty.call(message, "heartbeat")) { if (properties.streamRecord === 1) return "streamRecord: multiple values"; properties.streamRecord = 1; @@ -54095,7 +55785,7 @@ return "heartbeat." + error; } } - if (message.closeStream != null && message.hasOwnProperty("closeStream")) { + if (message.closeStream != null && Object.hasOwnProperty.call(message, "closeStream")) { if (properties.streamRecord === 1) return "streamRecord: multiple values"; properties.streamRecord = 1; @@ -54119,23 +55809,25 @@ ReadChangeStreamResponse.fromObject = function fromObject(object, long) { if (object instanceof $root.google.bigtable.v2.ReadChangeStreamResponse) return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.v2.ReadChangeStreamResponse: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) throw Error("maximum nesting depth exceeded"); var message = new $root.google.bigtable.v2.ReadChangeStreamResponse(); if (object.dataChange != null) { - if (typeof object.dataChange !== "object") + if (!$util.isObject(object.dataChange)) throw TypeError(".google.bigtable.v2.ReadChangeStreamResponse.dataChange: object expected"); message.dataChange = $root.google.bigtable.v2.ReadChangeStreamResponse.DataChange.fromObject(object.dataChange, long + 1); } if (object.heartbeat != null) { - if (typeof object.heartbeat !== "object") + if (!$util.isObject(object.heartbeat)) throw TypeError(".google.bigtable.v2.ReadChangeStreamResponse.heartbeat: object expected"); message.heartbeat = $root.google.bigtable.v2.ReadChangeStreamResponse.Heartbeat.fromObject(object.heartbeat, long + 1); } if (object.closeStream != null) { - if (typeof object.closeStream !== "object") + if (!$util.isObject(object.closeStream)) throw TypeError(".google.bigtable.v2.ReadChangeStreamResponse.closeStream: object expected"); message.closeStream = $root.google.bigtable.v2.ReadChangeStreamResponse.CloseStream.fromObject(object.closeStream, long + 1); } @@ -54151,22 +55843,26 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ReadChangeStreamResponse.toObject = function toObject(message, options) { + ReadChangeStreamResponse.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; - if (message.dataChange != null && message.hasOwnProperty("dataChange")) { - object.dataChange = $root.google.bigtable.v2.ReadChangeStreamResponse.DataChange.toObject(message.dataChange, options); + if (message.dataChange != null && Object.hasOwnProperty.call(message, "dataChange")) { + object.dataChange = $root.google.bigtable.v2.ReadChangeStreamResponse.DataChange.toObject(message.dataChange, options, q + 1); if (options.oneofs) object.streamRecord = "dataChange"; } - if (message.heartbeat != null && message.hasOwnProperty("heartbeat")) { - object.heartbeat = $root.google.bigtable.v2.ReadChangeStreamResponse.Heartbeat.toObject(message.heartbeat, options); + if (message.heartbeat != null && Object.hasOwnProperty.call(message, "heartbeat")) { + object.heartbeat = $root.google.bigtable.v2.ReadChangeStreamResponse.Heartbeat.toObject(message.heartbeat, options, q + 1); if (options.oneofs) object.streamRecord = "heartbeat"; } - if (message.closeStream != null && message.hasOwnProperty("closeStream")) { - object.closeStream = $root.google.bigtable.v2.ReadChangeStreamResponse.CloseStream.toObject(message.closeStream, options); + if (message.closeStream != null && Object.hasOwnProperty.call(message, "closeStream")) { + object.closeStream = $root.google.bigtable.v2.ReadChangeStreamResponse.CloseStream.toObject(message.closeStream, options, q + 1); if (options.oneofs) object.streamRecord = "closeStream"; } @@ -54261,13 +55957,17 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MutationChunk.encode = function encode(message, writer) { + MutationChunk.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.chunkInfo != null && Object.hasOwnProperty.call(message, "chunkInfo")) - $root.google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.ChunkInfo.encode(message.chunkInfo, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + $root.google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.ChunkInfo.encode(message.chunkInfo, writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); if (message.mutation != null && Object.hasOwnProperty.call(message, "mutation")) - $root.google.bigtable.v2.Mutation.encode(message.mutation, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + $root.google.bigtable.v2.Mutation.encode(message.mutation, writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); return writer; }; @@ -54281,7 +55981,7 @@ * @returns {$protobuf.Writer} Writer */ MutationChunk.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -54355,12 +56055,12 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.chunkInfo != null && message.hasOwnProperty("chunkInfo")) { + if (message.chunkInfo != null && Object.hasOwnProperty.call(message, "chunkInfo")) { var error = $root.google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.ChunkInfo.verify(message.chunkInfo, long + 1); if (error) return "chunkInfo." + error; } - if (message.mutation != null && message.hasOwnProperty("mutation")) { + if (message.mutation != null && Object.hasOwnProperty.call(message, "mutation")) { var error = $root.google.bigtable.v2.Mutation.verify(message.mutation, long + 1); if (error) return "mutation." + error; @@ -54379,18 +56079,20 @@ MutationChunk.fromObject = function fromObject(object, long) { if (object instanceof $root.google.bigtable.v2.ReadChangeStreamResponse.MutationChunk) return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.v2.ReadChangeStreamResponse.MutationChunk: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) throw Error("maximum nesting depth exceeded"); var message = new $root.google.bigtable.v2.ReadChangeStreamResponse.MutationChunk(); if (object.chunkInfo != null) { - if (typeof object.chunkInfo !== "object") + if (!$util.isObject(object.chunkInfo)) throw TypeError(".google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.chunkInfo: object expected"); message.chunkInfo = $root.google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.ChunkInfo.fromObject(object.chunkInfo, long + 1); } if (object.mutation != null) { - if (typeof object.mutation !== "object") + if (!$util.isObject(object.mutation)) throw TypeError(".google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.mutation: object expected"); message.mutation = $root.google.bigtable.v2.Mutation.fromObject(object.mutation, long + 1); } @@ -54406,18 +56108,22 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - MutationChunk.toObject = function toObject(message, options) { + MutationChunk.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.chunkInfo = null; object.mutation = null; } - if (message.chunkInfo != null && message.hasOwnProperty("chunkInfo")) - object.chunkInfo = $root.google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.ChunkInfo.toObject(message.chunkInfo, options); - if (message.mutation != null && message.hasOwnProperty("mutation")) - object.mutation = $root.google.bigtable.v2.Mutation.toObject(message.mutation, options); + if (message.chunkInfo != null && Object.hasOwnProperty.call(message, "chunkInfo")) + object.chunkInfo = $root.google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.ChunkInfo.toObject(message.chunkInfo, options, q + 1); + if (message.mutation != null && Object.hasOwnProperty.call(message, "mutation")) + object.mutation = $root.google.bigtable.v2.Mutation.toObject(message.mutation, options, q + 1); return object; }; @@ -54518,9 +56224,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ChunkInfo.encode = function encode(message, writer) { + ChunkInfo.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.chunkedValueSize != null && Object.hasOwnProperty.call(message, "chunkedValueSize")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.chunkedValueSize); if (message.chunkedValueOffset != null && Object.hasOwnProperty.call(message, "chunkedValueOffset")) @@ -54540,7 +56250,7 @@ * @returns {$protobuf.Writer} Writer */ ChunkInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -54618,13 +56328,13 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.chunkedValueSize != null && message.hasOwnProperty("chunkedValueSize")) + if (message.chunkedValueSize != null && Object.hasOwnProperty.call(message, "chunkedValueSize")) if (!$util.isInteger(message.chunkedValueSize)) return "chunkedValueSize: integer expected"; - if (message.chunkedValueOffset != null && message.hasOwnProperty("chunkedValueOffset")) + if (message.chunkedValueOffset != null && Object.hasOwnProperty.call(message, "chunkedValueOffset")) if (!$util.isInteger(message.chunkedValueOffset)) return "chunkedValueOffset: integer expected"; - if (message.lastChunk != null && message.hasOwnProperty("lastChunk")) + if (message.lastChunk != null && Object.hasOwnProperty.call(message, "lastChunk")) if (typeof message.lastChunk !== "boolean") return "lastChunk: boolean expected"; return null; @@ -54641,6 +56351,8 @@ ChunkInfo.fromObject = function fromObject(object, long) { if (object instanceof $root.google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.ChunkInfo) return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.ChunkInfo: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -54664,20 +56376,24 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ChunkInfo.toObject = function toObject(message, options) { + ChunkInfo.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.chunkedValueSize = 0; object.chunkedValueOffset = 0; object.lastChunk = false; } - if (message.chunkedValueSize != null && message.hasOwnProperty("chunkedValueSize")) + if (message.chunkedValueSize != null && Object.hasOwnProperty.call(message, "chunkedValueSize")) object.chunkedValueSize = message.chunkedValueSize; - if (message.chunkedValueOffset != null && message.hasOwnProperty("chunkedValueOffset")) + if (message.chunkedValueOffset != null && Object.hasOwnProperty.call(message, "chunkedValueOffset")) object.chunkedValueOffset = message.chunkedValueOffset; - if (message.lastChunk != null && message.hasOwnProperty("lastChunk")) + if (message.lastChunk != null && Object.hasOwnProperty.call(message, "lastChunk")) object.lastChunk = message.lastChunk; return object; }; @@ -54840,9 +56556,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DataChange.encode = function encode(message, writer) { + DataChange.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.type != null && Object.hasOwnProperty.call(message, "type")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.type); if (message.sourceClusterId != null && Object.hasOwnProperty.call(message, "sourceClusterId")) @@ -54850,18 +56570,18 @@ if (message.rowKey != null && Object.hasOwnProperty.call(message, "rowKey")) writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.rowKey); if (message.commitTimestamp != null && Object.hasOwnProperty.call(message, "commitTimestamp")) - $root.google.protobuf.Timestamp.encode(message.commitTimestamp, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + $root.google.protobuf.Timestamp.encode(message.commitTimestamp, writer.uint32(/* id 4, wireType 2 =*/34).fork(), q + 1).ldelim(); if (message.tiebreaker != null && Object.hasOwnProperty.call(message, "tiebreaker")) writer.uint32(/* id 5, wireType 0 =*/40).int32(message.tiebreaker); if (message.chunks != null && message.chunks.length) for (var i = 0; i < message.chunks.length; ++i) - $root.google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.encode(message.chunks[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + $root.google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.encode(message.chunks[i], writer.uint32(/* id 6, wireType 2 =*/50).fork(), q + 1).ldelim(); if (message.done != null && Object.hasOwnProperty.call(message, "done")) writer.uint32(/* id 8, wireType 0 =*/64).bool(message.done); if (message.token != null && Object.hasOwnProperty.call(message, "token")) writer.uint32(/* id 9, wireType 2 =*/74).string(message.token); if (message.estimatedLowWatermark != null && Object.hasOwnProperty.call(message, "estimatedLowWatermark")) - $root.google.protobuf.Timestamp.encode(message.estimatedLowWatermark, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + $root.google.protobuf.Timestamp.encode(message.estimatedLowWatermark, writer.uint32(/* id 10, wireType 2 =*/82).fork(), q + 1).ldelim(); return writer; }; @@ -54875,7 +56595,7 @@ * @returns {$protobuf.Writer} Writer */ DataChange.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -54979,7 +56699,7 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.type != null && message.hasOwnProperty("type")) + if (message.type != null && Object.hasOwnProperty.call(message, "type")) switch (message.type) { default: return "type: enum value expected"; @@ -54989,21 +56709,21 @@ case 3: break; } - if (message.sourceClusterId != null && message.hasOwnProperty("sourceClusterId")) + if (message.sourceClusterId != null && Object.hasOwnProperty.call(message, "sourceClusterId")) if (!$util.isString(message.sourceClusterId)) return "sourceClusterId: string expected"; - if (message.rowKey != null && message.hasOwnProperty("rowKey")) + if (message.rowKey != null && Object.hasOwnProperty.call(message, "rowKey")) if (!(message.rowKey && typeof message.rowKey.length === "number" || $util.isString(message.rowKey))) return "rowKey: buffer expected"; - if (message.commitTimestamp != null && message.hasOwnProperty("commitTimestamp")) { + if (message.commitTimestamp != null && Object.hasOwnProperty.call(message, "commitTimestamp")) { var error = $root.google.protobuf.Timestamp.verify(message.commitTimestamp, long + 1); if (error) return "commitTimestamp." + error; } - if (message.tiebreaker != null && message.hasOwnProperty("tiebreaker")) + if (message.tiebreaker != null && Object.hasOwnProperty.call(message, "tiebreaker")) if (!$util.isInteger(message.tiebreaker)) return "tiebreaker: integer expected"; - if (message.chunks != null && message.hasOwnProperty("chunks")) { + if (message.chunks != null && Object.hasOwnProperty.call(message, "chunks")) { if (!Array.isArray(message.chunks)) return "chunks: array expected"; for (var i = 0; i < message.chunks.length; ++i) { @@ -55012,13 +56732,13 @@ return "chunks." + error; } } - if (message.done != null && message.hasOwnProperty("done")) + if (message.done != null && Object.hasOwnProperty.call(message, "done")) if (typeof message.done !== "boolean") return "done: boolean expected"; - if (message.token != null && message.hasOwnProperty("token")) + if (message.token != null && Object.hasOwnProperty.call(message, "token")) if (!$util.isString(message.token)) return "token: string expected"; - if (message.estimatedLowWatermark != null && message.hasOwnProperty("estimatedLowWatermark")) { + if (message.estimatedLowWatermark != null && Object.hasOwnProperty.call(message, "estimatedLowWatermark")) { var error = $root.google.protobuf.Timestamp.verify(message.estimatedLowWatermark, long + 1); if (error) return "estimatedLowWatermark." + error; @@ -55037,6 +56757,8 @@ DataChange.fromObject = function fromObject(object, long) { if (object instanceof $root.google.bigtable.v2.ReadChangeStreamResponse.DataChange) return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.v2.ReadChangeStreamResponse.DataChange: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -55074,7 +56796,7 @@ else if (object.rowKey.length >= 0) message.rowKey = object.rowKey; if (object.commitTimestamp != null) { - if (typeof object.commitTimestamp !== "object") + if (!$util.isObject(object.commitTimestamp)) throw TypeError(".google.bigtable.v2.ReadChangeStreamResponse.DataChange.commitTimestamp: object expected"); message.commitTimestamp = $root.google.protobuf.Timestamp.fromObject(object.commitTimestamp, long + 1); } @@ -55085,7 +56807,7 @@ throw TypeError(".google.bigtable.v2.ReadChangeStreamResponse.DataChange.chunks: array expected"); message.chunks = []; for (var i = 0; i < object.chunks.length; ++i) { - if (typeof object.chunks[i] !== "object") + if (!$util.isObject(object.chunks[i])) throw TypeError(".google.bigtable.v2.ReadChangeStreamResponse.DataChange.chunks: object expected"); message.chunks[i] = $root.google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.fromObject(object.chunks[i], long + 1); } @@ -55095,7 +56817,7 @@ if (object.token != null) message.token = String(object.token); if (object.estimatedLowWatermark != null) { - if (typeof object.estimatedLowWatermark !== "object") + if (!$util.isObject(object.estimatedLowWatermark)) throw TypeError(".google.bigtable.v2.ReadChangeStreamResponse.DataChange.estimatedLowWatermark: object expected"); message.estimatedLowWatermark = $root.google.protobuf.Timestamp.fromObject(object.estimatedLowWatermark, long + 1); } @@ -55111,9 +56833,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DataChange.toObject = function toObject(message, options) { + DataChange.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.chunks = []; @@ -55133,27 +56859,27 @@ object.token = ""; object.estimatedLowWatermark = null; } - if (message.type != null && message.hasOwnProperty("type")) + if (message.type != null && Object.hasOwnProperty.call(message, "type")) object.type = options.enums === String ? $root.google.bigtable.v2.ReadChangeStreamResponse.DataChange.Type[message.type] === undefined ? message.type : $root.google.bigtable.v2.ReadChangeStreamResponse.DataChange.Type[message.type] : message.type; - if (message.sourceClusterId != null && message.hasOwnProperty("sourceClusterId")) + if (message.sourceClusterId != null && Object.hasOwnProperty.call(message, "sourceClusterId")) object.sourceClusterId = message.sourceClusterId; - if (message.rowKey != null && message.hasOwnProperty("rowKey")) + if (message.rowKey != null && Object.hasOwnProperty.call(message, "rowKey")) object.rowKey = options.bytes === String ? $util.base64.encode(message.rowKey, 0, message.rowKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.rowKey) : message.rowKey; - if (message.commitTimestamp != null && message.hasOwnProperty("commitTimestamp")) - object.commitTimestamp = $root.google.protobuf.Timestamp.toObject(message.commitTimestamp, options); - if (message.tiebreaker != null && message.hasOwnProperty("tiebreaker")) + if (message.commitTimestamp != null && Object.hasOwnProperty.call(message, "commitTimestamp")) + object.commitTimestamp = $root.google.protobuf.Timestamp.toObject(message.commitTimestamp, options, q + 1); + if (message.tiebreaker != null && Object.hasOwnProperty.call(message, "tiebreaker")) object.tiebreaker = message.tiebreaker; if (message.chunks && message.chunks.length) { object.chunks = []; for (var j = 0; j < message.chunks.length; ++j) - object.chunks[j] = $root.google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.toObject(message.chunks[j], options); + object.chunks[j] = $root.google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.toObject(message.chunks[j], options, q + 1); } - if (message.done != null && message.hasOwnProperty("done")) + if (message.done != null && Object.hasOwnProperty.call(message, "done")) object.done = message.done; - if (message.token != null && message.hasOwnProperty("token")) + if (message.token != null && Object.hasOwnProperty.call(message, "token")) object.token = message.token; - if (message.estimatedLowWatermark != null && message.hasOwnProperty("estimatedLowWatermark")) - object.estimatedLowWatermark = $root.google.protobuf.Timestamp.toObject(message.estimatedLowWatermark, options); + if (message.estimatedLowWatermark != null && Object.hasOwnProperty.call(message, "estimatedLowWatermark")) + object.estimatedLowWatermark = $root.google.protobuf.Timestamp.toObject(message.estimatedLowWatermark, options, q + 1); return object; }; @@ -55266,13 +56992,17 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Heartbeat.encode = function encode(message, writer) { + Heartbeat.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.continuationToken != null && Object.hasOwnProperty.call(message, "continuationToken")) - $root.google.bigtable.v2.StreamContinuationToken.encode(message.continuationToken, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + $root.google.bigtable.v2.StreamContinuationToken.encode(message.continuationToken, writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); if (message.estimatedLowWatermark != null && Object.hasOwnProperty.call(message, "estimatedLowWatermark")) - $root.google.protobuf.Timestamp.encode(message.estimatedLowWatermark, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + $root.google.protobuf.Timestamp.encode(message.estimatedLowWatermark, writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); return writer; }; @@ -55286,7 +57016,7 @@ * @returns {$protobuf.Writer} Writer */ Heartbeat.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -55360,12 +57090,12 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.continuationToken != null && message.hasOwnProperty("continuationToken")) { + if (message.continuationToken != null && Object.hasOwnProperty.call(message, "continuationToken")) { var error = $root.google.bigtable.v2.StreamContinuationToken.verify(message.continuationToken, long + 1); if (error) return "continuationToken." + error; } - if (message.estimatedLowWatermark != null && message.hasOwnProperty("estimatedLowWatermark")) { + if (message.estimatedLowWatermark != null && Object.hasOwnProperty.call(message, "estimatedLowWatermark")) { var error = $root.google.protobuf.Timestamp.verify(message.estimatedLowWatermark, long + 1); if (error) return "estimatedLowWatermark." + error; @@ -55384,18 +57114,20 @@ Heartbeat.fromObject = function fromObject(object, long) { if (object instanceof $root.google.bigtable.v2.ReadChangeStreamResponse.Heartbeat) return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.v2.ReadChangeStreamResponse.Heartbeat: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) throw Error("maximum nesting depth exceeded"); var message = new $root.google.bigtable.v2.ReadChangeStreamResponse.Heartbeat(); if (object.continuationToken != null) { - if (typeof object.continuationToken !== "object") + if (!$util.isObject(object.continuationToken)) throw TypeError(".google.bigtable.v2.ReadChangeStreamResponse.Heartbeat.continuationToken: object expected"); message.continuationToken = $root.google.bigtable.v2.StreamContinuationToken.fromObject(object.continuationToken, long + 1); } if (object.estimatedLowWatermark != null) { - if (typeof object.estimatedLowWatermark !== "object") + if (!$util.isObject(object.estimatedLowWatermark)) throw TypeError(".google.bigtable.v2.ReadChangeStreamResponse.Heartbeat.estimatedLowWatermark: object expected"); message.estimatedLowWatermark = $root.google.protobuf.Timestamp.fromObject(object.estimatedLowWatermark, long + 1); } @@ -55411,18 +57143,22 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Heartbeat.toObject = function toObject(message, options) { + Heartbeat.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.continuationToken = null; object.estimatedLowWatermark = null; } - if (message.continuationToken != null && message.hasOwnProperty("continuationToken")) - object.continuationToken = $root.google.bigtable.v2.StreamContinuationToken.toObject(message.continuationToken, options); - if (message.estimatedLowWatermark != null && message.hasOwnProperty("estimatedLowWatermark")) - object.estimatedLowWatermark = $root.google.protobuf.Timestamp.toObject(message.estimatedLowWatermark, options); + if (message.continuationToken != null && Object.hasOwnProperty.call(message, "continuationToken")) + object.continuationToken = $root.google.bigtable.v2.StreamContinuationToken.toObject(message.continuationToken, options, q + 1); + if (message.estimatedLowWatermark != null && Object.hasOwnProperty.call(message, "estimatedLowWatermark")) + object.estimatedLowWatermark = $root.google.protobuf.Timestamp.toObject(message.estimatedLowWatermark, options, q + 1); return object; }; @@ -55528,17 +57264,21 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CloseStream.encode = function encode(message, writer) { + CloseStream.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.status != null && Object.hasOwnProperty.call(message, "status")) - $root.google.rpc.Status.encode(message.status, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + $root.google.rpc.Status.encode(message.status, writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); if (message.continuationTokens != null && message.continuationTokens.length) for (var i = 0; i < message.continuationTokens.length; ++i) - $root.google.bigtable.v2.StreamContinuationToken.encode(message.continuationTokens[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + $root.google.bigtable.v2.StreamContinuationToken.encode(message.continuationTokens[i], writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); if (message.newPartitions != null && message.newPartitions.length) for (var i = 0; i < message.newPartitions.length; ++i) - $root.google.bigtable.v2.StreamPartition.encode(message.newPartitions[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + $root.google.bigtable.v2.StreamPartition.encode(message.newPartitions[i], writer.uint32(/* id 3, wireType 2 =*/26).fork(), q + 1).ldelim(); return writer; }; @@ -55552,7 +57292,7 @@ * @returns {$protobuf.Writer} Writer */ CloseStream.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -55634,12 +57374,12 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.status != null && message.hasOwnProperty("status")) { + if (message.status != null && Object.hasOwnProperty.call(message, "status")) { var error = $root.google.rpc.Status.verify(message.status, long + 1); if (error) return "status." + error; } - if (message.continuationTokens != null && message.hasOwnProperty("continuationTokens")) { + if (message.continuationTokens != null && Object.hasOwnProperty.call(message, "continuationTokens")) { if (!Array.isArray(message.continuationTokens)) return "continuationTokens: array expected"; for (var i = 0; i < message.continuationTokens.length; ++i) { @@ -55648,7 +57388,7 @@ return "continuationTokens." + error; } } - if (message.newPartitions != null && message.hasOwnProperty("newPartitions")) { + if (message.newPartitions != null && Object.hasOwnProperty.call(message, "newPartitions")) { if (!Array.isArray(message.newPartitions)) return "newPartitions: array expected"; for (var i = 0; i < message.newPartitions.length; ++i) { @@ -55671,13 +57411,15 @@ CloseStream.fromObject = function fromObject(object, long) { if (object instanceof $root.google.bigtable.v2.ReadChangeStreamResponse.CloseStream) return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.v2.ReadChangeStreamResponse.CloseStream: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) throw Error("maximum nesting depth exceeded"); var message = new $root.google.bigtable.v2.ReadChangeStreamResponse.CloseStream(); if (object.status != null) { - if (typeof object.status !== "object") + if (!$util.isObject(object.status)) throw TypeError(".google.bigtable.v2.ReadChangeStreamResponse.CloseStream.status: object expected"); message.status = $root.google.rpc.Status.fromObject(object.status, long + 1); } @@ -55686,7 +57428,7 @@ throw TypeError(".google.bigtable.v2.ReadChangeStreamResponse.CloseStream.continuationTokens: array expected"); message.continuationTokens = []; for (var i = 0; i < object.continuationTokens.length; ++i) { - if (typeof object.continuationTokens[i] !== "object") + if (!$util.isObject(object.continuationTokens[i])) throw TypeError(".google.bigtable.v2.ReadChangeStreamResponse.CloseStream.continuationTokens: object expected"); message.continuationTokens[i] = $root.google.bigtable.v2.StreamContinuationToken.fromObject(object.continuationTokens[i], long + 1); } @@ -55696,7 +57438,7 @@ throw TypeError(".google.bigtable.v2.ReadChangeStreamResponse.CloseStream.newPartitions: array expected"); message.newPartitions = []; for (var i = 0; i < object.newPartitions.length; ++i) { - if (typeof object.newPartitions[i] !== "object") + if (!$util.isObject(object.newPartitions[i])) throw TypeError(".google.bigtable.v2.ReadChangeStreamResponse.CloseStream.newPartitions: object expected"); message.newPartitions[i] = $root.google.bigtable.v2.StreamPartition.fromObject(object.newPartitions[i], long + 1); } @@ -55713,9 +57455,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CloseStream.toObject = function toObject(message, options) { + CloseStream.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) { object.continuationTokens = []; @@ -55723,17 +57469,17 @@ } if (options.defaults) object.status = null; - if (message.status != null && message.hasOwnProperty("status")) - object.status = $root.google.rpc.Status.toObject(message.status, options); + if (message.status != null && Object.hasOwnProperty.call(message, "status")) + object.status = $root.google.rpc.Status.toObject(message.status, options, q + 1); if (message.continuationTokens && message.continuationTokens.length) { object.continuationTokens = []; for (var j = 0; j < message.continuationTokens.length; ++j) - object.continuationTokens[j] = $root.google.bigtable.v2.StreamContinuationToken.toObject(message.continuationTokens[j], options); + object.continuationTokens[j] = $root.google.bigtable.v2.StreamContinuationToken.toObject(message.continuationTokens[j], options, q + 1); } if (message.newPartitions && message.newPartitions.length) { object.newPartitions = []; for (var j = 0; j < message.newPartitions.length; ++j) - object.newPartitions[j] = $root.google.bigtable.v2.StreamPartition.toObject(message.newPartitions[j], options); + object.newPartitions[j] = $root.google.bigtable.v2.StreamPartition.toObject(message.newPartitions[j], options, q + 1); } return object; }; @@ -55892,9 +57638,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ExecuteQueryRequest.encode = function encode(message, writer) { + ExecuteQueryRequest.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.instanceName != null && Object.hasOwnProperty.call(message, "instanceName")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.instanceName); if (message.appProfileId != null && Object.hasOwnProperty.call(message, "appProfileId")) @@ -55902,11 +57652,11 @@ if (message.query != null && Object.hasOwnProperty.call(message, "query")) writer.uint32(/* id 3, wireType 2 =*/26).string(message.query); if (message.protoFormat != null && Object.hasOwnProperty.call(message, "protoFormat")) - $root.google.bigtable.v2.ProtoFormat.encode(message.protoFormat, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + $root.google.bigtable.v2.ProtoFormat.encode(message.protoFormat, writer.uint32(/* id 4, wireType 2 =*/34).fork(), q + 1).ldelim(); if (message.params != null && Object.hasOwnProperty.call(message, "params")) for (var keys = Object.keys(message.params), i = 0; i < keys.length; ++i) { writer.uint32(/* id 7, wireType 2 =*/58).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); - $root.google.bigtable.v2.Value.encode(message.params[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); + $root.google.bigtable.v2.Value.encode(message.params[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim().ldelim(); } if (message.resumeToken != null && Object.hasOwnProperty.call(message, "resumeToken")) writer.uint32(/* id 8, wireType 2 =*/66).bytes(message.resumeToken); @@ -55925,7 +57675,7 @@ * @returns {$protobuf.Writer} Writer */ ExecuteQueryRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -56041,19 +57791,19 @@ if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; var properties = {}; - if (message.instanceName != null && message.hasOwnProperty("instanceName")) + if (message.instanceName != null && Object.hasOwnProperty.call(message, "instanceName")) if (!$util.isString(message.instanceName)) return "instanceName: string expected"; - if (message.appProfileId != null && message.hasOwnProperty("appProfileId")) + if (message.appProfileId != null && Object.hasOwnProperty.call(message, "appProfileId")) if (!$util.isString(message.appProfileId)) return "appProfileId: string expected"; - if (message.query != null && message.hasOwnProperty("query")) + if (message.query != null && Object.hasOwnProperty.call(message, "query")) if (!$util.isString(message.query)) return "query: string expected"; - if (message.preparedQuery != null && message.hasOwnProperty("preparedQuery")) + if (message.preparedQuery != null && Object.hasOwnProperty.call(message, "preparedQuery")) if (!(message.preparedQuery && typeof message.preparedQuery.length === "number" || $util.isString(message.preparedQuery))) return "preparedQuery: buffer expected"; - if (message.protoFormat != null && message.hasOwnProperty("protoFormat")) { + if (message.protoFormat != null && Object.hasOwnProperty.call(message, "protoFormat")) { properties.dataFormat = 1; { var error = $root.google.bigtable.v2.ProtoFormat.verify(message.protoFormat, long + 1); @@ -56061,10 +57811,10 @@ return "protoFormat." + error; } } - if (message.resumeToken != null && message.hasOwnProperty("resumeToken")) + if (message.resumeToken != null && Object.hasOwnProperty.call(message, "resumeToken")) if (!(message.resumeToken && typeof message.resumeToken.length === "number" || $util.isString(message.resumeToken))) return "resumeToken: buffer expected"; - if (message.params != null && message.hasOwnProperty("params")) { + if (message.params != null && Object.hasOwnProperty.call(message, "params")) { if (!$util.isObject(message.params)) return "params: object expected"; var key = Object.keys(message.params); @@ -56088,6 +57838,8 @@ ExecuteQueryRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.google.bigtable.v2.ExecuteQueryRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.v2.ExecuteQueryRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -56105,7 +57857,7 @@ else if (object.preparedQuery.length >= 0) message.preparedQuery = object.preparedQuery; if (object.protoFormat != null) { - if (typeof object.protoFormat !== "object") + if (!$util.isObject(object.protoFormat)) throw TypeError(".google.bigtable.v2.ExecuteQueryRequest.protoFormat: object expected"); message.protoFormat = $root.google.bigtable.v2.ProtoFormat.fromObject(object.protoFormat, long + 1); } @@ -56115,13 +57867,13 @@ else if (object.resumeToken.length >= 0) message.resumeToken = object.resumeToken; if (object.params) { - if (typeof object.params !== "object") + if (!$util.isObject(object.params)) throw TypeError(".google.bigtable.v2.ExecuteQueryRequest.params: object expected"); message.params = {}; for (var keys = Object.keys(object.params), i = 0; i < keys.length; ++i) { if (keys[i] === "__proto__") $util.makeProp(message.params, keys[i]); - if (typeof object.params[keys[i]] !== "object") + if (!$util.isObject(object.params[keys[i]])) throw TypeError(".google.bigtable.v2.ExecuteQueryRequest.params: object expected"); message.params[keys[i]] = $root.google.bigtable.v2.Value.fromObject(object.params[keys[i]], long + 1); } @@ -56138,9 +57890,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ExecuteQueryRequest.toObject = function toObject(message, options) { + ExecuteQueryRequest.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.objects || options.defaults) object.params = {}; @@ -56163,14 +57919,14 @@ object.preparedQuery = $util.newBuffer(object.preparedQuery); } } - if (message.instanceName != null && message.hasOwnProperty("instanceName")) + if (message.instanceName != null && Object.hasOwnProperty.call(message, "instanceName")) object.instanceName = message.instanceName; - if (message.appProfileId != null && message.hasOwnProperty("appProfileId")) + if (message.appProfileId != null && Object.hasOwnProperty.call(message, "appProfileId")) object.appProfileId = message.appProfileId; - if (message.query != null && message.hasOwnProperty("query")) + if (message.query != null && Object.hasOwnProperty.call(message, "query")) object.query = message.query; - if (message.protoFormat != null && message.hasOwnProperty("protoFormat")) { - object.protoFormat = $root.google.bigtable.v2.ProtoFormat.toObject(message.protoFormat, options); + if (message.protoFormat != null && Object.hasOwnProperty.call(message, "protoFormat")) { + object.protoFormat = $root.google.bigtable.v2.ProtoFormat.toObject(message.protoFormat, options, q + 1); if (options.oneofs) object.dataFormat = "protoFormat"; } @@ -56180,12 +57936,12 @@ for (var j = 0; j < keys2.length; ++j) { if (keys2[j] === "__proto__") $util.makeProp(object.params, keys2[j]); - object.params[keys2[j]] = $root.google.bigtable.v2.Value.toObject(message.params[keys2[j]], options); + object.params[keys2[j]] = $root.google.bigtable.v2.Value.toObject(message.params[keys2[j]], options, q + 1); } } - if (message.resumeToken != null && message.hasOwnProperty("resumeToken")) + if (message.resumeToken != null && Object.hasOwnProperty.call(message, "resumeToken")) object.resumeToken = options.bytes === String ? $util.base64.encode(message.resumeToken, 0, message.resumeToken.length) : options.bytes === Array ? Array.prototype.slice.call(message.resumeToken) : message.resumeToken; - if (message.preparedQuery != null && message.hasOwnProperty("preparedQuery")) + if (message.preparedQuery != null && Object.hasOwnProperty.call(message, "preparedQuery")) object.preparedQuery = options.bytes === String ? $util.base64.encode(message.preparedQuery, 0, message.preparedQuery.length) : options.bytes === Array ? Array.prototype.slice.call(message.preparedQuery) : message.preparedQuery; return object; }; @@ -56295,13 +58051,17 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ExecuteQueryResponse.encode = function encode(message, writer) { + ExecuteQueryResponse.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata")) - $root.google.bigtable.v2.ResultSetMetadata.encode(message.metadata, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + $root.google.bigtable.v2.ResultSetMetadata.encode(message.metadata, writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); if (message.results != null && Object.hasOwnProperty.call(message, "results")) - $root.google.bigtable.v2.PartialResultSet.encode(message.results, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + $root.google.bigtable.v2.PartialResultSet.encode(message.results, writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); return writer; }; @@ -56315,7 +58075,7 @@ * @returns {$protobuf.Writer} Writer */ ExecuteQueryResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -56390,7 +58150,7 @@ if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; var properties = {}; - if (message.metadata != null && message.hasOwnProperty("metadata")) { + if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata")) { properties.response = 1; { var error = $root.google.bigtable.v2.ResultSetMetadata.verify(message.metadata, long + 1); @@ -56398,7 +58158,7 @@ return "metadata." + error; } } - if (message.results != null && message.hasOwnProperty("results")) { + if (message.results != null && Object.hasOwnProperty.call(message, "results")) { if (properties.response === 1) return "response: multiple values"; properties.response = 1; @@ -56422,18 +58182,20 @@ ExecuteQueryResponse.fromObject = function fromObject(object, long) { if (object instanceof $root.google.bigtable.v2.ExecuteQueryResponse) return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.v2.ExecuteQueryResponse: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) throw Error("maximum nesting depth exceeded"); var message = new $root.google.bigtable.v2.ExecuteQueryResponse(); if (object.metadata != null) { - if (typeof object.metadata !== "object") + if (!$util.isObject(object.metadata)) throw TypeError(".google.bigtable.v2.ExecuteQueryResponse.metadata: object expected"); message.metadata = $root.google.bigtable.v2.ResultSetMetadata.fromObject(object.metadata, long + 1); } if (object.results != null) { - if (typeof object.results !== "object") + if (!$util.isObject(object.results)) throw TypeError(".google.bigtable.v2.ExecuteQueryResponse.results: object expected"); message.results = $root.google.bigtable.v2.PartialResultSet.fromObject(object.results, long + 1); } @@ -56449,17 +58211,21 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ExecuteQueryResponse.toObject = function toObject(message, options) { + ExecuteQueryResponse.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; - if (message.metadata != null && message.hasOwnProperty("metadata")) { - object.metadata = $root.google.bigtable.v2.ResultSetMetadata.toObject(message.metadata, options); + if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata")) { + object.metadata = $root.google.bigtable.v2.ResultSetMetadata.toObject(message.metadata, options, q + 1); if (options.oneofs) object.response = "metadata"; } - if (message.results != null && message.hasOwnProperty("results")) { - object.results = $root.google.bigtable.v2.PartialResultSet.toObject(message.results, options); + if (message.results != null && Object.hasOwnProperty.call(message, "results")) { + object.results = $root.google.bigtable.v2.PartialResultSet.toObject(message.results, options, q + 1); if (options.oneofs) object.response = "results"; } @@ -56599,9 +58365,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - PrepareQueryRequest.encode = function encode(message, writer) { + PrepareQueryRequest.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.instanceName != null && Object.hasOwnProperty.call(message, "instanceName")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.instanceName); if (message.appProfileId != null && Object.hasOwnProperty.call(message, "appProfileId")) @@ -56609,11 +58379,11 @@ if (message.query != null && Object.hasOwnProperty.call(message, "query")) writer.uint32(/* id 3, wireType 2 =*/26).string(message.query); if (message.protoFormat != null && Object.hasOwnProperty.call(message, "protoFormat")) - $root.google.bigtable.v2.ProtoFormat.encode(message.protoFormat, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + $root.google.bigtable.v2.ProtoFormat.encode(message.protoFormat, writer.uint32(/* id 4, wireType 2 =*/34).fork(), q + 1).ldelim(); if (message.paramTypes != null && Object.hasOwnProperty.call(message, "paramTypes")) for (var keys = Object.keys(message.paramTypes), i = 0; i < keys.length; ++i) { writer.uint32(/* id 6, wireType 2 =*/50).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); - $root.google.bigtable.v2.Type.encode(message.paramTypes[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); + $root.google.bigtable.v2.Type.encode(message.paramTypes[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim().ldelim(); } return writer; }; @@ -56628,7 +58398,7 @@ * @returns {$protobuf.Writer} Writer */ PrepareQueryRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -56736,16 +58506,16 @@ if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; var properties = {}; - if (message.instanceName != null && message.hasOwnProperty("instanceName")) + if (message.instanceName != null && Object.hasOwnProperty.call(message, "instanceName")) if (!$util.isString(message.instanceName)) return "instanceName: string expected"; - if (message.appProfileId != null && message.hasOwnProperty("appProfileId")) + if (message.appProfileId != null && Object.hasOwnProperty.call(message, "appProfileId")) if (!$util.isString(message.appProfileId)) return "appProfileId: string expected"; - if (message.query != null && message.hasOwnProperty("query")) + if (message.query != null && Object.hasOwnProperty.call(message, "query")) if (!$util.isString(message.query)) return "query: string expected"; - if (message.protoFormat != null && message.hasOwnProperty("protoFormat")) { + if (message.protoFormat != null && Object.hasOwnProperty.call(message, "protoFormat")) { properties.dataFormat = 1; { var error = $root.google.bigtable.v2.ProtoFormat.verify(message.protoFormat, long + 1); @@ -56753,7 +58523,7 @@ return "protoFormat." + error; } } - if (message.paramTypes != null && message.hasOwnProperty("paramTypes")) { + if (message.paramTypes != null && Object.hasOwnProperty.call(message, "paramTypes")) { if (!$util.isObject(message.paramTypes)) return "paramTypes: object expected"; var key = Object.keys(message.paramTypes); @@ -56777,6 +58547,8 @@ PrepareQueryRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.google.bigtable.v2.PrepareQueryRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.v2.PrepareQueryRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -56789,18 +58561,18 @@ if (object.query != null) message.query = String(object.query); if (object.protoFormat != null) { - if (typeof object.protoFormat !== "object") + if (!$util.isObject(object.protoFormat)) throw TypeError(".google.bigtable.v2.PrepareQueryRequest.protoFormat: object expected"); message.protoFormat = $root.google.bigtable.v2.ProtoFormat.fromObject(object.protoFormat, long + 1); } if (object.paramTypes) { - if (typeof object.paramTypes !== "object") + if (!$util.isObject(object.paramTypes)) throw TypeError(".google.bigtable.v2.PrepareQueryRequest.paramTypes: object expected"); message.paramTypes = {}; for (var keys = Object.keys(object.paramTypes), i = 0; i < keys.length; ++i) { if (keys[i] === "__proto__") $util.makeProp(message.paramTypes, keys[i]); - if (typeof object.paramTypes[keys[i]] !== "object") + if (!$util.isObject(object.paramTypes[keys[i]])) throw TypeError(".google.bigtable.v2.PrepareQueryRequest.paramTypes: object expected"); message.paramTypes[keys[i]] = $root.google.bigtable.v2.Type.fromObject(object.paramTypes[keys[i]], long + 1); } @@ -56817,9 +58589,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - PrepareQueryRequest.toObject = function toObject(message, options) { + PrepareQueryRequest.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.objects || options.defaults) object.paramTypes = {}; @@ -56828,14 +58604,14 @@ object.appProfileId = ""; object.query = ""; } - if (message.instanceName != null && message.hasOwnProperty("instanceName")) + if (message.instanceName != null && Object.hasOwnProperty.call(message, "instanceName")) object.instanceName = message.instanceName; - if (message.appProfileId != null && message.hasOwnProperty("appProfileId")) + if (message.appProfileId != null && Object.hasOwnProperty.call(message, "appProfileId")) object.appProfileId = message.appProfileId; - if (message.query != null && message.hasOwnProperty("query")) + if (message.query != null && Object.hasOwnProperty.call(message, "query")) object.query = message.query; - if (message.protoFormat != null && message.hasOwnProperty("protoFormat")) { - object.protoFormat = $root.google.bigtable.v2.ProtoFormat.toObject(message.protoFormat, options); + if (message.protoFormat != null && Object.hasOwnProperty.call(message, "protoFormat")) { + object.protoFormat = $root.google.bigtable.v2.ProtoFormat.toObject(message.protoFormat, options, q + 1); if (options.oneofs) object.dataFormat = "protoFormat"; } @@ -56845,7 +58621,7 @@ for (var j = 0; j < keys2.length; ++j) { if (keys2[j] === "__proto__") $util.makeProp(object.paramTypes, keys2[j]); - object.paramTypes[keys2[j]] = $root.google.bigtable.v2.Type.toObject(message.paramTypes[keys2[j]], options); + object.paramTypes[keys2[j]] = $root.google.bigtable.v2.Type.toObject(message.paramTypes[keys2[j]], options, q + 1); } } return object; @@ -56951,15 +58727,19 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - PrepareQueryResponse.encode = function encode(message, writer) { + PrepareQueryResponse.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata")) - $root.google.bigtable.v2.ResultSetMetadata.encode(message.metadata, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + $root.google.bigtable.v2.ResultSetMetadata.encode(message.metadata, writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); if (message.preparedQuery != null && Object.hasOwnProperty.call(message, "preparedQuery")) writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.preparedQuery); if (message.validUntil != null && Object.hasOwnProperty.call(message, "validUntil")) - $root.google.protobuf.Timestamp.encode(message.validUntil, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + $root.google.protobuf.Timestamp.encode(message.validUntil, writer.uint32(/* id 3, wireType 2 =*/26).fork(), q + 1).ldelim(); return writer; }; @@ -56973,7 +58753,7 @@ * @returns {$protobuf.Writer} Writer */ PrepareQueryResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -57051,15 +58831,15 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.metadata != null && message.hasOwnProperty("metadata")) { + if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata")) { var error = $root.google.bigtable.v2.ResultSetMetadata.verify(message.metadata, long + 1); if (error) return "metadata." + error; } - if (message.preparedQuery != null && message.hasOwnProperty("preparedQuery")) + if (message.preparedQuery != null && Object.hasOwnProperty.call(message, "preparedQuery")) if (!(message.preparedQuery && typeof message.preparedQuery.length === "number" || $util.isString(message.preparedQuery))) return "preparedQuery: buffer expected"; - if (message.validUntil != null && message.hasOwnProperty("validUntil")) { + if (message.validUntil != null && Object.hasOwnProperty.call(message, "validUntil")) { var error = $root.google.protobuf.Timestamp.verify(message.validUntil, long + 1); if (error) return "validUntil." + error; @@ -57078,13 +58858,15 @@ PrepareQueryResponse.fromObject = function fromObject(object, long) { if (object instanceof $root.google.bigtable.v2.PrepareQueryResponse) return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.v2.PrepareQueryResponse: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) throw Error("maximum nesting depth exceeded"); var message = new $root.google.bigtable.v2.PrepareQueryResponse(); if (object.metadata != null) { - if (typeof object.metadata !== "object") + if (!$util.isObject(object.metadata)) throw TypeError(".google.bigtable.v2.PrepareQueryResponse.metadata: object expected"); message.metadata = $root.google.bigtable.v2.ResultSetMetadata.fromObject(object.metadata, long + 1); } @@ -57094,7 +58876,7 @@ else if (object.preparedQuery.length >= 0) message.preparedQuery = object.preparedQuery; if (object.validUntil != null) { - if (typeof object.validUntil !== "object") + if (!$util.isObject(object.validUntil)) throw TypeError(".google.bigtable.v2.PrepareQueryResponse.validUntil: object expected"); message.validUntil = $root.google.protobuf.Timestamp.fromObject(object.validUntil, long + 1); } @@ -57110,9 +58892,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - PrepareQueryResponse.toObject = function toObject(message, options) { + PrepareQueryResponse.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.metadata = null; @@ -57125,12 +58911,12 @@ } object.validUntil = null; } - if (message.metadata != null && message.hasOwnProperty("metadata")) - object.metadata = $root.google.bigtable.v2.ResultSetMetadata.toObject(message.metadata, options); - if (message.preparedQuery != null && message.hasOwnProperty("preparedQuery")) + if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata")) + object.metadata = $root.google.bigtable.v2.ResultSetMetadata.toObject(message.metadata, options, q + 1); + if (message.preparedQuery != null && Object.hasOwnProperty.call(message, "preparedQuery")) object.preparedQuery = options.bytes === String ? $util.base64.encode(message.preparedQuery, 0, message.preparedQuery.length) : options.bytes === Array ? Array.prototype.slice.call(message.preparedQuery) : message.preparedQuery; - if (message.validUntil != null && message.hasOwnProperty("validUntil")) - object.validUntil = $root.google.protobuf.Timestamp.toObject(message.validUntil, options); + if (message.validUntil != null && Object.hasOwnProperty.call(message, "validUntil")) + object.validUntil = $root.google.protobuf.Timestamp.toObject(message.validUntil, options, q + 1); return object; }; @@ -57226,14 +59012,18 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Row.encode = function encode(message, writer) { + Row.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.key != null && Object.hasOwnProperty.call(message, "key")) writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.key); if (message.families != null && message.families.length) for (var i = 0; i < message.families.length; ++i) - $root.google.bigtable.v2.Family.encode(message.families[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + $root.google.bigtable.v2.Family.encode(message.families[i], writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); return writer; }; @@ -57247,7 +59037,7 @@ * @returns {$protobuf.Writer} Writer */ Row.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -57323,10 +59113,10 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.key != null && message.hasOwnProperty("key")) + if (message.key != null && Object.hasOwnProperty.call(message, "key")) if (!(message.key && typeof message.key.length === "number" || $util.isString(message.key))) return "key: buffer expected"; - if (message.families != null && message.hasOwnProperty("families")) { + if (message.families != null && Object.hasOwnProperty.call(message, "families")) { if (!Array.isArray(message.families)) return "families: array expected"; for (var i = 0; i < message.families.length; ++i) { @@ -57349,6 +59139,8 @@ Row.fromObject = function fromObject(object, long) { if (object instanceof $root.google.bigtable.v2.Row) return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.v2.Row: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -57364,7 +59156,7 @@ throw TypeError(".google.bigtable.v2.Row.families: array expected"); message.families = []; for (var i = 0; i < object.families.length; ++i) { - if (typeof object.families[i] !== "object") + if (!$util.isObject(object.families[i])) throw TypeError(".google.bigtable.v2.Row.families: object expected"); message.families[i] = $root.google.bigtable.v2.Family.fromObject(object.families[i], long + 1); } @@ -57381,9 +59173,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Row.toObject = function toObject(message, options) { + Row.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.families = []; @@ -57395,12 +59191,12 @@ if (options.bytes !== Array) object.key = $util.newBuffer(object.key); } - if (message.key != null && message.hasOwnProperty("key")) + if (message.key != null && Object.hasOwnProperty.call(message, "key")) object.key = options.bytes === String ? $util.base64.encode(message.key, 0, message.key.length) : options.bytes === Array ? Array.prototype.slice.call(message.key) : message.key; if (message.families && message.families.length) { object.families = []; for (var j = 0; j < message.families.length; ++j) - object.families[j] = $root.google.bigtable.v2.Family.toObject(message.families[j], options); + object.families[j] = $root.google.bigtable.v2.Family.toObject(message.families[j], options, q + 1); } return object; }; @@ -57497,14 +59293,18 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Family.encode = function encode(message, writer) { + Family.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); if (message.columns != null && message.columns.length) for (var i = 0; i < message.columns.length; ++i) - $root.google.bigtable.v2.Column.encode(message.columns[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + $root.google.bigtable.v2.Column.encode(message.columns[i], writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); return writer; }; @@ -57518,7 +59318,7 @@ * @returns {$protobuf.Writer} Writer */ Family.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -57594,10 +59394,10 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) if (!$util.isString(message.name)) return "name: string expected"; - if (message.columns != null && message.hasOwnProperty("columns")) { + if (message.columns != null && Object.hasOwnProperty.call(message, "columns")) { if (!Array.isArray(message.columns)) return "columns: array expected"; for (var i = 0; i < message.columns.length; ++i) { @@ -57620,6 +59420,8 @@ Family.fromObject = function fromObject(object, long) { if (object instanceof $root.google.bigtable.v2.Family) return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.v2.Family: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -57632,7 +59434,7 @@ throw TypeError(".google.bigtable.v2.Family.columns: array expected"); message.columns = []; for (var i = 0; i < object.columns.length; ++i) { - if (typeof object.columns[i] !== "object") + if (!$util.isObject(object.columns[i])) throw TypeError(".google.bigtable.v2.Family.columns: object expected"); message.columns[i] = $root.google.bigtable.v2.Column.fromObject(object.columns[i], long + 1); } @@ -57649,20 +59451,24 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Family.toObject = function toObject(message, options) { + Family.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.columns = []; if (options.defaults) object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) object.name = message.name; if (message.columns && message.columns.length) { object.columns = []; for (var j = 0; j < message.columns.length; ++j) - object.columns[j] = $root.google.bigtable.v2.Column.toObject(message.columns[j], options); + object.columns[j] = $root.google.bigtable.v2.Column.toObject(message.columns[j], options, q + 1); } return object; }; @@ -57759,14 +59565,18 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Column.encode = function encode(message, writer) { + Column.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.qualifier != null && Object.hasOwnProperty.call(message, "qualifier")) writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.qualifier); if (message.cells != null && message.cells.length) for (var i = 0; i < message.cells.length; ++i) - $root.google.bigtable.v2.Cell.encode(message.cells[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + $root.google.bigtable.v2.Cell.encode(message.cells[i], writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); return writer; }; @@ -57780,7 +59590,7 @@ * @returns {$protobuf.Writer} Writer */ Column.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -57856,10 +59666,10 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.qualifier != null && message.hasOwnProperty("qualifier")) + if (message.qualifier != null && Object.hasOwnProperty.call(message, "qualifier")) if (!(message.qualifier && typeof message.qualifier.length === "number" || $util.isString(message.qualifier))) return "qualifier: buffer expected"; - if (message.cells != null && message.hasOwnProperty("cells")) { + if (message.cells != null && Object.hasOwnProperty.call(message, "cells")) { if (!Array.isArray(message.cells)) return "cells: array expected"; for (var i = 0; i < message.cells.length; ++i) { @@ -57882,6 +59692,8 @@ Column.fromObject = function fromObject(object, long) { if (object instanceof $root.google.bigtable.v2.Column) return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.v2.Column: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -57897,7 +59709,7 @@ throw TypeError(".google.bigtable.v2.Column.cells: array expected"); message.cells = []; for (var i = 0; i < object.cells.length; ++i) { - if (typeof object.cells[i] !== "object") + if (!$util.isObject(object.cells[i])) throw TypeError(".google.bigtable.v2.Column.cells: object expected"); message.cells[i] = $root.google.bigtable.v2.Cell.fromObject(object.cells[i], long + 1); } @@ -57914,9 +59726,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Column.toObject = function toObject(message, options) { + Column.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.cells = []; @@ -57928,12 +59744,12 @@ if (options.bytes !== Array) object.qualifier = $util.newBuffer(object.qualifier); } - if (message.qualifier != null && message.hasOwnProperty("qualifier")) + if (message.qualifier != null && Object.hasOwnProperty.call(message, "qualifier")) object.qualifier = options.bytes === String ? $util.base64.encode(message.qualifier, 0, message.qualifier.length) : options.bytes === Array ? Array.prototype.slice.call(message.qualifier) : message.qualifier; if (message.cells && message.cells.length) { object.cells = []; for (var j = 0; j < message.cells.length; ++j) - object.cells[j] = $root.google.bigtable.v2.Cell.toObject(message.cells[j], options); + object.cells[j] = $root.google.bigtable.v2.Cell.toObject(message.cells[j], options, q + 1); } return object; }; @@ -58039,9 +59855,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Cell.encode = function encode(message, writer) { + Cell.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.timestampMicros != null && Object.hasOwnProperty.call(message, "timestampMicros")) writer.uint32(/* id 1, wireType 0 =*/8).int64(message.timestampMicros); if (message.value != null && Object.hasOwnProperty.call(message, "value")) @@ -58062,7 +59882,7 @@ * @returns {$protobuf.Writer} Writer */ Cell.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -58142,13 +59962,13 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.timestampMicros != null && message.hasOwnProperty("timestampMicros")) + if (message.timestampMicros != null && Object.hasOwnProperty.call(message, "timestampMicros")) if (!$util.isInteger(message.timestampMicros) && !(message.timestampMicros && $util.isInteger(message.timestampMicros.low) && $util.isInteger(message.timestampMicros.high))) return "timestampMicros: integer|Long expected"; - if (message.value != null && message.hasOwnProperty("value")) + if (message.value != null && Object.hasOwnProperty.call(message, "value")) if (!(message.value && typeof message.value.length === "number" || $util.isString(message.value))) return "value: buffer expected"; - if (message.labels != null && message.hasOwnProperty("labels")) { + if (message.labels != null && Object.hasOwnProperty.call(message, "labels")) { if (!Array.isArray(message.labels)) return "labels: array expected"; for (var i = 0; i < message.labels.length; ++i) @@ -58169,6 +59989,8 @@ Cell.fromObject = function fromObject(object, long) { if (object instanceof $root.google.bigtable.v2.Cell) return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.v2.Cell: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -58176,7 +59998,7 @@ var message = new $root.google.bigtable.v2.Cell(); if (object.timestampMicros != null) if ($util.Long) - (message.timestampMicros = $util.Long.fromValue(object.timestampMicros)).unsigned = false; + message.timestampMicros = $util.Long.fromValue(object.timestampMicros, false); else if (typeof object.timestampMicros === "string") message.timestampMicros = parseInt(object.timestampMicros, 10); else if (typeof object.timestampMicros === "number") @@ -58207,18 +60029,22 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Cell.toObject = function toObject(message, options) { + Cell.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.labels = []; if (options.defaults) { if ($util.Long) { var long = new $util.Long(0, 0, false); - object.timestampMicros = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.timestampMicros = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : typeof BigInt !== "undefined" && options.longs === BigInt ? long.toBigInt() : long; } else - object.timestampMicros = options.longs === String ? "0" : 0; + object.timestampMicros = options.longs === String ? "0" : typeof BigInt !== "undefined" && options.longs === BigInt ? BigInt("0") : 0; if (options.bytes === String) object.value = ""; else { @@ -58227,12 +60053,14 @@ object.value = $util.newBuffer(object.value); } } - if (message.timestampMicros != null && message.hasOwnProperty("timestampMicros")) - if (typeof message.timestampMicros === "number") + if (message.timestampMicros != null && Object.hasOwnProperty.call(message, "timestampMicros")) + if (typeof BigInt !== "undefined" && options.longs === BigInt) + object.timestampMicros = typeof message.timestampMicros === "number" ? BigInt(message.timestampMicros) : $util.Long.fromBits(message.timestampMicros.low >>> 0, message.timestampMicros.high >>> 0, false).toBigInt(); + else if (typeof message.timestampMicros === "number") object.timestampMicros = options.longs === String ? String(message.timestampMicros) : message.timestampMicros; else object.timestampMicros = options.longs === String ? $util.Long.prototype.toString.call(message.timestampMicros) : options.longs === Number ? new $util.LongBits(message.timestampMicros.low >>> 0, message.timestampMicros.high >>> 0).toNumber() : message.timestampMicros; - if (message.value != null && message.hasOwnProperty("value")) + if (message.value != null && Object.hasOwnProperty.call(message, "value")) object.value = options.bytes === String ? $util.base64.encode(message.value, 0, message.value.length) : options.bytes === Array ? Array.prototype.slice.call(message.value) : message.value; if (message.labels && message.labels.length) { object.labels = []; @@ -58428,19 +60256,23 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Value.encode = function encode(message, writer) { + Value.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.bytesValue != null && Object.hasOwnProperty.call(message, "bytesValue")) writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.bytesValue); if (message.stringValue != null && Object.hasOwnProperty.call(message, "stringValue")) writer.uint32(/* id 3, wireType 2 =*/26).string(message.stringValue); if (message.arrayValue != null && Object.hasOwnProperty.call(message, "arrayValue")) - $root.google.bigtable.v2.ArrayValue.encode(message.arrayValue, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + $root.google.bigtable.v2.ArrayValue.encode(message.arrayValue, writer.uint32(/* id 4, wireType 2 =*/34).fork(), q + 1).ldelim(); if (message.intValue != null && Object.hasOwnProperty.call(message, "intValue")) writer.uint32(/* id 6, wireType 0 =*/48).int64(message.intValue); if (message.type != null && Object.hasOwnProperty.call(message, "type")) - $root.google.bigtable.v2.Type.encode(message.type, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + $root.google.bigtable.v2.Type.encode(message.type, writer.uint32(/* id 7, wireType 2 =*/58).fork(), q + 1).ldelim(); if (message.rawValue != null && Object.hasOwnProperty.call(message, "rawValue")) writer.uint32(/* id 8, wireType 2 =*/66).bytes(message.rawValue); if (message.rawTimestampMicros != null && Object.hasOwnProperty.call(message, "rawTimestampMicros")) @@ -58450,9 +60282,9 @@ if (message.floatValue != null && Object.hasOwnProperty.call(message, "floatValue")) writer.uint32(/* id 11, wireType 1 =*/89).double(message.floatValue); if (message.timestampValue != null && Object.hasOwnProperty.call(message, "timestampValue")) - $root.google.protobuf.Timestamp.encode(message.timestampValue, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); + $root.google.protobuf.Timestamp.encode(message.timestampValue, writer.uint32(/* id 12, wireType 2 =*/98).fork(), q + 1).ldelim(); if (message.dateValue != null && Object.hasOwnProperty.call(message, "dateValue")) - $root.google.type.Date.encode(message.dateValue, writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim(); + $root.google.type.Date.encode(message.dateValue, writer.uint32(/* id 13, wireType 2 =*/106).fork(), q + 1).ldelim(); return writer; }; @@ -58466,7 +60298,7 @@ * @returns {$protobuf.Writer} Writer */ Value.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -58577,59 +60409,59 @@ if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; var properties = {}; - if (message.type != null && message.hasOwnProperty("type")) { + if (message.type != null && Object.hasOwnProperty.call(message, "type")) { var error = $root.google.bigtable.v2.Type.verify(message.type, long + 1); if (error) return "type." + error; } - if (message.rawValue != null && message.hasOwnProperty("rawValue")) { + if (message.rawValue != null && Object.hasOwnProperty.call(message, "rawValue")) { properties.kind = 1; if (!(message.rawValue && typeof message.rawValue.length === "number" || $util.isString(message.rawValue))) return "rawValue: buffer expected"; } - if (message.rawTimestampMicros != null && message.hasOwnProperty("rawTimestampMicros")) { + if (message.rawTimestampMicros != null && Object.hasOwnProperty.call(message, "rawTimestampMicros")) { if (properties.kind === 1) return "kind: multiple values"; properties.kind = 1; if (!$util.isInteger(message.rawTimestampMicros) && !(message.rawTimestampMicros && $util.isInteger(message.rawTimestampMicros.low) && $util.isInteger(message.rawTimestampMicros.high))) return "rawTimestampMicros: integer|Long expected"; } - if (message.bytesValue != null && message.hasOwnProperty("bytesValue")) { + if (message.bytesValue != null && Object.hasOwnProperty.call(message, "bytesValue")) { if (properties.kind === 1) return "kind: multiple values"; properties.kind = 1; if (!(message.bytesValue && typeof message.bytesValue.length === "number" || $util.isString(message.bytesValue))) return "bytesValue: buffer expected"; } - if (message.stringValue != null && message.hasOwnProperty("stringValue")) { + if (message.stringValue != null && Object.hasOwnProperty.call(message, "stringValue")) { if (properties.kind === 1) return "kind: multiple values"; properties.kind = 1; if (!$util.isString(message.stringValue)) return "stringValue: string expected"; } - if (message.intValue != null && message.hasOwnProperty("intValue")) { + if (message.intValue != null && Object.hasOwnProperty.call(message, "intValue")) { if (properties.kind === 1) return "kind: multiple values"; properties.kind = 1; if (!$util.isInteger(message.intValue) && !(message.intValue && $util.isInteger(message.intValue.low) && $util.isInteger(message.intValue.high))) return "intValue: integer|Long expected"; } - if (message.boolValue != null && message.hasOwnProperty("boolValue")) { + if (message.boolValue != null && Object.hasOwnProperty.call(message, "boolValue")) { if (properties.kind === 1) return "kind: multiple values"; properties.kind = 1; if (typeof message.boolValue !== "boolean") return "boolValue: boolean expected"; } - if (message.floatValue != null && message.hasOwnProperty("floatValue")) { + if (message.floatValue != null && Object.hasOwnProperty.call(message, "floatValue")) { if (properties.kind === 1) return "kind: multiple values"; properties.kind = 1; if (typeof message.floatValue !== "number") return "floatValue: number expected"; } - if (message.timestampValue != null && message.hasOwnProperty("timestampValue")) { + if (message.timestampValue != null && Object.hasOwnProperty.call(message, "timestampValue")) { if (properties.kind === 1) return "kind: multiple values"; properties.kind = 1; @@ -58639,7 +60471,7 @@ return "timestampValue." + error; } } - if (message.dateValue != null && message.hasOwnProperty("dateValue")) { + if (message.dateValue != null && Object.hasOwnProperty.call(message, "dateValue")) { if (properties.kind === 1) return "kind: multiple values"; properties.kind = 1; @@ -58649,7 +60481,7 @@ return "dateValue." + error; } } - if (message.arrayValue != null && message.hasOwnProperty("arrayValue")) { + if (message.arrayValue != null && Object.hasOwnProperty.call(message, "arrayValue")) { if (properties.kind === 1) return "kind: multiple values"; properties.kind = 1; @@ -58673,13 +60505,15 @@ Value.fromObject = function fromObject(object, long) { if (object instanceof $root.google.bigtable.v2.Value) return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.v2.Value: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) throw Error("maximum nesting depth exceeded"); var message = new $root.google.bigtable.v2.Value(); if (object.type != null) { - if (typeof object.type !== "object") + if (!$util.isObject(object.type)) throw TypeError(".google.bigtable.v2.Value.type: object expected"); message.type = $root.google.bigtable.v2.Type.fromObject(object.type, long + 1); } @@ -58690,7 +60524,7 @@ message.rawValue = object.rawValue; if (object.rawTimestampMicros != null) if ($util.Long) - (message.rawTimestampMicros = $util.Long.fromValue(object.rawTimestampMicros)).unsigned = false; + message.rawTimestampMicros = $util.Long.fromValue(object.rawTimestampMicros, false); else if (typeof object.rawTimestampMicros === "string") message.rawTimestampMicros = parseInt(object.rawTimestampMicros, 10); else if (typeof object.rawTimestampMicros === "number") @@ -58706,7 +60540,7 @@ message.stringValue = String(object.stringValue); if (object.intValue != null) if ($util.Long) - (message.intValue = $util.Long.fromValue(object.intValue)).unsigned = false; + message.intValue = $util.Long.fromValue(object.intValue, false); else if (typeof object.intValue === "string") message.intValue = parseInt(object.intValue, 10); else if (typeof object.intValue === "number") @@ -58718,17 +60552,17 @@ if (object.floatValue != null) message.floatValue = Number(object.floatValue); if (object.timestampValue != null) { - if (typeof object.timestampValue !== "object") + if (!$util.isObject(object.timestampValue)) throw TypeError(".google.bigtable.v2.Value.timestampValue: object expected"); message.timestampValue = $root.google.protobuf.Timestamp.fromObject(object.timestampValue, long + 1); } if (object.dateValue != null) { - if (typeof object.dateValue !== "object") + if (!$util.isObject(object.dateValue)) throw TypeError(".google.bigtable.v2.Value.dateValue: object expected"); message.dateValue = $root.google.type.Date.fromObject(object.dateValue, long + 1); } if (object.arrayValue != null) { - if (typeof object.arrayValue !== "object") + if (!$util.isObject(object.arrayValue)) throw TypeError(".google.bigtable.v2.Value.arrayValue: object expected"); message.arrayValue = $root.google.bigtable.v2.ArrayValue.fromObject(object.arrayValue, long + 1); } @@ -58744,67 +60578,75 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Value.toObject = function toObject(message, options) { + Value.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) object.type = null; - if (message.bytesValue != null && message.hasOwnProperty("bytesValue")) { + if (message.bytesValue != null && Object.hasOwnProperty.call(message, "bytesValue")) { object.bytesValue = options.bytes === String ? $util.base64.encode(message.bytesValue, 0, message.bytesValue.length) : options.bytes === Array ? Array.prototype.slice.call(message.bytesValue) : message.bytesValue; if (options.oneofs) object.kind = "bytesValue"; } - if (message.stringValue != null && message.hasOwnProperty("stringValue")) { + if (message.stringValue != null && Object.hasOwnProperty.call(message, "stringValue")) { object.stringValue = message.stringValue; if (options.oneofs) object.kind = "stringValue"; } - if (message.arrayValue != null && message.hasOwnProperty("arrayValue")) { - object.arrayValue = $root.google.bigtable.v2.ArrayValue.toObject(message.arrayValue, options); + if (message.arrayValue != null && Object.hasOwnProperty.call(message, "arrayValue")) { + object.arrayValue = $root.google.bigtable.v2.ArrayValue.toObject(message.arrayValue, options, q + 1); if (options.oneofs) object.kind = "arrayValue"; } - if (message.intValue != null && message.hasOwnProperty("intValue")) { - if (typeof message.intValue === "number") + if (message.intValue != null && Object.hasOwnProperty.call(message, "intValue")) { + if (typeof BigInt !== "undefined" && options.longs === BigInt) + object.intValue = typeof message.intValue === "number" ? BigInt(message.intValue) : $util.Long.fromBits(message.intValue.low >>> 0, message.intValue.high >>> 0, false).toBigInt(); + else if (typeof message.intValue === "number") object.intValue = options.longs === String ? String(message.intValue) : message.intValue; else object.intValue = options.longs === String ? $util.Long.prototype.toString.call(message.intValue) : options.longs === Number ? new $util.LongBits(message.intValue.low >>> 0, message.intValue.high >>> 0).toNumber() : message.intValue; if (options.oneofs) object.kind = "intValue"; } - if (message.type != null && message.hasOwnProperty("type")) - object.type = $root.google.bigtable.v2.Type.toObject(message.type, options); - if (message.rawValue != null && message.hasOwnProperty("rawValue")) { + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + object.type = $root.google.bigtable.v2.Type.toObject(message.type, options, q + 1); + if (message.rawValue != null && Object.hasOwnProperty.call(message, "rawValue")) { object.rawValue = options.bytes === String ? $util.base64.encode(message.rawValue, 0, message.rawValue.length) : options.bytes === Array ? Array.prototype.slice.call(message.rawValue) : message.rawValue; if (options.oneofs) object.kind = "rawValue"; } - if (message.rawTimestampMicros != null && message.hasOwnProperty("rawTimestampMicros")) { - if (typeof message.rawTimestampMicros === "number") + if (message.rawTimestampMicros != null && Object.hasOwnProperty.call(message, "rawTimestampMicros")) { + if (typeof BigInt !== "undefined" && options.longs === BigInt) + object.rawTimestampMicros = typeof message.rawTimestampMicros === "number" ? BigInt(message.rawTimestampMicros) : $util.Long.fromBits(message.rawTimestampMicros.low >>> 0, message.rawTimestampMicros.high >>> 0, false).toBigInt(); + else if (typeof message.rawTimestampMicros === "number") object.rawTimestampMicros = options.longs === String ? String(message.rawTimestampMicros) : message.rawTimestampMicros; else object.rawTimestampMicros = options.longs === String ? $util.Long.prototype.toString.call(message.rawTimestampMicros) : options.longs === Number ? new $util.LongBits(message.rawTimestampMicros.low >>> 0, message.rawTimestampMicros.high >>> 0).toNumber() : message.rawTimestampMicros; if (options.oneofs) object.kind = "rawTimestampMicros"; } - if (message.boolValue != null && message.hasOwnProperty("boolValue")) { + if (message.boolValue != null && Object.hasOwnProperty.call(message, "boolValue")) { object.boolValue = message.boolValue; if (options.oneofs) object.kind = "boolValue"; } - if (message.floatValue != null && message.hasOwnProperty("floatValue")) { + if (message.floatValue != null && Object.hasOwnProperty.call(message, "floatValue")) { object.floatValue = options.json && !isFinite(message.floatValue) ? String(message.floatValue) : message.floatValue; if (options.oneofs) object.kind = "floatValue"; } - if (message.timestampValue != null && message.hasOwnProperty("timestampValue")) { - object.timestampValue = $root.google.protobuf.Timestamp.toObject(message.timestampValue, options); + if (message.timestampValue != null && Object.hasOwnProperty.call(message, "timestampValue")) { + object.timestampValue = $root.google.protobuf.Timestamp.toObject(message.timestampValue, options, q + 1); if (options.oneofs) object.kind = "timestampValue"; } - if (message.dateValue != null && message.hasOwnProperty("dateValue")) { - object.dateValue = $root.google.type.Date.toObject(message.dateValue, options); + if (message.dateValue != null && Object.hasOwnProperty.call(message, "dateValue")) { + object.dateValue = $root.google.type.Date.toObject(message.dateValue, options, q + 1); if (options.oneofs) object.kind = "dateValue"; } @@ -58894,12 +60736,16 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ArrayValue.encode = function encode(message, writer) { + ArrayValue.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.values != null && message.values.length) for (var i = 0; i < message.values.length; ++i) - $root.google.bigtable.v2.Value.encode(message.values[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + $root.google.bigtable.v2.Value.encode(message.values[i], writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); return writer; }; @@ -58913,7 +60759,7 @@ * @returns {$protobuf.Writer} Writer */ ArrayValue.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -58985,7 +60831,7 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.values != null && message.hasOwnProperty("values")) { + if (message.values != null && Object.hasOwnProperty.call(message, "values")) { if (!Array.isArray(message.values)) return "values: array expected"; for (var i = 0; i < message.values.length; ++i) { @@ -59008,6 +60854,8 @@ ArrayValue.fromObject = function fromObject(object, long) { if (object instanceof $root.google.bigtable.v2.ArrayValue) return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.v2.ArrayValue: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -59018,7 +60866,7 @@ throw TypeError(".google.bigtable.v2.ArrayValue.values: array expected"); message.values = []; for (var i = 0; i < object.values.length; ++i) { - if (typeof object.values[i] !== "object") + if (!$util.isObject(object.values[i])) throw TypeError(".google.bigtable.v2.ArrayValue.values: object expected"); message.values[i] = $root.google.bigtable.v2.Value.fromObject(object.values[i], long + 1); } @@ -59035,16 +60883,20 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ArrayValue.toObject = function toObject(message, options) { + ArrayValue.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.values = []; if (message.values && message.values.length) { object.values = []; for (var j = 0; j < message.values.length; ++j) - object.values[j] = $root.google.bigtable.v2.Value.toObject(message.values[j], options); + object.values[j] = $root.google.bigtable.v2.Value.toObject(message.values[j], options, q + 1); } return object; }; @@ -59183,9 +61035,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - RowRange.encode = function encode(message, writer) { + RowRange.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.startKeyClosed != null && Object.hasOwnProperty.call(message, "startKeyClosed")) writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.startKeyClosed); if (message.startKeyOpen != null && Object.hasOwnProperty.call(message, "startKeyOpen")) @@ -59207,7 +61063,7 @@ * @returns {$protobuf.Writer} Writer */ RowRange.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -59290,24 +61146,24 @@ if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; var properties = {}; - if (message.startKeyClosed != null && message.hasOwnProperty("startKeyClosed")) { + if (message.startKeyClosed != null && Object.hasOwnProperty.call(message, "startKeyClosed")) { properties.startKey = 1; if (!(message.startKeyClosed && typeof message.startKeyClosed.length === "number" || $util.isString(message.startKeyClosed))) return "startKeyClosed: buffer expected"; } - if (message.startKeyOpen != null && message.hasOwnProperty("startKeyOpen")) { + if (message.startKeyOpen != null && Object.hasOwnProperty.call(message, "startKeyOpen")) { if (properties.startKey === 1) return "startKey: multiple values"; properties.startKey = 1; if (!(message.startKeyOpen && typeof message.startKeyOpen.length === "number" || $util.isString(message.startKeyOpen))) return "startKeyOpen: buffer expected"; } - if (message.endKeyOpen != null && message.hasOwnProperty("endKeyOpen")) { + if (message.endKeyOpen != null && Object.hasOwnProperty.call(message, "endKeyOpen")) { properties.endKey = 1; if (!(message.endKeyOpen && typeof message.endKeyOpen.length === "number" || $util.isString(message.endKeyOpen))) return "endKeyOpen: buffer expected"; } - if (message.endKeyClosed != null && message.hasOwnProperty("endKeyClosed")) { + if (message.endKeyClosed != null && Object.hasOwnProperty.call(message, "endKeyClosed")) { if (properties.endKey === 1) return "endKey: multiple values"; properties.endKey = 1; @@ -59328,6 +61184,8 @@ RowRange.fromObject = function fromObject(object, long) { if (object instanceof $root.google.bigtable.v2.RowRange) return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.v2.RowRange: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -59365,26 +61223,30 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - RowRange.toObject = function toObject(message, options) { + RowRange.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; - if (message.startKeyClosed != null && message.hasOwnProperty("startKeyClosed")) { + if (message.startKeyClosed != null && Object.hasOwnProperty.call(message, "startKeyClosed")) { object.startKeyClosed = options.bytes === String ? $util.base64.encode(message.startKeyClosed, 0, message.startKeyClosed.length) : options.bytes === Array ? Array.prototype.slice.call(message.startKeyClosed) : message.startKeyClosed; if (options.oneofs) object.startKey = "startKeyClosed"; } - if (message.startKeyOpen != null && message.hasOwnProperty("startKeyOpen")) { + if (message.startKeyOpen != null && Object.hasOwnProperty.call(message, "startKeyOpen")) { object.startKeyOpen = options.bytes === String ? $util.base64.encode(message.startKeyOpen, 0, message.startKeyOpen.length) : options.bytes === Array ? Array.prototype.slice.call(message.startKeyOpen) : message.startKeyOpen; if (options.oneofs) object.startKey = "startKeyOpen"; } - if (message.endKeyOpen != null && message.hasOwnProperty("endKeyOpen")) { + if (message.endKeyOpen != null && Object.hasOwnProperty.call(message, "endKeyOpen")) { object.endKeyOpen = options.bytes === String ? $util.base64.encode(message.endKeyOpen, 0, message.endKeyOpen.length) : options.bytes === Array ? Array.prototype.slice.call(message.endKeyOpen) : message.endKeyOpen; if (options.oneofs) object.endKey = "endKeyOpen"; } - if (message.endKeyClosed != null && message.hasOwnProperty("endKeyClosed")) { + if (message.endKeyClosed != null && Object.hasOwnProperty.call(message, "endKeyClosed")) { object.endKeyClosed = options.bytes === String ? $util.base64.encode(message.endKeyClosed, 0, message.endKeyClosed.length) : options.bytes === Array ? Array.prototype.slice.call(message.endKeyClosed) : message.endKeyClosed; if (options.oneofs) object.endKey = "endKeyClosed"; @@ -59485,15 +61347,19 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - RowSet.encode = function encode(message, writer) { + RowSet.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.rowKeys != null && message.rowKeys.length) for (var i = 0; i < message.rowKeys.length; ++i) writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.rowKeys[i]); if (message.rowRanges != null && message.rowRanges.length) for (var i = 0; i < message.rowRanges.length; ++i) - $root.google.bigtable.v2.RowRange.encode(message.rowRanges[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + $root.google.bigtable.v2.RowRange.encode(message.rowRanges[i], writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); return writer; }; @@ -59507,7 +61373,7 @@ * @returns {$protobuf.Writer} Writer */ RowSet.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -59585,14 +61451,14 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.rowKeys != null && message.hasOwnProperty("rowKeys")) { + if (message.rowKeys != null && Object.hasOwnProperty.call(message, "rowKeys")) { if (!Array.isArray(message.rowKeys)) return "rowKeys: array expected"; for (var i = 0; i < message.rowKeys.length; ++i) if (!(message.rowKeys[i] && typeof message.rowKeys[i].length === "number" || $util.isString(message.rowKeys[i]))) return "rowKeys: buffer[] expected"; } - if (message.rowRanges != null && message.hasOwnProperty("rowRanges")) { + if (message.rowRanges != null && Object.hasOwnProperty.call(message, "rowRanges")) { if (!Array.isArray(message.rowRanges)) return "rowRanges: array expected"; for (var i = 0; i < message.rowRanges.length; ++i) { @@ -59615,6 +61481,8 @@ RowSet.fromObject = function fromObject(object, long) { if (object instanceof $root.google.bigtable.v2.RowSet) return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.v2.RowSet: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -59635,7 +61503,7 @@ throw TypeError(".google.bigtable.v2.RowSet.rowRanges: array expected"); message.rowRanges = []; for (var i = 0; i < object.rowRanges.length; ++i) { - if (typeof object.rowRanges[i] !== "object") + if (!$util.isObject(object.rowRanges[i])) throw TypeError(".google.bigtable.v2.RowSet.rowRanges: object expected"); message.rowRanges[i] = $root.google.bigtable.v2.RowRange.fromObject(object.rowRanges[i], long + 1); } @@ -59652,9 +61520,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - RowSet.toObject = function toObject(message, options) { + RowSet.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) { object.rowKeys = []; @@ -59668,7 +61540,7 @@ if (message.rowRanges && message.rowRanges.length) { object.rowRanges = []; for (var j = 0; j < message.rowRanges.length; ++j) - object.rowRanges[j] = $root.google.bigtable.v2.RowRange.toObject(message.rowRanges[j], options); + object.rowRanges[j] = $root.google.bigtable.v2.RowRange.toObject(message.rowRanges[j], options, q + 1); } return object; }; @@ -59816,9 +61688,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ColumnRange.encode = function encode(message, writer) { + ColumnRange.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.familyName != null && Object.hasOwnProperty.call(message, "familyName")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.familyName); if (message.startQualifierClosed != null && Object.hasOwnProperty.call(message, "startQualifierClosed")) @@ -59842,7 +61718,7 @@ * @returns {$protobuf.Writer} Writer */ ColumnRange.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -59929,27 +61805,27 @@ if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; var properties = {}; - if (message.familyName != null && message.hasOwnProperty("familyName")) + if (message.familyName != null && Object.hasOwnProperty.call(message, "familyName")) if (!$util.isString(message.familyName)) return "familyName: string expected"; - if (message.startQualifierClosed != null && message.hasOwnProperty("startQualifierClosed")) { + if (message.startQualifierClosed != null && Object.hasOwnProperty.call(message, "startQualifierClosed")) { properties.startQualifier = 1; if (!(message.startQualifierClosed && typeof message.startQualifierClosed.length === "number" || $util.isString(message.startQualifierClosed))) return "startQualifierClosed: buffer expected"; } - if (message.startQualifierOpen != null && message.hasOwnProperty("startQualifierOpen")) { + if (message.startQualifierOpen != null && Object.hasOwnProperty.call(message, "startQualifierOpen")) { if (properties.startQualifier === 1) return "startQualifier: multiple values"; properties.startQualifier = 1; if (!(message.startQualifierOpen && typeof message.startQualifierOpen.length === "number" || $util.isString(message.startQualifierOpen))) return "startQualifierOpen: buffer expected"; } - if (message.endQualifierClosed != null && message.hasOwnProperty("endQualifierClosed")) { + if (message.endQualifierClosed != null && Object.hasOwnProperty.call(message, "endQualifierClosed")) { properties.endQualifier = 1; if (!(message.endQualifierClosed && typeof message.endQualifierClosed.length === "number" || $util.isString(message.endQualifierClosed))) return "endQualifierClosed: buffer expected"; } - if (message.endQualifierOpen != null && message.hasOwnProperty("endQualifierOpen")) { + if (message.endQualifierOpen != null && Object.hasOwnProperty.call(message, "endQualifierOpen")) { if (properties.endQualifier === 1) return "endQualifier: multiple values"; properties.endQualifier = 1; @@ -59970,6 +61846,8 @@ ColumnRange.fromObject = function fromObject(object, long) { if (object instanceof $root.google.bigtable.v2.ColumnRange) return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.v2.ColumnRange: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -60009,30 +61887,34 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ColumnRange.toObject = function toObject(message, options) { + ColumnRange.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) object.familyName = ""; - if (message.familyName != null && message.hasOwnProperty("familyName")) + if (message.familyName != null && Object.hasOwnProperty.call(message, "familyName")) object.familyName = message.familyName; - if (message.startQualifierClosed != null && message.hasOwnProperty("startQualifierClosed")) { + if (message.startQualifierClosed != null && Object.hasOwnProperty.call(message, "startQualifierClosed")) { object.startQualifierClosed = options.bytes === String ? $util.base64.encode(message.startQualifierClosed, 0, message.startQualifierClosed.length) : options.bytes === Array ? Array.prototype.slice.call(message.startQualifierClosed) : message.startQualifierClosed; if (options.oneofs) object.startQualifier = "startQualifierClosed"; } - if (message.startQualifierOpen != null && message.hasOwnProperty("startQualifierOpen")) { + if (message.startQualifierOpen != null && Object.hasOwnProperty.call(message, "startQualifierOpen")) { object.startQualifierOpen = options.bytes === String ? $util.base64.encode(message.startQualifierOpen, 0, message.startQualifierOpen.length) : options.bytes === Array ? Array.prototype.slice.call(message.startQualifierOpen) : message.startQualifierOpen; if (options.oneofs) object.startQualifier = "startQualifierOpen"; } - if (message.endQualifierClosed != null && message.hasOwnProperty("endQualifierClosed")) { + if (message.endQualifierClosed != null && Object.hasOwnProperty.call(message, "endQualifierClosed")) { object.endQualifierClosed = options.bytes === String ? $util.base64.encode(message.endQualifierClosed, 0, message.endQualifierClosed.length) : options.bytes === Array ? Array.prototype.slice.call(message.endQualifierClosed) : message.endQualifierClosed; if (options.oneofs) object.endQualifier = "endQualifierClosed"; } - if (message.endQualifierOpen != null && message.hasOwnProperty("endQualifierOpen")) { + if (message.endQualifierOpen != null && Object.hasOwnProperty.call(message, "endQualifierOpen")) { object.endQualifierOpen = options.bytes === String ? $util.base64.encode(message.endQualifierOpen, 0, message.endQualifierOpen.length) : options.bytes === Array ? Array.prototype.slice.call(message.endQualifierOpen) : message.endQualifierOpen; if (options.oneofs) object.endQualifier = "endQualifierOpen"; @@ -60131,9 +62013,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - TimestampRange.encode = function encode(message, writer) { + TimestampRange.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.startTimestampMicros != null && Object.hasOwnProperty.call(message, "startTimestampMicros")) writer.uint32(/* id 1, wireType 0 =*/8).int64(message.startTimestampMicros); if (message.endTimestampMicros != null && Object.hasOwnProperty.call(message, "endTimestampMicros")) @@ -60151,7 +62037,7 @@ * @returns {$protobuf.Writer} Writer */ TimestampRange.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -60225,10 +62111,10 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.startTimestampMicros != null && message.hasOwnProperty("startTimestampMicros")) + if (message.startTimestampMicros != null && Object.hasOwnProperty.call(message, "startTimestampMicros")) if (!$util.isInteger(message.startTimestampMicros) && !(message.startTimestampMicros && $util.isInteger(message.startTimestampMicros.low) && $util.isInteger(message.startTimestampMicros.high))) return "startTimestampMicros: integer|Long expected"; - if (message.endTimestampMicros != null && message.hasOwnProperty("endTimestampMicros")) + if (message.endTimestampMicros != null && Object.hasOwnProperty.call(message, "endTimestampMicros")) if (!$util.isInteger(message.endTimestampMicros) && !(message.endTimestampMicros && $util.isInteger(message.endTimestampMicros.low) && $util.isInteger(message.endTimestampMicros.high))) return "endTimestampMicros: integer|Long expected"; return null; @@ -60245,6 +62131,8 @@ TimestampRange.fromObject = function fromObject(object, long) { if (object instanceof $root.google.bigtable.v2.TimestampRange) return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.v2.TimestampRange: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -60252,7 +62140,7 @@ var message = new $root.google.bigtable.v2.TimestampRange(); if (object.startTimestampMicros != null) if ($util.Long) - (message.startTimestampMicros = $util.Long.fromValue(object.startTimestampMicros)).unsigned = false; + message.startTimestampMicros = $util.Long.fromValue(object.startTimestampMicros, false); else if (typeof object.startTimestampMicros === "string") message.startTimestampMicros = parseInt(object.startTimestampMicros, 10); else if (typeof object.startTimestampMicros === "number") @@ -60261,7 +62149,7 @@ message.startTimestampMicros = new $util.LongBits(object.startTimestampMicros.low >>> 0, object.startTimestampMicros.high >>> 0).toNumber(); if (object.endTimestampMicros != null) if ($util.Long) - (message.endTimestampMicros = $util.Long.fromValue(object.endTimestampMicros)).unsigned = false; + message.endTimestampMicros = $util.Long.fromValue(object.endTimestampMicros, false); else if (typeof object.endTimestampMicros === "string") message.endTimestampMicros = parseInt(object.endTimestampMicros, 10); else if (typeof object.endTimestampMicros === "number") @@ -60280,29 +62168,37 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - TimestampRange.toObject = function toObject(message, options) { + TimestampRange.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) { if ($util.Long) { var long = new $util.Long(0, 0, false); - object.startTimestampMicros = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.startTimestampMicros = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : typeof BigInt !== "undefined" && options.longs === BigInt ? long.toBigInt() : long; } else - object.startTimestampMicros = options.longs === String ? "0" : 0; + object.startTimestampMicros = options.longs === String ? "0" : typeof BigInt !== "undefined" && options.longs === BigInt ? BigInt("0") : 0; if ($util.Long) { var long = new $util.Long(0, 0, false); - object.endTimestampMicros = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.endTimestampMicros = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : typeof BigInt !== "undefined" && options.longs === BigInt ? long.toBigInt() : long; } else - object.endTimestampMicros = options.longs === String ? "0" : 0; + object.endTimestampMicros = options.longs === String ? "0" : typeof BigInt !== "undefined" && options.longs === BigInt ? BigInt("0") : 0; } - if (message.startTimestampMicros != null && message.hasOwnProperty("startTimestampMicros")) - if (typeof message.startTimestampMicros === "number") + if (message.startTimestampMicros != null && Object.hasOwnProperty.call(message, "startTimestampMicros")) + if (typeof BigInt !== "undefined" && options.longs === BigInt) + object.startTimestampMicros = typeof message.startTimestampMicros === "number" ? BigInt(message.startTimestampMicros) : $util.Long.fromBits(message.startTimestampMicros.low >>> 0, message.startTimestampMicros.high >>> 0, false).toBigInt(); + else if (typeof message.startTimestampMicros === "number") object.startTimestampMicros = options.longs === String ? String(message.startTimestampMicros) : message.startTimestampMicros; else object.startTimestampMicros = options.longs === String ? $util.Long.prototype.toString.call(message.startTimestampMicros) : options.longs === Number ? new $util.LongBits(message.startTimestampMicros.low >>> 0, message.startTimestampMicros.high >>> 0).toNumber() : message.startTimestampMicros; - if (message.endTimestampMicros != null && message.hasOwnProperty("endTimestampMicros")) - if (typeof message.endTimestampMicros === "number") + if (message.endTimestampMicros != null && Object.hasOwnProperty.call(message, "endTimestampMicros")) + if (typeof BigInt !== "undefined" && options.longs === BigInt) + object.endTimestampMicros = typeof message.endTimestampMicros === "number" ? BigInt(message.endTimestampMicros) : $util.Long.fromBits(message.endTimestampMicros.low >>> 0, message.endTimestampMicros.high >>> 0, false).toBigInt(); + else if (typeof message.endTimestampMicros === "number") object.endTimestampMicros = options.longs === String ? String(message.endTimestampMicros) : message.endTimestampMicros; else object.endTimestampMicros = options.longs === String ? $util.Long.prototype.toString.call(message.endTimestampMicros) : options.longs === Number ? new $util.LongBits(message.endTimestampMicros.low >>> 0, message.endTimestampMicros.high >>> 0).toNumber() : message.endTimestampMicros; @@ -60443,9 +62339,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ValueRange.encode = function encode(message, writer) { + ValueRange.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.startValueClosed != null && Object.hasOwnProperty.call(message, "startValueClosed")) writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.startValueClosed); if (message.startValueOpen != null && Object.hasOwnProperty.call(message, "startValueOpen")) @@ -60467,7 +62367,7 @@ * @returns {$protobuf.Writer} Writer */ ValueRange.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -60550,24 +62450,24 @@ if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; var properties = {}; - if (message.startValueClosed != null && message.hasOwnProperty("startValueClosed")) { + if (message.startValueClosed != null && Object.hasOwnProperty.call(message, "startValueClosed")) { properties.startValue = 1; if (!(message.startValueClosed && typeof message.startValueClosed.length === "number" || $util.isString(message.startValueClosed))) return "startValueClosed: buffer expected"; } - if (message.startValueOpen != null && message.hasOwnProperty("startValueOpen")) { + if (message.startValueOpen != null && Object.hasOwnProperty.call(message, "startValueOpen")) { if (properties.startValue === 1) return "startValue: multiple values"; properties.startValue = 1; if (!(message.startValueOpen && typeof message.startValueOpen.length === "number" || $util.isString(message.startValueOpen))) return "startValueOpen: buffer expected"; } - if (message.endValueClosed != null && message.hasOwnProperty("endValueClosed")) { + if (message.endValueClosed != null && Object.hasOwnProperty.call(message, "endValueClosed")) { properties.endValue = 1; if (!(message.endValueClosed && typeof message.endValueClosed.length === "number" || $util.isString(message.endValueClosed))) return "endValueClosed: buffer expected"; } - if (message.endValueOpen != null && message.hasOwnProperty("endValueOpen")) { + if (message.endValueOpen != null && Object.hasOwnProperty.call(message, "endValueOpen")) { if (properties.endValue === 1) return "endValue: multiple values"; properties.endValue = 1; @@ -60588,6 +62488,8 @@ ValueRange.fromObject = function fromObject(object, long) { if (object instanceof $root.google.bigtable.v2.ValueRange) return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.v2.ValueRange: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -60625,26 +62527,30 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ValueRange.toObject = function toObject(message, options) { + ValueRange.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; - if (message.startValueClosed != null && message.hasOwnProperty("startValueClosed")) { + if (message.startValueClosed != null && Object.hasOwnProperty.call(message, "startValueClosed")) { object.startValueClosed = options.bytes === String ? $util.base64.encode(message.startValueClosed, 0, message.startValueClosed.length) : options.bytes === Array ? Array.prototype.slice.call(message.startValueClosed) : message.startValueClosed; if (options.oneofs) object.startValue = "startValueClosed"; } - if (message.startValueOpen != null && message.hasOwnProperty("startValueOpen")) { + if (message.startValueOpen != null && Object.hasOwnProperty.call(message, "startValueOpen")) { object.startValueOpen = options.bytes === String ? $util.base64.encode(message.startValueOpen, 0, message.startValueOpen.length) : options.bytes === Array ? Array.prototype.slice.call(message.startValueOpen) : message.startValueOpen; if (options.oneofs) object.startValue = "startValueOpen"; } - if (message.endValueClosed != null && message.hasOwnProperty("endValueClosed")) { + if (message.endValueClosed != null && Object.hasOwnProperty.call(message, "endValueClosed")) { object.endValueClosed = options.bytes === String ? $util.base64.encode(message.endValueClosed, 0, message.endValueClosed.length) : options.bytes === Array ? Array.prototype.slice.call(message.endValueClosed) : message.endValueClosed; if (options.oneofs) object.endValue = "endValueClosed"; } - if (message.endValueOpen != null && message.hasOwnProperty("endValueOpen")) { + if (message.endValueOpen != null && Object.hasOwnProperty.call(message, "endValueOpen")) { object.endValueOpen = options.bytes === String ? $util.base64.encode(message.endValueOpen, 0, message.endValueOpen.length) : options.bytes === Array ? Array.prototype.slice.call(message.endValueOpen) : message.endValueOpen; if (options.oneofs) object.endValue = "endValueOpen"; @@ -60910,15 +62816,19 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - RowFilter.encode = function encode(message, writer) { + RowFilter.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.chain != null && Object.hasOwnProperty.call(message, "chain")) - $root.google.bigtable.v2.RowFilter.Chain.encode(message.chain, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + $root.google.bigtable.v2.RowFilter.Chain.encode(message.chain, writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); if (message.interleave != null && Object.hasOwnProperty.call(message, "interleave")) - $root.google.bigtable.v2.RowFilter.Interleave.encode(message.interleave, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + $root.google.bigtable.v2.RowFilter.Interleave.encode(message.interleave, writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); if (message.condition != null && Object.hasOwnProperty.call(message, "condition")) - $root.google.bigtable.v2.RowFilter.Condition.encode(message.condition, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + $root.google.bigtable.v2.RowFilter.Condition.encode(message.condition, writer.uint32(/* id 3, wireType 2 =*/26).fork(), q + 1).ldelim(); if (message.rowKeyRegexFilter != null && Object.hasOwnProperty.call(message, "rowKeyRegexFilter")) writer.uint32(/* id 4, wireType 2 =*/34).bytes(message.rowKeyRegexFilter); if (message.familyNameRegexFilter != null && Object.hasOwnProperty.call(message, "familyNameRegexFilter")) @@ -60926,9 +62836,9 @@ if (message.columnQualifierRegexFilter != null && Object.hasOwnProperty.call(message, "columnQualifierRegexFilter")) writer.uint32(/* id 6, wireType 2 =*/50).bytes(message.columnQualifierRegexFilter); if (message.columnRangeFilter != null && Object.hasOwnProperty.call(message, "columnRangeFilter")) - $root.google.bigtable.v2.ColumnRange.encode(message.columnRangeFilter, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + $root.google.bigtable.v2.ColumnRange.encode(message.columnRangeFilter, writer.uint32(/* id 7, wireType 2 =*/58).fork(), q + 1).ldelim(); if (message.timestampRangeFilter != null && Object.hasOwnProperty.call(message, "timestampRangeFilter")) - $root.google.bigtable.v2.TimestampRange.encode(message.timestampRangeFilter, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + $root.google.bigtable.v2.TimestampRange.encode(message.timestampRangeFilter, writer.uint32(/* id 8, wireType 2 =*/66).fork(), q + 1).ldelim(); if (message.valueRegexFilter != null && Object.hasOwnProperty.call(message, "valueRegexFilter")) writer.uint32(/* id 9, wireType 2 =*/74).bytes(message.valueRegexFilter); if (message.cellsPerRowOffsetFilter != null && Object.hasOwnProperty.call(message, "cellsPerRowOffsetFilter")) @@ -60942,7 +62852,7 @@ if (message.rowSampleFilter != null && Object.hasOwnProperty.call(message, "rowSampleFilter")) writer.uint32(/* id 14, wireType 1 =*/113).double(message.rowSampleFilter); if (message.valueRangeFilter != null && Object.hasOwnProperty.call(message, "valueRangeFilter")) - $root.google.bigtable.v2.ValueRange.encode(message.valueRangeFilter, writer.uint32(/* id 15, wireType 2 =*/122).fork()).ldelim(); + $root.google.bigtable.v2.ValueRange.encode(message.valueRangeFilter, writer.uint32(/* id 15, wireType 2 =*/122).fork(), q + 1).ldelim(); if (message.sink != null && Object.hasOwnProperty.call(message, "sink")) writer.uint32(/* id 16, wireType 0 =*/128).bool(message.sink); if (message.passAllFilter != null && Object.hasOwnProperty.call(message, "passAllFilter")) @@ -60964,7 +62874,7 @@ * @returns {$protobuf.Writer} Writer */ RowFilter.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -61107,7 +63017,7 @@ if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; var properties = {}; - if (message.chain != null && message.hasOwnProperty("chain")) { + if (message.chain != null && Object.hasOwnProperty.call(message, "chain")) { properties.filter = 1; { var error = $root.google.bigtable.v2.RowFilter.Chain.verify(message.chain, long + 1); @@ -61115,7 +63025,7 @@ return "chain." + error; } } - if (message.interleave != null && message.hasOwnProperty("interleave")) { + if (message.interleave != null && Object.hasOwnProperty.call(message, "interleave")) { if (properties.filter === 1) return "filter: multiple values"; properties.filter = 1; @@ -61125,7 +63035,7 @@ return "interleave." + error; } } - if (message.condition != null && message.hasOwnProperty("condition")) { + if (message.condition != null && Object.hasOwnProperty.call(message, "condition")) { if (properties.filter === 1) return "filter: multiple values"; properties.filter = 1; @@ -61135,56 +63045,56 @@ return "condition." + error; } } - if (message.sink != null && message.hasOwnProperty("sink")) { + if (message.sink != null && Object.hasOwnProperty.call(message, "sink")) { if (properties.filter === 1) return "filter: multiple values"; properties.filter = 1; if (typeof message.sink !== "boolean") return "sink: boolean expected"; } - if (message.passAllFilter != null && message.hasOwnProperty("passAllFilter")) { + if (message.passAllFilter != null && Object.hasOwnProperty.call(message, "passAllFilter")) { if (properties.filter === 1) return "filter: multiple values"; properties.filter = 1; if (typeof message.passAllFilter !== "boolean") return "passAllFilter: boolean expected"; } - if (message.blockAllFilter != null && message.hasOwnProperty("blockAllFilter")) { + if (message.blockAllFilter != null && Object.hasOwnProperty.call(message, "blockAllFilter")) { if (properties.filter === 1) return "filter: multiple values"; properties.filter = 1; if (typeof message.blockAllFilter !== "boolean") return "blockAllFilter: boolean expected"; } - if (message.rowKeyRegexFilter != null && message.hasOwnProperty("rowKeyRegexFilter")) { + if (message.rowKeyRegexFilter != null && Object.hasOwnProperty.call(message, "rowKeyRegexFilter")) { if (properties.filter === 1) return "filter: multiple values"; properties.filter = 1; if (!(message.rowKeyRegexFilter && typeof message.rowKeyRegexFilter.length === "number" || $util.isString(message.rowKeyRegexFilter))) return "rowKeyRegexFilter: buffer expected"; } - if (message.rowSampleFilter != null && message.hasOwnProperty("rowSampleFilter")) { + if (message.rowSampleFilter != null && Object.hasOwnProperty.call(message, "rowSampleFilter")) { if (properties.filter === 1) return "filter: multiple values"; properties.filter = 1; if (typeof message.rowSampleFilter !== "number") return "rowSampleFilter: number expected"; } - if (message.familyNameRegexFilter != null && message.hasOwnProperty("familyNameRegexFilter")) { + if (message.familyNameRegexFilter != null && Object.hasOwnProperty.call(message, "familyNameRegexFilter")) { if (properties.filter === 1) return "filter: multiple values"; properties.filter = 1; if (!$util.isString(message.familyNameRegexFilter)) return "familyNameRegexFilter: string expected"; } - if (message.columnQualifierRegexFilter != null && message.hasOwnProperty("columnQualifierRegexFilter")) { + if (message.columnQualifierRegexFilter != null && Object.hasOwnProperty.call(message, "columnQualifierRegexFilter")) { if (properties.filter === 1) return "filter: multiple values"; properties.filter = 1; if (!(message.columnQualifierRegexFilter && typeof message.columnQualifierRegexFilter.length === "number" || $util.isString(message.columnQualifierRegexFilter))) return "columnQualifierRegexFilter: buffer expected"; } - if (message.columnRangeFilter != null && message.hasOwnProperty("columnRangeFilter")) { + if (message.columnRangeFilter != null && Object.hasOwnProperty.call(message, "columnRangeFilter")) { if (properties.filter === 1) return "filter: multiple values"; properties.filter = 1; @@ -61194,7 +63104,7 @@ return "columnRangeFilter." + error; } } - if (message.timestampRangeFilter != null && message.hasOwnProperty("timestampRangeFilter")) { + if (message.timestampRangeFilter != null && Object.hasOwnProperty.call(message, "timestampRangeFilter")) { if (properties.filter === 1) return "filter: multiple values"; properties.filter = 1; @@ -61204,14 +63114,14 @@ return "timestampRangeFilter." + error; } } - if (message.valueRegexFilter != null && message.hasOwnProperty("valueRegexFilter")) { + if (message.valueRegexFilter != null && Object.hasOwnProperty.call(message, "valueRegexFilter")) { if (properties.filter === 1) return "filter: multiple values"; properties.filter = 1; if (!(message.valueRegexFilter && typeof message.valueRegexFilter.length === "number" || $util.isString(message.valueRegexFilter))) return "valueRegexFilter: buffer expected"; } - if (message.valueRangeFilter != null && message.hasOwnProperty("valueRangeFilter")) { + if (message.valueRangeFilter != null && Object.hasOwnProperty.call(message, "valueRangeFilter")) { if (properties.filter === 1) return "filter: multiple values"; properties.filter = 1; @@ -61221,35 +63131,35 @@ return "valueRangeFilter." + error; } } - if (message.cellsPerRowOffsetFilter != null && message.hasOwnProperty("cellsPerRowOffsetFilter")) { + if (message.cellsPerRowOffsetFilter != null && Object.hasOwnProperty.call(message, "cellsPerRowOffsetFilter")) { if (properties.filter === 1) return "filter: multiple values"; properties.filter = 1; if (!$util.isInteger(message.cellsPerRowOffsetFilter)) return "cellsPerRowOffsetFilter: integer expected"; } - if (message.cellsPerRowLimitFilter != null && message.hasOwnProperty("cellsPerRowLimitFilter")) { + if (message.cellsPerRowLimitFilter != null && Object.hasOwnProperty.call(message, "cellsPerRowLimitFilter")) { if (properties.filter === 1) return "filter: multiple values"; properties.filter = 1; if (!$util.isInteger(message.cellsPerRowLimitFilter)) return "cellsPerRowLimitFilter: integer expected"; } - if (message.cellsPerColumnLimitFilter != null && message.hasOwnProperty("cellsPerColumnLimitFilter")) { + if (message.cellsPerColumnLimitFilter != null && Object.hasOwnProperty.call(message, "cellsPerColumnLimitFilter")) { if (properties.filter === 1) return "filter: multiple values"; properties.filter = 1; if (!$util.isInteger(message.cellsPerColumnLimitFilter)) return "cellsPerColumnLimitFilter: integer expected"; } - if (message.stripValueTransformer != null && message.hasOwnProperty("stripValueTransformer")) { + if (message.stripValueTransformer != null && Object.hasOwnProperty.call(message, "stripValueTransformer")) { if (properties.filter === 1) return "filter: multiple values"; properties.filter = 1; if (typeof message.stripValueTransformer !== "boolean") return "stripValueTransformer: boolean expected"; } - if (message.applyLabelTransformer != null && message.hasOwnProperty("applyLabelTransformer")) { + if (message.applyLabelTransformer != null && Object.hasOwnProperty.call(message, "applyLabelTransformer")) { if (properties.filter === 1) return "filter: multiple values"; properties.filter = 1; @@ -61270,23 +63180,25 @@ RowFilter.fromObject = function fromObject(object, long) { if (object instanceof $root.google.bigtable.v2.RowFilter) return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.v2.RowFilter: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) throw Error("maximum nesting depth exceeded"); var message = new $root.google.bigtable.v2.RowFilter(); if (object.chain != null) { - if (typeof object.chain !== "object") + if (!$util.isObject(object.chain)) throw TypeError(".google.bigtable.v2.RowFilter.chain: object expected"); message.chain = $root.google.bigtable.v2.RowFilter.Chain.fromObject(object.chain, long + 1); } if (object.interleave != null) { - if (typeof object.interleave !== "object") + if (!$util.isObject(object.interleave)) throw TypeError(".google.bigtable.v2.RowFilter.interleave: object expected"); message.interleave = $root.google.bigtable.v2.RowFilter.Interleave.fromObject(object.interleave, long + 1); } if (object.condition != null) { - if (typeof object.condition !== "object") + if (!$util.isObject(object.condition)) throw TypeError(".google.bigtable.v2.RowFilter.condition: object expected"); message.condition = $root.google.bigtable.v2.RowFilter.Condition.fromObject(object.condition, long + 1); } @@ -61311,12 +63223,12 @@ else if (object.columnQualifierRegexFilter.length >= 0) message.columnQualifierRegexFilter = object.columnQualifierRegexFilter; if (object.columnRangeFilter != null) { - if (typeof object.columnRangeFilter !== "object") + if (!$util.isObject(object.columnRangeFilter)) throw TypeError(".google.bigtable.v2.RowFilter.columnRangeFilter: object expected"); message.columnRangeFilter = $root.google.bigtable.v2.ColumnRange.fromObject(object.columnRangeFilter, long + 1); } if (object.timestampRangeFilter != null) { - if (typeof object.timestampRangeFilter !== "object") + if (!$util.isObject(object.timestampRangeFilter)) throw TypeError(".google.bigtable.v2.RowFilter.timestampRangeFilter: object expected"); message.timestampRangeFilter = $root.google.bigtable.v2.TimestampRange.fromObject(object.timestampRangeFilter, long + 1); } @@ -61326,7 +63238,7 @@ else if (object.valueRegexFilter.length >= 0) message.valueRegexFilter = object.valueRegexFilter; if (object.valueRangeFilter != null) { - if (typeof object.valueRangeFilter !== "object") + if (!$util.isObject(object.valueRangeFilter)) throw TypeError(".google.bigtable.v2.RowFilter.valueRangeFilter: object expected"); message.valueRangeFilter = $root.google.bigtable.v2.ValueRange.fromObject(object.valueRangeFilter, long + 1); } @@ -61352,101 +63264,105 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - RowFilter.toObject = function toObject(message, options) { + RowFilter.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; - if (message.chain != null && message.hasOwnProperty("chain")) { - object.chain = $root.google.bigtable.v2.RowFilter.Chain.toObject(message.chain, options); + if (message.chain != null && Object.hasOwnProperty.call(message, "chain")) { + object.chain = $root.google.bigtable.v2.RowFilter.Chain.toObject(message.chain, options, q + 1); if (options.oneofs) object.filter = "chain"; } - if (message.interleave != null && message.hasOwnProperty("interleave")) { - object.interleave = $root.google.bigtable.v2.RowFilter.Interleave.toObject(message.interleave, options); + if (message.interleave != null && Object.hasOwnProperty.call(message, "interleave")) { + object.interleave = $root.google.bigtable.v2.RowFilter.Interleave.toObject(message.interleave, options, q + 1); if (options.oneofs) object.filter = "interleave"; } - if (message.condition != null && message.hasOwnProperty("condition")) { - object.condition = $root.google.bigtable.v2.RowFilter.Condition.toObject(message.condition, options); + if (message.condition != null && Object.hasOwnProperty.call(message, "condition")) { + object.condition = $root.google.bigtable.v2.RowFilter.Condition.toObject(message.condition, options, q + 1); if (options.oneofs) object.filter = "condition"; } - if (message.rowKeyRegexFilter != null && message.hasOwnProperty("rowKeyRegexFilter")) { + if (message.rowKeyRegexFilter != null && Object.hasOwnProperty.call(message, "rowKeyRegexFilter")) { object.rowKeyRegexFilter = options.bytes === String ? $util.base64.encode(message.rowKeyRegexFilter, 0, message.rowKeyRegexFilter.length) : options.bytes === Array ? Array.prototype.slice.call(message.rowKeyRegexFilter) : message.rowKeyRegexFilter; if (options.oneofs) object.filter = "rowKeyRegexFilter"; } - if (message.familyNameRegexFilter != null && message.hasOwnProperty("familyNameRegexFilter")) { + if (message.familyNameRegexFilter != null && Object.hasOwnProperty.call(message, "familyNameRegexFilter")) { object.familyNameRegexFilter = message.familyNameRegexFilter; if (options.oneofs) object.filter = "familyNameRegexFilter"; } - if (message.columnQualifierRegexFilter != null && message.hasOwnProperty("columnQualifierRegexFilter")) { + if (message.columnQualifierRegexFilter != null && Object.hasOwnProperty.call(message, "columnQualifierRegexFilter")) { object.columnQualifierRegexFilter = options.bytes === String ? $util.base64.encode(message.columnQualifierRegexFilter, 0, message.columnQualifierRegexFilter.length) : options.bytes === Array ? Array.prototype.slice.call(message.columnQualifierRegexFilter) : message.columnQualifierRegexFilter; if (options.oneofs) object.filter = "columnQualifierRegexFilter"; } - if (message.columnRangeFilter != null && message.hasOwnProperty("columnRangeFilter")) { - object.columnRangeFilter = $root.google.bigtable.v2.ColumnRange.toObject(message.columnRangeFilter, options); + if (message.columnRangeFilter != null && Object.hasOwnProperty.call(message, "columnRangeFilter")) { + object.columnRangeFilter = $root.google.bigtable.v2.ColumnRange.toObject(message.columnRangeFilter, options, q + 1); if (options.oneofs) object.filter = "columnRangeFilter"; } - if (message.timestampRangeFilter != null && message.hasOwnProperty("timestampRangeFilter")) { - object.timestampRangeFilter = $root.google.bigtable.v2.TimestampRange.toObject(message.timestampRangeFilter, options); + if (message.timestampRangeFilter != null && Object.hasOwnProperty.call(message, "timestampRangeFilter")) { + object.timestampRangeFilter = $root.google.bigtable.v2.TimestampRange.toObject(message.timestampRangeFilter, options, q + 1); if (options.oneofs) object.filter = "timestampRangeFilter"; } - if (message.valueRegexFilter != null && message.hasOwnProperty("valueRegexFilter")) { + if (message.valueRegexFilter != null && Object.hasOwnProperty.call(message, "valueRegexFilter")) { object.valueRegexFilter = options.bytes === String ? $util.base64.encode(message.valueRegexFilter, 0, message.valueRegexFilter.length) : options.bytes === Array ? Array.prototype.slice.call(message.valueRegexFilter) : message.valueRegexFilter; if (options.oneofs) object.filter = "valueRegexFilter"; } - if (message.cellsPerRowOffsetFilter != null && message.hasOwnProperty("cellsPerRowOffsetFilter")) { + if (message.cellsPerRowOffsetFilter != null && Object.hasOwnProperty.call(message, "cellsPerRowOffsetFilter")) { object.cellsPerRowOffsetFilter = message.cellsPerRowOffsetFilter; if (options.oneofs) object.filter = "cellsPerRowOffsetFilter"; } - if (message.cellsPerRowLimitFilter != null && message.hasOwnProperty("cellsPerRowLimitFilter")) { + if (message.cellsPerRowLimitFilter != null && Object.hasOwnProperty.call(message, "cellsPerRowLimitFilter")) { object.cellsPerRowLimitFilter = message.cellsPerRowLimitFilter; if (options.oneofs) object.filter = "cellsPerRowLimitFilter"; } - if (message.cellsPerColumnLimitFilter != null && message.hasOwnProperty("cellsPerColumnLimitFilter")) { + if (message.cellsPerColumnLimitFilter != null && Object.hasOwnProperty.call(message, "cellsPerColumnLimitFilter")) { object.cellsPerColumnLimitFilter = message.cellsPerColumnLimitFilter; if (options.oneofs) object.filter = "cellsPerColumnLimitFilter"; } - if (message.stripValueTransformer != null && message.hasOwnProperty("stripValueTransformer")) { + if (message.stripValueTransformer != null && Object.hasOwnProperty.call(message, "stripValueTransformer")) { object.stripValueTransformer = message.stripValueTransformer; if (options.oneofs) object.filter = "stripValueTransformer"; } - if (message.rowSampleFilter != null && message.hasOwnProperty("rowSampleFilter")) { + if (message.rowSampleFilter != null && Object.hasOwnProperty.call(message, "rowSampleFilter")) { object.rowSampleFilter = options.json && !isFinite(message.rowSampleFilter) ? String(message.rowSampleFilter) : message.rowSampleFilter; if (options.oneofs) object.filter = "rowSampleFilter"; } - if (message.valueRangeFilter != null && message.hasOwnProperty("valueRangeFilter")) { - object.valueRangeFilter = $root.google.bigtable.v2.ValueRange.toObject(message.valueRangeFilter, options); + if (message.valueRangeFilter != null && Object.hasOwnProperty.call(message, "valueRangeFilter")) { + object.valueRangeFilter = $root.google.bigtable.v2.ValueRange.toObject(message.valueRangeFilter, options, q + 1); if (options.oneofs) object.filter = "valueRangeFilter"; } - if (message.sink != null && message.hasOwnProperty("sink")) { + if (message.sink != null && Object.hasOwnProperty.call(message, "sink")) { object.sink = message.sink; if (options.oneofs) object.filter = "sink"; } - if (message.passAllFilter != null && message.hasOwnProperty("passAllFilter")) { + if (message.passAllFilter != null && Object.hasOwnProperty.call(message, "passAllFilter")) { object.passAllFilter = message.passAllFilter; if (options.oneofs) object.filter = "passAllFilter"; } - if (message.blockAllFilter != null && message.hasOwnProperty("blockAllFilter")) { + if (message.blockAllFilter != null && Object.hasOwnProperty.call(message, "blockAllFilter")) { object.blockAllFilter = message.blockAllFilter; if (options.oneofs) object.filter = "blockAllFilter"; } - if (message.applyLabelTransformer != null && message.hasOwnProperty("applyLabelTransformer")) { + if (message.applyLabelTransformer != null && Object.hasOwnProperty.call(message, "applyLabelTransformer")) { object.applyLabelTransformer = message.applyLabelTransformer; if (options.oneofs) object.filter = "applyLabelTransformer"; @@ -61534,12 +63450,16 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Chain.encode = function encode(message, writer) { + Chain.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.filters != null && message.filters.length) for (var i = 0; i < message.filters.length; ++i) - $root.google.bigtable.v2.RowFilter.encode(message.filters[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + $root.google.bigtable.v2.RowFilter.encode(message.filters[i], writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); return writer; }; @@ -61553,7 +63473,7 @@ * @returns {$protobuf.Writer} Writer */ Chain.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -61625,7 +63545,7 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.filters != null && message.hasOwnProperty("filters")) { + if (message.filters != null && Object.hasOwnProperty.call(message, "filters")) { if (!Array.isArray(message.filters)) return "filters: array expected"; for (var i = 0; i < message.filters.length; ++i) { @@ -61648,6 +63568,8 @@ Chain.fromObject = function fromObject(object, long) { if (object instanceof $root.google.bigtable.v2.RowFilter.Chain) return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.v2.RowFilter.Chain: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -61658,7 +63580,7 @@ throw TypeError(".google.bigtable.v2.RowFilter.Chain.filters: array expected"); message.filters = []; for (var i = 0; i < object.filters.length; ++i) { - if (typeof object.filters[i] !== "object") + if (!$util.isObject(object.filters[i])) throw TypeError(".google.bigtable.v2.RowFilter.Chain.filters: object expected"); message.filters[i] = $root.google.bigtable.v2.RowFilter.fromObject(object.filters[i], long + 1); } @@ -61675,16 +63597,20 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Chain.toObject = function toObject(message, options) { + Chain.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.filters = []; if (message.filters && message.filters.length) { object.filters = []; for (var j = 0; j < message.filters.length; ++j) - object.filters[j] = $root.google.bigtable.v2.RowFilter.toObject(message.filters[j], options); + object.filters[j] = $root.google.bigtable.v2.RowFilter.toObject(message.filters[j], options, q + 1); } return object; }; @@ -61772,12 +63698,16 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Interleave.encode = function encode(message, writer) { + Interleave.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.filters != null && message.filters.length) for (var i = 0; i < message.filters.length; ++i) - $root.google.bigtable.v2.RowFilter.encode(message.filters[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + $root.google.bigtable.v2.RowFilter.encode(message.filters[i], writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); return writer; }; @@ -61791,7 +63721,7 @@ * @returns {$protobuf.Writer} Writer */ Interleave.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -61863,7 +63793,7 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.filters != null && message.hasOwnProperty("filters")) { + if (message.filters != null && Object.hasOwnProperty.call(message, "filters")) { if (!Array.isArray(message.filters)) return "filters: array expected"; for (var i = 0; i < message.filters.length; ++i) { @@ -61886,6 +63816,8 @@ Interleave.fromObject = function fromObject(object, long) { if (object instanceof $root.google.bigtable.v2.RowFilter.Interleave) return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.v2.RowFilter.Interleave: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -61896,7 +63828,7 @@ throw TypeError(".google.bigtable.v2.RowFilter.Interleave.filters: array expected"); message.filters = []; for (var i = 0; i < object.filters.length; ++i) { - if (typeof object.filters[i] !== "object") + if (!$util.isObject(object.filters[i])) throw TypeError(".google.bigtable.v2.RowFilter.Interleave.filters: object expected"); message.filters[i] = $root.google.bigtable.v2.RowFilter.fromObject(object.filters[i], long + 1); } @@ -61913,16 +63845,20 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Interleave.toObject = function toObject(message, options) { + Interleave.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.filters = []; if (message.filters && message.filters.length) { object.filters = []; for (var j = 0; j < message.filters.length; ++j) - object.filters[j] = $root.google.bigtable.v2.RowFilter.toObject(message.filters[j], options); + object.filters[j] = $root.google.bigtable.v2.RowFilter.toObject(message.filters[j], options, q + 1); } return object; }; @@ -62027,15 +63963,19 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Condition.encode = function encode(message, writer) { + Condition.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.predicateFilter != null && Object.hasOwnProperty.call(message, "predicateFilter")) - $root.google.bigtable.v2.RowFilter.encode(message.predicateFilter, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + $root.google.bigtable.v2.RowFilter.encode(message.predicateFilter, writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); if (message.trueFilter != null && Object.hasOwnProperty.call(message, "trueFilter")) - $root.google.bigtable.v2.RowFilter.encode(message.trueFilter, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + $root.google.bigtable.v2.RowFilter.encode(message.trueFilter, writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); if (message.falseFilter != null && Object.hasOwnProperty.call(message, "falseFilter")) - $root.google.bigtable.v2.RowFilter.encode(message.falseFilter, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + $root.google.bigtable.v2.RowFilter.encode(message.falseFilter, writer.uint32(/* id 3, wireType 2 =*/26).fork(), q + 1).ldelim(); return writer; }; @@ -62049,7 +63989,7 @@ * @returns {$protobuf.Writer} Writer */ Condition.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -62127,17 +64067,17 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.predicateFilter != null && message.hasOwnProperty("predicateFilter")) { + if (message.predicateFilter != null && Object.hasOwnProperty.call(message, "predicateFilter")) { var error = $root.google.bigtable.v2.RowFilter.verify(message.predicateFilter, long + 1); if (error) return "predicateFilter." + error; } - if (message.trueFilter != null && message.hasOwnProperty("trueFilter")) { + if (message.trueFilter != null && Object.hasOwnProperty.call(message, "trueFilter")) { var error = $root.google.bigtable.v2.RowFilter.verify(message.trueFilter, long + 1); if (error) return "trueFilter." + error; } - if (message.falseFilter != null && message.hasOwnProperty("falseFilter")) { + if (message.falseFilter != null && Object.hasOwnProperty.call(message, "falseFilter")) { var error = $root.google.bigtable.v2.RowFilter.verify(message.falseFilter, long + 1); if (error) return "falseFilter." + error; @@ -62156,23 +64096,25 @@ Condition.fromObject = function fromObject(object, long) { if (object instanceof $root.google.bigtable.v2.RowFilter.Condition) return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.v2.RowFilter.Condition: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) throw Error("maximum nesting depth exceeded"); var message = new $root.google.bigtable.v2.RowFilter.Condition(); if (object.predicateFilter != null) { - if (typeof object.predicateFilter !== "object") + if (!$util.isObject(object.predicateFilter)) throw TypeError(".google.bigtable.v2.RowFilter.Condition.predicateFilter: object expected"); message.predicateFilter = $root.google.bigtable.v2.RowFilter.fromObject(object.predicateFilter, long + 1); } if (object.trueFilter != null) { - if (typeof object.trueFilter !== "object") + if (!$util.isObject(object.trueFilter)) throw TypeError(".google.bigtable.v2.RowFilter.Condition.trueFilter: object expected"); message.trueFilter = $root.google.bigtable.v2.RowFilter.fromObject(object.trueFilter, long + 1); } if (object.falseFilter != null) { - if (typeof object.falseFilter !== "object") + if (!$util.isObject(object.falseFilter)) throw TypeError(".google.bigtable.v2.RowFilter.Condition.falseFilter: object expected"); message.falseFilter = $root.google.bigtable.v2.RowFilter.fromObject(object.falseFilter, long + 1); } @@ -62188,21 +64130,25 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Condition.toObject = function toObject(message, options) { + Condition.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.predicateFilter = null; object.trueFilter = null; object.falseFilter = null; } - if (message.predicateFilter != null && message.hasOwnProperty("predicateFilter")) - object.predicateFilter = $root.google.bigtable.v2.RowFilter.toObject(message.predicateFilter, options); - if (message.trueFilter != null && message.hasOwnProperty("trueFilter")) - object.trueFilter = $root.google.bigtable.v2.RowFilter.toObject(message.trueFilter, options); - if (message.falseFilter != null && message.hasOwnProperty("falseFilter")) - object.falseFilter = $root.google.bigtable.v2.RowFilter.toObject(message.falseFilter, options); + if (message.predicateFilter != null && Object.hasOwnProperty.call(message, "predicateFilter")) + object.predicateFilter = $root.google.bigtable.v2.RowFilter.toObject(message.predicateFilter, options, q + 1); + if (message.trueFilter != null && Object.hasOwnProperty.call(message, "trueFilter")) + object.trueFilter = $root.google.bigtable.v2.RowFilter.toObject(message.trueFilter, options, q + 1); + if (message.falseFilter != null && Object.hasOwnProperty.call(message, "falseFilter")) + object.falseFilter = $root.google.bigtable.v2.RowFilter.toObject(message.falseFilter, options, q + 1); return object; }; @@ -62350,21 +64296,25 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Mutation.encode = function encode(message, writer) { + Mutation.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.setCell != null && Object.hasOwnProperty.call(message, "setCell")) - $root.google.bigtable.v2.Mutation.SetCell.encode(message.setCell, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + $root.google.bigtable.v2.Mutation.SetCell.encode(message.setCell, writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); if (message.deleteFromColumn != null && Object.hasOwnProperty.call(message, "deleteFromColumn")) - $root.google.bigtable.v2.Mutation.DeleteFromColumn.encode(message.deleteFromColumn, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + $root.google.bigtable.v2.Mutation.DeleteFromColumn.encode(message.deleteFromColumn, writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); if (message.deleteFromFamily != null && Object.hasOwnProperty.call(message, "deleteFromFamily")) - $root.google.bigtable.v2.Mutation.DeleteFromFamily.encode(message.deleteFromFamily, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + $root.google.bigtable.v2.Mutation.DeleteFromFamily.encode(message.deleteFromFamily, writer.uint32(/* id 3, wireType 2 =*/26).fork(), q + 1).ldelim(); if (message.deleteFromRow != null && Object.hasOwnProperty.call(message, "deleteFromRow")) - $root.google.bigtable.v2.Mutation.DeleteFromRow.encode(message.deleteFromRow, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + $root.google.bigtable.v2.Mutation.DeleteFromRow.encode(message.deleteFromRow, writer.uint32(/* id 4, wireType 2 =*/34).fork(), q + 1).ldelim(); if (message.addToCell != null && Object.hasOwnProperty.call(message, "addToCell")) - $root.google.bigtable.v2.Mutation.AddToCell.encode(message.addToCell, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + $root.google.bigtable.v2.Mutation.AddToCell.encode(message.addToCell, writer.uint32(/* id 5, wireType 2 =*/42).fork(), q + 1).ldelim(); if (message.mergeToCell != null && Object.hasOwnProperty.call(message, "mergeToCell")) - $root.google.bigtable.v2.Mutation.MergeToCell.encode(message.mergeToCell, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + $root.google.bigtable.v2.Mutation.MergeToCell.encode(message.mergeToCell, writer.uint32(/* id 6, wireType 2 =*/50).fork(), q + 1).ldelim(); return writer; }; @@ -62378,7 +64328,7 @@ * @returns {$protobuf.Writer} Writer */ Mutation.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -62469,7 +64419,7 @@ if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; var properties = {}; - if (message.setCell != null && message.hasOwnProperty("setCell")) { + if (message.setCell != null && Object.hasOwnProperty.call(message, "setCell")) { properties.mutation = 1; { var error = $root.google.bigtable.v2.Mutation.SetCell.verify(message.setCell, long + 1); @@ -62477,7 +64427,7 @@ return "setCell." + error; } } - if (message.addToCell != null && message.hasOwnProperty("addToCell")) { + if (message.addToCell != null && Object.hasOwnProperty.call(message, "addToCell")) { if (properties.mutation === 1) return "mutation: multiple values"; properties.mutation = 1; @@ -62487,7 +64437,7 @@ return "addToCell." + error; } } - if (message.mergeToCell != null && message.hasOwnProperty("mergeToCell")) { + if (message.mergeToCell != null && Object.hasOwnProperty.call(message, "mergeToCell")) { if (properties.mutation === 1) return "mutation: multiple values"; properties.mutation = 1; @@ -62497,7 +64447,7 @@ return "mergeToCell." + error; } } - if (message.deleteFromColumn != null && message.hasOwnProperty("deleteFromColumn")) { + if (message.deleteFromColumn != null && Object.hasOwnProperty.call(message, "deleteFromColumn")) { if (properties.mutation === 1) return "mutation: multiple values"; properties.mutation = 1; @@ -62507,7 +64457,7 @@ return "deleteFromColumn." + error; } } - if (message.deleteFromFamily != null && message.hasOwnProperty("deleteFromFamily")) { + if (message.deleteFromFamily != null && Object.hasOwnProperty.call(message, "deleteFromFamily")) { if (properties.mutation === 1) return "mutation: multiple values"; properties.mutation = 1; @@ -62517,7 +64467,7 @@ return "deleteFromFamily." + error; } } - if (message.deleteFromRow != null && message.hasOwnProperty("deleteFromRow")) { + if (message.deleteFromRow != null && Object.hasOwnProperty.call(message, "deleteFromRow")) { if (properties.mutation === 1) return "mutation: multiple values"; properties.mutation = 1; @@ -62541,38 +64491,40 @@ Mutation.fromObject = function fromObject(object, long) { if (object instanceof $root.google.bigtable.v2.Mutation) return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.v2.Mutation: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) throw Error("maximum nesting depth exceeded"); var message = new $root.google.bigtable.v2.Mutation(); if (object.setCell != null) { - if (typeof object.setCell !== "object") + if (!$util.isObject(object.setCell)) throw TypeError(".google.bigtable.v2.Mutation.setCell: object expected"); message.setCell = $root.google.bigtable.v2.Mutation.SetCell.fromObject(object.setCell, long + 1); } if (object.addToCell != null) { - if (typeof object.addToCell !== "object") + if (!$util.isObject(object.addToCell)) throw TypeError(".google.bigtable.v2.Mutation.addToCell: object expected"); message.addToCell = $root.google.bigtable.v2.Mutation.AddToCell.fromObject(object.addToCell, long + 1); } if (object.mergeToCell != null) { - if (typeof object.mergeToCell !== "object") + if (!$util.isObject(object.mergeToCell)) throw TypeError(".google.bigtable.v2.Mutation.mergeToCell: object expected"); message.mergeToCell = $root.google.bigtable.v2.Mutation.MergeToCell.fromObject(object.mergeToCell, long + 1); } if (object.deleteFromColumn != null) { - if (typeof object.deleteFromColumn !== "object") + if (!$util.isObject(object.deleteFromColumn)) throw TypeError(".google.bigtable.v2.Mutation.deleteFromColumn: object expected"); message.deleteFromColumn = $root.google.bigtable.v2.Mutation.DeleteFromColumn.fromObject(object.deleteFromColumn, long + 1); } if (object.deleteFromFamily != null) { - if (typeof object.deleteFromFamily !== "object") + if (!$util.isObject(object.deleteFromFamily)) throw TypeError(".google.bigtable.v2.Mutation.deleteFromFamily: object expected"); message.deleteFromFamily = $root.google.bigtable.v2.Mutation.DeleteFromFamily.fromObject(object.deleteFromFamily, long + 1); } if (object.deleteFromRow != null) { - if (typeof object.deleteFromRow !== "object") + if (!$util.isObject(object.deleteFromRow)) throw TypeError(".google.bigtable.v2.Mutation.deleteFromRow: object expected"); message.deleteFromRow = $root.google.bigtable.v2.Mutation.DeleteFromRow.fromObject(object.deleteFromRow, long + 1); } @@ -62588,37 +64540,41 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Mutation.toObject = function toObject(message, options) { + Mutation.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; - if (message.setCell != null && message.hasOwnProperty("setCell")) { - object.setCell = $root.google.bigtable.v2.Mutation.SetCell.toObject(message.setCell, options); + if (message.setCell != null && Object.hasOwnProperty.call(message, "setCell")) { + object.setCell = $root.google.bigtable.v2.Mutation.SetCell.toObject(message.setCell, options, q + 1); if (options.oneofs) object.mutation = "setCell"; } - if (message.deleteFromColumn != null && message.hasOwnProperty("deleteFromColumn")) { - object.deleteFromColumn = $root.google.bigtable.v2.Mutation.DeleteFromColumn.toObject(message.deleteFromColumn, options); + if (message.deleteFromColumn != null && Object.hasOwnProperty.call(message, "deleteFromColumn")) { + object.deleteFromColumn = $root.google.bigtable.v2.Mutation.DeleteFromColumn.toObject(message.deleteFromColumn, options, q + 1); if (options.oneofs) object.mutation = "deleteFromColumn"; } - if (message.deleteFromFamily != null && message.hasOwnProperty("deleteFromFamily")) { - object.deleteFromFamily = $root.google.bigtable.v2.Mutation.DeleteFromFamily.toObject(message.deleteFromFamily, options); + if (message.deleteFromFamily != null && Object.hasOwnProperty.call(message, "deleteFromFamily")) { + object.deleteFromFamily = $root.google.bigtable.v2.Mutation.DeleteFromFamily.toObject(message.deleteFromFamily, options, q + 1); if (options.oneofs) object.mutation = "deleteFromFamily"; } - if (message.deleteFromRow != null && message.hasOwnProperty("deleteFromRow")) { - object.deleteFromRow = $root.google.bigtable.v2.Mutation.DeleteFromRow.toObject(message.deleteFromRow, options); + if (message.deleteFromRow != null && Object.hasOwnProperty.call(message, "deleteFromRow")) { + object.deleteFromRow = $root.google.bigtable.v2.Mutation.DeleteFromRow.toObject(message.deleteFromRow, options, q + 1); if (options.oneofs) object.mutation = "deleteFromRow"; } - if (message.addToCell != null && message.hasOwnProperty("addToCell")) { - object.addToCell = $root.google.bigtable.v2.Mutation.AddToCell.toObject(message.addToCell, options); + if (message.addToCell != null && Object.hasOwnProperty.call(message, "addToCell")) { + object.addToCell = $root.google.bigtable.v2.Mutation.AddToCell.toObject(message.addToCell, options, q + 1); if (options.oneofs) object.mutation = "addToCell"; } - if (message.mergeToCell != null && message.hasOwnProperty("mergeToCell")) { - object.mergeToCell = $root.google.bigtable.v2.Mutation.MergeToCell.toObject(message.mergeToCell, options); + if (message.mergeToCell != null && Object.hasOwnProperty.call(message, "mergeToCell")) { + object.mergeToCell = $root.google.bigtable.v2.Mutation.MergeToCell.toObject(message.mergeToCell, options, q + 1); if (options.oneofs) object.mutation = "mergeToCell"; } @@ -62731,9 +64687,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SetCell.encode = function encode(message, writer) { + SetCell.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.familyName != null && Object.hasOwnProperty.call(message, "familyName")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.familyName); if (message.columnQualifier != null && Object.hasOwnProperty.call(message, "columnQualifier")) @@ -62755,7 +64715,7 @@ * @returns {$protobuf.Writer} Writer */ SetCell.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -62837,16 +64797,16 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.familyName != null && message.hasOwnProperty("familyName")) + if (message.familyName != null && Object.hasOwnProperty.call(message, "familyName")) if (!$util.isString(message.familyName)) return "familyName: string expected"; - if (message.columnQualifier != null && message.hasOwnProperty("columnQualifier")) + if (message.columnQualifier != null && Object.hasOwnProperty.call(message, "columnQualifier")) if (!(message.columnQualifier && typeof message.columnQualifier.length === "number" || $util.isString(message.columnQualifier))) return "columnQualifier: buffer expected"; - if (message.timestampMicros != null && message.hasOwnProperty("timestampMicros")) + if (message.timestampMicros != null && Object.hasOwnProperty.call(message, "timestampMicros")) if (!$util.isInteger(message.timestampMicros) && !(message.timestampMicros && $util.isInteger(message.timestampMicros.low) && $util.isInteger(message.timestampMicros.high))) return "timestampMicros: integer|Long expected"; - if (message.value != null && message.hasOwnProperty("value")) + if (message.value != null && Object.hasOwnProperty.call(message, "value")) if (!(message.value && typeof message.value.length === "number" || $util.isString(message.value))) return "value: buffer expected"; return null; @@ -62863,6 +64823,8 @@ SetCell.fromObject = function fromObject(object, long) { if (object instanceof $root.google.bigtable.v2.Mutation.SetCell) return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.v2.Mutation.SetCell: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -62877,7 +64839,7 @@ message.columnQualifier = object.columnQualifier; if (object.timestampMicros != null) if ($util.Long) - (message.timestampMicros = $util.Long.fromValue(object.timestampMicros)).unsigned = false; + message.timestampMicros = $util.Long.fromValue(object.timestampMicros, false); else if (typeof object.timestampMicros === "string") message.timestampMicros = parseInt(object.timestampMicros, 10); else if (typeof object.timestampMicros === "number") @@ -62901,9 +64863,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - SetCell.toObject = function toObject(message, options) { + SetCell.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.familyName = ""; @@ -62916,9 +64882,9 @@ } if ($util.Long) { var long = new $util.Long(0, 0, false); - object.timestampMicros = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.timestampMicros = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : typeof BigInt !== "undefined" && options.longs === BigInt ? long.toBigInt() : long; } else - object.timestampMicros = options.longs === String ? "0" : 0; + object.timestampMicros = options.longs === String ? "0" : typeof BigInt !== "undefined" && options.longs === BigInt ? BigInt("0") : 0; if (options.bytes === String) object.value = ""; else { @@ -62927,16 +64893,18 @@ object.value = $util.newBuffer(object.value); } } - if (message.familyName != null && message.hasOwnProperty("familyName")) + if (message.familyName != null && Object.hasOwnProperty.call(message, "familyName")) object.familyName = message.familyName; - if (message.columnQualifier != null && message.hasOwnProperty("columnQualifier")) + if (message.columnQualifier != null && Object.hasOwnProperty.call(message, "columnQualifier")) object.columnQualifier = options.bytes === String ? $util.base64.encode(message.columnQualifier, 0, message.columnQualifier.length) : options.bytes === Array ? Array.prototype.slice.call(message.columnQualifier) : message.columnQualifier; - if (message.timestampMicros != null && message.hasOwnProperty("timestampMicros")) - if (typeof message.timestampMicros === "number") + if (message.timestampMicros != null && Object.hasOwnProperty.call(message, "timestampMicros")) + if (typeof BigInt !== "undefined" && options.longs === BigInt) + object.timestampMicros = typeof message.timestampMicros === "number" ? BigInt(message.timestampMicros) : $util.Long.fromBits(message.timestampMicros.low >>> 0, message.timestampMicros.high >>> 0, false).toBigInt(); + else if (typeof message.timestampMicros === "number") object.timestampMicros = options.longs === String ? String(message.timestampMicros) : message.timestampMicros; else object.timestampMicros = options.longs === String ? $util.Long.prototype.toString.call(message.timestampMicros) : options.longs === Number ? new $util.LongBits(message.timestampMicros.low >>> 0, message.timestampMicros.high >>> 0).toNumber() : message.timestampMicros; - if (message.value != null && message.hasOwnProperty("value")) + if (message.value != null && Object.hasOwnProperty.call(message, "value")) object.value = options.bytes === String ? $util.base64.encode(message.value, 0, message.value.length) : options.bytes === Array ? Array.prototype.slice.call(message.value) : message.value; return object; }; @@ -63050,17 +65018,21 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AddToCell.encode = function encode(message, writer) { + AddToCell.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.familyName != null && Object.hasOwnProperty.call(message, "familyName")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.familyName); if (message.columnQualifier != null && Object.hasOwnProperty.call(message, "columnQualifier")) - $root.google.bigtable.v2.Value.encode(message.columnQualifier, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + $root.google.bigtable.v2.Value.encode(message.columnQualifier, writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); if (message.timestamp != null && Object.hasOwnProperty.call(message, "timestamp")) - $root.google.bigtable.v2.Value.encode(message.timestamp, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + $root.google.bigtable.v2.Value.encode(message.timestamp, writer.uint32(/* id 3, wireType 2 =*/26).fork(), q + 1).ldelim(); if (message.input != null && Object.hasOwnProperty.call(message, "input")) - $root.google.bigtable.v2.Value.encode(message.input, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + $root.google.bigtable.v2.Value.encode(message.input, writer.uint32(/* id 4, wireType 2 =*/34).fork(), q + 1).ldelim(); return writer; }; @@ -63074,7 +65046,7 @@ * @returns {$protobuf.Writer} Writer */ AddToCell.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -63156,20 +65128,20 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.familyName != null && message.hasOwnProperty("familyName")) + if (message.familyName != null && Object.hasOwnProperty.call(message, "familyName")) if (!$util.isString(message.familyName)) return "familyName: string expected"; - if (message.columnQualifier != null && message.hasOwnProperty("columnQualifier")) { + if (message.columnQualifier != null && Object.hasOwnProperty.call(message, "columnQualifier")) { var error = $root.google.bigtable.v2.Value.verify(message.columnQualifier, long + 1); if (error) return "columnQualifier." + error; } - if (message.timestamp != null && message.hasOwnProperty("timestamp")) { + if (message.timestamp != null && Object.hasOwnProperty.call(message, "timestamp")) { var error = $root.google.bigtable.v2.Value.verify(message.timestamp, long + 1); if (error) return "timestamp." + error; } - if (message.input != null && message.hasOwnProperty("input")) { + if (message.input != null && Object.hasOwnProperty.call(message, "input")) { var error = $root.google.bigtable.v2.Value.verify(message.input, long + 1); if (error) return "input." + error; @@ -63188,6 +65160,8 @@ AddToCell.fromObject = function fromObject(object, long) { if (object instanceof $root.google.bigtable.v2.Mutation.AddToCell) return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.v2.Mutation.AddToCell: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -63196,17 +65170,17 @@ if (object.familyName != null) message.familyName = String(object.familyName); if (object.columnQualifier != null) { - if (typeof object.columnQualifier !== "object") + if (!$util.isObject(object.columnQualifier)) throw TypeError(".google.bigtable.v2.Mutation.AddToCell.columnQualifier: object expected"); message.columnQualifier = $root.google.bigtable.v2.Value.fromObject(object.columnQualifier, long + 1); } if (object.timestamp != null) { - if (typeof object.timestamp !== "object") + if (!$util.isObject(object.timestamp)) throw TypeError(".google.bigtable.v2.Mutation.AddToCell.timestamp: object expected"); message.timestamp = $root.google.bigtable.v2.Value.fromObject(object.timestamp, long + 1); } if (object.input != null) { - if (typeof object.input !== "object") + if (!$util.isObject(object.input)) throw TypeError(".google.bigtable.v2.Mutation.AddToCell.input: object expected"); message.input = $root.google.bigtable.v2.Value.fromObject(object.input, long + 1); } @@ -63222,9 +65196,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - AddToCell.toObject = function toObject(message, options) { + AddToCell.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.familyName = ""; @@ -63232,14 +65210,14 @@ object.timestamp = null; object.input = null; } - if (message.familyName != null && message.hasOwnProperty("familyName")) + if (message.familyName != null && Object.hasOwnProperty.call(message, "familyName")) object.familyName = message.familyName; - if (message.columnQualifier != null && message.hasOwnProperty("columnQualifier")) - object.columnQualifier = $root.google.bigtable.v2.Value.toObject(message.columnQualifier, options); - if (message.timestamp != null && message.hasOwnProperty("timestamp")) - object.timestamp = $root.google.bigtable.v2.Value.toObject(message.timestamp, options); - if (message.input != null && message.hasOwnProperty("input")) - object.input = $root.google.bigtable.v2.Value.toObject(message.input, options); + if (message.columnQualifier != null && Object.hasOwnProperty.call(message, "columnQualifier")) + object.columnQualifier = $root.google.bigtable.v2.Value.toObject(message.columnQualifier, options, q + 1); + if (message.timestamp != null && Object.hasOwnProperty.call(message, "timestamp")) + object.timestamp = $root.google.bigtable.v2.Value.toObject(message.timestamp, options, q + 1); + if (message.input != null && Object.hasOwnProperty.call(message, "input")) + object.input = $root.google.bigtable.v2.Value.toObject(message.input, options, q + 1); return object; }; @@ -63352,17 +65330,21 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MergeToCell.encode = function encode(message, writer) { + MergeToCell.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.familyName != null && Object.hasOwnProperty.call(message, "familyName")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.familyName); if (message.columnQualifier != null && Object.hasOwnProperty.call(message, "columnQualifier")) - $root.google.bigtable.v2.Value.encode(message.columnQualifier, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + $root.google.bigtable.v2.Value.encode(message.columnQualifier, writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); if (message.timestamp != null && Object.hasOwnProperty.call(message, "timestamp")) - $root.google.bigtable.v2.Value.encode(message.timestamp, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + $root.google.bigtable.v2.Value.encode(message.timestamp, writer.uint32(/* id 3, wireType 2 =*/26).fork(), q + 1).ldelim(); if (message.input != null && Object.hasOwnProperty.call(message, "input")) - $root.google.bigtable.v2.Value.encode(message.input, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + $root.google.bigtable.v2.Value.encode(message.input, writer.uint32(/* id 4, wireType 2 =*/34).fork(), q + 1).ldelim(); return writer; }; @@ -63376,7 +65358,7 @@ * @returns {$protobuf.Writer} Writer */ MergeToCell.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -63458,20 +65440,20 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.familyName != null && message.hasOwnProperty("familyName")) + if (message.familyName != null && Object.hasOwnProperty.call(message, "familyName")) if (!$util.isString(message.familyName)) return "familyName: string expected"; - if (message.columnQualifier != null && message.hasOwnProperty("columnQualifier")) { + if (message.columnQualifier != null && Object.hasOwnProperty.call(message, "columnQualifier")) { var error = $root.google.bigtable.v2.Value.verify(message.columnQualifier, long + 1); if (error) return "columnQualifier." + error; } - if (message.timestamp != null && message.hasOwnProperty("timestamp")) { + if (message.timestamp != null && Object.hasOwnProperty.call(message, "timestamp")) { var error = $root.google.bigtable.v2.Value.verify(message.timestamp, long + 1); if (error) return "timestamp." + error; } - if (message.input != null && message.hasOwnProperty("input")) { + if (message.input != null && Object.hasOwnProperty.call(message, "input")) { var error = $root.google.bigtable.v2.Value.verify(message.input, long + 1); if (error) return "input." + error; @@ -63490,6 +65472,8 @@ MergeToCell.fromObject = function fromObject(object, long) { if (object instanceof $root.google.bigtable.v2.Mutation.MergeToCell) return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.v2.Mutation.MergeToCell: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -63498,17 +65482,17 @@ if (object.familyName != null) message.familyName = String(object.familyName); if (object.columnQualifier != null) { - if (typeof object.columnQualifier !== "object") + if (!$util.isObject(object.columnQualifier)) throw TypeError(".google.bigtable.v2.Mutation.MergeToCell.columnQualifier: object expected"); message.columnQualifier = $root.google.bigtable.v2.Value.fromObject(object.columnQualifier, long + 1); } if (object.timestamp != null) { - if (typeof object.timestamp !== "object") + if (!$util.isObject(object.timestamp)) throw TypeError(".google.bigtable.v2.Mutation.MergeToCell.timestamp: object expected"); message.timestamp = $root.google.bigtable.v2.Value.fromObject(object.timestamp, long + 1); } if (object.input != null) { - if (typeof object.input !== "object") + if (!$util.isObject(object.input)) throw TypeError(".google.bigtable.v2.Mutation.MergeToCell.input: object expected"); message.input = $root.google.bigtable.v2.Value.fromObject(object.input, long + 1); } @@ -63524,9 +65508,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - MergeToCell.toObject = function toObject(message, options) { + MergeToCell.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.familyName = ""; @@ -63534,14 +65522,14 @@ object.timestamp = null; object.input = null; } - if (message.familyName != null && message.hasOwnProperty("familyName")) + if (message.familyName != null && Object.hasOwnProperty.call(message, "familyName")) object.familyName = message.familyName; - if (message.columnQualifier != null && message.hasOwnProperty("columnQualifier")) - object.columnQualifier = $root.google.bigtable.v2.Value.toObject(message.columnQualifier, options); - if (message.timestamp != null && message.hasOwnProperty("timestamp")) - object.timestamp = $root.google.bigtable.v2.Value.toObject(message.timestamp, options); - if (message.input != null && message.hasOwnProperty("input")) - object.input = $root.google.bigtable.v2.Value.toObject(message.input, options); + if (message.columnQualifier != null && Object.hasOwnProperty.call(message, "columnQualifier")) + object.columnQualifier = $root.google.bigtable.v2.Value.toObject(message.columnQualifier, options, q + 1); + if (message.timestamp != null && Object.hasOwnProperty.call(message, "timestamp")) + object.timestamp = $root.google.bigtable.v2.Value.toObject(message.timestamp, options, q + 1); + if (message.input != null && Object.hasOwnProperty.call(message, "input")) + object.input = $root.google.bigtable.v2.Value.toObject(message.input, options, q + 1); return object; }; @@ -63645,15 +65633,19 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteFromColumn.encode = function encode(message, writer) { + DeleteFromColumn.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.familyName != null && Object.hasOwnProperty.call(message, "familyName")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.familyName); if (message.columnQualifier != null && Object.hasOwnProperty.call(message, "columnQualifier")) writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.columnQualifier); if (message.timeRange != null && Object.hasOwnProperty.call(message, "timeRange")) - $root.google.bigtable.v2.TimestampRange.encode(message.timeRange, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + $root.google.bigtable.v2.TimestampRange.encode(message.timeRange, writer.uint32(/* id 3, wireType 2 =*/26).fork(), q + 1).ldelim(); return writer; }; @@ -63667,7 +65659,7 @@ * @returns {$protobuf.Writer} Writer */ DeleteFromColumn.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -63745,13 +65737,13 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.familyName != null && message.hasOwnProperty("familyName")) + if (message.familyName != null && Object.hasOwnProperty.call(message, "familyName")) if (!$util.isString(message.familyName)) return "familyName: string expected"; - if (message.columnQualifier != null && message.hasOwnProperty("columnQualifier")) + if (message.columnQualifier != null && Object.hasOwnProperty.call(message, "columnQualifier")) if (!(message.columnQualifier && typeof message.columnQualifier.length === "number" || $util.isString(message.columnQualifier))) return "columnQualifier: buffer expected"; - if (message.timeRange != null && message.hasOwnProperty("timeRange")) { + if (message.timeRange != null && Object.hasOwnProperty.call(message, "timeRange")) { var error = $root.google.bigtable.v2.TimestampRange.verify(message.timeRange, long + 1); if (error) return "timeRange." + error; @@ -63770,6 +65762,8 @@ DeleteFromColumn.fromObject = function fromObject(object, long) { if (object instanceof $root.google.bigtable.v2.Mutation.DeleteFromColumn) return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.v2.Mutation.DeleteFromColumn: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -63783,7 +65777,7 @@ else if (object.columnQualifier.length >= 0) message.columnQualifier = object.columnQualifier; if (object.timeRange != null) { - if (typeof object.timeRange !== "object") + if (!$util.isObject(object.timeRange)) throw TypeError(".google.bigtable.v2.Mutation.DeleteFromColumn.timeRange: object expected"); message.timeRange = $root.google.bigtable.v2.TimestampRange.fromObject(object.timeRange, long + 1); } @@ -63799,9 +65793,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DeleteFromColumn.toObject = function toObject(message, options) { + DeleteFromColumn.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.familyName = ""; @@ -63814,12 +65812,12 @@ } object.timeRange = null; } - if (message.familyName != null && message.hasOwnProperty("familyName")) + if (message.familyName != null && Object.hasOwnProperty.call(message, "familyName")) object.familyName = message.familyName; - if (message.columnQualifier != null && message.hasOwnProperty("columnQualifier")) + if (message.columnQualifier != null && Object.hasOwnProperty.call(message, "columnQualifier")) object.columnQualifier = options.bytes === String ? $util.base64.encode(message.columnQualifier, 0, message.columnQualifier.length) : options.bytes === Array ? Array.prototype.slice.call(message.columnQualifier) : message.columnQualifier; - if (message.timeRange != null && message.hasOwnProperty("timeRange")) - object.timeRange = $root.google.bigtable.v2.TimestampRange.toObject(message.timeRange, options); + if (message.timeRange != null && Object.hasOwnProperty.call(message, "timeRange")) + object.timeRange = $root.google.bigtable.v2.TimestampRange.toObject(message.timeRange, options, q + 1); return object; }; @@ -63905,9 +65903,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteFromFamily.encode = function encode(message, writer) { + DeleteFromFamily.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.familyName != null && Object.hasOwnProperty.call(message, "familyName")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.familyName); return writer; @@ -63923,7 +65925,7 @@ * @returns {$protobuf.Writer} Writer */ DeleteFromFamily.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -63993,7 +65995,7 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.familyName != null && message.hasOwnProperty("familyName")) + if (message.familyName != null && Object.hasOwnProperty.call(message, "familyName")) if (!$util.isString(message.familyName)) return "familyName: string expected"; return null; @@ -64010,6 +66012,8 @@ DeleteFromFamily.fromObject = function fromObject(object, long) { if (object instanceof $root.google.bigtable.v2.Mutation.DeleteFromFamily) return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.v2.Mutation.DeleteFromFamily: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -64029,13 +66033,17 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DeleteFromFamily.toObject = function toObject(message, options) { + DeleteFromFamily.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) object.familyName = ""; - if (message.familyName != null && message.hasOwnProperty("familyName")) + if (message.familyName != null && Object.hasOwnProperty.call(message, "familyName")) object.familyName = message.familyName; return object; }; @@ -64113,9 +66121,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteFromRow.encode = function encode(message, writer) { + DeleteFromRow.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); return writer; }; @@ -64129,7 +66141,7 @@ * @returns {$protobuf.Writer} Writer */ DeleteFromRow.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -64209,10 +66221,6 @@ DeleteFromRow.fromObject = function fromObject(object, long) { if (object instanceof $root.google.bigtable.v2.Mutation.DeleteFromRow) return object; - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - throw Error("maximum nesting depth exceeded"); return new $root.google.bigtable.v2.Mutation.DeleteFromRow(); }; @@ -64355,9 +66363,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ReadModifyWriteRule.encode = function encode(message, writer) { + ReadModifyWriteRule.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.familyName != null && Object.hasOwnProperty.call(message, "familyName")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.familyName); if (message.columnQualifier != null && Object.hasOwnProperty.call(message, "columnQualifier")) @@ -64379,7 +66391,7 @@ * @returns {$protobuf.Writer} Writer */ ReadModifyWriteRule.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -64462,18 +66474,18 @@ if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; var properties = {}; - if (message.familyName != null && message.hasOwnProperty("familyName")) + if (message.familyName != null && Object.hasOwnProperty.call(message, "familyName")) if (!$util.isString(message.familyName)) return "familyName: string expected"; - if (message.columnQualifier != null && message.hasOwnProperty("columnQualifier")) + if (message.columnQualifier != null && Object.hasOwnProperty.call(message, "columnQualifier")) if (!(message.columnQualifier && typeof message.columnQualifier.length === "number" || $util.isString(message.columnQualifier))) return "columnQualifier: buffer expected"; - if (message.appendValue != null && message.hasOwnProperty("appendValue")) { + if (message.appendValue != null && Object.hasOwnProperty.call(message, "appendValue")) { properties.rule = 1; if (!(message.appendValue && typeof message.appendValue.length === "number" || $util.isString(message.appendValue))) return "appendValue: buffer expected"; } - if (message.incrementAmount != null && message.hasOwnProperty("incrementAmount")) { + if (message.incrementAmount != null && Object.hasOwnProperty.call(message, "incrementAmount")) { if (properties.rule === 1) return "rule: multiple values"; properties.rule = 1; @@ -64494,6 +66506,8 @@ ReadModifyWriteRule.fromObject = function fromObject(object, long) { if (object instanceof $root.google.bigtable.v2.ReadModifyWriteRule) return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.v2.ReadModifyWriteRule: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -64513,7 +66527,7 @@ message.appendValue = object.appendValue; if (object.incrementAmount != null) if ($util.Long) - (message.incrementAmount = $util.Long.fromValue(object.incrementAmount)).unsigned = false; + message.incrementAmount = $util.Long.fromValue(object.incrementAmount, false); else if (typeof object.incrementAmount === "string") message.incrementAmount = parseInt(object.incrementAmount, 10); else if (typeof object.incrementAmount === "number") @@ -64532,9 +66546,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ReadModifyWriteRule.toObject = function toObject(message, options) { + ReadModifyWriteRule.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.familyName = ""; @@ -64546,17 +66564,19 @@ object.columnQualifier = $util.newBuffer(object.columnQualifier); } } - if (message.familyName != null && message.hasOwnProperty("familyName")) + if (message.familyName != null && Object.hasOwnProperty.call(message, "familyName")) object.familyName = message.familyName; - if (message.columnQualifier != null && message.hasOwnProperty("columnQualifier")) + if (message.columnQualifier != null && Object.hasOwnProperty.call(message, "columnQualifier")) object.columnQualifier = options.bytes === String ? $util.base64.encode(message.columnQualifier, 0, message.columnQualifier.length) : options.bytes === Array ? Array.prototype.slice.call(message.columnQualifier) : message.columnQualifier; - if (message.appendValue != null && message.hasOwnProperty("appendValue")) { + if (message.appendValue != null && Object.hasOwnProperty.call(message, "appendValue")) { object.appendValue = options.bytes === String ? $util.base64.encode(message.appendValue, 0, message.appendValue.length) : options.bytes === Array ? Array.prototype.slice.call(message.appendValue) : message.appendValue; if (options.oneofs) object.rule = "appendValue"; } - if (message.incrementAmount != null && message.hasOwnProperty("incrementAmount")) { - if (typeof message.incrementAmount === "number") + if (message.incrementAmount != null && Object.hasOwnProperty.call(message, "incrementAmount")) { + if (typeof BigInt !== "undefined" && options.longs === BigInt) + object.incrementAmount = typeof message.incrementAmount === "number" ? BigInt(message.incrementAmount) : $util.Long.fromBits(message.incrementAmount.low >>> 0, message.incrementAmount.high >>> 0, false).toBigInt(); + else if (typeof message.incrementAmount === "number") object.incrementAmount = options.longs === String ? String(message.incrementAmount) : message.incrementAmount; else object.incrementAmount = options.longs === String ? $util.Long.prototype.toString.call(message.incrementAmount) : options.longs === Number ? new $util.LongBits(message.incrementAmount.low >>> 0, message.incrementAmount.high >>> 0).toNumber() : message.incrementAmount; @@ -64648,11 +66668,15 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - StreamPartition.encode = function encode(message, writer) { + StreamPartition.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.rowRange != null && Object.hasOwnProperty.call(message, "rowRange")) - $root.google.bigtable.v2.RowRange.encode(message.rowRange, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + $root.google.bigtable.v2.RowRange.encode(message.rowRange, writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); return writer; }; @@ -64666,7 +66690,7 @@ * @returns {$protobuf.Writer} Writer */ StreamPartition.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -64736,7 +66760,7 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.rowRange != null && message.hasOwnProperty("rowRange")) { + if (message.rowRange != null && Object.hasOwnProperty.call(message, "rowRange")) { var error = $root.google.bigtable.v2.RowRange.verify(message.rowRange, long + 1); if (error) return "rowRange." + error; @@ -64755,13 +66779,15 @@ StreamPartition.fromObject = function fromObject(object, long) { if (object instanceof $root.google.bigtable.v2.StreamPartition) return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.v2.StreamPartition: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) throw Error("maximum nesting depth exceeded"); var message = new $root.google.bigtable.v2.StreamPartition(); if (object.rowRange != null) { - if (typeof object.rowRange !== "object") + if (!$util.isObject(object.rowRange)) throw TypeError(".google.bigtable.v2.StreamPartition.rowRange: object expected"); message.rowRange = $root.google.bigtable.v2.RowRange.fromObject(object.rowRange, long + 1); } @@ -64777,14 +66803,18 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - StreamPartition.toObject = function toObject(message, options) { + StreamPartition.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) object.rowRange = null; - if (message.rowRange != null && message.hasOwnProperty("rowRange")) - object.rowRange = $root.google.bigtable.v2.RowRange.toObject(message.rowRange, options); + if (message.rowRange != null && Object.hasOwnProperty.call(message, "rowRange")) + object.rowRange = $root.google.bigtable.v2.RowRange.toObject(message.rowRange, options, q + 1); return object; }; @@ -64871,12 +66901,16 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - StreamContinuationTokens.encode = function encode(message, writer) { + StreamContinuationTokens.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.tokens != null && message.tokens.length) for (var i = 0; i < message.tokens.length; ++i) - $root.google.bigtable.v2.StreamContinuationToken.encode(message.tokens[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + $root.google.bigtable.v2.StreamContinuationToken.encode(message.tokens[i], writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); return writer; }; @@ -64890,7 +66924,7 @@ * @returns {$protobuf.Writer} Writer */ StreamContinuationTokens.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -64962,7 +66996,7 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.tokens != null && message.hasOwnProperty("tokens")) { + if (message.tokens != null && Object.hasOwnProperty.call(message, "tokens")) { if (!Array.isArray(message.tokens)) return "tokens: array expected"; for (var i = 0; i < message.tokens.length; ++i) { @@ -64985,6 +67019,8 @@ StreamContinuationTokens.fromObject = function fromObject(object, long) { if (object instanceof $root.google.bigtable.v2.StreamContinuationTokens) return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.v2.StreamContinuationTokens: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -64995,7 +67031,7 @@ throw TypeError(".google.bigtable.v2.StreamContinuationTokens.tokens: array expected"); message.tokens = []; for (var i = 0; i < object.tokens.length; ++i) { - if (typeof object.tokens[i] !== "object") + if (!$util.isObject(object.tokens[i])) throw TypeError(".google.bigtable.v2.StreamContinuationTokens.tokens: object expected"); message.tokens[i] = $root.google.bigtable.v2.StreamContinuationToken.fromObject(object.tokens[i], long + 1); } @@ -65012,16 +67048,20 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - StreamContinuationTokens.toObject = function toObject(message, options) { + StreamContinuationTokens.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.tokens = []; if (message.tokens && message.tokens.length) { object.tokens = []; for (var j = 0; j < message.tokens.length; ++j) - object.tokens[j] = $root.google.bigtable.v2.StreamContinuationToken.toObject(message.tokens[j], options); + object.tokens[j] = $root.google.bigtable.v2.StreamContinuationToken.toObject(message.tokens[j], options, q + 1); } return object; }; @@ -65117,11 +67157,15 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - StreamContinuationToken.encode = function encode(message, writer) { + StreamContinuationToken.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.partition != null && Object.hasOwnProperty.call(message, "partition")) - $root.google.bigtable.v2.StreamPartition.encode(message.partition, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + $root.google.bigtable.v2.StreamPartition.encode(message.partition, writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); if (message.token != null && Object.hasOwnProperty.call(message, "token")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.token); return writer; @@ -65137,7 +67181,7 @@ * @returns {$protobuf.Writer} Writer */ StreamContinuationToken.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -65211,12 +67255,12 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.partition != null && message.hasOwnProperty("partition")) { + if (message.partition != null && Object.hasOwnProperty.call(message, "partition")) { var error = $root.google.bigtable.v2.StreamPartition.verify(message.partition, long + 1); if (error) return "partition." + error; } - if (message.token != null && message.hasOwnProperty("token")) + if (message.token != null && Object.hasOwnProperty.call(message, "token")) if (!$util.isString(message.token)) return "token: string expected"; return null; @@ -65233,13 +67277,15 @@ StreamContinuationToken.fromObject = function fromObject(object, long) { if (object instanceof $root.google.bigtable.v2.StreamContinuationToken) return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.v2.StreamContinuationToken: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) throw Error("maximum nesting depth exceeded"); var message = new $root.google.bigtable.v2.StreamContinuationToken(); if (object.partition != null) { - if (typeof object.partition !== "object") + if (!$util.isObject(object.partition)) throw TypeError(".google.bigtable.v2.StreamContinuationToken.partition: object expected"); message.partition = $root.google.bigtable.v2.StreamPartition.fromObject(object.partition, long + 1); } @@ -65257,17 +67303,21 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - StreamContinuationToken.toObject = function toObject(message, options) { + StreamContinuationToken.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.partition = null; object.token = ""; } - if (message.partition != null && message.hasOwnProperty("partition")) - object.partition = $root.google.bigtable.v2.StreamPartition.toObject(message.partition, options); - if (message.token != null && message.hasOwnProperty("token")) + if (message.partition != null && Object.hasOwnProperty.call(message, "partition")) + object.partition = $root.google.bigtable.v2.StreamPartition.toObject(message.partition, options, q + 1); + if (message.token != null && Object.hasOwnProperty.call(message, "token")) object.token = message.token; return object; }; @@ -65345,9 +67395,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ProtoFormat.encode = function encode(message, writer) { + ProtoFormat.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); return writer; }; @@ -65361,7 +67415,7 @@ * @returns {$protobuf.Writer} Writer */ ProtoFormat.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -65441,10 +67495,6 @@ ProtoFormat.fromObject = function fromObject(object, long) { if (object instanceof $root.google.bigtable.v2.ProtoFormat) return object; - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - throw Error("maximum nesting depth exceeded"); return new $root.google.bigtable.v2.ProtoFormat(); }; @@ -65552,13 +67602,17 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ColumnMetadata.encode = function encode(message, writer) { + ColumnMetadata.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); if (message.type != null && Object.hasOwnProperty.call(message, "type")) - $root.google.bigtable.v2.Type.encode(message.type, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + $root.google.bigtable.v2.Type.encode(message.type, writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); return writer; }; @@ -65572,7 +67626,7 @@ * @returns {$protobuf.Writer} Writer */ ColumnMetadata.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -65646,10 +67700,10 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) if (!$util.isString(message.name)) return "name: string expected"; - if (message.type != null && message.hasOwnProperty("type")) { + if (message.type != null && Object.hasOwnProperty.call(message, "type")) { var error = $root.google.bigtable.v2.Type.verify(message.type, long + 1); if (error) return "type." + error; @@ -65668,6 +67722,8 @@ ColumnMetadata.fromObject = function fromObject(object, long) { if (object instanceof $root.google.bigtable.v2.ColumnMetadata) return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.v2.ColumnMetadata: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -65676,7 +67732,7 @@ if (object.name != null) message.name = String(object.name); if (object.type != null) { - if (typeof object.type !== "object") + if (!$util.isObject(object.type)) throw TypeError(".google.bigtable.v2.ColumnMetadata.type: object expected"); message.type = $root.google.bigtable.v2.Type.fromObject(object.type, long + 1); } @@ -65692,18 +67748,22 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ColumnMetadata.toObject = function toObject(message, options) { + ColumnMetadata.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.name = ""; object.type = null; } - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) object.name = message.name; - if (message.type != null && message.hasOwnProperty("type")) - object.type = $root.google.bigtable.v2.Type.toObject(message.type, options); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + object.type = $root.google.bigtable.v2.Type.toObject(message.type, options, q + 1); return object; }; @@ -65790,12 +67850,16 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ProtoSchema.encode = function encode(message, writer) { + ProtoSchema.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.columns != null && message.columns.length) for (var i = 0; i < message.columns.length; ++i) - $root.google.bigtable.v2.ColumnMetadata.encode(message.columns[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + $root.google.bigtable.v2.ColumnMetadata.encode(message.columns[i], writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); return writer; }; @@ -65809,7 +67873,7 @@ * @returns {$protobuf.Writer} Writer */ ProtoSchema.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -65881,7 +67945,7 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.columns != null && message.hasOwnProperty("columns")) { + if (message.columns != null && Object.hasOwnProperty.call(message, "columns")) { if (!Array.isArray(message.columns)) return "columns: array expected"; for (var i = 0; i < message.columns.length; ++i) { @@ -65904,6 +67968,8 @@ ProtoSchema.fromObject = function fromObject(object, long) { if (object instanceof $root.google.bigtable.v2.ProtoSchema) return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.v2.ProtoSchema: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -65914,7 +67980,7 @@ throw TypeError(".google.bigtable.v2.ProtoSchema.columns: array expected"); message.columns = []; for (var i = 0; i < object.columns.length; ++i) { - if (typeof object.columns[i] !== "object") + if (!$util.isObject(object.columns[i])) throw TypeError(".google.bigtable.v2.ProtoSchema.columns: object expected"); message.columns[i] = $root.google.bigtable.v2.ColumnMetadata.fromObject(object.columns[i], long + 1); } @@ -65931,16 +67997,20 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ProtoSchema.toObject = function toObject(message, options) { + ProtoSchema.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.columns = []; if (message.columns && message.columns.length) { object.columns = []; for (var j = 0; j < message.columns.length; ++j) - object.columns[j] = $root.google.bigtable.v2.ColumnMetadata.toObject(message.columns[j], options); + object.columns[j] = $root.google.bigtable.v2.ColumnMetadata.toObject(message.columns[j], options, q + 1); } return object; }; @@ -66041,11 +68111,15 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ResultSetMetadata.encode = function encode(message, writer) { + ResultSetMetadata.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.protoSchema != null && Object.hasOwnProperty.call(message, "protoSchema")) - $root.google.bigtable.v2.ProtoSchema.encode(message.protoSchema, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + $root.google.bigtable.v2.ProtoSchema.encode(message.protoSchema, writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); return writer; }; @@ -66059,7 +68133,7 @@ * @returns {$protobuf.Writer} Writer */ ResultSetMetadata.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -66130,7 +68204,7 @@ if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; var properties = {}; - if (message.protoSchema != null && message.hasOwnProperty("protoSchema")) { + if (message.protoSchema != null && Object.hasOwnProperty.call(message, "protoSchema")) { properties.schema = 1; { var error = $root.google.bigtable.v2.ProtoSchema.verify(message.protoSchema, long + 1); @@ -66152,13 +68226,15 @@ ResultSetMetadata.fromObject = function fromObject(object, long) { if (object instanceof $root.google.bigtable.v2.ResultSetMetadata) return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.v2.ResultSetMetadata: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) throw Error("maximum nesting depth exceeded"); var message = new $root.google.bigtable.v2.ResultSetMetadata(); if (object.protoSchema != null) { - if (typeof object.protoSchema !== "object") + if (!$util.isObject(object.protoSchema)) throw TypeError(".google.bigtable.v2.ResultSetMetadata.protoSchema: object expected"); message.protoSchema = $root.google.bigtable.v2.ProtoSchema.fromObject(object.protoSchema, long + 1); } @@ -66174,12 +68250,16 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ResultSetMetadata.toObject = function toObject(message, options) { + ResultSetMetadata.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; - if (message.protoSchema != null && message.hasOwnProperty("protoSchema")) { - object.protoSchema = $root.google.bigtable.v2.ProtoSchema.toObject(message.protoSchema, options); + if (message.protoSchema != null && Object.hasOwnProperty.call(message, "protoSchema")) { + object.protoSchema = $root.google.bigtable.v2.ProtoSchema.toObject(message.protoSchema, options, q + 1); if (options.oneofs) object.schema = "protoSchema"; } @@ -66269,12 +68349,16 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ProtoRows.encode = function encode(message, writer) { + ProtoRows.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.values != null && message.values.length) for (var i = 0; i < message.values.length; ++i) - $root.google.bigtable.v2.Value.encode(message.values[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + $root.google.bigtable.v2.Value.encode(message.values[i], writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); return writer; }; @@ -66288,7 +68372,7 @@ * @returns {$protobuf.Writer} Writer */ ProtoRows.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -66360,7 +68444,7 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.values != null && message.hasOwnProperty("values")) { + if (message.values != null && Object.hasOwnProperty.call(message, "values")) { if (!Array.isArray(message.values)) return "values: array expected"; for (var i = 0; i < message.values.length; ++i) { @@ -66383,6 +68467,8 @@ ProtoRows.fromObject = function fromObject(object, long) { if (object instanceof $root.google.bigtable.v2.ProtoRows) return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.v2.ProtoRows: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -66393,7 +68479,7 @@ throw TypeError(".google.bigtable.v2.ProtoRows.values: array expected"); message.values = []; for (var i = 0; i < object.values.length; ++i) { - if (typeof object.values[i] !== "object") + if (!$util.isObject(object.values[i])) throw TypeError(".google.bigtable.v2.ProtoRows.values: object expected"); message.values[i] = $root.google.bigtable.v2.Value.fromObject(object.values[i], long + 1); } @@ -66410,16 +68496,20 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ProtoRows.toObject = function toObject(message, options) { + ProtoRows.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.values = []; if (message.values && message.values.length) { object.values = []; for (var j = 0; j < message.values.length; ++j) - object.values[j] = $root.google.bigtable.v2.Value.toObject(message.values[j], options); + object.values[j] = $root.google.bigtable.v2.Value.toObject(message.values[j], options, q + 1); } return object; }; @@ -66506,9 +68596,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ProtoRowsBatch.encode = function encode(message, writer) { + ProtoRowsBatch.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.batchData != null && Object.hasOwnProperty.call(message, "batchData")) writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.batchData); return writer; @@ -66524,7 +68618,7 @@ * @returns {$protobuf.Writer} Writer */ ProtoRowsBatch.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -66594,7 +68688,7 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.batchData != null && message.hasOwnProperty("batchData")) + if (message.batchData != null && Object.hasOwnProperty.call(message, "batchData")) if (!(message.batchData && typeof message.batchData.length === "number" || $util.isString(message.batchData))) return "batchData: buffer expected"; return null; @@ -66611,6 +68705,8 @@ ProtoRowsBatch.fromObject = function fromObject(object, long) { if (object instanceof $root.google.bigtable.v2.ProtoRowsBatch) return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.v2.ProtoRowsBatch: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -66633,9 +68729,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ProtoRowsBatch.toObject = function toObject(message, options) { + ProtoRowsBatch.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) if (options.bytes === String) @@ -66645,7 +68745,7 @@ if (options.bytes !== Array) object.batchData = $util.newBuffer(object.batchData); } - if (message.batchData != null && message.hasOwnProperty("batchData")) + if (message.batchData != null && Object.hasOwnProperty.call(message, "batchData")) object.batchData = options.bytes === String ? $util.base64.encode(message.batchData, 0, message.batchData.length) : options.bytes === Array ? Array.prototype.slice.call(message.batchData) : message.batchData; return object; }; @@ -66788,11 +68888,15 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - PartialResultSet.encode = function encode(message, writer) { + PartialResultSet.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.protoRowsBatch != null && Object.hasOwnProperty.call(message, "protoRowsBatch")) - $root.google.bigtable.v2.ProtoRowsBatch.encode(message.protoRowsBatch, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + $root.google.bigtable.v2.ProtoRowsBatch.encode(message.protoRowsBatch, writer.uint32(/* id 3, wireType 2 =*/26).fork(), q + 1).ldelim(); if (message.estimatedBatchSize != null && Object.hasOwnProperty.call(message, "estimatedBatchSize")) writer.uint32(/* id 4, wireType 0 =*/32).int32(message.estimatedBatchSize); if (message.resumeToken != null && Object.hasOwnProperty.call(message, "resumeToken")) @@ -66814,7 +68918,7 @@ * @returns {$protobuf.Writer} Writer */ PartialResultSet.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -66901,7 +69005,7 @@ if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; var properties = {}; - if (message.protoRowsBatch != null && message.hasOwnProperty("protoRowsBatch")) { + if (message.protoRowsBatch != null && Object.hasOwnProperty.call(message, "protoRowsBatch")) { properties.partialRows = 1; { var error = $root.google.bigtable.v2.ProtoRowsBatch.verify(message.protoRowsBatch, long + 1); @@ -66909,18 +69013,18 @@ return "protoRowsBatch." + error; } } - if (message.batchChecksum != null && message.hasOwnProperty("batchChecksum")) { + if (message.batchChecksum != null && Object.hasOwnProperty.call(message, "batchChecksum")) { properties._batchChecksum = 1; if (!$util.isInteger(message.batchChecksum)) return "batchChecksum: integer expected"; } - if (message.resumeToken != null && message.hasOwnProperty("resumeToken")) + if (message.resumeToken != null && Object.hasOwnProperty.call(message, "resumeToken")) if (!(message.resumeToken && typeof message.resumeToken.length === "number" || $util.isString(message.resumeToken))) return "resumeToken: buffer expected"; - if (message.reset != null && message.hasOwnProperty("reset")) + if (message.reset != null && Object.hasOwnProperty.call(message, "reset")) if (typeof message.reset !== "boolean") return "reset: boolean expected"; - if (message.estimatedBatchSize != null && message.hasOwnProperty("estimatedBatchSize")) + if (message.estimatedBatchSize != null && Object.hasOwnProperty.call(message, "estimatedBatchSize")) if (!$util.isInteger(message.estimatedBatchSize)) return "estimatedBatchSize: integer expected"; return null; @@ -66937,13 +69041,15 @@ PartialResultSet.fromObject = function fromObject(object, long) { if (object instanceof $root.google.bigtable.v2.PartialResultSet) return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.v2.PartialResultSet: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) throw Error("maximum nesting depth exceeded"); var message = new $root.google.bigtable.v2.PartialResultSet(); if (object.protoRowsBatch != null) { - if (typeof object.protoRowsBatch !== "object") + if (!$util.isObject(object.protoRowsBatch)) throw TypeError(".google.bigtable.v2.PartialResultSet.protoRowsBatch: object expected"); message.protoRowsBatch = $root.google.bigtable.v2.ProtoRowsBatch.fromObject(object.protoRowsBatch, long + 1); } @@ -66970,9 +69076,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - PartialResultSet.toObject = function toObject(message, options) { + PartialResultSet.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.estimatedBatchSize = 0; @@ -66985,21 +69095,21 @@ } object.reset = false; } - if (message.protoRowsBatch != null && message.hasOwnProperty("protoRowsBatch")) { - object.protoRowsBatch = $root.google.bigtable.v2.ProtoRowsBatch.toObject(message.protoRowsBatch, options); + if (message.protoRowsBatch != null && Object.hasOwnProperty.call(message, "protoRowsBatch")) { + object.protoRowsBatch = $root.google.bigtable.v2.ProtoRowsBatch.toObject(message.protoRowsBatch, options, q + 1); if (options.oneofs) object.partialRows = "protoRowsBatch"; } - if (message.estimatedBatchSize != null && message.hasOwnProperty("estimatedBatchSize")) + if (message.estimatedBatchSize != null && Object.hasOwnProperty.call(message, "estimatedBatchSize")) object.estimatedBatchSize = message.estimatedBatchSize; - if (message.resumeToken != null && message.hasOwnProperty("resumeToken")) + if (message.resumeToken != null && Object.hasOwnProperty.call(message, "resumeToken")) object.resumeToken = options.bytes === String ? $util.base64.encode(message.resumeToken, 0, message.resumeToken.length) : options.bytes === Array ? Array.prototype.slice.call(message.resumeToken) : message.resumeToken; - if (message.batchChecksum != null && message.hasOwnProperty("batchChecksum")) { + if (message.batchChecksum != null && Object.hasOwnProperty.call(message, "batchChecksum")) { object.batchChecksum = message.batchChecksum; if (options.oneofs) object._batchChecksum = "batchChecksum"; } - if (message.reset != null && message.hasOwnProperty("reset")) + if (message.reset != null && Object.hasOwnProperty.call(message, "reset")) object.reset = message.reset; return object; }; @@ -67095,13 +69205,17 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Idempotency.encode = function encode(message, writer) { + Idempotency.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.token != null && Object.hasOwnProperty.call(message, "token")) writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.token); if (message.startTime != null && Object.hasOwnProperty.call(message, "startTime")) - $root.google.protobuf.Timestamp.encode(message.startTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + $root.google.protobuf.Timestamp.encode(message.startTime, writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); return writer; }; @@ -67115,7 +69229,7 @@ * @returns {$protobuf.Writer} Writer */ Idempotency.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -67189,10 +69303,10 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.token != null && message.hasOwnProperty("token")) + if (message.token != null && Object.hasOwnProperty.call(message, "token")) if (!(message.token && typeof message.token.length === "number" || $util.isString(message.token))) return "token: buffer expected"; - if (message.startTime != null && message.hasOwnProperty("startTime")) { + if (message.startTime != null && Object.hasOwnProperty.call(message, "startTime")) { var error = $root.google.protobuf.Timestamp.verify(message.startTime, long + 1); if (error) return "startTime." + error; @@ -67211,6 +69325,8 @@ Idempotency.fromObject = function fromObject(object, long) { if (object instanceof $root.google.bigtable.v2.Idempotency) return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.v2.Idempotency: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -67222,7 +69338,7 @@ else if (object.token.length >= 0) message.token = object.token; if (object.startTime != null) { - if (typeof object.startTime !== "object") + if (!$util.isObject(object.startTime)) throw TypeError(".google.bigtable.v2.Idempotency.startTime: object expected"); message.startTime = $root.google.protobuf.Timestamp.fromObject(object.startTime, long + 1); } @@ -67238,9 +69354,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Idempotency.toObject = function toObject(message, options) { + Idempotency.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) { if (options.bytes === String) @@ -67252,10 +69372,10 @@ } object.startTime = null; } - if (message.token != null && message.hasOwnProperty("token")) + if (message.token != null && Object.hasOwnProperty.call(message, "token")) object.token = options.bytes === String ? $util.base64.encode(message.token, 0, message.token.length) : options.bytes === Array ? Array.prototype.slice.call(message.token) : message.token; - if (message.startTime != null && message.hasOwnProperty("startTime")) - object.startTime = $root.google.protobuf.Timestamp.toObject(message.startTime, options); + if (message.startTime != null && Object.hasOwnProperty.call(message, "startTime")) + object.startTime = $root.google.protobuf.Timestamp.toObject(message.startTime, options, q + 1); return object; }; @@ -67472,37 +69592,41 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Type.encode = function encode(message, writer) { + Type.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.bytesType != null && Object.hasOwnProperty.call(message, "bytesType")) - $root.google.bigtable.v2.Type.Bytes.encode(message.bytesType, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + $root.google.bigtable.v2.Type.Bytes.encode(message.bytesType, writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); if (message.stringType != null && Object.hasOwnProperty.call(message, "stringType")) - $root.google.bigtable.v2.Type.String.encode(message.stringType, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + $root.google.bigtable.v2.Type.String.encode(message.stringType, writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); if (message.arrayType != null && Object.hasOwnProperty.call(message, "arrayType")) - $root.google.bigtable.v2.Type.Array.encode(message.arrayType, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + $root.google.bigtable.v2.Type.Array.encode(message.arrayType, writer.uint32(/* id 3, wireType 2 =*/26).fork(), q + 1).ldelim(); if (message.mapType != null && Object.hasOwnProperty.call(message, "mapType")) - $root.google.bigtable.v2.Type.Map.encode(message.mapType, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + $root.google.bigtable.v2.Type.Map.encode(message.mapType, writer.uint32(/* id 4, wireType 2 =*/34).fork(), q + 1).ldelim(); if (message.int64Type != null && Object.hasOwnProperty.call(message, "int64Type")) - $root.google.bigtable.v2.Type.Int64.encode(message.int64Type, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + $root.google.bigtable.v2.Type.Int64.encode(message.int64Type, writer.uint32(/* id 5, wireType 2 =*/42).fork(), q + 1).ldelim(); if (message.aggregateType != null && Object.hasOwnProperty.call(message, "aggregateType")) - $root.google.bigtable.v2.Type.Aggregate.encode(message.aggregateType, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + $root.google.bigtable.v2.Type.Aggregate.encode(message.aggregateType, writer.uint32(/* id 6, wireType 2 =*/50).fork(), q + 1).ldelim(); if (message.structType != null && Object.hasOwnProperty.call(message, "structType")) - $root.google.bigtable.v2.Type.Struct.encode(message.structType, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + $root.google.bigtable.v2.Type.Struct.encode(message.structType, writer.uint32(/* id 7, wireType 2 =*/58).fork(), q + 1).ldelim(); if (message.boolType != null && Object.hasOwnProperty.call(message, "boolType")) - $root.google.bigtable.v2.Type.Bool.encode(message.boolType, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + $root.google.bigtable.v2.Type.Bool.encode(message.boolType, writer.uint32(/* id 8, wireType 2 =*/66).fork(), q + 1).ldelim(); if (message.float64Type != null && Object.hasOwnProperty.call(message, "float64Type")) - $root.google.bigtable.v2.Type.Float64.encode(message.float64Type, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + $root.google.bigtable.v2.Type.Float64.encode(message.float64Type, writer.uint32(/* id 9, wireType 2 =*/74).fork(), q + 1).ldelim(); if (message.timestampType != null && Object.hasOwnProperty.call(message, "timestampType")) - $root.google.bigtable.v2.Type.Timestamp.encode(message.timestampType, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + $root.google.bigtable.v2.Type.Timestamp.encode(message.timestampType, writer.uint32(/* id 10, wireType 2 =*/82).fork(), q + 1).ldelim(); if (message.dateType != null && Object.hasOwnProperty.call(message, "dateType")) - $root.google.bigtable.v2.Type.Date.encode(message.dateType, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + $root.google.bigtable.v2.Type.Date.encode(message.dateType, writer.uint32(/* id 11, wireType 2 =*/90).fork(), q + 1).ldelim(); if (message.float32Type != null && Object.hasOwnProperty.call(message, "float32Type")) - $root.google.bigtable.v2.Type.Float32.encode(message.float32Type, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); + $root.google.bigtable.v2.Type.Float32.encode(message.float32Type, writer.uint32(/* id 12, wireType 2 =*/98).fork(), q + 1).ldelim(); if (message.protoType != null && Object.hasOwnProperty.call(message, "protoType")) - $root.google.bigtable.v2.Type.Proto.encode(message.protoType, writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim(); + $root.google.bigtable.v2.Type.Proto.encode(message.protoType, writer.uint32(/* id 13, wireType 2 =*/106).fork(), q + 1).ldelim(); if (message.enumType != null && Object.hasOwnProperty.call(message, "enumType")) - $root.google.bigtable.v2.Type.Enum.encode(message.enumType, writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim(); + $root.google.bigtable.v2.Type.Enum.encode(message.enumType, writer.uint32(/* id 14, wireType 2 =*/114).fork(), q + 1).ldelim(); return writer; }; @@ -67516,7 +69640,7 @@ * @returns {$protobuf.Writer} Writer */ Type.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -67639,7 +69763,7 @@ if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; var properties = {}; - if (message.bytesType != null && message.hasOwnProperty("bytesType")) { + if (message.bytesType != null && Object.hasOwnProperty.call(message, "bytesType")) { properties.kind = 1; { var error = $root.google.bigtable.v2.Type.Bytes.verify(message.bytesType, long + 1); @@ -67647,7 +69771,7 @@ return "bytesType." + error; } } - if (message.stringType != null && message.hasOwnProperty("stringType")) { + if (message.stringType != null && Object.hasOwnProperty.call(message, "stringType")) { if (properties.kind === 1) return "kind: multiple values"; properties.kind = 1; @@ -67657,7 +69781,7 @@ return "stringType." + error; } } - if (message.int64Type != null && message.hasOwnProperty("int64Type")) { + if (message.int64Type != null && Object.hasOwnProperty.call(message, "int64Type")) { if (properties.kind === 1) return "kind: multiple values"; properties.kind = 1; @@ -67667,7 +69791,7 @@ return "int64Type." + error; } } - if (message.float32Type != null && message.hasOwnProperty("float32Type")) { + if (message.float32Type != null && Object.hasOwnProperty.call(message, "float32Type")) { if (properties.kind === 1) return "kind: multiple values"; properties.kind = 1; @@ -67677,7 +69801,7 @@ return "float32Type." + error; } } - if (message.float64Type != null && message.hasOwnProperty("float64Type")) { + if (message.float64Type != null && Object.hasOwnProperty.call(message, "float64Type")) { if (properties.kind === 1) return "kind: multiple values"; properties.kind = 1; @@ -67687,7 +69811,7 @@ return "float64Type." + error; } } - if (message.boolType != null && message.hasOwnProperty("boolType")) { + if (message.boolType != null && Object.hasOwnProperty.call(message, "boolType")) { if (properties.kind === 1) return "kind: multiple values"; properties.kind = 1; @@ -67697,7 +69821,7 @@ return "boolType." + error; } } - if (message.timestampType != null && message.hasOwnProperty("timestampType")) { + if (message.timestampType != null && Object.hasOwnProperty.call(message, "timestampType")) { if (properties.kind === 1) return "kind: multiple values"; properties.kind = 1; @@ -67707,7 +69831,7 @@ return "timestampType." + error; } } - if (message.dateType != null && message.hasOwnProperty("dateType")) { + if (message.dateType != null && Object.hasOwnProperty.call(message, "dateType")) { if (properties.kind === 1) return "kind: multiple values"; properties.kind = 1; @@ -67717,7 +69841,7 @@ return "dateType." + error; } } - if (message.aggregateType != null && message.hasOwnProperty("aggregateType")) { + if (message.aggregateType != null && Object.hasOwnProperty.call(message, "aggregateType")) { if (properties.kind === 1) return "kind: multiple values"; properties.kind = 1; @@ -67727,7 +69851,7 @@ return "aggregateType." + error; } } - if (message.structType != null && message.hasOwnProperty("structType")) { + if (message.structType != null && Object.hasOwnProperty.call(message, "structType")) { if (properties.kind === 1) return "kind: multiple values"; properties.kind = 1; @@ -67737,7 +69861,7 @@ return "structType." + error; } } - if (message.arrayType != null && message.hasOwnProperty("arrayType")) { + if (message.arrayType != null && Object.hasOwnProperty.call(message, "arrayType")) { if (properties.kind === 1) return "kind: multiple values"; properties.kind = 1; @@ -67747,7 +69871,7 @@ return "arrayType." + error; } } - if (message.mapType != null && message.hasOwnProperty("mapType")) { + if (message.mapType != null && Object.hasOwnProperty.call(message, "mapType")) { if (properties.kind === 1) return "kind: multiple values"; properties.kind = 1; @@ -67757,7 +69881,7 @@ return "mapType." + error; } } - if (message.protoType != null && message.hasOwnProperty("protoType")) { + if (message.protoType != null && Object.hasOwnProperty.call(message, "protoType")) { if (properties.kind === 1) return "kind: multiple values"; properties.kind = 1; @@ -67767,7 +69891,7 @@ return "protoType." + error; } } - if (message.enumType != null && message.hasOwnProperty("enumType")) { + if (message.enumType != null && Object.hasOwnProperty.call(message, "enumType")) { if (properties.kind === 1) return "kind: multiple values"; properties.kind = 1; @@ -67791,78 +69915,80 @@ Type.fromObject = function fromObject(object, long) { if (object instanceof $root.google.bigtable.v2.Type) return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.v2.Type: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) throw Error("maximum nesting depth exceeded"); var message = new $root.google.bigtable.v2.Type(); if (object.bytesType != null) { - if (typeof object.bytesType !== "object") + if (!$util.isObject(object.bytesType)) throw TypeError(".google.bigtable.v2.Type.bytesType: object expected"); message.bytesType = $root.google.bigtable.v2.Type.Bytes.fromObject(object.bytesType, long + 1); } if (object.stringType != null) { - if (typeof object.stringType !== "object") + if (!$util.isObject(object.stringType)) throw TypeError(".google.bigtable.v2.Type.stringType: object expected"); message.stringType = $root.google.bigtable.v2.Type.String.fromObject(object.stringType, long + 1); } if (object.int64Type != null) { - if (typeof object.int64Type !== "object") + if (!$util.isObject(object.int64Type)) throw TypeError(".google.bigtable.v2.Type.int64Type: object expected"); message.int64Type = $root.google.bigtable.v2.Type.Int64.fromObject(object.int64Type, long + 1); } if (object.float32Type != null) { - if (typeof object.float32Type !== "object") + if (!$util.isObject(object.float32Type)) throw TypeError(".google.bigtable.v2.Type.float32Type: object expected"); message.float32Type = $root.google.bigtable.v2.Type.Float32.fromObject(object.float32Type, long + 1); } if (object.float64Type != null) { - if (typeof object.float64Type !== "object") + if (!$util.isObject(object.float64Type)) throw TypeError(".google.bigtable.v2.Type.float64Type: object expected"); message.float64Type = $root.google.bigtable.v2.Type.Float64.fromObject(object.float64Type, long + 1); } if (object.boolType != null) { - if (typeof object.boolType !== "object") + if (!$util.isObject(object.boolType)) throw TypeError(".google.bigtable.v2.Type.boolType: object expected"); message.boolType = $root.google.bigtable.v2.Type.Bool.fromObject(object.boolType, long + 1); } if (object.timestampType != null) { - if (typeof object.timestampType !== "object") + if (!$util.isObject(object.timestampType)) throw TypeError(".google.bigtable.v2.Type.timestampType: object expected"); message.timestampType = $root.google.bigtable.v2.Type.Timestamp.fromObject(object.timestampType, long + 1); } if (object.dateType != null) { - if (typeof object.dateType !== "object") + if (!$util.isObject(object.dateType)) throw TypeError(".google.bigtable.v2.Type.dateType: object expected"); message.dateType = $root.google.bigtable.v2.Type.Date.fromObject(object.dateType, long + 1); } if (object.aggregateType != null) { - if (typeof object.aggregateType !== "object") + if (!$util.isObject(object.aggregateType)) throw TypeError(".google.bigtable.v2.Type.aggregateType: object expected"); message.aggregateType = $root.google.bigtable.v2.Type.Aggregate.fromObject(object.aggregateType, long + 1); } if (object.structType != null) { - if (typeof object.structType !== "object") + if (!$util.isObject(object.structType)) throw TypeError(".google.bigtable.v2.Type.structType: object expected"); message.structType = $root.google.bigtable.v2.Type.Struct.fromObject(object.structType, long + 1); } if (object.arrayType != null) { - if (typeof object.arrayType !== "object") + if (!$util.isObject(object.arrayType)) throw TypeError(".google.bigtable.v2.Type.arrayType: object expected"); message.arrayType = $root.google.bigtable.v2.Type.Array.fromObject(object.arrayType, long + 1); } if (object.mapType != null) { - if (typeof object.mapType !== "object") + if (!$util.isObject(object.mapType)) throw TypeError(".google.bigtable.v2.Type.mapType: object expected"); message.mapType = $root.google.bigtable.v2.Type.Map.fromObject(object.mapType, long + 1); } if (object.protoType != null) { - if (typeof object.protoType !== "object") + if (!$util.isObject(object.protoType)) throw TypeError(".google.bigtable.v2.Type.protoType: object expected"); message.protoType = $root.google.bigtable.v2.Type.Proto.fromObject(object.protoType, long + 1); } if (object.enumType != null) { - if (typeof object.enumType !== "object") + if (!$util.isObject(object.enumType)) throw TypeError(".google.bigtable.v2.Type.enumType: object expected"); message.enumType = $root.google.bigtable.v2.Type.Enum.fromObject(object.enumType, long + 1); } @@ -67878,77 +70004,81 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Type.toObject = function toObject(message, options) { + Type.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; - if (message.bytesType != null && message.hasOwnProperty("bytesType")) { - object.bytesType = $root.google.bigtable.v2.Type.Bytes.toObject(message.bytesType, options); + if (message.bytesType != null && Object.hasOwnProperty.call(message, "bytesType")) { + object.bytesType = $root.google.bigtable.v2.Type.Bytes.toObject(message.bytesType, options, q + 1); if (options.oneofs) object.kind = "bytesType"; } - if (message.stringType != null && message.hasOwnProperty("stringType")) { - object.stringType = $root.google.bigtable.v2.Type.String.toObject(message.stringType, options); + if (message.stringType != null && Object.hasOwnProperty.call(message, "stringType")) { + object.stringType = $root.google.bigtable.v2.Type.String.toObject(message.stringType, options, q + 1); if (options.oneofs) object.kind = "stringType"; } - if (message.arrayType != null && message.hasOwnProperty("arrayType")) { - object.arrayType = $root.google.bigtable.v2.Type.Array.toObject(message.arrayType, options); + if (message.arrayType != null && Object.hasOwnProperty.call(message, "arrayType")) { + object.arrayType = $root.google.bigtable.v2.Type.Array.toObject(message.arrayType, options, q + 1); if (options.oneofs) object.kind = "arrayType"; } - if (message.mapType != null && message.hasOwnProperty("mapType")) { - object.mapType = $root.google.bigtable.v2.Type.Map.toObject(message.mapType, options); + if (message.mapType != null && Object.hasOwnProperty.call(message, "mapType")) { + object.mapType = $root.google.bigtable.v2.Type.Map.toObject(message.mapType, options, q + 1); if (options.oneofs) object.kind = "mapType"; } - if (message.int64Type != null && message.hasOwnProperty("int64Type")) { - object.int64Type = $root.google.bigtable.v2.Type.Int64.toObject(message.int64Type, options); + if (message.int64Type != null && Object.hasOwnProperty.call(message, "int64Type")) { + object.int64Type = $root.google.bigtable.v2.Type.Int64.toObject(message.int64Type, options, q + 1); if (options.oneofs) object.kind = "int64Type"; } - if (message.aggregateType != null && message.hasOwnProperty("aggregateType")) { - object.aggregateType = $root.google.bigtable.v2.Type.Aggregate.toObject(message.aggregateType, options); + if (message.aggregateType != null && Object.hasOwnProperty.call(message, "aggregateType")) { + object.aggregateType = $root.google.bigtable.v2.Type.Aggregate.toObject(message.aggregateType, options, q + 1); if (options.oneofs) object.kind = "aggregateType"; } - if (message.structType != null && message.hasOwnProperty("structType")) { - object.structType = $root.google.bigtable.v2.Type.Struct.toObject(message.structType, options); + if (message.structType != null && Object.hasOwnProperty.call(message, "structType")) { + object.structType = $root.google.bigtable.v2.Type.Struct.toObject(message.structType, options, q + 1); if (options.oneofs) object.kind = "structType"; } - if (message.boolType != null && message.hasOwnProperty("boolType")) { - object.boolType = $root.google.bigtable.v2.Type.Bool.toObject(message.boolType, options); + if (message.boolType != null && Object.hasOwnProperty.call(message, "boolType")) { + object.boolType = $root.google.bigtable.v2.Type.Bool.toObject(message.boolType, options, q + 1); if (options.oneofs) object.kind = "boolType"; } - if (message.float64Type != null && message.hasOwnProperty("float64Type")) { - object.float64Type = $root.google.bigtable.v2.Type.Float64.toObject(message.float64Type, options); + if (message.float64Type != null && Object.hasOwnProperty.call(message, "float64Type")) { + object.float64Type = $root.google.bigtable.v2.Type.Float64.toObject(message.float64Type, options, q + 1); if (options.oneofs) object.kind = "float64Type"; } - if (message.timestampType != null && message.hasOwnProperty("timestampType")) { - object.timestampType = $root.google.bigtable.v2.Type.Timestamp.toObject(message.timestampType, options); + if (message.timestampType != null && Object.hasOwnProperty.call(message, "timestampType")) { + object.timestampType = $root.google.bigtable.v2.Type.Timestamp.toObject(message.timestampType, options, q + 1); if (options.oneofs) object.kind = "timestampType"; } - if (message.dateType != null && message.hasOwnProperty("dateType")) { - object.dateType = $root.google.bigtable.v2.Type.Date.toObject(message.dateType, options); + if (message.dateType != null && Object.hasOwnProperty.call(message, "dateType")) { + object.dateType = $root.google.bigtable.v2.Type.Date.toObject(message.dateType, options, q + 1); if (options.oneofs) object.kind = "dateType"; } - if (message.float32Type != null && message.hasOwnProperty("float32Type")) { - object.float32Type = $root.google.bigtable.v2.Type.Float32.toObject(message.float32Type, options); + if (message.float32Type != null && Object.hasOwnProperty.call(message, "float32Type")) { + object.float32Type = $root.google.bigtable.v2.Type.Float32.toObject(message.float32Type, options, q + 1); if (options.oneofs) object.kind = "float32Type"; } - if (message.protoType != null && message.hasOwnProperty("protoType")) { - object.protoType = $root.google.bigtable.v2.Type.Proto.toObject(message.protoType, options); + if (message.protoType != null && Object.hasOwnProperty.call(message, "protoType")) { + object.protoType = $root.google.bigtable.v2.Type.Proto.toObject(message.protoType, options, q + 1); if (options.oneofs) object.kind = "protoType"; } - if (message.enumType != null && message.hasOwnProperty("enumType")) { - object.enumType = $root.google.bigtable.v2.Type.Enum.toObject(message.enumType, options); + if (message.enumType != null && Object.hasOwnProperty.call(message, "enumType")) { + object.enumType = $root.google.bigtable.v2.Type.Enum.toObject(message.enumType, options, q + 1); if (options.oneofs) object.kind = "enumType"; } @@ -68034,11 +70164,15 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Bytes.encode = function encode(message, writer) { + Bytes.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.encoding != null && Object.hasOwnProperty.call(message, "encoding")) - $root.google.bigtable.v2.Type.Bytes.Encoding.encode(message.encoding, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + $root.google.bigtable.v2.Type.Bytes.Encoding.encode(message.encoding, writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); return writer; }; @@ -68052,7 +70186,7 @@ * @returns {$protobuf.Writer} Writer */ Bytes.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -68122,7 +70256,7 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.encoding != null && message.hasOwnProperty("encoding")) { + if (message.encoding != null && Object.hasOwnProperty.call(message, "encoding")) { var error = $root.google.bigtable.v2.Type.Bytes.Encoding.verify(message.encoding, long + 1); if (error) return "encoding." + error; @@ -68141,13 +70275,15 @@ Bytes.fromObject = function fromObject(object, long) { if (object instanceof $root.google.bigtable.v2.Type.Bytes) return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.v2.Type.Bytes: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) throw Error("maximum nesting depth exceeded"); var message = new $root.google.bigtable.v2.Type.Bytes(); if (object.encoding != null) { - if (typeof object.encoding !== "object") + if (!$util.isObject(object.encoding)) throw TypeError(".google.bigtable.v2.Type.Bytes.encoding: object expected"); message.encoding = $root.google.bigtable.v2.Type.Bytes.Encoding.fromObject(object.encoding, long + 1); } @@ -68163,14 +70299,18 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Bytes.toObject = function toObject(message, options) { + Bytes.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) object.encoding = null; - if (message.encoding != null && message.hasOwnProperty("encoding")) - object.encoding = $root.google.bigtable.v2.Type.Bytes.Encoding.toObject(message.encoding, options); + if (message.encoding != null && Object.hasOwnProperty.call(message, "encoding")) + object.encoding = $root.google.bigtable.v2.Type.Bytes.Encoding.toObject(message.encoding, options, q + 1); return object; }; @@ -68267,11 +70407,15 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Encoding.encode = function encode(message, writer) { + Encoding.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.raw != null && Object.hasOwnProperty.call(message, "raw")) - $root.google.bigtable.v2.Type.Bytes.Encoding.Raw.encode(message.raw, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + $root.google.bigtable.v2.Type.Bytes.Encoding.Raw.encode(message.raw, writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); return writer; }; @@ -68285,7 +70429,7 @@ * @returns {$protobuf.Writer} Writer */ Encoding.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -68356,7 +70500,7 @@ if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; var properties = {}; - if (message.raw != null && message.hasOwnProperty("raw")) { + if (message.raw != null && Object.hasOwnProperty.call(message, "raw")) { properties.encoding = 1; { var error = $root.google.bigtable.v2.Type.Bytes.Encoding.Raw.verify(message.raw, long + 1); @@ -68378,13 +70522,15 @@ Encoding.fromObject = function fromObject(object, long) { if (object instanceof $root.google.bigtable.v2.Type.Bytes.Encoding) return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.v2.Type.Bytes.Encoding: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) throw Error("maximum nesting depth exceeded"); var message = new $root.google.bigtable.v2.Type.Bytes.Encoding(); if (object.raw != null) { - if (typeof object.raw !== "object") + if (!$util.isObject(object.raw)) throw TypeError(".google.bigtable.v2.Type.Bytes.Encoding.raw: object expected"); message.raw = $root.google.bigtable.v2.Type.Bytes.Encoding.Raw.fromObject(object.raw, long + 1); } @@ -68400,12 +70546,16 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Encoding.toObject = function toObject(message, options) { + Encoding.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; - if (message.raw != null && message.hasOwnProperty("raw")) { - object.raw = $root.google.bigtable.v2.Type.Bytes.Encoding.Raw.toObject(message.raw, options); + if (message.raw != null && Object.hasOwnProperty.call(message, "raw")) { + object.raw = $root.google.bigtable.v2.Type.Bytes.Encoding.Raw.toObject(message.raw, options, q + 1); if (options.oneofs) object.encoding = "raw"; } @@ -68491,9 +70641,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Raw.encode = function encode(message, writer) { + Raw.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.escapeNulls != null && Object.hasOwnProperty.call(message, "escapeNulls")) writer.uint32(/* id 1, wireType 0 =*/8).bool(message.escapeNulls); return writer; @@ -68509,7 +70663,7 @@ * @returns {$protobuf.Writer} Writer */ Raw.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -68579,7 +70733,7 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.escapeNulls != null && message.hasOwnProperty("escapeNulls")) + if (message.escapeNulls != null && Object.hasOwnProperty.call(message, "escapeNulls")) if (typeof message.escapeNulls !== "boolean") return "escapeNulls: boolean expected"; return null; @@ -68596,6 +70750,8 @@ Raw.fromObject = function fromObject(object, long) { if (object instanceof $root.google.bigtable.v2.Type.Bytes.Encoding.Raw) return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.v2.Type.Bytes.Encoding.Raw: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -68615,13 +70771,17 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Raw.toObject = function toObject(message, options) { + Raw.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) object.escapeNulls = false; - if (message.escapeNulls != null && message.hasOwnProperty("escapeNulls")) + if (message.escapeNulls != null && Object.hasOwnProperty.call(message, "escapeNulls")) object.escapeNulls = message.escapeNulls; return object; }; @@ -68714,11 +70874,15 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - String.encode = function encode(message, writer) { + String.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.encoding != null && Object.hasOwnProperty.call(message, "encoding")) - $root.google.bigtable.v2.Type.String.Encoding.encode(message.encoding, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + $root.google.bigtable.v2.Type.String.Encoding.encode(message.encoding, writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); return writer; }; @@ -68732,7 +70896,7 @@ * @returns {$protobuf.Writer} Writer */ String.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -68802,7 +70966,7 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.encoding != null && message.hasOwnProperty("encoding")) { + if (message.encoding != null && Object.hasOwnProperty.call(message, "encoding")) { var error = $root.google.bigtable.v2.Type.String.Encoding.verify(message.encoding, long + 1); if (error) return "encoding." + error; @@ -68821,13 +70985,15 @@ String.fromObject = function fromObject(object, long) { if (object instanceof $root.google.bigtable.v2.Type.String) return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.v2.Type.String: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) throw Error("maximum nesting depth exceeded"); var message = new $root.google.bigtable.v2.Type.String(); if (object.encoding != null) { - if (typeof object.encoding !== "object") + if (!$util.isObject(object.encoding)) throw TypeError(".google.bigtable.v2.Type.String.encoding: object expected"); message.encoding = $root.google.bigtable.v2.Type.String.Encoding.fromObject(object.encoding, long + 1); } @@ -68843,14 +71009,18 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - String.toObject = function toObject(message, options) { + String.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) object.encoding = null; - if (message.encoding != null && message.hasOwnProperty("encoding")) - object.encoding = $root.google.bigtable.v2.Type.String.Encoding.toObject(message.encoding, options); + if (message.encoding != null && Object.hasOwnProperty.call(message, "encoding")) + object.encoding = $root.google.bigtable.v2.Type.String.Encoding.toObject(message.encoding, options, q + 1); return object; }; @@ -68956,13 +71126,17 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Encoding.encode = function encode(message, writer) { + Encoding.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.utf8Raw != null && Object.hasOwnProperty.call(message, "utf8Raw")) - $root.google.bigtable.v2.Type.String.Encoding.Utf8Raw.encode(message.utf8Raw, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + $root.google.bigtable.v2.Type.String.Encoding.Utf8Raw.encode(message.utf8Raw, writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); if (message.utf8Bytes != null && Object.hasOwnProperty.call(message, "utf8Bytes")) - $root.google.bigtable.v2.Type.String.Encoding.Utf8Bytes.encode(message.utf8Bytes, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + $root.google.bigtable.v2.Type.String.Encoding.Utf8Bytes.encode(message.utf8Bytes, writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); return writer; }; @@ -68976,7 +71150,7 @@ * @returns {$protobuf.Writer} Writer */ Encoding.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -69051,7 +71225,7 @@ if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; var properties = {}; - if (message.utf8Raw != null && message.hasOwnProperty("utf8Raw")) { + if (message.utf8Raw != null && Object.hasOwnProperty.call(message, "utf8Raw")) { properties.encoding = 1; { var error = $root.google.bigtable.v2.Type.String.Encoding.Utf8Raw.verify(message.utf8Raw, long + 1); @@ -69059,7 +71233,7 @@ return "utf8Raw." + error; } } - if (message.utf8Bytes != null && message.hasOwnProperty("utf8Bytes")) { + if (message.utf8Bytes != null && Object.hasOwnProperty.call(message, "utf8Bytes")) { if (properties.encoding === 1) return "encoding: multiple values"; properties.encoding = 1; @@ -69083,18 +71257,20 @@ Encoding.fromObject = function fromObject(object, long) { if (object instanceof $root.google.bigtable.v2.Type.String.Encoding) return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.v2.Type.String.Encoding: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) throw Error("maximum nesting depth exceeded"); var message = new $root.google.bigtable.v2.Type.String.Encoding(); if (object.utf8Raw != null) { - if (typeof object.utf8Raw !== "object") + if (!$util.isObject(object.utf8Raw)) throw TypeError(".google.bigtable.v2.Type.String.Encoding.utf8Raw: object expected"); message.utf8Raw = $root.google.bigtable.v2.Type.String.Encoding.Utf8Raw.fromObject(object.utf8Raw, long + 1); } if (object.utf8Bytes != null) { - if (typeof object.utf8Bytes !== "object") + if (!$util.isObject(object.utf8Bytes)) throw TypeError(".google.bigtable.v2.Type.String.Encoding.utf8Bytes: object expected"); message.utf8Bytes = $root.google.bigtable.v2.Type.String.Encoding.Utf8Bytes.fromObject(object.utf8Bytes, long + 1); } @@ -69110,17 +71286,21 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Encoding.toObject = function toObject(message, options) { + Encoding.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; - if (message.utf8Raw != null && message.hasOwnProperty("utf8Raw")) { - object.utf8Raw = $root.google.bigtable.v2.Type.String.Encoding.Utf8Raw.toObject(message.utf8Raw, options); + if (message.utf8Raw != null && Object.hasOwnProperty.call(message, "utf8Raw")) { + object.utf8Raw = $root.google.bigtable.v2.Type.String.Encoding.Utf8Raw.toObject(message.utf8Raw, options, q + 1); if (options.oneofs) object.encoding = "utf8Raw"; } - if (message.utf8Bytes != null && message.hasOwnProperty("utf8Bytes")) { - object.utf8Bytes = $root.google.bigtable.v2.Type.String.Encoding.Utf8Bytes.toObject(message.utf8Bytes, options); + if (message.utf8Bytes != null && Object.hasOwnProperty.call(message, "utf8Bytes")) { + object.utf8Bytes = $root.google.bigtable.v2.Type.String.Encoding.Utf8Bytes.toObject(message.utf8Bytes, options, q + 1); if (options.oneofs) object.encoding = "utf8Bytes"; } @@ -69197,9 +71377,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Utf8Raw.encode = function encode(message, writer) { + Utf8Raw.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); return writer; }; @@ -69213,7 +71397,7 @@ * @returns {$protobuf.Writer} Writer */ Utf8Raw.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -69293,10 +71477,6 @@ Utf8Raw.fromObject = function fromObject(object, long) { if (object instanceof $root.google.bigtable.v2.Type.String.Encoding.Utf8Raw) return object; - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - throw Error("maximum nesting depth exceeded"); return new $root.google.bigtable.v2.Type.String.Encoding.Utf8Raw(); }; @@ -69395,9 +71575,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Utf8Bytes.encode = function encode(message, writer) { + Utf8Bytes.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.nullEscapeChar != null && Object.hasOwnProperty.call(message, "nullEscapeChar")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.nullEscapeChar); return writer; @@ -69413,7 +71597,7 @@ * @returns {$protobuf.Writer} Writer */ Utf8Bytes.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -69483,7 +71667,7 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.nullEscapeChar != null && message.hasOwnProperty("nullEscapeChar")) + if (message.nullEscapeChar != null && Object.hasOwnProperty.call(message, "nullEscapeChar")) if (!$util.isString(message.nullEscapeChar)) return "nullEscapeChar: string expected"; return null; @@ -69500,6 +71684,8 @@ Utf8Bytes.fromObject = function fromObject(object, long) { if (object instanceof $root.google.bigtable.v2.Type.String.Encoding.Utf8Bytes) return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.v2.Type.String.Encoding.Utf8Bytes: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -69519,13 +71705,17 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Utf8Bytes.toObject = function toObject(message, options) { + Utf8Bytes.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) object.nullEscapeChar = ""; - if (message.nullEscapeChar != null && message.hasOwnProperty("nullEscapeChar")) + if (message.nullEscapeChar != null && Object.hasOwnProperty.call(message, "nullEscapeChar")) object.nullEscapeChar = message.nullEscapeChar; return object; }; @@ -69618,11 +71808,15 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Int64.encode = function encode(message, writer) { + Int64.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.encoding != null && Object.hasOwnProperty.call(message, "encoding")) - $root.google.bigtable.v2.Type.Int64.Encoding.encode(message.encoding, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + $root.google.bigtable.v2.Type.Int64.Encoding.encode(message.encoding, writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); return writer; }; @@ -69636,7 +71830,7 @@ * @returns {$protobuf.Writer} Writer */ Int64.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -69706,7 +71900,7 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.encoding != null && message.hasOwnProperty("encoding")) { + if (message.encoding != null && Object.hasOwnProperty.call(message, "encoding")) { var error = $root.google.bigtable.v2.Type.Int64.Encoding.verify(message.encoding, long + 1); if (error) return "encoding." + error; @@ -69725,13 +71919,15 @@ Int64.fromObject = function fromObject(object, long) { if (object instanceof $root.google.bigtable.v2.Type.Int64) return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.v2.Type.Int64: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) throw Error("maximum nesting depth exceeded"); var message = new $root.google.bigtable.v2.Type.Int64(); if (object.encoding != null) { - if (typeof object.encoding !== "object") + if (!$util.isObject(object.encoding)) throw TypeError(".google.bigtable.v2.Type.Int64.encoding: object expected"); message.encoding = $root.google.bigtable.v2.Type.Int64.Encoding.fromObject(object.encoding, long + 1); } @@ -69747,14 +71943,18 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Int64.toObject = function toObject(message, options) { + Int64.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) object.encoding = null; - if (message.encoding != null && message.hasOwnProperty("encoding")) - object.encoding = $root.google.bigtable.v2.Type.Int64.Encoding.toObject(message.encoding, options); + if (message.encoding != null && Object.hasOwnProperty.call(message, "encoding")) + object.encoding = $root.google.bigtable.v2.Type.Int64.Encoding.toObject(message.encoding, options, q + 1); return object; }; @@ -69860,13 +72060,17 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Encoding.encode = function encode(message, writer) { + Encoding.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.bigEndianBytes != null && Object.hasOwnProperty.call(message, "bigEndianBytes")) - $root.google.bigtable.v2.Type.Int64.Encoding.BigEndianBytes.encode(message.bigEndianBytes, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + $root.google.bigtable.v2.Type.Int64.Encoding.BigEndianBytes.encode(message.bigEndianBytes, writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); if (message.orderedCodeBytes != null && Object.hasOwnProperty.call(message, "orderedCodeBytes")) - $root.google.bigtable.v2.Type.Int64.Encoding.OrderedCodeBytes.encode(message.orderedCodeBytes, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + $root.google.bigtable.v2.Type.Int64.Encoding.OrderedCodeBytes.encode(message.orderedCodeBytes, writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); return writer; }; @@ -69880,7 +72084,7 @@ * @returns {$protobuf.Writer} Writer */ Encoding.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -69955,7 +72159,7 @@ if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; var properties = {}; - if (message.bigEndianBytes != null && message.hasOwnProperty("bigEndianBytes")) { + if (message.bigEndianBytes != null && Object.hasOwnProperty.call(message, "bigEndianBytes")) { properties.encoding = 1; { var error = $root.google.bigtable.v2.Type.Int64.Encoding.BigEndianBytes.verify(message.bigEndianBytes, long + 1); @@ -69963,7 +72167,7 @@ return "bigEndianBytes." + error; } } - if (message.orderedCodeBytes != null && message.hasOwnProperty("orderedCodeBytes")) { + if (message.orderedCodeBytes != null && Object.hasOwnProperty.call(message, "orderedCodeBytes")) { if (properties.encoding === 1) return "encoding: multiple values"; properties.encoding = 1; @@ -69987,18 +72191,20 @@ Encoding.fromObject = function fromObject(object, long) { if (object instanceof $root.google.bigtable.v2.Type.Int64.Encoding) return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.v2.Type.Int64.Encoding: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) throw Error("maximum nesting depth exceeded"); var message = new $root.google.bigtable.v2.Type.Int64.Encoding(); if (object.bigEndianBytes != null) { - if (typeof object.bigEndianBytes !== "object") + if (!$util.isObject(object.bigEndianBytes)) throw TypeError(".google.bigtable.v2.Type.Int64.Encoding.bigEndianBytes: object expected"); message.bigEndianBytes = $root.google.bigtable.v2.Type.Int64.Encoding.BigEndianBytes.fromObject(object.bigEndianBytes, long + 1); } if (object.orderedCodeBytes != null) { - if (typeof object.orderedCodeBytes !== "object") + if (!$util.isObject(object.orderedCodeBytes)) throw TypeError(".google.bigtable.v2.Type.Int64.Encoding.orderedCodeBytes: object expected"); message.orderedCodeBytes = $root.google.bigtable.v2.Type.Int64.Encoding.OrderedCodeBytes.fromObject(object.orderedCodeBytes, long + 1); } @@ -70014,17 +72220,21 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Encoding.toObject = function toObject(message, options) { + Encoding.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; - if (message.bigEndianBytes != null && message.hasOwnProperty("bigEndianBytes")) { - object.bigEndianBytes = $root.google.bigtable.v2.Type.Int64.Encoding.BigEndianBytes.toObject(message.bigEndianBytes, options); + if (message.bigEndianBytes != null && Object.hasOwnProperty.call(message, "bigEndianBytes")) { + object.bigEndianBytes = $root.google.bigtable.v2.Type.Int64.Encoding.BigEndianBytes.toObject(message.bigEndianBytes, options, q + 1); if (options.oneofs) object.encoding = "bigEndianBytes"; } - if (message.orderedCodeBytes != null && message.hasOwnProperty("orderedCodeBytes")) { - object.orderedCodeBytes = $root.google.bigtable.v2.Type.Int64.Encoding.OrderedCodeBytes.toObject(message.orderedCodeBytes, options); + if (message.orderedCodeBytes != null && Object.hasOwnProperty.call(message, "orderedCodeBytes")) { + object.orderedCodeBytes = $root.google.bigtable.v2.Type.Int64.Encoding.OrderedCodeBytes.toObject(message.orderedCodeBytes, options, q + 1); if (options.oneofs) object.encoding = "orderedCodeBytes"; } @@ -70110,11 +72320,15 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - BigEndianBytes.encode = function encode(message, writer) { + BigEndianBytes.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.bytesType != null && Object.hasOwnProperty.call(message, "bytesType")) - $root.google.bigtable.v2.Type.Bytes.encode(message.bytesType, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + $root.google.bigtable.v2.Type.Bytes.encode(message.bytesType, writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); return writer; }; @@ -70128,7 +72342,7 @@ * @returns {$protobuf.Writer} Writer */ BigEndianBytes.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -70198,7 +72412,7 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.bytesType != null && message.hasOwnProperty("bytesType")) { + if (message.bytesType != null && Object.hasOwnProperty.call(message, "bytesType")) { var error = $root.google.bigtable.v2.Type.Bytes.verify(message.bytesType, long + 1); if (error) return "bytesType." + error; @@ -70217,13 +72431,15 @@ BigEndianBytes.fromObject = function fromObject(object, long) { if (object instanceof $root.google.bigtable.v2.Type.Int64.Encoding.BigEndianBytes) return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.v2.Type.Int64.Encoding.BigEndianBytes: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) throw Error("maximum nesting depth exceeded"); var message = new $root.google.bigtable.v2.Type.Int64.Encoding.BigEndianBytes(); if (object.bytesType != null) { - if (typeof object.bytesType !== "object") + if (!$util.isObject(object.bytesType)) throw TypeError(".google.bigtable.v2.Type.Int64.Encoding.BigEndianBytes.bytesType: object expected"); message.bytesType = $root.google.bigtable.v2.Type.Bytes.fromObject(object.bytesType, long + 1); } @@ -70239,14 +72455,18 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - BigEndianBytes.toObject = function toObject(message, options) { + BigEndianBytes.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) object.bytesType = null; - if (message.bytesType != null && message.hasOwnProperty("bytesType")) - object.bytesType = $root.google.bigtable.v2.Type.Bytes.toObject(message.bytesType, options); + if (message.bytesType != null && Object.hasOwnProperty.call(message, "bytesType")) + object.bytesType = $root.google.bigtable.v2.Type.Bytes.toObject(message.bytesType, options, q + 1); return object; }; @@ -70323,9 +72543,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - OrderedCodeBytes.encode = function encode(message, writer) { + OrderedCodeBytes.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); return writer; }; @@ -70339,7 +72563,7 @@ * @returns {$protobuf.Writer} Writer */ OrderedCodeBytes.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -70419,10 +72643,6 @@ OrderedCodeBytes.fromObject = function fromObject(object, long) { if (object instanceof $root.google.bigtable.v2.Type.Int64.Encoding.OrderedCodeBytes) return object; - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - throw Error("maximum nesting depth exceeded"); return new $root.google.bigtable.v2.Type.Int64.Encoding.OrderedCodeBytes(); }; @@ -70518,9 +72738,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Bool.encode = function encode(message, writer) { + Bool.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); return writer; }; @@ -70534,7 +72758,7 @@ * @returns {$protobuf.Writer} Writer */ Bool.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -70614,10 +72838,6 @@ Bool.fromObject = function fromObject(object, long) { if (object instanceof $root.google.bigtable.v2.Type.Bool) return object; - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - throw Error("maximum nesting depth exceeded"); return new $root.google.bigtable.v2.Type.Bool(); }; @@ -70707,9 +72927,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Float32.encode = function encode(message, writer) { + Float32.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); return writer; }; @@ -70723,7 +72947,7 @@ * @returns {$protobuf.Writer} Writer */ Float32.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -70803,10 +73027,6 @@ Float32.fromObject = function fromObject(object, long) { if (object instanceof $root.google.bigtable.v2.Type.Float32) return object; - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - throw Error("maximum nesting depth exceeded"); return new $root.google.bigtable.v2.Type.Float32(); }; @@ -70896,9 +73116,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Float64.encode = function encode(message, writer) { + Float64.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); return writer; }; @@ -70912,7 +73136,7 @@ * @returns {$protobuf.Writer} Writer */ Float64.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -70992,10 +73216,6 @@ Float64.fromObject = function fromObject(object, long) { if (object instanceof $root.google.bigtable.v2.Type.Float64) return object; - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - throw Error("maximum nesting depth exceeded"); return new $root.google.bigtable.v2.Type.Float64(); }; @@ -71094,11 +73314,15 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Timestamp.encode = function encode(message, writer) { + Timestamp.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.encoding != null && Object.hasOwnProperty.call(message, "encoding")) - $root.google.bigtable.v2.Type.Timestamp.Encoding.encode(message.encoding, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + $root.google.bigtable.v2.Type.Timestamp.Encoding.encode(message.encoding, writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); return writer; }; @@ -71112,7 +73336,7 @@ * @returns {$protobuf.Writer} Writer */ Timestamp.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -71182,7 +73406,7 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.encoding != null && message.hasOwnProperty("encoding")) { + if (message.encoding != null && Object.hasOwnProperty.call(message, "encoding")) { var error = $root.google.bigtable.v2.Type.Timestamp.Encoding.verify(message.encoding, long + 1); if (error) return "encoding." + error; @@ -71201,13 +73425,15 @@ Timestamp.fromObject = function fromObject(object, long) { if (object instanceof $root.google.bigtable.v2.Type.Timestamp) return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.v2.Type.Timestamp: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) throw Error("maximum nesting depth exceeded"); var message = new $root.google.bigtable.v2.Type.Timestamp(); if (object.encoding != null) { - if (typeof object.encoding !== "object") + if (!$util.isObject(object.encoding)) throw TypeError(".google.bigtable.v2.Type.Timestamp.encoding: object expected"); message.encoding = $root.google.bigtable.v2.Type.Timestamp.Encoding.fromObject(object.encoding, long + 1); } @@ -71223,14 +73449,18 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Timestamp.toObject = function toObject(message, options) { + Timestamp.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) object.encoding = null; - if (message.encoding != null && message.hasOwnProperty("encoding")) - object.encoding = $root.google.bigtable.v2.Type.Timestamp.Encoding.toObject(message.encoding, options); + if (message.encoding != null && Object.hasOwnProperty.call(message, "encoding")) + object.encoding = $root.google.bigtable.v2.Type.Timestamp.Encoding.toObject(message.encoding, options, q + 1); return object; }; @@ -71327,11 +73557,15 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Encoding.encode = function encode(message, writer) { + Encoding.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.unixMicrosInt64 != null && Object.hasOwnProperty.call(message, "unixMicrosInt64")) - $root.google.bigtable.v2.Type.Int64.Encoding.encode(message.unixMicrosInt64, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + $root.google.bigtable.v2.Type.Int64.Encoding.encode(message.unixMicrosInt64, writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); return writer; }; @@ -71345,7 +73579,7 @@ * @returns {$protobuf.Writer} Writer */ Encoding.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -71416,7 +73650,7 @@ if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; var properties = {}; - if (message.unixMicrosInt64 != null && message.hasOwnProperty("unixMicrosInt64")) { + if (message.unixMicrosInt64 != null && Object.hasOwnProperty.call(message, "unixMicrosInt64")) { properties.encoding = 1; { var error = $root.google.bigtable.v2.Type.Int64.Encoding.verify(message.unixMicrosInt64, long + 1); @@ -71438,13 +73672,15 @@ Encoding.fromObject = function fromObject(object, long) { if (object instanceof $root.google.bigtable.v2.Type.Timestamp.Encoding) return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.v2.Type.Timestamp.Encoding: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) throw Error("maximum nesting depth exceeded"); var message = new $root.google.bigtable.v2.Type.Timestamp.Encoding(); if (object.unixMicrosInt64 != null) { - if (typeof object.unixMicrosInt64 !== "object") + if (!$util.isObject(object.unixMicrosInt64)) throw TypeError(".google.bigtable.v2.Type.Timestamp.Encoding.unixMicrosInt64: object expected"); message.unixMicrosInt64 = $root.google.bigtable.v2.Type.Int64.Encoding.fromObject(object.unixMicrosInt64, long + 1); } @@ -71460,12 +73696,16 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Encoding.toObject = function toObject(message, options) { + Encoding.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; - if (message.unixMicrosInt64 != null && message.hasOwnProperty("unixMicrosInt64")) { - object.unixMicrosInt64 = $root.google.bigtable.v2.Type.Int64.Encoding.toObject(message.unixMicrosInt64, options); + if (message.unixMicrosInt64 != null && Object.hasOwnProperty.call(message, "unixMicrosInt64")) { + object.unixMicrosInt64 = $root.google.bigtable.v2.Type.Int64.Encoding.toObject(message.unixMicrosInt64, options, q + 1); if (options.oneofs) object.encoding = "unixMicrosInt64"; } @@ -71548,9 +73788,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Date.encode = function encode(message, writer) { + Date.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); return writer; }; @@ -71564,7 +73808,7 @@ * @returns {$protobuf.Writer} Writer */ Date.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -71644,10 +73888,6 @@ Date.fromObject = function fromObject(object, long) { if (object instanceof $root.google.bigtable.v2.Type.Date) return object; - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - throw Error("maximum nesting depth exceeded"); return new $root.google.bigtable.v2.Type.Date(); }; @@ -71756,14 +73996,18 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Struct.encode = function encode(message, writer) { + Struct.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.fields != null && message.fields.length) for (var i = 0; i < message.fields.length; ++i) - $root.google.bigtable.v2.Type.Struct.Field.encode(message.fields[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + $root.google.bigtable.v2.Type.Struct.Field.encode(message.fields[i], writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); if (message.encoding != null && Object.hasOwnProperty.call(message, "encoding")) - $root.google.bigtable.v2.Type.Struct.Encoding.encode(message.encoding, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + $root.google.bigtable.v2.Type.Struct.Encoding.encode(message.encoding, writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); return writer; }; @@ -71777,7 +74021,7 @@ * @returns {$protobuf.Writer} Writer */ Struct.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -71853,7 +74097,7 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.fields != null && message.hasOwnProperty("fields")) { + if (message.fields != null && Object.hasOwnProperty.call(message, "fields")) { if (!Array.isArray(message.fields)) return "fields: array expected"; for (var i = 0; i < message.fields.length; ++i) { @@ -71862,7 +74106,7 @@ return "fields." + error; } } - if (message.encoding != null && message.hasOwnProperty("encoding")) { + if (message.encoding != null && Object.hasOwnProperty.call(message, "encoding")) { var error = $root.google.bigtable.v2.Type.Struct.Encoding.verify(message.encoding, long + 1); if (error) return "encoding." + error; @@ -71881,6 +74125,8 @@ Struct.fromObject = function fromObject(object, long) { if (object instanceof $root.google.bigtable.v2.Type.Struct) return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.v2.Type.Struct: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -71891,13 +74137,13 @@ throw TypeError(".google.bigtable.v2.Type.Struct.fields: array expected"); message.fields = []; for (var i = 0; i < object.fields.length; ++i) { - if (typeof object.fields[i] !== "object") + if (!$util.isObject(object.fields[i])) throw TypeError(".google.bigtable.v2.Type.Struct.fields: object expected"); message.fields[i] = $root.google.bigtable.v2.Type.Struct.Field.fromObject(object.fields[i], long + 1); } } if (object.encoding != null) { - if (typeof object.encoding !== "object") + if (!$util.isObject(object.encoding)) throw TypeError(".google.bigtable.v2.Type.Struct.encoding: object expected"); message.encoding = $root.google.bigtable.v2.Type.Struct.Encoding.fromObject(object.encoding, long + 1); } @@ -71913,9 +74159,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Struct.toObject = function toObject(message, options) { + Struct.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.fields = []; @@ -71924,10 +74174,10 @@ if (message.fields && message.fields.length) { object.fields = []; for (var j = 0; j < message.fields.length; ++j) - object.fields[j] = $root.google.bigtable.v2.Type.Struct.Field.toObject(message.fields[j], options); + object.fields[j] = $root.google.bigtable.v2.Type.Struct.Field.toObject(message.fields[j], options, q + 1); } - if (message.encoding != null && message.hasOwnProperty("encoding")) - object.encoding = $root.google.bigtable.v2.Type.Struct.Encoding.toObject(message.encoding, options); + if (message.encoding != null && Object.hasOwnProperty.call(message, "encoding")) + object.encoding = $root.google.bigtable.v2.Type.Struct.Encoding.toObject(message.encoding, options, q + 1); return object; }; @@ -72019,13 +74269,17 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Field.encode = function encode(message, writer) { + Field.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.fieldName != null && Object.hasOwnProperty.call(message, "fieldName")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.fieldName); if (message.type != null && Object.hasOwnProperty.call(message, "type")) - $root.google.bigtable.v2.Type.encode(message.type, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + $root.google.bigtable.v2.Type.encode(message.type, writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); return writer; }; @@ -72039,7 +74293,7 @@ * @returns {$protobuf.Writer} Writer */ Field.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -72113,10 +74367,10 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.fieldName != null && message.hasOwnProperty("fieldName")) + if (message.fieldName != null && Object.hasOwnProperty.call(message, "fieldName")) if (!$util.isString(message.fieldName)) return "fieldName: string expected"; - if (message.type != null && message.hasOwnProperty("type")) { + if (message.type != null && Object.hasOwnProperty.call(message, "type")) { var error = $root.google.bigtable.v2.Type.verify(message.type, long + 1); if (error) return "type." + error; @@ -72135,6 +74389,8 @@ Field.fromObject = function fromObject(object, long) { if (object instanceof $root.google.bigtable.v2.Type.Struct.Field) return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.v2.Type.Struct.Field: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -72143,7 +74399,7 @@ if (object.fieldName != null) message.fieldName = String(object.fieldName); if (object.type != null) { - if (typeof object.type !== "object") + if (!$util.isObject(object.type)) throw TypeError(".google.bigtable.v2.Type.Struct.Field.type: object expected"); message.type = $root.google.bigtable.v2.Type.fromObject(object.type, long + 1); } @@ -72159,18 +74415,22 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Field.toObject = function toObject(message, options) { + Field.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.fieldName = ""; object.type = null; } - if (message.fieldName != null && message.hasOwnProperty("fieldName")) + if (message.fieldName != null && Object.hasOwnProperty.call(message, "fieldName")) object.fieldName = message.fieldName; - if (message.type != null && message.hasOwnProperty("type")) - object.type = $root.google.bigtable.v2.Type.toObject(message.type, options); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + object.type = $root.google.bigtable.v2.Type.toObject(message.type, options, q + 1); return object; }; @@ -72288,15 +74548,19 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Encoding.encode = function encode(message, writer) { + Encoding.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.singleton != null && Object.hasOwnProperty.call(message, "singleton")) - $root.google.bigtable.v2.Type.Struct.Encoding.Singleton.encode(message.singleton, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + $root.google.bigtable.v2.Type.Struct.Encoding.Singleton.encode(message.singleton, writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); if (message.delimitedBytes != null && Object.hasOwnProperty.call(message, "delimitedBytes")) - $root.google.bigtable.v2.Type.Struct.Encoding.DelimitedBytes.encode(message.delimitedBytes, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + $root.google.bigtable.v2.Type.Struct.Encoding.DelimitedBytes.encode(message.delimitedBytes, writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); if (message.orderedCodeBytes != null && Object.hasOwnProperty.call(message, "orderedCodeBytes")) - $root.google.bigtable.v2.Type.Struct.Encoding.OrderedCodeBytes.encode(message.orderedCodeBytes, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + $root.google.bigtable.v2.Type.Struct.Encoding.OrderedCodeBytes.encode(message.orderedCodeBytes, writer.uint32(/* id 3, wireType 2 =*/26).fork(), q + 1).ldelim(); return writer; }; @@ -72310,7 +74574,7 @@ * @returns {$protobuf.Writer} Writer */ Encoding.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -72389,7 +74653,7 @@ if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; var properties = {}; - if (message.singleton != null && message.hasOwnProperty("singleton")) { + if (message.singleton != null && Object.hasOwnProperty.call(message, "singleton")) { properties.encoding = 1; { var error = $root.google.bigtable.v2.Type.Struct.Encoding.Singleton.verify(message.singleton, long + 1); @@ -72397,7 +74661,7 @@ return "singleton." + error; } } - if (message.delimitedBytes != null && message.hasOwnProperty("delimitedBytes")) { + if (message.delimitedBytes != null && Object.hasOwnProperty.call(message, "delimitedBytes")) { if (properties.encoding === 1) return "encoding: multiple values"; properties.encoding = 1; @@ -72407,7 +74671,7 @@ return "delimitedBytes." + error; } } - if (message.orderedCodeBytes != null && message.hasOwnProperty("orderedCodeBytes")) { + if (message.orderedCodeBytes != null && Object.hasOwnProperty.call(message, "orderedCodeBytes")) { if (properties.encoding === 1) return "encoding: multiple values"; properties.encoding = 1; @@ -72431,23 +74695,25 @@ Encoding.fromObject = function fromObject(object, long) { if (object instanceof $root.google.bigtable.v2.Type.Struct.Encoding) return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.v2.Type.Struct.Encoding: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) throw Error("maximum nesting depth exceeded"); var message = new $root.google.bigtable.v2.Type.Struct.Encoding(); if (object.singleton != null) { - if (typeof object.singleton !== "object") + if (!$util.isObject(object.singleton)) throw TypeError(".google.bigtable.v2.Type.Struct.Encoding.singleton: object expected"); message.singleton = $root.google.bigtable.v2.Type.Struct.Encoding.Singleton.fromObject(object.singleton, long + 1); } if (object.delimitedBytes != null) { - if (typeof object.delimitedBytes !== "object") + if (!$util.isObject(object.delimitedBytes)) throw TypeError(".google.bigtable.v2.Type.Struct.Encoding.delimitedBytes: object expected"); message.delimitedBytes = $root.google.bigtable.v2.Type.Struct.Encoding.DelimitedBytes.fromObject(object.delimitedBytes, long + 1); } if (object.orderedCodeBytes != null) { - if (typeof object.orderedCodeBytes !== "object") + if (!$util.isObject(object.orderedCodeBytes)) throw TypeError(".google.bigtable.v2.Type.Struct.Encoding.orderedCodeBytes: object expected"); message.orderedCodeBytes = $root.google.bigtable.v2.Type.Struct.Encoding.OrderedCodeBytes.fromObject(object.orderedCodeBytes, long + 1); } @@ -72463,22 +74729,26 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Encoding.toObject = function toObject(message, options) { + Encoding.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; - if (message.singleton != null && message.hasOwnProperty("singleton")) { - object.singleton = $root.google.bigtable.v2.Type.Struct.Encoding.Singleton.toObject(message.singleton, options); + if (message.singleton != null && Object.hasOwnProperty.call(message, "singleton")) { + object.singleton = $root.google.bigtable.v2.Type.Struct.Encoding.Singleton.toObject(message.singleton, options, q + 1); if (options.oneofs) object.encoding = "singleton"; } - if (message.delimitedBytes != null && message.hasOwnProperty("delimitedBytes")) { - object.delimitedBytes = $root.google.bigtable.v2.Type.Struct.Encoding.DelimitedBytes.toObject(message.delimitedBytes, options); + if (message.delimitedBytes != null && Object.hasOwnProperty.call(message, "delimitedBytes")) { + object.delimitedBytes = $root.google.bigtable.v2.Type.Struct.Encoding.DelimitedBytes.toObject(message.delimitedBytes, options, q + 1); if (options.oneofs) object.encoding = "delimitedBytes"; } - if (message.orderedCodeBytes != null && message.hasOwnProperty("orderedCodeBytes")) { - object.orderedCodeBytes = $root.google.bigtable.v2.Type.Struct.Encoding.OrderedCodeBytes.toObject(message.orderedCodeBytes, options); + if (message.orderedCodeBytes != null && Object.hasOwnProperty.call(message, "orderedCodeBytes")) { + object.orderedCodeBytes = $root.google.bigtable.v2.Type.Struct.Encoding.OrderedCodeBytes.toObject(message.orderedCodeBytes, options, q + 1); if (options.oneofs) object.encoding = "orderedCodeBytes"; } @@ -72555,9 +74825,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Singleton.encode = function encode(message, writer) { + Singleton.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); return writer; }; @@ -72571,7 +74845,7 @@ * @returns {$protobuf.Writer} Writer */ Singleton.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -72651,10 +74925,6 @@ Singleton.fromObject = function fromObject(object, long) { if (object instanceof $root.google.bigtable.v2.Type.Struct.Encoding.Singleton) return object; - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - throw Error("maximum nesting depth exceeded"); return new $root.google.bigtable.v2.Type.Struct.Encoding.Singleton(); }; @@ -72753,9 +75023,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DelimitedBytes.encode = function encode(message, writer) { + DelimitedBytes.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.delimiter != null && Object.hasOwnProperty.call(message, "delimiter")) writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.delimiter); return writer; @@ -72771,7 +75045,7 @@ * @returns {$protobuf.Writer} Writer */ DelimitedBytes.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -72841,7 +75115,7 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.delimiter != null && message.hasOwnProperty("delimiter")) + if (message.delimiter != null && Object.hasOwnProperty.call(message, "delimiter")) if (!(message.delimiter && typeof message.delimiter.length === "number" || $util.isString(message.delimiter))) return "delimiter: buffer expected"; return null; @@ -72858,6 +75132,8 @@ DelimitedBytes.fromObject = function fromObject(object, long) { if (object instanceof $root.google.bigtable.v2.Type.Struct.Encoding.DelimitedBytes) return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.v2.Type.Struct.Encoding.DelimitedBytes: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -72880,9 +75156,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DelimitedBytes.toObject = function toObject(message, options) { + DelimitedBytes.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) if (options.bytes === String) @@ -72892,7 +75172,7 @@ if (options.bytes !== Array) object.delimiter = $util.newBuffer(object.delimiter); } - if (message.delimiter != null && message.hasOwnProperty("delimiter")) + if (message.delimiter != null && Object.hasOwnProperty.call(message, "delimiter")) object.delimiter = options.bytes === String ? $util.base64.encode(message.delimiter, 0, message.delimiter.length) : options.bytes === Array ? Array.prototype.slice.call(message.delimiter) : message.delimiter; return object; }; @@ -72970,9 +75250,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - OrderedCodeBytes.encode = function encode(message, writer) { + OrderedCodeBytes.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); return writer; }; @@ -72986,7 +75270,7 @@ * @returns {$protobuf.Writer} Writer */ OrderedCodeBytes.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -73066,10 +75350,6 @@ OrderedCodeBytes.fromObject = function fromObject(object, long) { if (object instanceof $root.google.bigtable.v2.Type.Struct.Encoding.OrderedCodeBytes) return object; - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - throw Error("maximum nesting depth exceeded"); return new $root.google.bigtable.v2.Type.Struct.Encoding.OrderedCodeBytes(); }; @@ -73183,9 +75463,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Proto.encode = function encode(message, writer) { + Proto.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.schemaBundleId != null && Object.hasOwnProperty.call(message, "schemaBundleId")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.schemaBundleId); if (message.messageName != null && Object.hasOwnProperty.call(message, "messageName")) @@ -73203,7 +75487,7 @@ * @returns {$protobuf.Writer} Writer */ Proto.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -73277,10 +75561,10 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.schemaBundleId != null && message.hasOwnProperty("schemaBundleId")) + if (message.schemaBundleId != null && Object.hasOwnProperty.call(message, "schemaBundleId")) if (!$util.isString(message.schemaBundleId)) return "schemaBundleId: string expected"; - if (message.messageName != null && message.hasOwnProperty("messageName")) + if (message.messageName != null && Object.hasOwnProperty.call(message, "messageName")) if (!$util.isString(message.messageName)) return "messageName: string expected"; return null; @@ -73297,6 +75581,8 @@ Proto.fromObject = function fromObject(object, long) { if (object instanceof $root.google.bigtable.v2.Type.Proto) return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.v2.Type.Proto: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -73318,17 +75604,21 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Proto.toObject = function toObject(message, options) { + Proto.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.schemaBundleId = ""; object.messageName = ""; } - if (message.schemaBundleId != null && message.hasOwnProperty("schemaBundleId")) + if (message.schemaBundleId != null && Object.hasOwnProperty.call(message, "schemaBundleId")) object.schemaBundleId = message.schemaBundleId; - if (message.messageName != null && message.hasOwnProperty("messageName")) + if (message.messageName != null && Object.hasOwnProperty.call(message, "messageName")) object.messageName = message.messageName; return object; }; @@ -73424,9 +75714,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Enum.encode = function encode(message, writer) { + Enum.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.schemaBundleId != null && Object.hasOwnProperty.call(message, "schemaBundleId")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.schemaBundleId); if (message.enumName != null && Object.hasOwnProperty.call(message, "enumName")) @@ -73444,7 +75738,7 @@ * @returns {$protobuf.Writer} Writer */ Enum.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -73518,10 +75812,10 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.schemaBundleId != null && message.hasOwnProperty("schemaBundleId")) + if (message.schemaBundleId != null && Object.hasOwnProperty.call(message, "schemaBundleId")) if (!$util.isString(message.schemaBundleId)) return "schemaBundleId: string expected"; - if (message.enumName != null && message.hasOwnProperty("enumName")) + if (message.enumName != null && Object.hasOwnProperty.call(message, "enumName")) if (!$util.isString(message.enumName)) return "enumName: string expected"; return null; @@ -73538,6 +75832,8 @@ Enum.fromObject = function fromObject(object, long) { if (object instanceof $root.google.bigtable.v2.Type.Enum) return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.v2.Type.Enum: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -73559,17 +75855,21 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Enum.toObject = function toObject(message, options) { + Enum.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.schemaBundleId = ""; object.enumName = ""; } - if (message.schemaBundleId != null && message.hasOwnProperty("schemaBundleId")) + if (message.schemaBundleId != null && Object.hasOwnProperty.call(message, "schemaBundleId")) object.schemaBundleId = message.schemaBundleId; - if (message.enumName != null && message.hasOwnProperty("enumName")) + if (message.enumName != null && Object.hasOwnProperty.call(message, "enumName")) object.enumName = message.enumName; return object; }; @@ -73656,11 +75956,15 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Array.encode = function encode(message, writer) { + Array.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.elementType != null && Object.hasOwnProperty.call(message, "elementType")) - $root.google.bigtable.v2.Type.encode(message.elementType, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + $root.google.bigtable.v2.Type.encode(message.elementType, writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); return writer; }; @@ -73674,7 +75978,7 @@ * @returns {$protobuf.Writer} Writer */ Array.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -73744,7 +76048,7 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.elementType != null && message.hasOwnProperty("elementType")) { + if (message.elementType != null && Object.hasOwnProperty.call(message, "elementType")) { var error = $root.google.bigtable.v2.Type.verify(message.elementType, long + 1); if (error) return "elementType." + error; @@ -73763,13 +76067,15 @@ Array.fromObject = function fromObject(object, long) { if (object instanceof $root.google.bigtable.v2.Type.Array) return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.v2.Type.Array: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) throw Error("maximum nesting depth exceeded"); var message = new $root.google.bigtable.v2.Type.Array(); if (object.elementType != null) { - if (typeof object.elementType !== "object") + if (!$util.isObject(object.elementType)) throw TypeError(".google.bigtable.v2.Type.Array.elementType: object expected"); message.elementType = $root.google.bigtable.v2.Type.fromObject(object.elementType, long + 1); } @@ -73785,14 +76091,18 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Array.toObject = function toObject(message, options) { + Array.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) object.elementType = null; - if (message.elementType != null && message.hasOwnProperty("elementType")) - object.elementType = $root.google.bigtable.v2.Type.toObject(message.elementType, options); + if (message.elementType != null && Object.hasOwnProperty.call(message, "elementType")) + object.elementType = $root.google.bigtable.v2.Type.toObject(message.elementType, options, q + 1); return object; }; @@ -73887,13 +76197,17 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Map.encode = function encode(message, writer) { + Map.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.keyType != null && Object.hasOwnProperty.call(message, "keyType")) - $root.google.bigtable.v2.Type.encode(message.keyType, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + $root.google.bigtable.v2.Type.encode(message.keyType, writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); if (message.valueType != null && Object.hasOwnProperty.call(message, "valueType")) - $root.google.bigtable.v2.Type.encode(message.valueType, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + $root.google.bigtable.v2.Type.encode(message.valueType, writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); return writer; }; @@ -73907,7 +76221,7 @@ * @returns {$protobuf.Writer} Writer */ Map.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -73981,12 +76295,12 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.keyType != null && message.hasOwnProperty("keyType")) { + if (message.keyType != null && Object.hasOwnProperty.call(message, "keyType")) { var error = $root.google.bigtable.v2.Type.verify(message.keyType, long + 1); if (error) return "keyType." + error; } - if (message.valueType != null && message.hasOwnProperty("valueType")) { + if (message.valueType != null && Object.hasOwnProperty.call(message, "valueType")) { var error = $root.google.bigtable.v2.Type.verify(message.valueType, long + 1); if (error) return "valueType." + error; @@ -74005,18 +76319,20 @@ Map.fromObject = function fromObject(object, long) { if (object instanceof $root.google.bigtable.v2.Type.Map) return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.v2.Type.Map: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) throw Error("maximum nesting depth exceeded"); var message = new $root.google.bigtable.v2.Type.Map(); if (object.keyType != null) { - if (typeof object.keyType !== "object") + if (!$util.isObject(object.keyType)) throw TypeError(".google.bigtable.v2.Type.Map.keyType: object expected"); message.keyType = $root.google.bigtable.v2.Type.fromObject(object.keyType, long + 1); } if (object.valueType != null) { - if (typeof object.valueType !== "object") + if (!$util.isObject(object.valueType)) throw TypeError(".google.bigtable.v2.Type.Map.valueType: object expected"); message.valueType = $root.google.bigtable.v2.Type.fromObject(object.valueType, long + 1); } @@ -74032,18 +76348,22 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Map.toObject = function toObject(message, options) { + Map.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.keyType = null; object.valueType = null; } - if (message.keyType != null && message.hasOwnProperty("keyType")) - object.keyType = $root.google.bigtable.v2.Type.toObject(message.keyType, options); - if (message.valueType != null && message.hasOwnProperty("valueType")) - object.valueType = $root.google.bigtable.v2.Type.toObject(message.valueType, options); + if (message.keyType != null && Object.hasOwnProperty.call(message, "keyType")) + object.keyType = $root.google.bigtable.v2.Type.toObject(message.keyType, options, q + 1); + if (message.valueType != null && Object.hasOwnProperty.call(message, "valueType")) + object.valueType = $root.google.bigtable.v2.Type.toObject(message.valueType, options, q + 1); return object; }; @@ -74188,21 +76508,25 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Aggregate.encode = function encode(message, writer) { + Aggregate.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.inputType != null && Object.hasOwnProperty.call(message, "inputType")) - $root.google.bigtable.v2.Type.encode(message.inputType, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + $root.google.bigtable.v2.Type.encode(message.inputType, writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); if (message.stateType != null && Object.hasOwnProperty.call(message, "stateType")) - $root.google.bigtable.v2.Type.encode(message.stateType, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + $root.google.bigtable.v2.Type.encode(message.stateType, writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); if (message.sum != null && Object.hasOwnProperty.call(message, "sum")) - $root.google.bigtable.v2.Type.Aggregate.Sum.encode(message.sum, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + $root.google.bigtable.v2.Type.Aggregate.Sum.encode(message.sum, writer.uint32(/* id 4, wireType 2 =*/34).fork(), q + 1).ldelim(); if (message.hllppUniqueCount != null && Object.hasOwnProperty.call(message, "hllppUniqueCount")) - $root.google.bigtable.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount.encode(message.hllppUniqueCount, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + $root.google.bigtable.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount.encode(message.hllppUniqueCount, writer.uint32(/* id 5, wireType 2 =*/42).fork(), q + 1).ldelim(); if (message.max != null && Object.hasOwnProperty.call(message, "max")) - $root.google.bigtable.v2.Type.Aggregate.Max.encode(message.max, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + $root.google.bigtable.v2.Type.Aggregate.Max.encode(message.max, writer.uint32(/* id 6, wireType 2 =*/50).fork(), q + 1).ldelim(); if (message.min != null && Object.hasOwnProperty.call(message, "min")) - $root.google.bigtable.v2.Type.Aggregate.Min.encode(message.min, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + $root.google.bigtable.v2.Type.Aggregate.Min.encode(message.min, writer.uint32(/* id 7, wireType 2 =*/58).fork(), q + 1).ldelim(); return writer; }; @@ -74216,7 +76540,7 @@ * @returns {$protobuf.Writer} Writer */ Aggregate.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -74307,17 +76631,17 @@ if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; var properties = {}; - if (message.inputType != null && message.hasOwnProperty("inputType")) { + if (message.inputType != null && Object.hasOwnProperty.call(message, "inputType")) { var error = $root.google.bigtable.v2.Type.verify(message.inputType, long + 1); if (error) return "inputType." + error; } - if (message.stateType != null && message.hasOwnProperty("stateType")) { + if (message.stateType != null && Object.hasOwnProperty.call(message, "stateType")) { var error = $root.google.bigtable.v2.Type.verify(message.stateType, long + 1); if (error) return "stateType." + error; } - if (message.sum != null && message.hasOwnProperty("sum")) { + if (message.sum != null && Object.hasOwnProperty.call(message, "sum")) { properties.aggregator = 1; { var error = $root.google.bigtable.v2.Type.Aggregate.Sum.verify(message.sum, long + 1); @@ -74325,7 +76649,7 @@ return "sum." + error; } } - if (message.hllppUniqueCount != null && message.hasOwnProperty("hllppUniqueCount")) { + if (message.hllppUniqueCount != null && Object.hasOwnProperty.call(message, "hllppUniqueCount")) { if (properties.aggregator === 1) return "aggregator: multiple values"; properties.aggregator = 1; @@ -74335,7 +76659,7 @@ return "hllppUniqueCount." + error; } } - if (message.max != null && message.hasOwnProperty("max")) { + if (message.max != null && Object.hasOwnProperty.call(message, "max")) { if (properties.aggregator === 1) return "aggregator: multiple values"; properties.aggregator = 1; @@ -74345,7 +76669,7 @@ return "max." + error; } } - if (message.min != null && message.hasOwnProperty("min")) { + if (message.min != null && Object.hasOwnProperty.call(message, "min")) { if (properties.aggregator === 1) return "aggregator: multiple values"; properties.aggregator = 1; @@ -74369,38 +76693,40 @@ Aggregate.fromObject = function fromObject(object, long) { if (object instanceof $root.google.bigtable.v2.Type.Aggregate) return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.v2.Type.Aggregate: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) throw Error("maximum nesting depth exceeded"); var message = new $root.google.bigtable.v2.Type.Aggregate(); if (object.inputType != null) { - if (typeof object.inputType !== "object") + if (!$util.isObject(object.inputType)) throw TypeError(".google.bigtable.v2.Type.Aggregate.inputType: object expected"); message.inputType = $root.google.bigtable.v2.Type.fromObject(object.inputType, long + 1); } if (object.stateType != null) { - if (typeof object.stateType !== "object") + if (!$util.isObject(object.stateType)) throw TypeError(".google.bigtable.v2.Type.Aggregate.stateType: object expected"); message.stateType = $root.google.bigtable.v2.Type.fromObject(object.stateType, long + 1); } if (object.sum != null) { - if (typeof object.sum !== "object") + if (!$util.isObject(object.sum)) throw TypeError(".google.bigtable.v2.Type.Aggregate.sum: object expected"); message.sum = $root.google.bigtable.v2.Type.Aggregate.Sum.fromObject(object.sum, long + 1); } if (object.hllppUniqueCount != null) { - if (typeof object.hllppUniqueCount !== "object") + if (!$util.isObject(object.hllppUniqueCount)) throw TypeError(".google.bigtable.v2.Type.Aggregate.hllppUniqueCount: object expected"); message.hllppUniqueCount = $root.google.bigtable.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount.fromObject(object.hllppUniqueCount, long + 1); } if (object.max != null) { - if (typeof object.max !== "object") + if (!$util.isObject(object.max)) throw TypeError(".google.bigtable.v2.Type.Aggregate.max: object expected"); message.max = $root.google.bigtable.v2.Type.Aggregate.Max.fromObject(object.max, long + 1); } if (object.min != null) { - if (typeof object.min !== "object") + if (!$util.isObject(object.min)) throw TypeError(".google.bigtable.v2.Type.Aggregate.min: object expected"); message.min = $root.google.bigtable.v2.Type.Aggregate.Min.fromObject(object.min, long + 1); } @@ -74416,35 +76742,39 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Aggregate.toObject = function toObject(message, options) { + Aggregate.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.inputType = null; object.stateType = null; } - if (message.inputType != null && message.hasOwnProperty("inputType")) - object.inputType = $root.google.bigtable.v2.Type.toObject(message.inputType, options); - if (message.stateType != null && message.hasOwnProperty("stateType")) - object.stateType = $root.google.bigtable.v2.Type.toObject(message.stateType, options); - if (message.sum != null && message.hasOwnProperty("sum")) { - object.sum = $root.google.bigtable.v2.Type.Aggregate.Sum.toObject(message.sum, options); + if (message.inputType != null && Object.hasOwnProperty.call(message, "inputType")) + object.inputType = $root.google.bigtable.v2.Type.toObject(message.inputType, options, q + 1); + if (message.stateType != null && Object.hasOwnProperty.call(message, "stateType")) + object.stateType = $root.google.bigtable.v2.Type.toObject(message.stateType, options, q + 1); + if (message.sum != null && Object.hasOwnProperty.call(message, "sum")) { + object.sum = $root.google.bigtable.v2.Type.Aggregate.Sum.toObject(message.sum, options, q + 1); if (options.oneofs) object.aggregator = "sum"; } - if (message.hllppUniqueCount != null && message.hasOwnProperty("hllppUniqueCount")) { - object.hllppUniqueCount = $root.google.bigtable.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount.toObject(message.hllppUniqueCount, options); + if (message.hllppUniqueCount != null && Object.hasOwnProperty.call(message, "hllppUniqueCount")) { + object.hllppUniqueCount = $root.google.bigtable.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount.toObject(message.hllppUniqueCount, options, q + 1); if (options.oneofs) object.aggregator = "hllppUniqueCount"; } - if (message.max != null && message.hasOwnProperty("max")) { - object.max = $root.google.bigtable.v2.Type.Aggregate.Max.toObject(message.max, options); + if (message.max != null && Object.hasOwnProperty.call(message, "max")) { + object.max = $root.google.bigtable.v2.Type.Aggregate.Max.toObject(message.max, options, q + 1); if (options.oneofs) object.aggregator = "max"; } - if (message.min != null && message.hasOwnProperty("min")) { - object.min = $root.google.bigtable.v2.Type.Aggregate.Min.toObject(message.min, options); + if (message.min != null && Object.hasOwnProperty.call(message, "min")) { + object.min = $root.google.bigtable.v2.Type.Aggregate.Min.toObject(message.min, options, q + 1); if (options.oneofs) object.aggregator = "min"; } @@ -74521,9 +76851,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Sum.encode = function encode(message, writer) { + Sum.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); return writer; }; @@ -74537,7 +76871,7 @@ * @returns {$protobuf.Writer} Writer */ Sum.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -74617,10 +76951,6 @@ Sum.fromObject = function fromObject(object, long) { if (object instanceof $root.google.bigtable.v2.Type.Aggregate.Sum) return object; - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - throw Error("maximum nesting depth exceeded"); return new $root.google.bigtable.v2.Type.Aggregate.Sum(); }; @@ -74710,9 +77040,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Max.encode = function encode(message, writer) { + Max.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); return writer; }; @@ -74726,7 +77060,7 @@ * @returns {$protobuf.Writer} Writer */ Max.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -74806,10 +77140,6 @@ Max.fromObject = function fromObject(object, long) { if (object instanceof $root.google.bigtable.v2.Type.Aggregate.Max) return object; - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - throw Error("maximum nesting depth exceeded"); return new $root.google.bigtable.v2.Type.Aggregate.Max(); }; @@ -74899,9 +77229,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Min.encode = function encode(message, writer) { + Min.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); return writer; }; @@ -74915,7 +77249,7 @@ * @returns {$protobuf.Writer} Writer */ Min.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -74995,10 +77329,6 @@ Min.fromObject = function fromObject(object, long) { if (object instanceof $root.google.bigtable.v2.Type.Aggregate.Min) return object; - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - throw Error("maximum nesting depth exceeded"); return new $root.google.bigtable.v2.Type.Aggregate.Min(); }; @@ -75088,9 +77418,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - HyperLogLogPlusPlusUniqueCount.encode = function encode(message, writer) { + HyperLogLogPlusPlusUniqueCount.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); return writer; }; @@ -75104,7 +77438,7 @@ * @returns {$protobuf.Writer} Writer */ HyperLogLogPlusPlusUniqueCount.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -75184,10 +77518,6 @@ HyperLogLogPlusPlusUniqueCount.fromObject = function fromObject(object, long) { if (object instanceof $root.google.bigtable.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount) return object; - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - throw Error("maximum nesting depth exceeded"); return new $root.google.bigtable.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount(); }; @@ -75319,9 +77649,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ReadIterationStats.encode = function encode(message, writer) { + ReadIterationStats.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.rowsSeenCount != null && Object.hasOwnProperty.call(message, "rowsSeenCount")) writer.uint32(/* id 1, wireType 0 =*/8).int64(message.rowsSeenCount); if (message.rowsReturnedCount != null && Object.hasOwnProperty.call(message, "rowsReturnedCount")) @@ -75343,7 +77677,7 @@ * @returns {$protobuf.Writer} Writer */ ReadIterationStats.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -75425,16 +77759,16 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.rowsSeenCount != null && message.hasOwnProperty("rowsSeenCount")) + if (message.rowsSeenCount != null && Object.hasOwnProperty.call(message, "rowsSeenCount")) if (!$util.isInteger(message.rowsSeenCount) && !(message.rowsSeenCount && $util.isInteger(message.rowsSeenCount.low) && $util.isInteger(message.rowsSeenCount.high))) return "rowsSeenCount: integer|Long expected"; - if (message.rowsReturnedCount != null && message.hasOwnProperty("rowsReturnedCount")) + if (message.rowsReturnedCount != null && Object.hasOwnProperty.call(message, "rowsReturnedCount")) if (!$util.isInteger(message.rowsReturnedCount) && !(message.rowsReturnedCount && $util.isInteger(message.rowsReturnedCount.low) && $util.isInteger(message.rowsReturnedCount.high))) return "rowsReturnedCount: integer|Long expected"; - if (message.cellsSeenCount != null && message.hasOwnProperty("cellsSeenCount")) + if (message.cellsSeenCount != null && Object.hasOwnProperty.call(message, "cellsSeenCount")) if (!$util.isInteger(message.cellsSeenCount) && !(message.cellsSeenCount && $util.isInteger(message.cellsSeenCount.low) && $util.isInteger(message.cellsSeenCount.high))) return "cellsSeenCount: integer|Long expected"; - if (message.cellsReturnedCount != null && message.hasOwnProperty("cellsReturnedCount")) + if (message.cellsReturnedCount != null && Object.hasOwnProperty.call(message, "cellsReturnedCount")) if (!$util.isInteger(message.cellsReturnedCount) && !(message.cellsReturnedCount && $util.isInteger(message.cellsReturnedCount.low) && $util.isInteger(message.cellsReturnedCount.high))) return "cellsReturnedCount: integer|Long expected"; return null; @@ -75451,6 +77785,8 @@ ReadIterationStats.fromObject = function fromObject(object, long) { if (object instanceof $root.google.bigtable.v2.ReadIterationStats) return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.v2.ReadIterationStats: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -75458,7 +77794,7 @@ var message = new $root.google.bigtable.v2.ReadIterationStats(); if (object.rowsSeenCount != null) if ($util.Long) - (message.rowsSeenCount = $util.Long.fromValue(object.rowsSeenCount)).unsigned = false; + message.rowsSeenCount = $util.Long.fromValue(object.rowsSeenCount, false); else if (typeof object.rowsSeenCount === "string") message.rowsSeenCount = parseInt(object.rowsSeenCount, 10); else if (typeof object.rowsSeenCount === "number") @@ -75467,7 +77803,7 @@ message.rowsSeenCount = new $util.LongBits(object.rowsSeenCount.low >>> 0, object.rowsSeenCount.high >>> 0).toNumber(); if (object.rowsReturnedCount != null) if ($util.Long) - (message.rowsReturnedCount = $util.Long.fromValue(object.rowsReturnedCount)).unsigned = false; + message.rowsReturnedCount = $util.Long.fromValue(object.rowsReturnedCount, false); else if (typeof object.rowsReturnedCount === "string") message.rowsReturnedCount = parseInt(object.rowsReturnedCount, 10); else if (typeof object.rowsReturnedCount === "number") @@ -75476,7 +77812,7 @@ message.rowsReturnedCount = new $util.LongBits(object.rowsReturnedCount.low >>> 0, object.rowsReturnedCount.high >>> 0).toNumber(); if (object.cellsSeenCount != null) if ($util.Long) - (message.cellsSeenCount = $util.Long.fromValue(object.cellsSeenCount)).unsigned = false; + message.cellsSeenCount = $util.Long.fromValue(object.cellsSeenCount, false); else if (typeof object.cellsSeenCount === "string") message.cellsSeenCount = parseInt(object.cellsSeenCount, 10); else if (typeof object.cellsSeenCount === "number") @@ -75485,7 +77821,7 @@ message.cellsSeenCount = new $util.LongBits(object.cellsSeenCount.low >>> 0, object.cellsSeenCount.high >>> 0).toNumber(); if (object.cellsReturnedCount != null) if ($util.Long) - (message.cellsReturnedCount = $util.Long.fromValue(object.cellsReturnedCount)).unsigned = false; + message.cellsReturnedCount = $util.Long.fromValue(object.cellsReturnedCount, false); else if (typeof object.cellsReturnedCount === "string") message.cellsReturnedCount = parseInt(object.cellsReturnedCount, 10); else if (typeof object.cellsReturnedCount === "number") @@ -75504,49 +77840,61 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ReadIterationStats.toObject = function toObject(message, options) { + ReadIterationStats.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) { if ($util.Long) { var long = new $util.Long(0, 0, false); - object.rowsSeenCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.rowsSeenCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : typeof BigInt !== "undefined" && options.longs === BigInt ? long.toBigInt() : long; } else - object.rowsSeenCount = options.longs === String ? "0" : 0; + object.rowsSeenCount = options.longs === String ? "0" : typeof BigInt !== "undefined" && options.longs === BigInt ? BigInt("0") : 0; if ($util.Long) { var long = new $util.Long(0, 0, false); - object.rowsReturnedCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.rowsReturnedCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : typeof BigInt !== "undefined" && options.longs === BigInt ? long.toBigInt() : long; } else - object.rowsReturnedCount = options.longs === String ? "0" : 0; + object.rowsReturnedCount = options.longs === String ? "0" : typeof BigInt !== "undefined" && options.longs === BigInt ? BigInt("0") : 0; if ($util.Long) { var long = new $util.Long(0, 0, false); - object.cellsSeenCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.cellsSeenCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : typeof BigInt !== "undefined" && options.longs === BigInt ? long.toBigInt() : long; } else - object.cellsSeenCount = options.longs === String ? "0" : 0; + object.cellsSeenCount = options.longs === String ? "0" : typeof BigInt !== "undefined" && options.longs === BigInt ? BigInt("0") : 0; if ($util.Long) { var long = new $util.Long(0, 0, false); - object.cellsReturnedCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.cellsReturnedCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : typeof BigInt !== "undefined" && options.longs === BigInt ? long.toBigInt() : long; } else - object.cellsReturnedCount = options.longs === String ? "0" : 0; + object.cellsReturnedCount = options.longs === String ? "0" : typeof BigInt !== "undefined" && options.longs === BigInt ? BigInt("0") : 0; } - if (message.rowsSeenCount != null && message.hasOwnProperty("rowsSeenCount")) - if (typeof message.rowsSeenCount === "number") + if (message.rowsSeenCount != null && Object.hasOwnProperty.call(message, "rowsSeenCount")) + if (typeof BigInt !== "undefined" && options.longs === BigInt) + object.rowsSeenCount = typeof message.rowsSeenCount === "number" ? BigInt(message.rowsSeenCount) : $util.Long.fromBits(message.rowsSeenCount.low >>> 0, message.rowsSeenCount.high >>> 0, false).toBigInt(); + else if (typeof message.rowsSeenCount === "number") object.rowsSeenCount = options.longs === String ? String(message.rowsSeenCount) : message.rowsSeenCount; else object.rowsSeenCount = options.longs === String ? $util.Long.prototype.toString.call(message.rowsSeenCount) : options.longs === Number ? new $util.LongBits(message.rowsSeenCount.low >>> 0, message.rowsSeenCount.high >>> 0).toNumber() : message.rowsSeenCount; - if (message.rowsReturnedCount != null && message.hasOwnProperty("rowsReturnedCount")) - if (typeof message.rowsReturnedCount === "number") + if (message.rowsReturnedCount != null && Object.hasOwnProperty.call(message, "rowsReturnedCount")) + if (typeof BigInt !== "undefined" && options.longs === BigInt) + object.rowsReturnedCount = typeof message.rowsReturnedCount === "number" ? BigInt(message.rowsReturnedCount) : $util.Long.fromBits(message.rowsReturnedCount.low >>> 0, message.rowsReturnedCount.high >>> 0, false).toBigInt(); + else if (typeof message.rowsReturnedCount === "number") object.rowsReturnedCount = options.longs === String ? String(message.rowsReturnedCount) : message.rowsReturnedCount; else object.rowsReturnedCount = options.longs === String ? $util.Long.prototype.toString.call(message.rowsReturnedCount) : options.longs === Number ? new $util.LongBits(message.rowsReturnedCount.low >>> 0, message.rowsReturnedCount.high >>> 0).toNumber() : message.rowsReturnedCount; - if (message.cellsSeenCount != null && message.hasOwnProperty("cellsSeenCount")) - if (typeof message.cellsSeenCount === "number") + if (message.cellsSeenCount != null && Object.hasOwnProperty.call(message, "cellsSeenCount")) + if (typeof BigInt !== "undefined" && options.longs === BigInt) + object.cellsSeenCount = typeof message.cellsSeenCount === "number" ? BigInt(message.cellsSeenCount) : $util.Long.fromBits(message.cellsSeenCount.low >>> 0, message.cellsSeenCount.high >>> 0, false).toBigInt(); + else if (typeof message.cellsSeenCount === "number") object.cellsSeenCount = options.longs === String ? String(message.cellsSeenCount) : message.cellsSeenCount; else object.cellsSeenCount = options.longs === String ? $util.Long.prototype.toString.call(message.cellsSeenCount) : options.longs === Number ? new $util.LongBits(message.cellsSeenCount.low >>> 0, message.cellsSeenCount.high >>> 0).toNumber() : message.cellsSeenCount; - if (message.cellsReturnedCount != null && message.hasOwnProperty("cellsReturnedCount")) - if (typeof message.cellsReturnedCount === "number") + if (message.cellsReturnedCount != null && Object.hasOwnProperty.call(message, "cellsReturnedCount")) + if (typeof BigInt !== "undefined" && options.longs === BigInt) + object.cellsReturnedCount = typeof message.cellsReturnedCount === "number" ? BigInt(message.cellsReturnedCount) : $util.Long.fromBits(message.cellsReturnedCount.low >>> 0, message.cellsReturnedCount.high >>> 0, false).toBigInt(); + else if (typeof message.cellsReturnedCount === "number") object.cellsReturnedCount = options.longs === String ? String(message.cellsReturnedCount) : message.cellsReturnedCount; else object.cellsReturnedCount = options.longs === String ? $util.Long.prototype.toString.call(message.cellsReturnedCount) : options.longs === Number ? new $util.LongBits(message.cellsReturnedCount.low >>> 0, message.cellsReturnedCount.high >>> 0).toNumber() : message.cellsReturnedCount; @@ -75635,11 +77983,15 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - RequestLatencyStats.encode = function encode(message, writer) { + RequestLatencyStats.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.frontendServerLatency != null && Object.hasOwnProperty.call(message, "frontendServerLatency")) - $root.google.protobuf.Duration.encode(message.frontendServerLatency, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + $root.google.protobuf.Duration.encode(message.frontendServerLatency, writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); return writer; }; @@ -75653,7 +78005,7 @@ * @returns {$protobuf.Writer} Writer */ RequestLatencyStats.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -75723,7 +78075,7 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.frontendServerLatency != null && message.hasOwnProperty("frontendServerLatency")) { + if (message.frontendServerLatency != null && Object.hasOwnProperty.call(message, "frontendServerLatency")) { var error = $root.google.protobuf.Duration.verify(message.frontendServerLatency, long + 1); if (error) return "frontendServerLatency." + error; @@ -75742,13 +78094,15 @@ RequestLatencyStats.fromObject = function fromObject(object, long) { if (object instanceof $root.google.bigtable.v2.RequestLatencyStats) return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.v2.RequestLatencyStats: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) throw Error("maximum nesting depth exceeded"); var message = new $root.google.bigtable.v2.RequestLatencyStats(); if (object.frontendServerLatency != null) { - if (typeof object.frontendServerLatency !== "object") + if (!$util.isObject(object.frontendServerLatency)) throw TypeError(".google.bigtable.v2.RequestLatencyStats.frontendServerLatency: object expected"); message.frontendServerLatency = $root.google.protobuf.Duration.fromObject(object.frontendServerLatency, long + 1); } @@ -75764,14 +78118,18 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - RequestLatencyStats.toObject = function toObject(message, options) { + RequestLatencyStats.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) object.frontendServerLatency = null; - if (message.frontendServerLatency != null && message.hasOwnProperty("frontendServerLatency")) - object.frontendServerLatency = $root.google.protobuf.Duration.toObject(message.frontendServerLatency, options); + if (message.frontendServerLatency != null && Object.hasOwnProperty.call(message, "frontendServerLatency")) + object.frontendServerLatency = $root.google.protobuf.Duration.toObject(message.frontendServerLatency, options, q + 1); return object; }; @@ -75866,13 +78224,17 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FullReadStatsView.encode = function encode(message, writer) { + FullReadStatsView.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.readIterationStats != null && Object.hasOwnProperty.call(message, "readIterationStats")) - $root.google.bigtable.v2.ReadIterationStats.encode(message.readIterationStats, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + $root.google.bigtable.v2.ReadIterationStats.encode(message.readIterationStats, writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); if (message.requestLatencyStats != null && Object.hasOwnProperty.call(message, "requestLatencyStats")) - $root.google.bigtable.v2.RequestLatencyStats.encode(message.requestLatencyStats, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + $root.google.bigtable.v2.RequestLatencyStats.encode(message.requestLatencyStats, writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); return writer; }; @@ -75886,7 +78248,7 @@ * @returns {$protobuf.Writer} Writer */ FullReadStatsView.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -75960,12 +78322,12 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.readIterationStats != null && message.hasOwnProperty("readIterationStats")) { + if (message.readIterationStats != null && Object.hasOwnProperty.call(message, "readIterationStats")) { var error = $root.google.bigtable.v2.ReadIterationStats.verify(message.readIterationStats, long + 1); if (error) return "readIterationStats." + error; } - if (message.requestLatencyStats != null && message.hasOwnProperty("requestLatencyStats")) { + if (message.requestLatencyStats != null && Object.hasOwnProperty.call(message, "requestLatencyStats")) { var error = $root.google.bigtable.v2.RequestLatencyStats.verify(message.requestLatencyStats, long + 1); if (error) return "requestLatencyStats." + error; @@ -75984,18 +78346,20 @@ FullReadStatsView.fromObject = function fromObject(object, long) { if (object instanceof $root.google.bigtable.v2.FullReadStatsView) return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.v2.FullReadStatsView: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) throw Error("maximum nesting depth exceeded"); var message = new $root.google.bigtable.v2.FullReadStatsView(); if (object.readIterationStats != null) { - if (typeof object.readIterationStats !== "object") + if (!$util.isObject(object.readIterationStats)) throw TypeError(".google.bigtable.v2.FullReadStatsView.readIterationStats: object expected"); message.readIterationStats = $root.google.bigtable.v2.ReadIterationStats.fromObject(object.readIterationStats, long + 1); } if (object.requestLatencyStats != null) { - if (typeof object.requestLatencyStats !== "object") + if (!$util.isObject(object.requestLatencyStats)) throw TypeError(".google.bigtable.v2.FullReadStatsView.requestLatencyStats: object expected"); message.requestLatencyStats = $root.google.bigtable.v2.RequestLatencyStats.fromObject(object.requestLatencyStats, long + 1); } @@ -76011,18 +78375,22 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - FullReadStatsView.toObject = function toObject(message, options) { + FullReadStatsView.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.readIterationStats = null; object.requestLatencyStats = null; } - if (message.readIterationStats != null && message.hasOwnProperty("readIterationStats")) - object.readIterationStats = $root.google.bigtable.v2.ReadIterationStats.toObject(message.readIterationStats, options); - if (message.requestLatencyStats != null && message.hasOwnProperty("requestLatencyStats")) - object.requestLatencyStats = $root.google.bigtable.v2.RequestLatencyStats.toObject(message.requestLatencyStats, options); + if (message.readIterationStats != null && Object.hasOwnProperty.call(message, "readIterationStats")) + object.readIterationStats = $root.google.bigtable.v2.ReadIterationStats.toObject(message.readIterationStats, options, q + 1); + if (message.requestLatencyStats != null && Object.hasOwnProperty.call(message, "requestLatencyStats")) + object.requestLatencyStats = $root.google.bigtable.v2.RequestLatencyStats.toObject(message.requestLatencyStats, options, q + 1); return object; }; @@ -76122,11 +78490,15 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - RequestStats.encode = function encode(message, writer) { + RequestStats.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.fullReadStatsView != null && Object.hasOwnProperty.call(message, "fullReadStatsView")) - $root.google.bigtable.v2.FullReadStatsView.encode(message.fullReadStatsView, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + $root.google.bigtable.v2.FullReadStatsView.encode(message.fullReadStatsView, writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); return writer; }; @@ -76140,7 +78512,7 @@ * @returns {$protobuf.Writer} Writer */ RequestStats.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -76211,7 +78583,7 @@ if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; var properties = {}; - if (message.fullReadStatsView != null && message.hasOwnProperty("fullReadStatsView")) { + if (message.fullReadStatsView != null && Object.hasOwnProperty.call(message, "fullReadStatsView")) { properties.statsView = 1; { var error = $root.google.bigtable.v2.FullReadStatsView.verify(message.fullReadStatsView, long + 1); @@ -76233,13 +78605,15 @@ RequestStats.fromObject = function fromObject(object, long) { if (object instanceof $root.google.bigtable.v2.RequestStats) return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.v2.RequestStats: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) throw Error("maximum nesting depth exceeded"); var message = new $root.google.bigtable.v2.RequestStats(); if (object.fullReadStatsView != null) { - if (typeof object.fullReadStatsView !== "object") + if (!$util.isObject(object.fullReadStatsView)) throw TypeError(".google.bigtable.v2.RequestStats.fullReadStatsView: object expected"); message.fullReadStatsView = $root.google.bigtable.v2.FullReadStatsView.fromObject(object.fullReadStatsView, long + 1); } @@ -76255,12 +78629,16 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - RequestStats.toObject = function toObject(message, options) { + RequestStats.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; - if (message.fullReadStatsView != null && message.hasOwnProperty("fullReadStatsView")) { - object.fullReadStatsView = $root.google.bigtable.v2.FullReadStatsView.toObject(message.fullReadStatsView, options); + if (message.fullReadStatsView != null && Object.hasOwnProperty.call(message, "fullReadStatsView")) { + object.fullReadStatsView = $root.google.bigtable.v2.FullReadStatsView.toObject(message.fullReadStatsView, options, q + 1); if (options.oneofs) object.statsView = "fullReadStatsView"; } @@ -76430,9 +78808,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FeatureFlags.encode = function encode(message, writer) { + FeatureFlags.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.reverseScans != null && Object.hasOwnProperty.call(message, "reverseScans")) writer.uint32(/* id 1, wireType 0 =*/8).bool(message.reverseScans); if (message.mutateRowsRateLimit != null && Object.hasOwnProperty.call(message, "mutateRowsRateLimit")) @@ -76466,7 +78848,7 @@ * @returns {$protobuf.Writer} Writer */ FeatureFlags.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -76572,34 +78954,34 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.reverseScans != null && message.hasOwnProperty("reverseScans")) + if (message.reverseScans != null && Object.hasOwnProperty.call(message, "reverseScans")) if (typeof message.reverseScans !== "boolean") return "reverseScans: boolean expected"; - if (message.mutateRowsRateLimit != null && message.hasOwnProperty("mutateRowsRateLimit")) + if (message.mutateRowsRateLimit != null && Object.hasOwnProperty.call(message, "mutateRowsRateLimit")) if (typeof message.mutateRowsRateLimit !== "boolean") return "mutateRowsRateLimit: boolean expected"; - if (message.mutateRowsRateLimit2 != null && message.hasOwnProperty("mutateRowsRateLimit2")) + if (message.mutateRowsRateLimit2 != null && Object.hasOwnProperty.call(message, "mutateRowsRateLimit2")) if (typeof message.mutateRowsRateLimit2 !== "boolean") return "mutateRowsRateLimit2: boolean expected"; - if (message.lastScannedRowResponses != null && message.hasOwnProperty("lastScannedRowResponses")) + if (message.lastScannedRowResponses != null && Object.hasOwnProperty.call(message, "lastScannedRowResponses")) if (typeof message.lastScannedRowResponses !== "boolean") return "lastScannedRowResponses: boolean expected"; - if (message.routingCookie != null && message.hasOwnProperty("routingCookie")) + if (message.routingCookie != null && Object.hasOwnProperty.call(message, "routingCookie")) if (typeof message.routingCookie !== "boolean") return "routingCookie: boolean expected"; - if (message.retryInfo != null && message.hasOwnProperty("retryInfo")) + if (message.retryInfo != null && Object.hasOwnProperty.call(message, "retryInfo")) if (typeof message.retryInfo !== "boolean") return "retryInfo: boolean expected"; - if (message.clientSideMetricsEnabled != null && message.hasOwnProperty("clientSideMetricsEnabled")) + if (message.clientSideMetricsEnabled != null && Object.hasOwnProperty.call(message, "clientSideMetricsEnabled")) if (typeof message.clientSideMetricsEnabled !== "boolean") return "clientSideMetricsEnabled: boolean expected"; - if (message.trafficDirectorEnabled != null && message.hasOwnProperty("trafficDirectorEnabled")) + if (message.trafficDirectorEnabled != null && Object.hasOwnProperty.call(message, "trafficDirectorEnabled")) if (typeof message.trafficDirectorEnabled !== "boolean") return "trafficDirectorEnabled: boolean expected"; - if (message.directAccessRequested != null && message.hasOwnProperty("directAccessRequested")) + if (message.directAccessRequested != null && Object.hasOwnProperty.call(message, "directAccessRequested")) if (typeof message.directAccessRequested !== "boolean") return "directAccessRequested: boolean expected"; - if (message.peerInfo != null && message.hasOwnProperty("peerInfo")) + if (message.peerInfo != null && Object.hasOwnProperty.call(message, "peerInfo")) if (typeof message.peerInfo !== "boolean") return "peerInfo: boolean expected"; return null; @@ -76616,6 +78998,8 @@ FeatureFlags.fromObject = function fromObject(object, long) { if (object instanceof $root.google.bigtable.v2.FeatureFlags) return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.v2.FeatureFlags: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -76653,9 +79037,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - FeatureFlags.toObject = function toObject(message, options) { + FeatureFlags.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.reverseScans = false; @@ -76669,25 +79057,25 @@ object.directAccessRequested = false; object.peerInfo = false; } - if (message.reverseScans != null && message.hasOwnProperty("reverseScans")) + if (message.reverseScans != null && Object.hasOwnProperty.call(message, "reverseScans")) object.reverseScans = message.reverseScans; - if (message.mutateRowsRateLimit != null && message.hasOwnProperty("mutateRowsRateLimit")) + if (message.mutateRowsRateLimit != null && Object.hasOwnProperty.call(message, "mutateRowsRateLimit")) object.mutateRowsRateLimit = message.mutateRowsRateLimit; - if (message.lastScannedRowResponses != null && message.hasOwnProperty("lastScannedRowResponses")) + if (message.lastScannedRowResponses != null && Object.hasOwnProperty.call(message, "lastScannedRowResponses")) object.lastScannedRowResponses = message.lastScannedRowResponses; - if (message.mutateRowsRateLimit2 != null && message.hasOwnProperty("mutateRowsRateLimit2")) + if (message.mutateRowsRateLimit2 != null && Object.hasOwnProperty.call(message, "mutateRowsRateLimit2")) object.mutateRowsRateLimit2 = message.mutateRowsRateLimit2; - if (message.routingCookie != null && message.hasOwnProperty("routingCookie")) + if (message.routingCookie != null && Object.hasOwnProperty.call(message, "routingCookie")) object.routingCookie = message.routingCookie; - if (message.retryInfo != null && message.hasOwnProperty("retryInfo")) + if (message.retryInfo != null && Object.hasOwnProperty.call(message, "retryInfo")) object.retryInfo = message.retryInfo; - if (message.clientSideMetricsEnabled != null && message.hasOwnProperty("clientSideMetricsEnabled")) + if (message.clientSideMetricsEnabled != null && Object.hasOwnProperty.call(message, "clientSideMetricsEnabled")) object.clientSideMetricsEnabled = message.clientSideMetricsEnabled; - if (message.trafficDirectorEnabled != null && message.hasOwnProperty("trafficDirectorEnabled")) + if (message.trafficDirectorEnabled != null && Object.hasOwnProperty.call(message, "trafficDirectorEnabled")) object.trafficDirectorEnabled = message.trafficDirectorEnabled; - if (message.directAccessRequested != null && message.hasOwnProperty("directAccessRequested")) + if (message.directAccessRequested != null && Object.hasOwnProperty.call(message, "directAccessRequested")) object.directAccessRequested = message.directAccessRequested; - if (message.peerInfo != null && message.hasOwnProperty("peerInfo")) + if (message.peerInfo != null && Object.hasOwnProperty.call(message, "peerInfo")) object.peerInfo = message.peerInfo; return object; }; @@ -76810,9 +79198,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - PeerInfo.encode = function encode(message, writer) { + PeerInfo.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.googleFrontendId != null && Object.hasOwnProperty.call(message, "googleFrontendId")) writer.uint32(/* id 1, wireType 0 =*/8).int64(message.googleFrontendId); if (message.applicationFrontendId != null && Object.hasOwnProperty.call(message, "applicationFrontendId")) @@ -76836,7 +79228,7 @@ * @returns {$protobuf.Writer} Writer */ PeerInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -76922,19 +79314,19 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.googleFrontendId != null && message.hasOwnProperty("googleFrontendId")) + if (message.googleFrontendId != null && Object.hasOwnProperty.call(message, "googleFrontendId")) if (!$util.isInteger(message.googleFrontendId) && !(message.googleFrontendId && $util.isInteger(message.googleFrontendId.low) && $util.isInteger(message.googleFrontendId.high))) return "googleFrontendId: integer|Long expected"; - if (message.applicationFrontendId != null && message.hasOwnProperty("applicationFrontendId")) + if (message.applicationFrontendId != null && Object.hasOwnProperty.call(message, "applicationFrontendId")) if (!$util.isInteger(message.applicationFrontendId) && !(message.applicationFrontendId && $util.isInteger(message.applicationFrontendId.low) && $util.isInteger(message.applicationFrontendId.high))) return "applicationFrontendId: integer|Long expected"; - if (message.applicationFrontendZone != null && message.hasOwnProperty("applicationFrontendZone")) + if (message.applicationFrontendZone != null && Object.hasOwnProperty.call(message, "applicationFrontendZone")) if (!$util.isString(message.applicationFrontendZone)) return "applicationFrontendZone: string expected"; - if (message.applicationFrontendSubzone != null && message.hasOwnProperty("applicationFrontendSubzone")) + if (message.applicationFrontendSubzone != null && Object.hasOwnProperty.call(message, "applicationFrontendSubzone")) if (!$util.isString(message.applicationFrontendSubzone)) return "applicationFrontendSubzone: string expected"; - if (message.transportType != null && message.hasOwnProperty("transportType")) + if (message.transportType != null && Object.hasOwnProperty.call(message, "transportType")) switch (message.transportType) { default: return "transportType: enum value expected"; @@ -76962,6 +79354,8 @@ PeerInfo.fromObject = function fromObject(object, long) { if (object instanceof $root.google.bigtable.v2.PeerInfo) return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.v2.PeerInfo: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -76969,7 +79363,7 @@ var message = new $root.google.bigtable.v2.PeerInfo(); if (object.googleFrontendId != null) if ($util.Long) - (message.googleFrontendId = $util.Long.fromValue(object.googleFrontendId)).unsigned = false; + message.googleFrontendId = $util.Long.fromValue(object.googleFrontendId, false); else if (typeof object.googleFrontendId === "string") message.googleFrontendId = parseInt(object.googleFrontendId, 10); else if (typeof object.googleFrontendId === "number") @@ -76978,7 +79372,7 @@ message.googleFrontendId = new $util.LongBits(object.googleFrontendId.low >>> 0, object.googleFrontendId.high >>> 0).toNumber(); if (object.applicationFrontendId != null) if ($util.Long) - (message.applicationFrontendId = $util.Long.fromValue(object.applicationFrontendId)).unsigned = false; + message.applicationFrontendId = $util.Long.fromValue(object.applicationFrontendId, false); else if (typeof object.applicationFrontendId === "string") message.applicationFrontendId = parseInt(object.applicationFrontendId, 10); else if (typeof object.applicationFrontendId === "number") @@ -77041,40 +79435,48 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - PeerInfo.toObject = function toObject(message, options) { + PeerInfo.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) { if ($util.Long) { var long = new $util.Long(0, 0, false); - object.googleFrontendId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.googleFrontendId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : typeof BigInt !== "undefined" && options.longs === BigInt ? long.toBigInt() : long; } else - object.googleFrontendId = options.longs === String ? "0" : 0; + object.googleFrontendId = options.longs === String ? "0" : typeof BigInt !== "undefined" && options.longs === BigInt ? BigInt("0") : 0; if ($util.Long) { var long = new $util.Long(0, 0, false); - object.applicationFrontendId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.applicationFrontendId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : typeof BigInt !== "undefined" && options.longs === BigInt ? long.toBigInt() : long; } else - object.applicationFrontendId = options.longs === String ? "0" : 0; + object.applicationFrontendId = options.longs === String ? "0" : typeof BigInt !== "undefined" && options.longs === BigInt ? BigInt("0") : 0; object.applicationFrontendZone = ""; object.applicationFrontendSubzone = ""; object.transportType = options.enums === String ? "TRANSPORT_TYPE_UNKNOWN" : 0; } - if (message.googleFrontendId != null && message.hasOwnProperty("googleFrontendId")) - if (typeof message.googleFrontendId === "number") + if (message.googleFrontendId != null && Object.hasOwnProperty.call(message, "googleFrontendId")) + if (typeof BigInt !== "undefined" && options.longs === BigInt) + object.googleFrontendId = typeof message.googleFrontendId === "number" ? BigInt(message.googleFrontendId) : $util.Long.fromBits(message.googleFrontendId.low >>> 0, message.googleFrontendId.high >>> 0, false).toBigInt(); + else if (typeof message.googleFrontendId === "number") object.googleFrontendId = options.longs === String ? String(message.googleFrontendId) : message.googleFrontendId; else object.googleFrontendId = options.longs === String ? $util.Long.prototype.toString.call(message.googleFrontendId) : options.longs === Number ? new $util.LongBits(message.googleFrontendId.low >>> 0, message.googleFrontendId.high >>> 0).toNumber() : message.googleFrontendId; - if (message.applicationFrontendId != null && message.hasOwnProperty("applicationFrontendId")) - if (typeof message.applicationFrontendId === "number") + if (message.applicationFrontendId != null && Object.hasOwnProperty.call(message, "applicationFrontendId")) + if (typeof BigInt !== "undefined" && options.longs === BigInt) + object.applicationFrontendId = typeof message.applicationFrontendId === "number" ? BigInt(message.applicationFrontendId) : $util.Long.fromBits(message.applicationFrontendId.low >>> 0, message.applicationFrontendId.high >>> 0, false).toBigInt(); + else if (typeof message.applicationFrontendId === "number") object.applicationFrontendId = options.longs === String ? String(message.applicationFrontendId) : message.applicationFrontendId; else object.applicationFrontendId = options.longs === String ? $util.Long.prototype.toString.call(message.applicationFrontendId) : options.longs === Number ? new $util.LongBits(message.applicationFrontendId.low >>> 0, message.applicationFrontendId.high >>> 0).toNumber() : message.applicationFrontendId; - if (message.applicationFrontendZone != null && message.hasOwnProperty("applicationFrontendZone")) + if (message.applicationFrontendZone != null && Object.hasOwnProperty.call(message, "applicationFrontendZone")) object.applicationFrontendZone = message.applicationFrontendZone; - if (message.applicationFrontendSubzone != null && message.hasOwnProperty("applicationFrontendSubzone")) + if (message.applicationFrontendSubzone != null && Object.hasOwnProperty.call(message, "applicationFrontendSubzone")) object.applicationFrontendSubzone = message.applicationFrontendSubzone; - if (message.transportType != null && message.hasOwnProperty("transportType")) + if (message.transportType != null && Object.hasOwnProperty.call(message, "transportType")) object.transportType = options.enums === String ? $root.google.bigtable.v2.PeerInfo.TransportType[message.transportType] === undefined ? message.transportType : $root.google.bigtable.v2.PeerInfo.TransportType[message.transportType] : message.transportType; return object; }; @@ -77226,9 +79628,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ResponseParams.encode = function encode(message, writer) { + ResponseParams.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.zoneId != null && Object.hasOwnProperty.call(message, "zoneId")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.zoneId); if (message.clusterId != null && Object.hasOwnProperty.call(message, "clusterId")) @@ -77248,7 +79654,7 @@ * @returns {$protobuf.Writer} Writer */ ResponseParams.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -77327,17 +79733,17 @@ if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; var properties = {}; - if (message.zoneId != null && message.hasOwnProperty("zoneId")) { + if (message.zoneId != null && Object.hasOwnProperty.call(message, "zoneId")) { properties._zoneId = 1; if (!$util.isString(message.zoneId)) return "zoneId: string expected"; } - if (message.clusterId != null && message.hasOwnProperty("clusterId")) { + if (message.clusterId != null && Object.hasOwnProperty.call(message, "clusterId")) { properties._clusterId = 1; if (!$util.isString(message.clusterId)) return "clusterId: string expected"; } - if (message.afeId != null && message.hasOwnProperty("afeId")) { + if (message.afeId != null && Object.hasOwnProperty.call(message, "afeId")) { properties._afeId = 1; if (!$util.isInteger(message.afeId) && !(message.afeId && $util.isInteger(message.afeId.low) && $util.isInteger(message.afeId.high))) return "afeId: integer|Long expected"; @@ -77356,6 +79762,8 @@ ResponseParams.fromObject = function fromObject(object, long) { if (object instanceof $root.google.bigtable.v2.ResponseParams) return object; + if (!$util.isObject(object)) + throw TypeError(".google.bigtable.v2.ResponseParams: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -77367,7 +79775,7 @@ message.clusterId = String(object.clusterId); if (object.afeId != null) if ($util.Long) - (message.afeId = $util.Long.fromValue(object.afeId)).unsigned = false; + message.afeId = $util.Long.fromValue(object.afeId, false); else if (typeof object.afeId === "string") message.afeId = parseInt(object.afeId, 10); else if (typeof object.afeId === "number") @@ -77386,22 +79794,28 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ResponseParams.toObject = function toObject(message, options) { + ResponseParams.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; - if (message.zoneId != null && message.hasOwnProperty("zoneId")) { + if (message.zoneId != null && Object.hasOwnProperty.call(message, "zoneId")) { object.zoneId = message.zoneId; if (options.oneofs) object._zoneId = "zoneId"; } - if (message.clusterId != null && message.hasOwnProperty("clusterId")) { + if (message.clusterId != null && Object.hasOwnProperty.call(message, "clusterId")) { object.clusterId = message.clusterId; if (options.oneofs) object._clusterId = "clusterId"; } - if (message.afeId != null && message.hasOwnProperty("afeId")) { - if (typeof message.afeId === "number") + if (message.afeId != null && Object.hasOwnProperty.call(message, "afeId")) { + if (typeof BigInt !== "undefined" && options.longs === BigInt) + object.afeId = typeof message.afeId === "number" ? BigInt(message.afeId) : $util.Long.fromBits(message.afeId.low >>> 0, message.afeId.high >>> 0, false).toBigInt(); + else if (typeof message.afeId === "number") object.afeId = options.longs === String ? String(message.afeId) : message.afeId; else object.afeId = options.longs === String ? $util.Long.prototype.toString.call(message.afeId) : options.longs === Number ? new $util.LongBits(message.afeId.low >>> 0, message.afeId.high >>> 0).toNumber() : message.afeId; @@ -77518,12 +79932,16 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Http.encode = function encode(message, writer) { + Http.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.rules != null && message.rules.length) for (var i = 0; i < message.rules.length; ++i) - $root.google.api.HttpRule.encode(message.rules[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + $root.google.api.HttpRule.encode(message.rules[i], writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); if (message.fullyDecodeReservedExpansion != null && Object.hasOwnProperty.call(message, "fullyDecodeReservedExpansion")) writer.uint32(/* id 2, wireType 0 =*/16).bool(message.fullyDecodeReservedExpansion); return writer; @@ -77539,7 +79957,7 @@ * @returns {$protobuf.Writer} Writer */ Http.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -77615,7 +80033,7 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.rules != null && message.hasOwnProperty("rules")) { + if (message.rules != null && Object.hasOwnProperty.call(message, "rules")) { if (!Array.isArray(message.rules)) return "rules: array expected"; for (var i = 0; i < message.rules.length; ++i) { @@ -77624,7 +80042,7 @@ return "rules." + error; } } - if (message.fullyDecodeReservedExpansion != null && message.hasOwnProperty("fullyDecodeReservedExpansion")) + if (message.fullyDecodeReservedExpansion != null && Object.hasOwnProperty.call(message, "fullyDecodeReservedExpansion")) if (typeof message.fullyDecodeReservedExpansion !== "boolean") return "fullyDecodeReservedExpansion: boolean expected"; return null; @@ -77641,6 +80059,8 @@ Http.fromObject = function fromObject(object, long) { if (object instanceof $root.google.api.Http) return object; + if (!$util.isObject(object)) + throw TypeError(".google.api.Http: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -77651,7 +80071,7 @@ throw TypeError(".google.api.Http.rules: array expected"); message.rules = []; for (var i = 0; i < object.rules.length; ++i) { - if (typeof object.rules[i] !== "object") + if (!$util.isObject(object.rules[i])) throw TypeError(".google.api.Http.rules: object expected"); message.rules[i] = $root.google.api.HttpRule.fromObject(object.rules[i], long + 1); } @@ -77670,9 +80090,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Http.toObject = function toObject(message, options) { + Http.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.rules = []; @@ -77681,9 +80105,9 @@ if (message.rules && message.rules.length) { object.rules = []; for (var j = 0; j < message.rules.length; ++j) - object.rules[j] = $root.google.api.HttpRule.toObject(message.rules[j], options); + object.rules[j] = $root.google.api.HttpRule.toObject(message.rules[j], options, q + 1); } - if (message.fullyDecodeReservedExpansion != null && message.hasOwnProperty("fullyDecodeReservedExpansion")) + if (message.fullyDecodeReservedExpansion != null && Object.hasOwnProperty.call(message, "fullyDecodeReservedExpansion")) object.fullyDecodeReservedExpansion = message.fullyDecodeReservedExpansion; return object; }; @@ -77866,9 +80290,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - HttpRule.encode = function encode(message, writer) { + HttpRule.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.selector != null && Object.hasOwnProperty.call(message, "selector")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.selector); if (message.get != null && Object.hasOwnProperty.call(message, "get")) @@ -77884,10 +80312,10 @@ if (message.body != null && Object.hasOwnProperty.call(message, "body")) writer.uint32(/* id 7, wireType 2 =*/58).string(message.body); if (message.custom != null && Object.hasOwnProperty.call(message, "custom")) - $root.google.api.CustomHttpPattern.encode(message.custom, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + $root.google.api.CustomHttpPattern.encode(message.custom, writer.uint32(/* id 8, wireType 2 =*/66).fork(), q + 1).ldelim(); if (message.additionalBindings != null && message.additionalBindings.length) for (var i = 0; i < message.additionalBindings.length; ++i) - $root.google.api.HttpRule.encode(message.additionalBindings[i], writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + $root.google.api.HttpRule.encode(message.additionalBindings[i], writer.uint32(/* id 11, wireType 2 =*/90).fork(), q + 1).ldelim(); if (message.responseBody != null && Object.hasOwnProperty.call(message, "responseBody")) writer.uint32(/* id 12, wireType 2 =*/98).string(message.responseBody); return writer; @@ -77903,7 +80331,7 @@ * @returns {$protobuf.Writer} Writer */ HttpRule.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -78012,43 +80440,43 @@ if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; var properties = {}; - if (message.selector != null && message.hasOwnProperty("selector")) + if (message.selector != null && Object.hasOwnProperty.call(message, "selector")) if (!$util.isString(message.selector)) return "selector: string expected"; - if (message.get != null && message.hasOwnProperty("get")) { + if (message.get != null && Object.hasOwnProperty.call(message, "get")) { properties.pattern = 1; if (!$util.isString(message.get)) return "get: string expected"; } - if (message.put != null && message.hasOwnProperty("put")) { + if (message.put != null && Object.hasOwnProperty.call(message, "put")) { if (properties.pattern === 1) return "pattern: multiple values"; properties.pattern = 1; if (!$util.isString(message.put)) return "put: string expected"; } - if (message.post != null && message.hasOwnProperty("post")) { + if (message.post != null && Object.hasOwnProperty.call(message, "post")) { if (properties.pattern === 1) return "pattern: multiple values"; properties.pattern = 1; if (!$util.isString(message.post)) return "post: string expected"; } - if (message["delete"] != null && message.hasOwnProperty("delete")) { + if (message["delete"] != null && Object.hasOwnProperty.call(message, "delete")) { if (properties.pattern === 1) return "pattern: multiple values"; properties.pattern = 1; if (!$util.isString(message["delete"])) return "delete: string expected"; } - if (message.patch != null && message.hasOwnProperty("patch")) { + if (message.patch != null && Object.hasOwnProperty.call(message, "patch")) { if (properties.pattern === 1) return "pattern: multiple values"; properties.pattern = 1; if (!$util.isString(message.patch)) return "patch: string expected"; } - if (message.custom != null && message.hasOwnProperty("custom")) { + if (message.custom != null && Object.hasOwnProperty.call(message, "custom")) { if (properties.pattern === 1) return "pattern: multiple values"; properties.pattern = 1; @@ -78058,13 +80486,13 @@ return "custom." + error; } } - if (message.body != null && message.hasOwnProperty("body")) + if (message.body != null && Object.hasOwnProperty.call(message, "body")) if (!$util.isString(message.body)) return "body: string expected"; - if (message.responseBody != null && message.hasOwnProperty("responseBody")) + if (message.responseBody != null && Object.hasOwnProperty.call(message, "responseBody")) if (!$util.isString(message.responseBody)) return "responseBody: string expected"; - if (message.additionalBindings != null && message.hasOwnProperty("additionalBindings")) { + if (message.additionalBindings != null && Object.hasOwnProperty.call(message, "additionalBindings")) { if (!Array.isArray(message.additionalBindings)) return "additionalBindings: array expected"; for (var i = 0; i < message.additionalBindings.length; ++i) { @@ -78087,6 +80515,8 @@ HttpRule.fromObject = function fromObject(object, long) { if (object instanceof $root.google.api.HttpRule) return object; + if (!$util.isObject(object)) + throw TypeError(".google.api.HttpRule: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -78105,7 +80535,7 @@ if (object.patch != null) message.patch = String(object.patch); if (object.custom != null) { - if (typeof object.custom !== "object") + if (!$util.isObject(object.custom)) throw TypeError(".google.api.HttpRule.custom: object expected"); message.custom = $root.google.api.CustomHttpPattern.fromObject(object.custom, long + 1); } @@ -78118,7 +80548,7 @@ throw TypeError(".google.api.HttpRule.additionalBindings: array expected"); message.additionalBindings = []; for (var i = 0; i < object.additionalBindings.length; ++i) { - if (typeof object.additionalBindings[i] !== "object") + if (!$util.isObject(object.additionalBindings[i])) throw TypeError(".google.api.HttpRule.additionalBindings: object expected"); message.additionalBindings[i] = $root.google.api.HttpRule.fromObject(object.additionalBindings[i], long + 1); } @@ -78135,9 +80565,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - HttpRule.toObject = function toObject(message, options) { + HttpRule.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.additionalBindings = []; @@ -78146,46 +80580,46 @@ object.body = ""; object.responseBody = ""; } - if (message.selector != null && message.hasOwnProperty("selector")) + if (message.selector != null && Object.hasOwnProperty.call(message, "selector")) object.selector = message.selector; - if (message.get != null && message.hasOwnProperty("get")) { + if (message.get != null && Object.hasOwnProperty.call(message, "get")) { object.get = message.get; if (options.oneofs) object.pattern = "get"; } - if (message.put != null && message.hasOwnProperty("put")) { + if (message.put != null && Object.hasOwnProperty.call(message, "put")) { object.put = message.put; if (options.oneofs) object.pattern = "put"; } - if (message.post != null && message.hasOwnProperty("post")) { + if (message.post != null && Object.hasOwnProperty.call(message, "post")) { object.post = message.post; if (options.oneofs) object.pattern = "post"; } - if (message["delete"] != null && message.hasOwnProperty("delete")) { + if (message["delete"] != null && Object.hasOwnProperty.call(message, "delete")) { object["delete"] = message["delete"]; if (options.oneofs) object.pattern = "delete"; } - if (message.patch != null && message.hasOwnProperty("patch")) { + if (message.patch != null && Object.hasOwnProperty.call(message, "patch")) { object.patch = message.patch; if (options.oneofs) object.pattern = "patch"; } - if (message.body != null && message.hasOwnProperty("body")) + if (message.body != null && Object.hasOwnProperty.call(message, "body")) object.body = message.body; - if (message.custom != null && message.hasOwnProperty("custom")) { - object.custom = $root.google.api.CustomHttpPattern.toObject(message.custom, options); + if (message.custom != null && Object.hasOwnProperty.call(message, "custom")) { + object.custom = $root.google.api.CustomHttpPattern.toObject(message.custom, options, q + 1); if (options.oneofs) object.pattern = "custom"; } if (message.additionalBindings && message.additionalBindings.length) { object.additionalBindings = []; for (var j = 0; j < message.additionalBindings.length; ++j) - object.additionalBindings[j] = $root.google.api.HttpRule.toObject(message.additionalBindings[j], options); + object.additionalBindings[j] = $root.google.api.HttpRule.toObject(message.additionalBindings[j], options, q + 1); } - if (message.responseBody != null && message.hasOwnProperty("responseBody")) + if (message.responseBody != null && Object.hasOwnProperty.call(message, "responseBody")) object.responseBody = message.responseBody; return object; }; @@ -78281,9 +80715,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CustomHttpPattern.encode = function encode(message, writer) { + CustomHttpPattern.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.kind != null && Object.hasOwnProperty.call(message, "kind")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.kind); if (message.path != null && Object.hasOwnProperty.call(message, "path")) @@ -78301,7 +80739,7 @@ * @returns {$protobuf.Writer} Writer */ CustomHttpPattern.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -78375,10 +80813,10 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.kind != null && message.hasOwnProperty("kind")) + if (message.kind != null && Object.hasOwnProperty.call(message, "kind")) if (!$util.isString(message.kind)) return "kind: string expected"; - if (message.path != null && message.hasOwnProperty("path")) + if (message.path != null && Object.hasOwnProperty.call(message, "path")) if (!$util.isString(message.path)) return "path: string expected"; return null; @@ -78395,6 +80833,8 @@ CustomHttpPattern.fromObject = function fromObject(object, long) { if (object instanceof $root.google.api.CustomHttpPattern) return object; + if (!$util.isObject(object)) + throw TypeError(".google.api.CustomHttpPattern: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -78416,17 +80856,21 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CustomHttpPattern.toObject = function toObject(message, options) { + CustomHttpPattern.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.kind = ""; object.path = ""; } - if (message.kind != null && message.hasOwnProperty("kind")) + if (message.kind != null && Object.hasOwnProperty.call(message, "kind")) object.kind = message.kind; - if (message.path != null && message.hasOwnProperty("path")) + if (message.path != null && Object.hasOwnProperty.call(message, "path")) object.path = message.path; return object; }; @@ -78532,9 +80976,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CommonLanguageSettings.encode = function encode(message, writer) { + CommonLanguageSettings.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.referenceDocsUri != null && Object.hasOwnProperty.call(message, "referenceDocsUri")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.referenceDocsUri); if (message.destinations != null && message.destinations.length) { @@ -78544,7 +80992,7 @@ writer.ldelim(); } if (message.selectiveGapicGeneration != null && Object.hasOwnProperty.call(message, "selectiveGapicGeneration")) - $root.google.api.SelectiveGapicGeneration.encode(message.selectiveGapicGeneration, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + $root.google.api.SelectiveGapicGeneration.encode(message.selectiveGapicGeneration, writer.uint32(/* id 3, wireType 2 =*/26).fork(), q + 1).ldelim(); return writer; }; @@ -78558,7 +81006,7 @@ * @returns {$protobuf.Writer} Writer */ CommonLanguageSettings.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -78643,10 +81091,10 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.referenceDocsUri != null && message.hasOwnProperty("referenceDocsUri")) + if (message.referenceDocsUri != null && Object.hasOwnProperty.call(message, "referenceDocsUri")) if (!$util.isString(message.referenceDocsUri)) return "referenceDocsUri: string expected"; - if (message.destinations != null && message.hasOwnProperty("destinations")) { + if (message.destinations != null && Object.hasOwnProperty.call(message, "destinations")) { if (!Array.isArray(message.destinations)) return "destinations: array expected"; for (var i = 0; i < message.destinations.length; ++i) @@ -78659,7 +81107,7 @@ break; } } - if (message.selectiveGapicGeneration != null && message.hasOwnProperty("selectiveGapicGeneration")) { + if (message.selectiveGapicGeneration != null && Object.hasOwnProperty.call(message, "selectiveGapicGeneration")) { var error = $root.google.api.SelectiveGapicGeneration.verify(message.selectiveGapicGeneration, long + 1); if (error) return "selectiveGapicGeneration." + error; @@ -78678,6 +81126,8 @@ CommonLanguageSettings.fromObject = function fromObject(object, long) { if (object instanceof $root.google.api.CommonLanguageSettings) return object; + if (!$util.isObject(object)) + throw TypeError(".google.api.CommonLanguageSettings: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -78711,7 +81161,7 @@ } } if (object.selectiveGapicGeneration != null) { - if (typeof object.selectiveGapicGeneration !== "object") + if (!$util.isObject(object.selectiveGapicGeneration)) throw TypeError(".google.api.CommonLanguageSettings.selectiveGapicGeneration: object expected"); message.selectiveGapicGeneration = $root.google.api.SelectiveGapicGeneration.fromObject(object.selectiveGapicGeneration, long + 1); } @@ -78727,9 +81177,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CommonLanguageSettings.toObject = function toObject(message, options) { + CommonLanguageSettings.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.destinations = []; @@ -78737,15 +81191,15 @@ object.referenceDocsUri = ""; object.selectiveGapicGeneration = null; } - if (message.referenceDocsUri != null && message.hasOwnProperty("referenceDocsUri")) + if (message.referenceDocsUri != null && Object.hasOwnProperty.call(message, "referenceDocsUri")) object.referenceDocsUri = message.referenceDocsUri; if (message.destinations && message.destinations.length) { object.destinations = []; for (var j = 0; j < message.destinations.length; ++j) object.destinations[j] = options.enums === String ? $root.google.api.ClientLibraryDestination[message.destinations[j]] === undefined ? message.destinations[j] : $root.google.api.ClientLibraryDestination[message.destinations[j]] : message.destinations[j]; } - if (message.selectiveGapicGeneration != null && message.hasOwnProperty("selectiveGapicGeneration")) - object.selectiveGapicGeneration = $root.google.api.SelectiveGapicGeneration.toObject(message.selectiveGapicGeneration, options); + if (message.selectiveGapicGeneration != null && Object.hasOwnProperty.call(message, "selectiveGapicGeneration")) + object.selectiveGapicGeneration = $root.google.api.SelectiveGapicGeneration.toObject(message.selectiveGapicGeneration, options, q + 1); return object; }; @@ -78921,9 +81375,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ClientLibrarySettings.encode = function encode(message, writer) { + ClientLibrarySettings.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.version != null && Object.hasOwnProperty.call(message, "version")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.version); if (message.launchStage != null && Object.hasOwnProperty.call(message, "launchStage")) @@ -78931,21 +81389,21 @@ if (message.restNumericEnums != null && Object.hasOwnProperty.call(message, "restNumericEnums")) writer.uint32(/* id 3, wireType 0 =*/24).bool(message.restNumericEnums); if (message.javaSettings != null && Object.hasOwnProperty.call(message, "javaSettings")) - $root.google.api.JavaSettings.encode(message.javaSettings, writer.uint32(/* id 21, wireType 2 =*/170).fork()).ldelim(); + $root.google.api.JavaSettings.encode(message.javaSettings, writer.uint32(/* id 21, wireType 2 =*/170).fork(), q + 1).ldelim(); if (message.cppSettings != null && Object.hasOwnProperty.call(message, "cppSettings")) - $root.google.api.CppSettings.encode(message.cppSettings, writer.uint32(/* id 22, wireType 2 =*/178).fork()).ldelim(); + $root.google.api.CppSettings.encode(message.cppSettings, writer.uint32(/* id 22, wireType 2 =*/178).fork(), q + 1).ldelim(); if (message.phpSettings != null && Object.hasOwnProperty.call(message, "phpSettings")) - $root.google.api.PhpSettings.encode(message.phpSettings, writer.uint32(/* id 23, wireType 2 =*/186).fork()).ldelim(); + $root.google.api.PhpSettings.encode(message.phpSettings, writer.uint32(/* id 23, wireType 2 =*/186).fork(), q + 1).ldelim(); if (message.pythonSettings != null && Object.hasOwnProperty.call(message, "pythonSettings")) - $root.google.api.PythonSettings.encode(message.pythonSettings, writer.uint32(/* id 24, wireType 2 =*/194).fork()).ldelim(); + $root.google.api.PythonSettings.encode(message.pythonSettings, writer.uint32(/* id 24, wireType 2 =*/194).fork(), q + 1).ldelim(); if (message.nodeSettings != null && Object.hasOwnProperty.call(message, "nodeSettings")) - $root.google.api.NodeSettings.encode(message.nodeSettings, writer.uint32(/* id 25, wireType 2 =*/202).fork()).ldelim(); + $root.google.api.NodeSettings.encode(message.nodeSettings, writer.uint32(/* id 25, wireType 2 =*/202).fork(), q + 1).ldelim(); if (message.dotnetSettings != null && Object.hasOwnProperty.call(message, "dotnetSettings")) - $root.google.api.DotnetSettings.encode(message.dotnetSettings, writer.uint32(/* id 26, wireType 2 =*/210).fork()).ldelim(); + $root.google.api.DotnetSettings.encode(message.dotnetSettings, writer.uint32(/* id 26, wireType 2 =*/210).fork(), q + 1).ldelim(); if (message.rubySettings != null && Object.hasOwnProperty.call(message, "rubySettings")) - $root.google.api.RubySettings.encode(message.rubySettings, writer.uint32(/* id 27, wireType 2 =*/218).fork()).ldelim(); + $root.google.api.RubySettings.encode(message.rubySettings, writer.uint32(/* id 27, wireType 2 =*/218).fork(), q + 1).ldelim(); if (message.goSettings != null && Object.hasOwnProperty.call(message, "goSettings")) - $root.google.api.GoSettings.encode(message.goSettings, writer.uint32(/* id 28, wireType 2 =*/226).fork()).ldelim(); + $root.google.api.GoSettings.encode(message.goSettings, writer.uint32(/* id 28, wireType 2 =*/226).fork(), q + 1).ldelim(); return writer; }; @@ -78959,7 +81417,7 @@ * @returns {$protobuf.Writer} Writer */ ClientLibrarySettings.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -79069,10 +81527,10 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.version != null && message.hasOwnProperty("version")) + if (message.version != null && Object.hasOwnProperty.call(message, "version")) if (!$util.isString(message.version)) return "version: string expected"; - if (message.launchStage != null && message.hasOwnProperty("launchStage")) + if (message.launchStage != null && Object.hasOwnProperty.call(message, "launchStage")) switch (message.launchStage) { default: return "launchStage: enum value expected"; @@ -79086,45 +81544,45 @@ case 5: break; } - if (message.restNumericEnums != null && message.hasOwnProperty("restNumericEnums")) + if (message.restNumericEnums != null && Object.hasOwnProperty.call(message, "restNumericEnums")) if (typeof message.restNumericEnums !== "boolean") return "restNumericEnums: boolean expected"; - if (message.javaSettings != null && message.hasOwnProperty("javaSettings")) { + if (message.javaSettings != null && Object.hasOwnProperty.call(message, "javaSettings")) { var error = $root.google.api.JavaSettings.verify(message.javaSettings, long + 1); if (error) return "javaSettings." + error; } - if (message.cppSettings != null && message.hasOwnProperty("cppSettings")) { + if (message.cppSettings != null && Object.hasOwnProperty.call(message, "cppSettings")) { var error = $root.google.api.CppSettings.verify(message.cppSettings, long + 1); if (error) return "cppSettings." + error; } - if (message.phpSettings != null && message.hasOwnProperty("phpSettings")) { + if (message.phpSettings != null && Object.hasOwnProperty.call(message, "phpSettings")) { var error = $root.google.api.PhpSettings.verify(message.phpSettings, long + 1); if (error) return "phpSettings." + error; } - if (message.pythonSettings != null && message.hasOwnProperty("pythonSettings")) { + if (message.pythonSettings != null && Object.hasOwnProperty.call(message, "pythonSettings")) { var error = $root.google.api.PythonSettings.verify(message.pythonSettings, long + 1); if (error) return "pythonSettings." + error; } - if (message.nodeSettings != null && message.hasOwnProperty("nodeSettings")) { + if (message.nodeSettings != null && Object.hasOwnProperty.call(message, "nodeSettings")) { var error = $root.google.api.NodeSettings.verify(message.nodeSettings, long + 1); if (error) return "nodeSettings." + error; } - if (message.dotnetSettings != null && message.hasOwnProperty("dotnetSettings")) { + if (message.dotnetSettings != null && Object.hasOwnProperty.call(message, "dotnetSettings")) { var error = $root.google.api.DotnetSettings.verify(message.dotnetSettings, long + 1); if (error) return "dotnetSettings." + error; } - if (message.rubySettings != null && message.hasOwnProperty("rubySettings")) { + if (message.rubySettings != null && Object.hasOwnProperty.call(message, "rubySettings")) { var error = $root.google.api.RubySettings.verify(message.rubySettings, long + 1); if (error) return "rubySettings." + error; } - if (message.goSettings != null && message.hasOwnProperty("goSettings")) { + if (message.goSettings != null && Object.hasOwnProperty.call(message, "goSettings")) { var error = $root.google.api.GoSettings.verify(message.goSettings, long + 1); if (error) return "goSettings." + error; @@ -79143,6 +81601,8 @@ ClientLibrarySettings.fromObject = function fromObject(object, long) { if (object instanceof $root.google.api.ClientLibrarySettings) return object; + if (!$util.isObject(object)) + throw TypeError(".google.api.ClientLibrarySettings: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -79193,42 +81653,42 @@ if (object.restNumericEnums != null) message.restNumericEnums = Boolean(object.restNumericEnums); if (object.javaSettings != null) { - if (typeof object.javaSettings !== "object") + if (!$util.isObject(object.javaSettings)) throw TypeError(".google.api.ClientLibrarySettings.javaSettings: object expected"); message.javaSettings = $root.google.api.JavaSettings.fromObject(object.javaSettings, long + 1); } if (object.cppSettings != null) { - if (typeof object.cppSettings !== "object") + if (!$util.isObject(object.cppSettings)) throw TypeError(".google.api.ClientLibrarySettings.cppSettings: object expected"); message.cppSettings = $root.google.api.CppSettings.fromObject(object.cppSettings, long + 1); } if (object.phpSettings != null) { - if (typeof object.phpSettings !== "object") + if (!$util.isObject(object.phpSettings)) throw TypeError(".google.api.ClientLibrarySettings.phpSettings: object expected"); message.phpSettings = $root.google.api.PhpSettings.fromObject(object.phpSettings, long + 1); } if (object.pythonSettings != null) { - if (typeof object.pythonSettings !== "object") + if (!$util.isObject(object.pythonSettings)) throw TypeError(".google.api.ClientLibrarySettings.pythonSettings: object expected"); message.pythonSettings = $root.google.api.PythonSettings.fromObject(object.pythonSettings, long + 1); } if (object.nodeSettings != null) { - if (typeof object.nodeSettings !== "object") + if (!$util.isObject(object.nodeSettings)) throw TypeError(".google.api.ClientLibrarySettings.nodeSettings: object expected"); message.nodeSettings = $root.google.api.NodeSettings.fromObject(object.nodeSettings, long + 1); } if (object.dotnetSettings != null) { - if (typeof object.dotnetSettings !== "object") + if (!$util.isObject(object.dotnetSettings)) throw TypeError(".google.api.ClientLibrarySettings.dotnetSettings: object expected"); message.dotnetSettings = $root.google.api.DotnetSettings.fromObject(object.dotnetSettings, long + 1); } if (object.rubySettings != null) { - if (typeof object.rubySettings !== "object") + if (!$util.isObject(object.rubySettings)) throw TypeError(".google.api.ClientLibrarySettings.rubySettings: object expected"); message.rubySettings = $root.google.api.RubySettings.fromObject(object.rubySettings, long + 1); } if (object.goSettings != null) { - if (typeof object.goSettings !== "object") + if (!$util.isObject(object.goSettings)) throw TypeError(".google.api.ClientLibrarySettings.goSettings: object expected"); message.goSettings = $root.google.api.GoSettings.fromObject(object.goSettings, long + 1); } @@ -79244,9 +81704,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ClientLibrarySettings.toObject = function toObject(message, options) { + ClientLibrarySettings.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.version = ""; @@ -79261,28 +81725,28 @@ object.rubySettings = null; object.goSettings = null; } - if (message.version != null && message.hasOwnProperty("version")) + if (message.version != null && Object.hasOwnProperty.call(message, "version")) object.version = message.version; - if (message.launchStage != null && message.hasOwnProperty("launchStage")) + if (message.launchStage != null && Object.hasOwnProperty.call(message, "launchStage")) object.launchStage = options.enums === String ? $root.google.api.LaunchStage[message.launchStage] === undefined ? message.launchStage : $root.google.api.LaunchStage[message.launchStage] : message.launchStage; - if (message.restNumericEnums != null && message.hasOwnProperty("restNumericEnums")) + if (message.restNumericEnums != null && Object.hasOwnProperty.call(message, "restNumericEnums")) object.restNumericEnums = message.restNumericEnums; - if (message.javaSettings != null && message.hasOwnProperty("javaSettings")) - object.javaSettings = $root.google.api.JavaSettings.toObject(message.javaSettings, options); - if (message.cppSettings != null && message.hasOwnProperty("cppSettings")) - object.cppSettings = $root.google.api.CppSettings.toObject(message.cppSettings, options); - if (message.phpSettings != null && message.hasOwnProperty("phpSettings")) - object.phpSettings = $root.google.api.PhpSettings.toObject(message.phpSettings, options); - if (message.pythonSettings != null && message.hasOwnProperty("pythonSettings")) - object.pythonSettings = $root.google.api.PythonSettings.toObject(message.pythonSettings, options); - if (message.nodeSettings != null && message.hasOwnProperty("nodeSettings")) - object.nodeSettings = $root.google.api.NodeSettings.toObject(message.nodeSettings, options); - if (message.dotnetSettings != null && message.hasOwnProperty("dotnetSettings")) - object.dotnetSettings = $root.google.api.DotnetSettings.toObject(message.dotnetSettings, options); - if (message.rubySettings != null && message.hasOwnProperty("rubySettings")) - object.rubySettings = $root.google.api.RubySettings.toObject(message.rubySettings, options); - if (message.goSettings != null && message.hasOwnProperty("goSettings")) - object.goSettings = $root.google.api.GoSettings.toObject(message.goSettings, options); + if (message.javaSettings != null && Object.hasOwnProperty.call(message, "javaSettings")) + object.javaSettings = $root.google.api.JavaSettings.toObject(message.javaSettings, options, q + 1); + if (message.cppSettings != null && Object.hasOwnProperty.call(message, "cppSettings")) + object.cppSettings = $root.google.api.CppSettings.toObject(message.cppSettings, options, q + 1); + if (message.phpSettings != null && Object.hasOwnProperty.call(message, "phpSettings")) + object.phpSettings = $root.google.api.PhpSettings.toObject(message.phpSettings, options, q + 1); + if (message.pythonSettings != null && Object.hasOwnProperty.call(message, "pythonSettings")) + object.pythonSettings = $root.google.api.PythonSettings.toObject(message.pythonSettings, options, q + 1); + if (message.nodeSettings != null && Object.hasOwnProperty.call(message, "nodeSettings")) + object.nodeSettings = $root.google.api.NodeSettings.toObject(message.nodeSettings, options, q + 1); + if (message.dotnetSettings != null && Object.hasOwnProperty.call(message, "dotnetSettings")) + object.dotnetSettings = $root.google.api.DotnetSettings.toObject(message.dotnetSettings, options, q + 1); + if (message.rubySettings != null && Object.hasOwnProperty.call(message, "rubySettings")) + object.rubySettings = $root.google.api.RubySettings.toObject(message.rubySettings, options, q + 1); + if (message.goSettings != null && Object.hasOwnProperty.call(message, "goSettings")) + object.goSettings = $root.google.api.GoSettings.toObject(message.goSettings, options, q + 1); return object; }; @@ -79461,12 +81925,16 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Publishing.encode = function encode(message, writer) { + Publishing.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.methodSettings != null && message.methodSettings.length) for (var i = 0; i < message.methodSettings.length; ++i) - $root.google.api.MethodSettings.encode(message.methodSettings[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + $root.google.api.MethodSettings.encode(message.methodSettings[i], writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); if (message.newIssueUri != null && Object.hasOwnProperty.call(message, "newIssueUri")) writer.uint32(/* id 101, wireType 2 =*/810).string(message.newIssueUri); if (message.documentationUri != null && Object.hasOwnProperty.call(message, "documentationUri")) @@ -79484,7 +81952,7 @@ writer.uint32(/* id 107, wireType 0 =*/856).int32(message.organization); if (message.librarySettings != null && message.librarySettings.length) for (var i = 0; i < message.librarySettings.length; ++i) - $root.google.api.ClientLibrarySettings.encode(message.librarySettings[i], writer.uint32(/* id 109, wireType 2 =*/874).fork()).ldelim(); + $root.google.api.ClientLibrarySettings.encode(message.librarySettings[i], writer.uint32(/* id 109, wireType 2 =*/874).fork(), q + 1).ldelim(); if (message.protoReferenceDocumentationUri != null && Object.hasOwnProperty.call(message, "protoReferenceDocumentationUri")) writer.uint32(/* id 110, wireType 2 =*/882).string(message.protoReferenceDocumentationUri); if (message.restReferenceDocumentationUri != null && Object.hasOwnProperty.call(message, "restReferenceDocumentationUri")) @@ -79502,7 +81970,7 @@ * @returns {$protobuf.Writer} Writer */ Publishing.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -79618,7 +82086,7 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.methodSettings != null && message.hasOwnProperty("methodSettings")) { + if (message.methodSettings != null && Object.hasOwnProperty.call(message, "methodSettings")) { if (!Array.isArray(message.methodSettings)) return "methodSettings: array expected"; for (var i = 0; i < message.methodSettings.length; ++i) { @@ -79627,29 +82095,29 @@ return "methodSettings." + error; } } - if (message.newIssueUri != null && message.hasOwnProperty("newIssueUri")) + if (message.newIssueUri != null && Object.hasOwnProperty.call(message, "newIssueUri")) if (!$util.isString(message.newIssueUri)) return "newIssueUri: string expected"; - if (message.documentationUri != null && message.hasOwnProperty("documentationUri")) + if (message.documentationUri != null && Object.hasOwnProperty.call(message, "documentationUri")) if (!$util.isString(message.documentationUri)) return "documentationUri: string expected"; - if (message.apiShortName != null && message.hasOwnProperty("apiShortName")) + if (message.apiShortName != null && Object.hasOwnProperty.call(message, "apiShortName")) if (!$util.isString(message.apiShortName)) return "apiShortName: string expected"; - if (message.githubLabel != null && message.hasOwnProperty("githubLabel")) + if (message.githubLabel != null && Object.hasOwnProperty.call(message, "githubLabel")) if (!$util.isString(message.githubLabel)) return "githubLabel: string expected"; - if (message.codeownerGithubTeams != null && message.hasOwnProperty("codeownerGithubTeams")) { + if (message.codeownerGithubTeams != null && Object.hasOwnProperty.call(message, "codeownerGithubTeams")) { if (!Array.isArray(message.codeownerGithubTeams)) return "codeownerGithubTeams: array expected"; for (var i = 0; i < message.codeownerGithubTeams.length; ++i) if (!$util.isString(message.codeownerGithubTeams[i])) return "codeownerGithubTeams: string[] expected"; } - if (message.docTagPrefix != null && message.hasOwnProperty("docTagPrefix")) + if (message.docTagPrefix != null && Object.hasOwnProperty.call(message, "docTagPrefix")) if (!$util.isString(message.docTagPrefix)) return "docTagPrefix: string expected"; - if (message.organization != null && message.hasOwnProperty("organization")) + if (message.organization != null && Object.hasOwnProperty.call(message, "organization")) switch (message.organization) { default: return "organization: enum value expected"; @@ -79663,7 +82131,7 @@ case 7: break; } - if (message.librarySettings != null && message.hasOwnProperty("librarySettings")) { + if (message.librarySettings != null && Object.hasOwnProperty.call(message, "librarySettings")) { if (!Array.isArray(message.librarySettings)) return "librarySettings: array expected"; for (var i = 0; i < message.librarySettings.length; ++i) { @@ -79672,10 +82140,10 @@ return "librarySettings." + error; } } - if (message.protoReferenceDocumentationUri != null && message.hasOwnProperty("protoReferenceDocumentationUri")) + if (message.protoReferenceDocumentationUri != null && Object.hasOwnProperty.call(message, "protoReferenceDocumentationUri")) if (!$util.isString(message.protoReferenceDocumentationUri)) return "protoReferenceDocumentationUri: string expected"; - if (message.restReferenceDocumentationUri != null && message.hasOwnProperty("restReferenceDocumentationUri")) + if (message.restReferenceDocumentationUri != null && Object.hasOwnProperty.call(message, "restReferenceDocumentationUri")) if (!$util.isString(message.restReferenceDocumentationUri)) return "restReferenceDocumentationUri: string expected"; return null; @@ -79692,6 +82160,8 @@ Publishing.fromObject = function fromObject(object, long) { if (object instanceof $root.google.api.Publishing) return object; + if (!$util.isObject(object)) + throw TypeError(".google.api.Publishing: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -79702,7 +82172,7 @@ throw TypeError(".google.api.Publishing.methodSettings: array expected"); message.methodSettings = []; for (var i = 0; i < object.methodSettings.length; ++i) { - if (typeof object.methodSettings[i] !== "object") + if (!$util.isObject(object.methodSettings[i])) throw TypeError(".google.api.Publishing.methodSettings: object expected"); message.methodSettings[i] = $root.google.api.MethodSettings.fromObject(object.methodSettings[i], long + 1); } @@ -79769,7 +82239,7 @@ throw TypeError(".google.api.Publishing.librarySettings: array expected"); message.librarySettings = []; for (var i = 0; i < object.librarySettings.length; ++i) { - if (typeof object.librarySettings[i] !== "object") + if (!$util.isObject(object.librarySettings[i])) throw TypeError(".google.api.Publishing.librarySettings: object expected"); message.librarySettings[i] = $root.google.api.ClientLibrarySettings.fromObject(object.librarySettings[i], long + 1); } @@ -79790,9 +82260,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Publishing.toObject = function toObject(message, options) { + Publishing.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) { object.methodSettings = []; @@ -79812,33 +82286,33 @@ if (message.methodSettings && message.methodSettings.length) { object.methodSettings = []; for (var j = 0; j < message.methodSettings.length; ++j) - object.methodSettings[j] = $root.google.api.MethodSettings.toObject(message.methodSettings[j], options); + object.methodSettings[j] = $root.google.api.MethodSettings.toObject(message.methodSettings[j], options, q + 1); } - if (message.newIssueUri != null && message.hasOwnProperty("newIssueUri")) + if (message.newIssueUri != null && Object.hasOwnProperty.call(message, "newIssueUri")) object.newIssueUri = message.newIssueUri; - if (message.documentationUri != null && message.hasOwnProperty("documentationUri")) + if (message.documentationUri != null && Object.hasOwnProperty.call(message, "documentationUri")) object.documentationUri = message.documentationUri; - if (message.apiShortName != null && message.hasOwnProperty("apiShortName")) + if (message.apiShortName != null && Object.hasOwnProperty.call(message, "apiShortName")) object.apiShortName = message.apiShortName; - if (message.githubLabel != null && message.hasOwnProperty("githubLabel")) + if (message.githubLabel != null && Object.hasOwnProperty.call(message, "githubLabel")) object.githubLabel = message.githubLabel; if (message.codeownerGithubTeams && message.codeownerGithubTeams.length) { object.codeownerGithubTeams = []; for (var j = 0; j < message.codeownerGithubTeams.length; ++j) object.codeownerGithubTeams[j] = message.codeownerGithubTeams[j]; } - if (message.docTagPrefix != null && message.hasOwnProperty("docTagPrefix")) + if (message.docTagPrefix != null && Object.hasOwnProperty.call(message, "docTagPrefix")) object.docTagPrefix = message.docTagPrefix; - if (message.organization != null && message.hasOwnProperty("organization")) + if (message.organization != null && Object.hasOwnProperty.call(message, "organization")) object.organization = options.enums === String ? $root.google.api.ClientLibraryOrganization[message.organization] === undefined ? message.organization : $root.google.api.ClientLibraryOrganization[message.organization] : message.organization; if (message.librarySettings && message.librarySettings.length) { object.librarySettings = []; for (var j = 0; j < message.librarySettings.length; ++j) - object.librarySettings[j] = $root.google.api.ClientLibrarySettings.toObject(message.librarySettings[j], options); + object.librarySettings[j] = $root.google.api.ClientLibrarySettings.toObject(message.librarySettings[j], options, q + 1); } - if (message.protoReferenceDocumentationUri != null && message.hasOwnProperty("protoReferenceDocumentationUri")) + if (message.protoReferenceDocumentationUri != null && Object.hasOwnProperty.call(message, "protoReferenceDocumentationUri")) object.protoReferenceDocumentationUri = message.protoReferenceDocumentationUri; - if (message.restReferenceDocumentationUri != null && message.hasOwnProperty("restReferenceDocumentationUri")) + if (message.restReferenceDocumentationUri != null && Object.hasOwnProperty.call(message, "restReferenceDocumentationUri")) object.restReferenceDocumentationUri = message.restReferenceDocumentationUri; return object; }; @@ -79944,16 +82418,20 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - JavaSettings.encode = function encode(message, writer) { + JavaSettings.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.libraryPackage != null && Object.hasOwnProperty.call(message, "libraryPackage")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.libraryPackage); if (message.serviceClassNames != null && Object.hasOwnProperty.call(message, "serviceClassNames")) for (var keys = Object.keys(message.serviceClassNames), i = 0; i < keys.length; ++i) writer.uint32(/* id 2, wireType 2 =*/18).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.serviceClassNames[keys[i]]).ldelim(); if (message.common != null && Object.hasOwnProperty.call(message, "common")) - $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 3, wireType 2 =*/26).fork(), q + 1).ldelim(); return writer; }; @@ -79967,7 +82445,7 @@ * @returns {$protobuf.Writer} Writer */ JavaSettings.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -80066,10 +82544,10 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.libraryPackage != null && message.hasOwnProperty("libraryPackage")) + if (message.libraryPackage != null && Object.hasOwnProperty.call(message, "libraryPackage")) if (!$util.isString(message.libraryPackage)) return "libraryPackage: string expected"; - if (message.serviceClassNames != null && message.hasOwnProperty("serviceClassNames")) { + if (message.serviceClassNames != null && Object.hasOwnProperty.call(message, "serviceClassNames")) { if (!$util.isObject(message.serviceClassNames)) return "serviceClassNames: object expected"; var key = Object.keys(message.serviceClassNames); @@ -80077,7 +82555,7 @@ if (!$util.isString(message.serviceClassNames[key[i]])) return "serviceClassNames: string{k:string} expected"; } - if (message.common != null && message.hasOwnProperty("common")) { + if (message.common != null && Object.hasOwnProperty.call(message, "common")) { var error = $root.google.api.CommonLanguageSettings.verify(message.common, long + 1); if (error) return "common." + error; @@ -80096,6 +82574,8 @@ JavaSettings.fromObject = function fromObject(object, long) { if (object instanceof $root.google.api.JavaSettings) return object; + if (!$util.isObject(object)) + throw TypeError(".google.api.JavaSettings: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -80104,7 +82584,7 @@ if (object.libraryPackage != null) message.libraryPackage = String(object.libraryPackage); if (object.serviceClassNames) { - if (typeof object.serviceClassNames !== "object") + if (!$util.isObject(object.serviceClassNames)) throw TypeError(".google.api.JavaSettings.serviceClassNames: object expected"); message.serviceClassNames = {}; for (var keys = Object.keys(object.serviceClassNames), i = 0; i < keys.length; ++i) { @@ -80114,7 +82594,7 @@ } } if (object.common != null) { - if (typeof object.common !== "object") + if (!$util.isObject(object.common)) throw TypeError(".google.api.JavaSettings.common: object expected"); message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common, long + 1); } @@ -80130,9 +82610,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - JavaSettings.toObject = function toObject(message, options) { + JavaSettings.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.objects || options.defaults) object.serviceClassNames = {}; @@ -80140,7 +82624,7 @@ object.libraryPackage = ""; object.common = null; } - if (message.libraryPackage != null && message.hasOwnProperty("libraryPackage")) + if (message.libraryPackage != null && Object.hasOwnProperty.call(message, "libraryPackage")) object.libraryPackage = message.libraryPackage; var keys2; if (message.serviceClassNames && (keys2 = Object.keys(message.serviceClassNames)).length) { @@ -80151,8 +82635,8 @@ object.serviceClassNames[keys2[j]] = message.serviceClassNames[keys2[j]]; } } - if (message.common != null && message.hasOwnProperty("common")) - object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); + if (message.common != null && Object.hasOwnProperty.call(message, "common")) + object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options, q + 1); return object; }; @@ -80238,11 +82722,15 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CppSettings.encode = function encode(message, writer) { + CppSettings.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.common != null && Object.hasOwnProperty.call(message, "common")) - $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); return writer; }; @@ -80256,7 +82744,7 @@ * @returns {$protobuf.Writer} Writer */ CppSettings.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -80326,7 +82814,7 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.common != null && message.hasOwnProperty("common")) { + if (message.common != null && Object.hasOwnProperty.call(message, "common")) { var error = $root.google.api.CommonLanguageSettings.verify(message.common, long + 1); if (error) return "common." + error; @@ -80345,13 +82833,15 @@ CppSettings.fromObject = function fromObject(object, long) { if (object instanceof $root.google.api.CppSettings) return object; + if (!$util.isObject(object)) + throw TypeError(".google.api.CppSettings: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) throw Error("maximum nesting depth exceeded"); var message = new $root.google.api.CppSettings(); if (object.common != null) { - if (typeof object.common !== "object") + if (!$util.isObject(object.common)) throw TypeError(".google.api.CppSettings.common: object expected"); message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common, long + 1); } @@ -80367,14 +82857,18 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CppSettings.toObject = function toObject(message, options) { + CppSettings.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) object.common = null; - if (message.common != null && message.hasOwnProperty("common")) - object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); + if (message.common != null && Object.hasOwnProperty.call(message, "common")) + object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options, q + 1); return object; }; @@ -80460,11 +82954,15 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - PhpSettings.encode = function encode(message, writer) { + PhpSettings.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.common != null && Object.hasOwnProperty.call(message, "common")) - $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); return writer; }; @@ -80478,7 +82976,7 @@ * @returns {$protobuf.Writer} Writer */ PhpSettings.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -80548,7 +83046,7 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.common != null && message.hasOwnProperty("common")) { + if (message.common != null && Object.hasOwnProperty.call(message, "common")) { var error = $root.google.api.CommonLanguageSettings.verify(message.common, long + 1); if (error) return "common." + error; @@ -80567,13 +83065,15 @@ PhpSettings.fromObject = function fromObject(object, long) { if (object instanceof $root.google.api.PhpSettings) return object; + if (!$util.isObject(object)) + throw TypeError(".google.api.PhpSettings: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) throw Error("maximum nesting depth exceeded"); var message = new $root.google.api.PhpSettings(); if (object.common != null) { - if (typeof object.common !== "object") + if (!$util.isObject(object.common)) throw TypeError(".google.api.PhpSettings.common: object expected"); message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common, long + 1); } @@ -80589,14 +83089,18 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - PhpSettings.toObject = function toObject(message, options) { + PhpSettings.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) object.common = null; - if (message.common != null && message.hasOwnProperty("common")) - object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); + if (message.common != null && Object.hasOwnProperty.call(message, "common")) + object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options, q + 1); return object; }; @@ -80691,13 +83195,17 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - PythonSettings.encode = function encode(message, writer) { + PythonSettings.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.common != null && Object.hasOwnProperty.call(message, "common")) - $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); if (message.experimentalFeatures != null && Object.hasOwnProperty.call(message, "experimentalFeatures")) - $root.google.api.PythonSettings.ExperimentalFeatures.encode(message.experimentalFeatures, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + $root.google.api.PythonSettings.ExperimentalFeatures.encode(message.experimentalFeatures, writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); return writer; }; @@ -80711,7 +83219,7 @@ * @returns {$protobuf.Writer} Writer */ PythonSettings.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -80785,12 +83293,12 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.common != null && message.hasOwnProperty("common")) { + if (message.common != null && Object.hasOwnProperty.call(message, "common")) { var error = $root.google.api.CommonLanguageSettings.verify(message.common, long + 1); if (error) return "common." + error; } - if (message.experimentalFeatures != null && message.hasOwnProperty("experimentalFeatures")) { + if (message.experimentalFeatures != null && Object.hasOwnProperty.call(message, "experimentalFeatures")) { var error = $root.google.api.PythonSettings.ExperimentalFeatures.verify(message.experimentalFeatures, long + 1); if (error) return "experimentalFeatures." + error; @@ -80809,18 +83317,20 @@ PythonSettings.fromObject = function fromObject(object, long) { if (object instanceof $root.google.api.PythonSettings) return object; + if (!$util.isObject(object)) + throw TypeError(".google.api.PythonSettings: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) throw Error("maximum nesting depth exceeded"); var message = new $root.google.api.PythonSettings(); if (object.common != null) { - if (typeof object.common !== "object") + if (!$util.isObject(object.common)) throw TypeError(".google.api.PythonSettings.common: object expected"); message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common, long + 1); } if (object.experimentalFeatures != null) { - if (typeof object.experimentalFeatures !== "object") + if (!$util.isObject(object.experimentalFeatures)) throw TypeError(".google.api.PythonSettings.experimentalFeatures: object expected"); message.experimentalFeatures = $root.google.api.PythonSettings.ExperimentalFeatures.fromObject(object.experimentalFeatures, long + 1); } @@ -80836,18 +83346,22 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - PythonSettings.toObject = function toObject(message, options) { + PythonSettings.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.common = null; object.experimentalFeatures = null; } - if (message.common != null && message.hasOwnProperty("common")) - object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); - if (message.experimentalFeatures != null && message.hasOwnProperty("experimentalFeatures")) - object.experimentalFeatures = $root.google.api.PythonSettings.ExperimentalFeatures.toObject(message.experimentalFeatures, options); + if (message.common != null && Object.hasOwnProperty.call(message, "common")) + object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options, q + 1); + if (message.experimentalFeatures != null && Object.hasOwnProperty.call(message, "experimentalFeatures")) + object.experimentalFeatures = $root.google.api.PythonSettings.ExperimentalFeatures.toObject(message.experimentalFeatures, options, q + 1); return object; }; @@ -80948,9 +83462,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ExperimentalFeatures.encode = function encode(message, writer) { + ExperimentalFeatures.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.restAsyncIoEnabled != null && Object.hasOwnProperty.call(message, "restAsyncIoEnabled")) writer.uint32(/* id 1, wireType 0 =*/8).bool(message.restAsyncIoEnabled); if (message.protobufPythonicTypesEnabled != null && Object.hasOwnProperty.call(message, "protobufPythonicTypesEnabled")) @@ -80970,7 +83488,7 @@ * @returns {$protobuf.Writer} Writer */ ExperimentalFeatures.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -81048,13 +83566,13 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.restAsyncIoEnabled != null && message.hasOwnProperty("restAsyncIoEnabled")) + if (message.restAsyncIoEnabled != null && Object.hasOwnProperty.call(message, "restAsyncIoEnabled")) if (typeof message.restAsyncIoEnabled !== "boolean") return "restAsyncIoEnabled: boolean expected"; - if (message.protobufPythonicTypesEnabled != null && message.hasOwnProperty("protobufPythonicTypesEnabled")) + if (message.protobufPythonicTypesEnabled != null && Object.hasOwnProperty.call(message, "protobufPythonicTypesEnabled")) if (typeof message.protobufPythonicTypesEnabled !== "boolean") return "protobufPythonicTypesEnabled: boolean expected"; - if (message.unversionedPackageDisabled != null && message.hasOwnProperty("unversionedPackageDisabled")) + if (message.unversionedPackageDisabled != null && Object.hasOwnProperty.call(message, "unversionedPackageDisabled")) if (typeof message.unversionedPackageDisabled !== "boolean") return "unversionedPackageDisabled: boolean expected"; return null; @@ -81071,6 +83589,8 @@ ExperimentalFeatures.fromObject = function fromObject(object, long) { if (object instanceof $root.google.api.PythonSettings.ExperimentalFeatures) return object; + if (!$util.isObject(object)) + throw TypeError(".google.api.PythonSettings.ExperimentalFeatures: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -81094,20 +83614,24 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ExperimentalFeatures.toObject = function toObject(message, options) { + ExperimentalFeatures.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.restAsyncIoEnabled = false; object.protobufPythonicTypesEnabled = false; object.unversionedPackageDisabled = false; } - if (message.restAsyncIoEnabled != null && message.hasOwnProperty("restAsyncIoEnabled")) + if (message.restAsyncIoEnabled != null && Object.hasOwnProperty.call(message, "restAsyncIoEnabled")) object.restAsyncIoEnabled = message.restAsyncIoEnabled; - if (message.protobufPythonicTypesEnabled != null && message.hasOwnProperty("protobufPythonicTypesEnabled")) + if (message.protobufPythonicTypesEnabled != null && Object.hasOwnProperty.call(message, "protobufPythonicTypesEnabled")) object.protobufPythonicTypesEnabled = message.protobufPythonicTypesEnabled; - if (message.unversionedPackageDisabled != null && message.hasOwnProperty("unversionedPackageDisabled")) + if (message.unversionedPackageDisabled != null && Object.hasOwnProperty.call(message, "unversionedPackageDisabled")) object.unversionedPackageDisabled = message.unversionedPackageDisabled; return object; }; @@ -81197,11 +83721,15 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - NodeSettings.encode = function encode(message, writer) { + NodeSettings.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.common != null && Object.hasOwnProperty.call(message, "common")) - $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); return writer; }; @@ -81215,7 +83743,7 @@ * @returns {$protobuf.Writer} Writer */ NodeSettings.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -81285,7 +83813,7 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.common != null && message.hasOwnProperty("common")) { + if (message.common != null && Object.hasOwnProperty.call(message, "common")) { var error = $root.google.api.CommonLanguageSettings.verify(message.common, long + 1); if (error) return "common." + error; @@ -81304,13 +83832,15 @@ NodeSettings.fromObject = function fromObject(object, long) { if (object instanceof $root.google.api.NodeSettings) return object; + if (!$util.isObject(object)) + throw TypeError(".google.api.NodeSettings: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) throw Error("maximum nesting depth exceeded"); var message = new $root.google.api.NodeSettings(); if (object.common != null) { - if (typeof object.common !== "object") + if (!$util.isObject(object.common)) throw TypeError(".google.api.NodeSettings.common: object expected"); message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common, long + 1); } @@ -81326,14 +83856,18 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - NodeSettings.toObject = function toObject(message, options) { + NodeSettings.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) object.common = null; - if (message.common != null && message.hasOwnProperty("common")) - object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); + if (message.common != null && Object.hasOwnProperty.call(message, "common")) + object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options, q + 1); return object; }; @@ -81469,11 +84003,15 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DotnetSettings.encode = function encode(message, writer) { + DotnetSettings.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.common != null && Object.hasOwnProperty.call(message, "common")) - $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); if (message.renamedServices != null && Object.hasOwnProperty.call(message, "renamedServices")) for (var keys = Object.keys(message.renamedServices), i = 0; i < keys.length; ++i) writer.uint32(/* id 2, wireType 2 =*/18).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.renamedServices[keys[i]]).ldelim(); @@ -81502,7 +84040,7 @@ * @returns {$protobuf.Writer} Writer */ DotnetSettings.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -81640,12 +84178,12 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.common != null && message.hasOwnProperty("common")) { + if (message.common != null && Object.hasOwnProperty.call(message, "common")) { var error = $root.google.api.CommonLanguageSettings.verify(message.common, long + 1); if (error) return "common." + error; } - if (message.renamedServices != null && message.hasOwnProperty("renamedServices")) { + if (message.renamedServices != null && Object.hasOwnProperty.call(message, "renamedServices")) { if (!$util.isObject(message.renamedServices)) return "renamedServices: object expected"; var key = Object.keys(message.renamedServices); @@ -81653,7 +84191,7 @@ if (!$util.isString(message.renamedServices[key[i]])) return "renamedServices: string{k:string} expected"; } - if (message.renamedResources != null && message.hasOwnProperty("renamedResources")) { + if (message.renamedResources != null && Object.hasOwnProperty.call(message, "renamedResources")) { if (!$util.isObject(message.renamedResources)) return "renamedResources: object expected"; var key = Object.keys(message.renamedResources); @@ -81661,21 +84199,21 @@ if (!$util.isString(message.renamedResources[key[i]])) return "renamedResources: string{k:string} expected"; } - if (message.ignoredResources != null && message.hasOwnProperty("ignoredResources")) { + if (message.ignoredResources != null && Object.hasOwnProperty.call(message, "ignoredResources")) { if (!Array.isArray(message.ignoredResources)) return "ignoredResources: array expected"; for (var i = 0; i < message.ignoredResources.length; ++i) if (!$util.isString(message.ignoredResources[i])) return "ignoredResources: string[] expected"; } - if (message.forcedNamespaceAliases != null && message.hasOwnProperty("forcedNamespaceAliases")) { + if (message.forcedNamespaceAliases != null && Object.hasOwnProperty.call(message, "forcedNamespaceAliases")) { if (!Array.isArray(message.forcedNamespaceAliases)) return "forcedNamespaceAliases: array expected"; for (var i = 0; i < message.forcedNamespaceAliases.length; ++i) if (!$util.isString(message.forcedNamespaceAliases[i])) return "forcedNamespaceAliases: string[] expected"; } - if (message.handwrittenSignatures != null && message.hasOwnProperty("handwrittenSignatures")) { + if (message.handwrittenSignatures != null && Object.hasOwnProperty.call(message, "handwrittenSignatures")) { if (!Array.isArray(message.handwrittenSignatures)) return "handwrittenSignatures: array expected"; for (var i = 0; i < message.handwrittenSignatures.length; ++i) @@ -81696,18 +84234,20 @@ DotnetSettings.fromObject = function fromObject(object, long) { if (object instanceof $root.google.api.DotnetSettings) return object; + if (!$util.isObject(object)) + throw TypeError(".google.api.DotnetSettings: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) throw Error("maximum nesting depth exceeded"); var message = new $root.google.api.DotnetSettings(); if (object.common != null) { - if (typeof object.common !== "object") + if (!$util.isObject(object.common)) throw TypeError(".google.api.DotnetSettings.common: object expected"); message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common, long + 1); } if (object.renamedServices) { - if (typeof object.renamedServices !== "object") + if (!$util.isObject(object.renamedServices)) throw TypeError(".google.api.DotnetSettings.renamedServices: object expected"); message.renamedServices = {}; for (var keys = Object.keys(object.renamedServices), i = 0; i < keys.length; ++i) { @@ -81717,7 +84257,7 @@ } } if (object.renamedResources) { - if (typeof object.renamedResources !== "object") + if (!$util.isObject(object.renamedResources)) throw TypeError(".google.api.DotnetSettings.renamedResources: object expected"); message.renamedResources = {}; for (var keys = Object.keys(object.renamedResources), i = 0; i < keys.length; ++i) { @@ -81759,9 +84299,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DotnetSettings.toObject = function toObject(message, options) { + DotnetSettings.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) { object.ignoredResources = []; @@ -81774,8 +84318,8 @@ } if (options.defaults) object.common = null; - if (message.common != null && message.hasOwnProperty("common")) - object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); + if (message.common != null && Object.hasOwnProperty.call(message, "common")) + object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options, q + 1); var keys2; if (message.renamedServices && (keys2 = Object.keys(message.renamedServices)).length) { object.renamedServices = {}; @@ -81893,11 +84437,15 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - RubySettings.encode = function encode(message, writer) { + RubySettings.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.common != null && Object.hasOwnProperty.call(message, "common")) - $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); return writer; }; @@ -81911,7 +84459,7 @@ * @returns {$protobuf.Writer} Writer */ RubySettings.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -81981,7 +84529,7 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.common != null && message.hasOwnProperty("common")) { + if (message.common != null && Object.hasOwnProperty.call(message, "common")) { var error = $root.google.api.CommonLanguageSettings.verify(message.common, long + 1); if (error) return "common." + error; @@ -82000,13 +84548,15 @@ RubySettings.fromObject = function fromObject(object, long) { if (object instanceof $root.google.api.RubySettings) return object; + if (!$util.isObject(object)) + throw TypeError(".google.api.RubySettings: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) throw Error("maximum nesting depth exceeded"); var message = new $root.google.api.RubySettings(); if (object.common != null) { - if (typeof object.common !== "object") + if (!$util.isObject(object.common)) throw TypeError(".google.api.RubySettings.common: object expected"); message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common, long + 1); } @@ -82022,14 +84572,18 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - RubySettings.toObject = function toObject(message, options) { + RubySettings.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) object.common = null; - if (message.common != null && message.hasOwnProperty("common")) - object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); + if (message.common != null && Object.hasOwnProperty.call(message, "common")) + object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options, q + 1); return object; }; @@ -82125,11 +84679,15 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GoSettings.encode = function encode(message, writer) { + GoSettings.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.common != null && Object.hasOwnProperty.call(message, "common")) - $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); if (message.renamedServices != null && Object.hasOwnProperty.call(message, "renamedServices")) for (var keys = Object.keys(message.renamedServices), i = 0; i < keys.length; ++i) writer.uint32(/* id 2, wireType 2 =*/18).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.renamedServices[keys[i]]).ldelim(); @@ -82146,7 +84704,7 @@ * @returns {$protobuf.Writer} Writer */ GoSettings.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -82241,12 +84799,12 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.common != null && message.hasOwnProperty("common")) { + if (message.common != null && Object.hasOwnProperty.call(message, "common")) { var error = $root.google.api.CommonLanguageSettings.verify(message.common, long + 1); if (error) return "common." + error; } - if (message.renamedServices != null && message.hasOwnProperty("renamedServices")) { + if (message.renamedServices != null && Object.hasOwnProperty.call(message, "renamedServices")) { if (!$util.isObject(message.renamedServices)) return "renamedServices: object expected"; var key = Object.keys(message.renamedServices); @@ -82268,18 +84826,20 @@ GoSettings.fromObject = function fromObject(object, long) { if (object instanceof $root.google.api.GoSettings) return object; + if (!$util.isObject(object)) + throw TypeError(".google.api.GoSettings: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) throw Error("maximum nesting depth exceeded"); var message = new $root.google.api.GoSettings(); if (object.common != null) { - if (typeof object.common !== "object") + if (!$util.isObject(object.common)) throw TypeError(".google.api.GoSettings.common: object expected"); message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common, long + 1); } if (object.renamedServices) { - if (typeof object.renamedServices !== "object") + if (!$util.isObject(object.renamedServices)) throw TypeError(".google.api.GoSettings.renamedServices: object expected"); message.renamedServices = {}; for (var keys = Object.keys(object.renamedServices), i = 0; i < keys.length; ++i) { @@ -82300,16 +84860,20 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GoSettings.toObject = function toObject(message, options) { + GoSettings.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.objects || options.defaults) object.renamedServices = {}; if (options.defaults) object.common = null; - if (message.common != null && message.hasOwnProperty("common")) - object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); + if (message.common != null && Object.hasOwnProperty.call(message, "common")) + object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options, q + 1); var keys2; if (message.renamedServices && (keys2 = Object.keys(message.renamedServices)).length) { object.renamedServices = {}; @@ -82423,13 +84987,17 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MethodSettings.encode = function encode(message, writer) { + MethodSettings.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.selector != null && Object.hasOwnProperty.call(message, "selector")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.selector); if (message.longRunning != null && Object.hasOwnProperty.call(message, "longRunning")) - $root.google.api.MethodSettings.LongRunning.encode(message.longRunning, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + $root.google.api.MethodSettings.LongRunning.encode(message.longRunning, writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); if (message.autoPopulatedFields != null && message.autoPopulatedFields.length) for (var i = 0; i < message.autoPopulatedFields.length; ++i) writer.uint32(/* id 3, wireType 2 =*/26).string(message.autoPopulatedFields[i]); @@ -82446,7 +85014,7 @@ * @returns {$protobuf.Writer} Writer */ MethodSettings.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -82526,15 +85094,15 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.selector != null && message.hasOwnProperty("selector")) + if (message.selector != null && Object.hasOwnProperty.call(message, "selector")) if (!$util.isString(message.selector)) return "selector: string expected"; - if (message.longRunning != null && message.hasOwnProperty("longRunning")) { + if (message.longRunning != null && Object.hasOwnProperty.call(message, "longRunning")) { var error = $root.google.api.MethodSettings.LongRunning.verify(message.longRunning, long + 1); if (error) return "longRunning." + error; } - if (message.autoPopulatedFields != null && message.hasOwnProperty("autoPopulatedFields")) { + if (message.autoPopulatedFields != null && Object.hasOwnProperty.call(message, "autoPopulatedFields")) { if (!Array.isArray(message.autoPopulatedFields)) return "autoPopulatedFields: array expected"; for (var i = 0; i < message.autoPopulatedFields.length; ++i) @@ -82555,6 +85123,8 @@ MethodSettings.fromObject = function fromObject(object, long) { if (object instanceof $root.google.api.MethodSettings) return object; + if (!$util.isObject(object)) + throw TypeError(".google.api.MethodSettings: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -82563,7 +85133,7 @@ if (object.selector != null) message.selector = String(object.selector); if (object.longRunning != null) { - if (typeof object.longRunning !== "object") + if (!$util.isObject(object.longRunning)) throw TypeError(".google.api.MethodSettings.longRunning: object expected"); message.longRunning = $root.google.api.MethodSettings.LongRunning.fromObject(object.longRunning, long + 1); } @@ -82586,9 +85156,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - MethodSettings.toObject = function toObject(message, options) { + MethodSettings.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.autoPopulatedFields = []; @@ -82596,10 +85170,10 @@ object.selector = ""; object.longRunning = null; } - if (message.selector != null && message.hasOwnProperty("selector")) + if (message.selector != null && Object.hasOwnProperty.call(message, "selector")) object.selector = message.selector; - if (message.longRunning != null && message.hasOwnProperty("longRunning")) - object.longRunning = $root.google.api.MethodSettings.LongRunning.toObject(message.longRunning, options); + if (message.longRunning != null && Object.hasOwnProperty.call(message, "longRunning")) + object.longRunning = $root.google.api.MethodSettings.LongRunning.toObject(message.longRunning, options, q + 1); if (message.autoPopulatedFields && message.autoPopulatedFields.length) { object.autoPopulatedFields = []; for (var j = 0; j < message.autoPopulatedFields.length; ++j) @@ -82714,17 +85288,21 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - LongRunning.encode = function encode(message, writer) { + LongRunning.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.initialPollDelay != null && Object.hasOwnProperty.call(message, "initialPollDelay")) - $root.google.protobuf.Duration.encode(message.initialPollDelay, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + $root.google.protobuf.Duration.encode(message.initialPollDelay, writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); if (message.pollDelayMultiplier != null && Object.hasOwnProperty.call(message, "pollDelayMultiplier")) writer.uint32(/* id 2, wireType 5 =*/21).float(message.pollDelayMultiplier); if (message.maxPollDelay != null && Object.hasOwnProperty.call(message, "maxPollDelay")) - $root.google.protobuf.Duration.encode(message.maxPollDelay, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + $root.google.protobuf.Duration.encode(message.maxPollDelay, writer.uint32(/* id 3, wireType 2 =*/26).fork(), q + 1).ldelim(); if (message.totalPollTimeout != null && Object.hasOwnProperty.call(message, "totalPollTimeout")) - $root.google.protobuf.Duration.encode(message.totalPollTimeout, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + $root.google.protobuf.Duration.encode(message.totalPollTimeout, writer.uint32(/* id 4, wireType 2 =*/34).fork(), q + 1).ldelim(); return writer; }; @@ -82738,7 +85316,7 @@ * @returns {$protobuf.Writer} Writer */ LongRunning.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -82820,20 +85398,20 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.initialPollDelay != null && message.hasOwnProperty("initialPollDelay")) { + if (message.initialPollDelay != null && Object.hasOwnProperty.call(message, "initialPollDelay")) { var error = $root.google.protobuf.Duration.verify(message.initialPollDelay, long + 1); if (error) return "initialPollDelay." + error; } - if (message.pollDelayMultiplier != null && message.hasOwnProperty("pollDelayMultiplier")) + if (message.pollDelayMultiplier != null && Object.hasOwnProperty.call(message, "pollDelayMultiplier")) if (typeof message.pollDelayMultiplier !== "number") return "pollDelayMultiplier: number expected"; - if (message.maxPollDelay != null && message.hasOwnProperty("maxPollDelay")) { + if (message.maxPollDelay != null && Object.hasOwnProperty.call(message, "maxPollDelay")) { var error = $root.google.protobuf.Duration.verify(message.maxPollDelay, long + 1); if (error) return "maxPollDelay." + error; } - if (message.totalPollTimeout != null && message.hasOwnProperty("totalPollTimeout")) { + if (message.totalPollTimeout != null && Object.hasOwnProperty.call(message, "totalPollTimeout")) { var error = $root.google.protobuf.Duration.verify(message.totalPollTimeout, long + 1); if (error) return "totalPollTimeout." + error; @@ -82852,25 +85430,27 @@ LongRunning.fromObject = function fromObject(object, long) { if (object instanceof $root.google.api.MethodSettings.LongRunning) return object; + if (!$util.isObject(object)) + throw TypeError(".google.api.MethodSettings.LongRunning: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) throw Error("maximum nesting depth exceeded"); var message = new $root.google.api.MethodSettings.LongRunning(); if (object.initialPollDelay != null) { - if (typeof object.initialPollDelay !== "object") + if (!$util.isObject(object.initialPollDelay)) throw TypeError(".google.api.MethodSettings.LongRunning.initialPollDelay: object expected"); message.initialPollDelay = $root.google.protobuf.Duration.fromObject(object.initialPollDelay, long + 1); } if (object.pollDelayMultiplier != null) message.pollDelayMultiplier = Number(object.pollDelayMultiplier); if (object.maxPollDelay != null) { - if (typeof object.maxPollDelay !== "object") + if (!$util.isObject(object.maxPollDelay)) throw TypeError(".google.api.MethodSettings.LongRunning.maxPollDelay: object expected"); message.maxPollDelay = $root.google.protobuf.Duration.fromObject(object.maxPollDelay, long + 1); } if (object.totalPollTimeout != null) { - if (typeof object.totalPollTimeout !== "object") + if (!$util.isObject(object.totalPollTimeout)) throw TypeError(".google.api.MethodSettings.LongRunning.totalPollTimeout: object expected"); message.totalPollTimeout = $root.google.protobuf.Duration.fromObject(object.totalPollTimeout, long + 1); } @@ -82886,9 +85466,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - LongRunning.toObject = function toObject(message, options) { + LongRunning.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.initialPollDelay = null; @@ -82896,14 +85480,14 @@ object.maxPollDelay = null; object.totalPollTimeout = null; } - if (message.initialPollDelay != null && message.hasOwnProperty("initialPollDelay")) - object.initialPollDelay = $root.google.protobuf.Duration.toObject(message.initialPollDelay, options); - if (message.pollDelayMultiplier != null && message.hasOwnProperty("pollDelayMultiplier")) + if (message.initialPollDelay != null && Object.hasOwnProperty.call(message, "initialPollDelay")) + object.initialPollDelay = $root.google.protobuf.Duration.toObject(message.initialPollDelay, options, q + 1); + if (message.pollDelayMultiplier != null && Object.hasOwnProperty.call(message, "pollDelayMultiplier")) object.pollDelayMultiplier = options.json && !isFinite(message.pollDelayMultiplier) ? String(message.pollDelayMultiplier) : message.pollDelayMultiplier; - if (message.maxPollDelay != null && message.hasOwnProperty("maxPollDelay")) - object.maxPollDelay = $root.google.protobuf.Duration.toObject(message.maxPollDelay, options); - if (message.totalPollTimeout != null && message.hasOwnProperty("totalPollTimeout")) - object.totalPollTimeout = $root.google.protobuf.Duration.toObject(message.totalPollTimeout, options); + if (message.maxPollDelay != null && Object.hasOwnProperty.call(message, "maxPollDelay")) + object.maxPollDelay = $root.google.protobuf.Duration.toObject(message.maxPollDelay, options, q + 1); + if (message.totalPollTimeout != null && Object.hasOwnProperty.call(message, "totalPollTimeout")) + object.totalPollTimeout = $root.google.protobuf.Duration.toObject(message.totalPollTimeout, options, q + 1); return object; }; @@ -83044,9 +85628,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SelectiveGapicGeneration.encode = function encode(message, writer) { + SelectiveGapicGeneration.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.methods != null && message.methods.length) for (var i = 0; i < message.methods.length; ++i) writer.uint32(/* id 1, wireType 2 =*/10).string(message.methods[i]); @@ -83065,7 +85653,7 @@ * @returns {$protobuf.Writer} Writer */ SelectiveGapicGeneration.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -83141,14 +85729,14 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.methods != null && message.hasOwnProperty("methods")) { + if (message.methods != null && Object.hasOwnProperty.call(message, "methods")) { if (!Array.isArray(message.methods)) return "methods: array expected"; for (var i = 0; i < message.methods.length; ++i) if (!$util.isString(message.methods[i])) return "methods: string[] expected"; } - if (message.generateOmittedAsInternal != null && message.hasOwnProperty("generateOmittedAsInternal")) + if (message.generateOmittedAsInternal != null && Object.hasOwnProperty.call(message, "generateOmittedAsInternal")) if (typeof message.generateOmittedAsInternal !== "boolean") return "generateOmittedAsInternal: boolean expected"; return null; @@ -83165,6 +85753,8 @@ SelectiveGapicGeneration.fromObject = function fromObject(object, long) { if (object instanceof $root.google.api.SelectiveGapicGeneration) return object; + if (!$util.isObject(object)) + throw TypeError(".google.api.SelectiveGapicGeneration: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -83191,9 +85781,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - SelectiveGapicGeneration.toObject = function toObject(message, options) { + SelectiveGapicGeneration.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.methods = []; @@ -83204,7 +85798,7 @@ for (var j = 0; j < message.methods.length; ++j) object.methods[j] = message.methods[j]; } - if (message.generateOmittedAsInternal != null && message.hasOwnProperty("generateOmittedAsInternal")) + if (message.generateOmittedAsInternal != null && Object.hasOwnProperty.call(message, "generateOmittedAsInternal")) object.generateOmittedAsInternal = message.generateOmittedAsInternal; return object; }; @@ -83401,9 +85995,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ResourceDescriptor.encode = function encode(message, writer) { + ResourceDescriptor.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.type != null && Object.hasOwnProperty.call(message, "type")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.type); if (message.pattern != null && message.pattern.length) @@ -83436,7 +86034,7 @@ * @returns {$protobuf.Writer} Writer */ ResourceDescriptor.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -83539,20 +86137,20 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.type != null && message.hasOwnProperty("type")) + if (message.type != null && Object.hasOwnProperty.call(message, "type")) if (!$util.isString(message.type)) return "type: string expected"; - if (message.pattern != null && message.hasOwnProperty("pattern")) { + if (message.pattern != null && Object.hasOwnProperty.call(message, "pattern")) { if (!Array.isArray(message.pattern)) return "pattern: array expected"; for (var i = 0; i < message.pattern.length; ++i) if (!$util.isString(message.pattern[i])) return "pattern: string[] expected"; } - if (message.nameField != null && message.hasOwnProperty("nameField")) + if (message.nameField != null && Object.hasOwnProperty.call(message, "nameField")) if (!$util.isString(message.nameField)) return "nameField: string expected"; - if (message.history != null && message.hasOwnProperty("history")) + if (message.history != null && Object.hasOwnProperty.call(message, "history")) switch (message.history) { default: return "history: enum value expected"; @@ -83561,13 +86159,13 @@ case 2: break; } - if (message.plural != null && message.hasOwnProperty("plural")) + if (message.plural != null && Object.hasOwnProperty.call(message, "plural")) if (!$util.isString(message.plural)) return "plural: string expected"; - if (message.singular != null && message.hasOwnProperty("singular")) + if (message.singular != null && Object.hasOwnProperty.call(message, "singular")) if (!$util.isString(message.singular)) return "singular: string expected"; - if (message.style != null && message.hasOwnProperty("style")) { + if (message.style != null && Object.hasOwnProperty.call(message, "style")) { if (!Array.isArray(message.style)) return "style: array expected"; for (var i = 0; i < message.style.length; ++i) @@ -83593,6 +86191,8 @@ ResourceDescriptor.fromObject = function fromObject(object, long) { if (object instanceof $root.google.api.ResourceDescriptor) return object; + if (!$util.isObject(object)) + throw TypeError(".google.api.ResourceDescriptor: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -83666,9 +86266,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ResourceDescriptor.toObject = function toObject(message, options) { + ResourceDescriptor.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) { object.pattern = []; @@ -83681,20 +86285,20 @@ object.plural = ""; object.singular = ""; } - if (message.type != null && message.hasOwnProperty("type")) + if (message.type != null && Object.hasOwnProperty.call(message, "type")) object.type = message.type; if (message.pattern && message.pattern.length) { object.pattern = []; for (var j = 0; j < message.pattern.length; ++j) object.pattern[j] = message.pattern[j]; } - if (message.nameField != null && message.hasOwnProperty("nameField")) + if (message.nameField != null && Object.hasOwnProperty.call(message, "nameField")) object.nameField = message.nameField; - if (message.history != null && message.hasOwnProperty("history")) + if (message.history != null && Object.hasOwnProperty.call(message, "history")) object.history = options.enums === String ? $root.google.api.ResourceDescriptor.History[message.history] === undefined ? message.history : $root.google.api.ResourceDescriptor.History[message.history] : message.history; - if (message.plural != null && message.hasOwnProperty("plural")) + if (message.plural != null && Object.hasOwnProperty.call(message, "plural")) object.plural = message.plural; - if (message.singular != null && message.hasOwnProperty("singular")) + if (message.singular != null && Object.hasOwnProperty.call(message, "singular")) object.singular = message.singular; if (message.style && message.style.length) { object.style = []; @@ -83825,9 +86429,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ResourceReference.encode = function encode(message, writer) { + ResourceReference.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.type != null && Object.hasOwnProperty.call(message, "type")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.type); if (message.childType != null && Object.hasOwnProperty.call(message, "childType")) @@ -83845,7 +86453,7 @@ * @returns {$protobuf.Writer} Writer */ ResourceReference.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -83919,10 +86527,10 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.type != null && message.hasOwnProperty("type")) + if (message.type != null && Object.hasOwnProperty.call(message, "type")) if (!$util.isString(message.type)) return "type: string expected"; - if (message.childType != null && message.hasOwnProperty("childType")) + if (message.childType != null && Object.hasOwnProperty.call(message, "childType")) if (!$util.isString(message.childType)) return "childType: string expected"; return null; @@ -83939,6 +86547,8 @@ ResourceReference.fromObject = function fromObject(object, long) { if (object instanceof $root.google.api.ResourceReference) return object; + if (!$util.isObject(object)) + throw TypeError(".google.api.ResourceReference: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -83960,17 +86570,21 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ResourceReference.toObject = function toObject(message, options) { + ResourceReference.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.type = ""; object.childType = ""; } - if (message.type != null && message.hasOwnProperty("type")) + if (message.type != null && Object.hasOwnProperty.call(message, "type")) object.type = message.type; - if (message.childType != null && message.hasOwnProperty("childType")) + if (message.childType != null && Object.hasOwnProperty.call(message, "childType")) object.childType = message.childType; return object; }; @@ -84058,12 +86672,16 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - RoutingRule.encode = function encode(message, writer) { + RoutingRule.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.routingParameters != null && message.routingParameters.length) for (var i = 0; i < message.routingParameters.length; ++i) - $root.google.api.RoutingParameter.encode(message.routingParameters[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + $root.google.api.RoutingParameter.encode(message.routingParameters[i], writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); return writer; }; @@ -84077,7 +86695,7 @@ * @returns {$protobuf.Writer} Writer */ RoutingRule.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -84149,7 +86767,7 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.routingParameters != null && message.hasOwnProperty("routingParameters")) { + if (message.routingParameters != null && Object.hasOwnProperty.call(message, "routingParameters")) { if (!Array.isArray(message.routingParameters)) return "routingParameters: array expected"; for (var i = 0; i < message.routingParameters.length; ++i) { @@ -84172,6 +86790,8 @@ RoutingRule.fromObject = function fromObject(object, long) { if (object instanceof $root.google.api.RoutingRule) return object; + if (!$util.isObject(object)) + throw TypeError(".google.api.RoutingRule: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -84182,7 +86802,7 @@ throw TypeError(".google.api.RoutingRule.routingParameters: array expected"); message.routingParameters = []; for (var i = 0; i < object.routingParameters.length; ++i) { - if (typeof object.routingParameters[i] !== "object") + if (!$util.isObject(object.routingParameters[i])) throw TypeError(".google.api.RoutingRule.routingParameters: object expected"); message.routingParameters[i] = $root.google.api.RoutingParameter.fromObject(object.routingParameters[i], long + 1); } @@ -84199,16 +86819,20 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - RoutingRule.toObject = function toObject(message, options) { + RoutingRule.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.routingParameters = []; if (message.routingParameters && message.routingParameters.length) { object.routingParameters = []; for (var j = 0; j < message.routingParameters.length; ++j) - object.routingParameters[j] = $root.google.api.RoutingParameter.toObject(message.routingParameters[j], options); + object.routingParameters[j] = $root.google.api.RoutingParameter.toObject(message.routingParameters[j], options, q + 1); } return object; }; @@ -84304,9 +86928,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - RoutingParameter.encode = function encode(message, writer) { + RoutingParameter.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.field != null && Object.hasOwnProperty.call(message, "field")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.field); if (message.pathTemplate != null && Object.hasOwnProperty.call(message, "pathTemplate")) @@ -84324,7 +86952,7 @@ * @returns {$protobuf.Writer} Writer */ RoutingParameter.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -84398,10 +87026,10 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.field != null && message.hasOwnProperty("field")) + if (message.field != null && Object.hasOwnProperty.call(message, "field")) if (!$util.isString(message.field)) return "field: string expected"; - if (message.pathTemplate != null && message.hasOwnProperty("pathTemplate")) + if (message.pathTemplate != null && Object.hasOwnProperty.call(message, "pathTemplate")) if (!$util.isString(message.pathTemplate)) return "pathTemplate: string expected"; return null; @@ -84418,6 +87046,8 @@ RoutingParameter.fromObject = function fromObject(object, long) { if (object instanceof $root.google.api.RoutingParameter) return object; + if (!$util.isObject(object)) + throw TypeError(".google.api.RoutingParameter: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -84439,17 +87069,21 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - RoutingParameter.toObject = function toObject(message, options) { + RoutingParameter.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.field = ""; object.pathTemplate = ""; } - if (message.field != null && message.hasOwnProperty("field")) + if (message.field != null && Object.hasOwnProperty.call(message, "field")) object.field = message.field; - if (message.pathTemplate != null && message.hasOwnProperty("pathTemplate")) + if (message.pathTemplate != null && Object.hasOwnProperty.call(message, "pathTemplate")) object.pathTemplate = message.pathTemplate; return object; }; @@ -84549,12 +87183,16 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FileDescriptorSet.encode = function encode(message, writer) { + FileDescriptorSet.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.file != null && message.file.length) for (var i = 0; i < message.file.length; ++i) - $root.google.protobuf.FileDescriptorProto.encode(message.file[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + $root.google.protobuf.FileDescriptorProto.encode(message.file[i], writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); return writer; }; @@ -84568,7 +87206,7 @@ * @returns {$protobuf.Writer} Writer */ FileDescriptorSet.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -84640,7 +87278,7 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.file != null && message.hasOwnProperty("file")) { + if (message.file != null && Object.hasOwnProperty.call(message, "file")) { if (!Array.isArray(message.file)) return "file: array expected"; for (var i = 0; i < message.file.length; ++i) { @@ -84663,6 +87301,8 @@ FileDescriptorSet.fromObject = function fromObject(object, long) { if (object instanceof $root.google.protobuf.FileDescriptorSet) return object; + if (!$util.isObject(object)) + throw TypeError(".google.protobuf.FileDescriptorSet: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -84673,7 +87313,7 @@ throw TypeError(".google.protobuf.FileDescriptorSet.file: array expected"); message.file = []; for (var i = 0; i < object.file.length; ++i) { - if (typeof object.file[i] !== "object") + if (!$util.isObject(object.file[i])) throw TypeError(".google.protobuf.FileDescriptorSet.file: object expected"); message.file[i] = $root.google.protobuf.FileDescriptorProto.fromObject(object.file[i], long + 1); } @@ -84690,16 +87330,20 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - FileDescriptorSet.toObject = function toObject(message, options) { + FileDescriptorSet.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.file = []; if (message.file && message.file.length) { object.file = []; for (var j = 0; j < message.file.length; ++j) - object.file[j] = $root.google.protobuf.FileDescriptorProto.toObject(message.file[j], options); + object.file[j] = $root.google.protobuf.FileDescriptorProto.toObject(message.file[j], options, q + 1); } return object; }; @@ -84945,9 +87589,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FileDescriptorProto.encode = function encode(message, writer) { + FileDescriptorProto.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); if (message["package"] != null && Object.hasOwnProperty.call(message, "package")) @@ -84957,20 +87605,20 @@ writer.uint32(/* id 3, wireType 2 =*/26).string(message.dependency[i]); if (message.messageType != null && message.messageType.length) for (var i = 0; i < message.messageType.length; ++i) - $root.google.protobuf.DescriptorProto.encode(message.messageType[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + $root.google.protobuf.DescriptorProto.encode(message.messageType[i], writer.uint32(/* id 4, wireType 2 =*/34).fork(), q + 1).ldelim(); if (message.enumType != null && message.enumType.length) for (var i = 0; i < message.enumType.length; ++i) - $root.google.protobuf.EnumDescriptorProto.encode(message.enumType[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + $root.google.protobuf.EnumDescriptorProto.encode(message.enumType[i], writer.uint32(/* id 5, wireType 2 =*/42).fork(), q + 1).ldelim(); if (message.service != null && message.service.length) for (var i = 0; i < message.service.length; ++i) - $root.google.protobuf.ServiceDescriptorProto.encode(message.service[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + $root.google.protobuf.ServiceDescriptorProto.encode(message.service[i], writer.uint32(/* id 6, wireType 2 =*/50).fork(), q + 1).ldelim(); if (message.extension != null && message.extension.length) for (var i = 0; i < message.extension.length; ++i) - $root.google.protobuf.FieldDescriptorProto.encode(message.extension[i], writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + $root.google.protobuf.FieldDescriptorProto.encode(message.extension[i], writer.uint32(/* id 7, wireType 2 =*/58).fork(), q + 1).ldelim(); if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.FileOptions.encode(message.options, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + $root.google.protobuf.FileOptions.encode(message.options, writer.uint32(/* id 8, wireType 2 =*/66).fork(), q + 1).ldelim(); if (message.sourceCodeInfo != null && Object.hasOwnProperty.call(message, "sourceCodeInfo")) - $root.google.protobuf.SourceCodeInfo.encode(message.sourceCodeInfo, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + $root.google.protobuf.SourceCodeInfo.encode(message.sourceCodeInfo, writer.uint32(/* id 9, wireType 2 =*/74).fork(), q + 1).ldelim(); if (message.publicDependency != null && message.publicDependency.length) for (var i = 0; i < message.publicDependency.length; ++i) writer.uint32(/* id 10, wireType 0 =*/80).int32(message.publicDependency[i]); @@ -84997,7 +87645,7 @@ * @returns {$protobuf.Writer} Writer */ FileDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -85145,41 +87793,41 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) if (!$util.isString(message.name)) return "name: string expected"; - if (message["package"] != null && message.hasOwnProperty("package")) + if (message["package"] != null && Object.hasOwnProperty.call(message, "package")) if (!$util.isString(message["package"])) return "package: string expected"; - if (message.dependency != null && message.hasOwnProperty("dependency")) { + if (message.dependency != null && Object.hasOwnProperty.call(message, "dependency")) { if (!Array.isArray(message.dependency)) return "dependency: array expected"; for (var i = 0; i < message.dependency.length; ++i) if (!$util.isString(message.dependency[i])) return "dependency: string[] expected"; } - if (message.publicDependency != null && message.hasOwnProperty("publicDependency")) { + if (message.publicDependency != null && Object.hasOwnProperty.call(message, "publicDependency")) { if (!Array.isArray(message.publicDependency)) return "publicDependency: array expected"; for (var i = 0; i < message.publicDependency.length; ++i) if (!$util.isInteger(message.publicDependency[i])) return "publicDependency: integer[] expected"; } - if (message.weakDependency != null && message.hasOwnProperty("weakDependency")) { + if (message.weakDependency != null && Object.hasOwnProperty.call(message, "weakDependency")) { if (!Array.isArray(message.weakDependency)) return "weakDependency: array expected"; for (var i = 0; i < message.weakDependency.length; ++i) if (!$util.isInteger(message.weakDependency[i])) return "weakDependency: integer[] expected"; } - if (message.optionDependency != null && message.hasOwnProperty("optionDependency")) { + if (message.optionDependency != null && Object.hasOwnProperty.call(message, "optionDependency")) { if (!Array.isArray(message.optionDependency)) return "optionDependency: array expected"; for (var i = 0; i < message.optionDependency.length; ++i) if (!$util.isString(message.optionDependency[i])) return "optionDependency: string[] expected"; } - if (message.messageType != null && message.hasOwnProperty("messageType")) { + if (message.messageType != null && Object.hasOwnProperty.call(message, "messageType")) { if (!Array.isArray(message.messageType)) return "messageType: array expected"; for (var i = 0; i < message.messageType.length; ++i) { @@ -85188,7 +87836,7 @@ return "messageType." + error; } } - if (message.enumType != null && message.hasOwnProperty("enumType")) { + if (message.enumType != null && Object.hasOwnProperty.call(message, "enumType")) { if (!Array.isArray(message.enumType)) return "enumType: array expected"; for (var i = 0; i < message.enumType.length; ++i) { @@ -85197,7 +87845,7 @@ return "enumType." + error; } } - if (message.service != null && message.hasOwnProperty("service")) { + if (message.service != null && Object.hasOwnProperty.call(message, "service")) { if (!Array.isArray(message.service)) return "service: array expected"; for (var i = 0; i < message.service.length; ++i) { @@ -85206,7 +87854,7 @@ return "service." + error; } } - if (message.extension != null && message.hasOwnProperty("extension")) { + if (message.extension != null && Object.hasOwnProperty.call(message, "extension")) { if (!Array.isArray(message.extension)) return "extension: array expected"; for (var i = 0; i < message.extension.length; ++i) { @@ -85215,20 +87863,20 @@ return "extension." + error; } } - if (message.options != null && message.hasOwnProperty("options")) { + if (message.options != null && Object.hasOwnProperty.call(message, "options")) { var error = $root.google.protobuf.FileOptions.verify(message.options, long + 1); if (error) return "options." + error; } - if (message.sourceCodeInfo != null && message.hasOwnProperty("sourceCodeInfo")) { + if (message.sourceCodeInfo != null && Object.hasOwnProperty.call(message, "sourceCodeInfo")) { var error = $root.google.protobuf.SourceCodeInfo.verify(message.sourceCodeInfo, long + 1); if (error) return "sourceCodeInfo." + error; } - if (message.syntax != null && message.hasOwnProperty("syntax")) + if (message.syntax != null && Object.hasOwnProperty.call(message, "syntax")) if (!$util.isString(message.syntax)) return "syntax: string expected"; - if (message.edition != null && message.hasOwnProperty("edition")) + if (message.edition != null && Object.hasOwnProperty.call(message, "edition")) switch (message.edition) { default: return "edition: enum value expected"; @@ -85260,6 +87908,8 @@ FileDescriptorProto.fromObject = function fromObject(object, long) { if (object instanceof $root.google.protobuf.FileDescriptorProto) return object; + if (!$util.isObject(object)) + throw TypeError(".google.protobuf.FileDescriptorProto: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -85302,7 +87952,7 @@ throw TypeError(".google.protobuf.FileDescriptorProto.messageType: array expected"); message.messageType = []; for (var i = 0; i < object.messageType.length; ++i) { - if (typeof object.messageType[i] !== "object") + if (!$util.isObject(object.messageType[i])) throw TypeError(".google.protobuf.FileDescriptorProto.messageType: object expected"); message.messageType[i] = $root.google.protobuf.DescriptorProto.fromObject(object.messageType[i], long + 1); } @@ -85312,7 +87962,7 @@ throw TypeError(".google.protobuf.FileDescriptorProto.enumType: array expected"); message.enumType = []; for (var i = 0; i < object.enumType.length; ++i) { - if (typeof object.enumType[i] !== "object") + if (!$util.isObject(object.enumType[i])) throw TypeError(".google.protobuf.FileDescriptorProto.enumType: object expected"); message.enumType[i] = $root.google.protobuf.EnumDescriptorProto.fromObject(object.enumType[i], long + 1); } @@ -85322,7 +87972,7 @@ throw TypeError(".google.protobuf.FileDescriptorProto.service: array expected"); message.service = []; for (var i = 0; i < object.service.length; ++i) { - if (typeof object.service[i] !== "object") + if (!$util.isObject(object.service[i])) throw TypeError(".google.protobuf.FileDescriptorProto.service: object expected"); message.service[i] = $root.google.protobuf.ServiceDescriptorProto.fromObject(object.service[i], long + 1); } @@ -85332,18 +87982,18 @@ throw TypeError(".google.protobuf.FileDescriptorProto.extension: array expected"); message.extension = []; for (var i = 0; i < object.extension.length; ++i) { - if (typeof object.extension[i] !== "object") + if (!$util.isObject(object.extension[i])) throw TypeError(".google.protobuf.FileDescriptorProto.extension: object expected"); message.extension[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.extension[i], long + 1); } } if (object.options != null) { - if (typeof object.options !== "object") + if (!$util.isObject(object.options)) throw TypeError(".google.protobuf.FileDescriptorProto.options: object expected"); message.options = $root.google.protobuf.FileOptions.fromObject(object.options, long + 1); } if (object.sourceCodeInfo != null) { - if (typeof object.sourceCodeInfo !== "object") + if (!$util.isObject(object.sourceCodeInfo)) throw TypeError(".google.protobuf.FileDescriptorProto.sourceCodeInfo: object expected"); message.sourceCodeInfo = $root.google.protobuf.SourceCodeInfo.fromObject(object.sourceCodeInfo, long + 1); } @@ -85417,9 +88067,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - FileDescriptorProto.toObject = function toObject(message, options) { + FileDescriptorProto.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) { object.dependency = []; @@ -85439,9 +88093,9 @@ object.syntax = ""; object.edition = options.enums === String ? "EDITION_UNKNOWN" : 0; } - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) object.name = message.name; - if (message["package"] != null && message.hasOwnProperty("package")) + if (message["package"] != null && Object.hasOwnProperty.call(message, "package")) object["package"] = message["package"]; if (message.dependency && message.dependency.length) { object.dependency = []; @@ -85451,27 +88105,27 @@ if (message.messageType && message.messageType.length) { object.messageType = []; for (var j = 0; j < message.messageType.length; ++j) - object.messageType[j] = $root.google.protobuf.DescriptorProto.toObject(message.messageType[j], options); + object.messageType[j] = $root.google.protobuf.DescriptorProto.toObject(message.messageType[j], options, q + 1); } if (message.enumType && message.enumType.length) { object.enumType = []; for (var j = 0; j < message.enumType.length; ++j) - object.enumType[j] = $root.google.protobuf.EnumDescriptorProto.toObject(message.enumType[j], options); + object.enumType[j] = $root.google.protobuf.EnumDescriptorProto.toObject(message.enumType[j], options, q + 1); } if (message.service && message.service.length) { object.service = []; for (var j = 0; j < message.service.length; ++j) - object.service[j] = $root.google.protobuf.ServiceDescriptorProto.toObject(message.service[j], options); + object.service[j] = $root.google.protobuf.ServiceDescriptorProto.toObject(message.service[j], options, q + 1); } if (message.extension && message.extension.length) { object.extension = []; for (var j = 0; j < message.extension.length; ++j) - object.extension[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.extension[j], options); + object.extension[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.extension[j], options, q + 1); } - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.FileOptions.toObject(message.options, options); - if (message.sourceCodeInfo != null && message.hasOwnProperty("sourceCodeInfo")) - object.sourceCodeInfo = $root.google.protobuf.SourceCodeInfo.toObject(message.sourceCodeInfo, options); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + object.options = $root.google.protobuf.FileOptions.toObject(message.options, options, q + 1); + if (message.sourceCodeInfo != null && Object.hasOwnProperty.call(message, "sourceCodeInfo")) + object.sourceCodeInfo = $root.google.protobuf.SourceCodeInfo.toObject(message.sourceCodeInfo, options, q + 1); if (message.publicDependency && message.publicDependency.length) { object.publicDependency = []; for (var j = 0; j < message.publicDependency.length; ++j) @@ -85482,9 +88136,9 @@ for (var j = 0; j < message.weakDependency.length; ++j) object.weakDependency[j] = message.weakDependency[j]; } - if (message.syntax != null && message.hasOwnProperty("syntax")) + if (message.syntax != null && Object.hasOwnProperty.call(message, "syntax")) object.syntax = message.syntax; - if (message.edition != null && message.hasOwnProperty("edition")) + if (message.edition != null && Object.hasOwnProperty.call(message, "edition")) object.edition = options.enums === String ? $root.google.protobuf.Edition[message.edition] === undefined ? message.edition : $root.google.protobuf.Edition[message.edition] : message.edition; if (message.optionDependency && message.optionDependency.length) { object.optionDependency = []; @@ -85674,34 +88328,38 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DescriptorProto.encode = function encode(message, writer) { + DescriptorProto.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); if (message.field != null && message.field.length) for (var i = 0; i < message.field.length; ++i) - $root.google.protobuf.FieldDescriptorProto.encode(message.field[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + $root.google.protobuf.FieldDescriptorProto.encode(message.field[i], writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); if (message.nestedType != null && message.nestedType.length) for (var i = 0; i < message.nestedType.length; ++i) - $root.google.protobuf.DescriptorProto.encode(message.nestedType[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + $root.google.protobuf.DescriptorProto.encode(message.nestedType[i], writer.uint32(/* id 3, wireType 2 =*/26).fork(), q + 1).ldelim(); if (message.enumType != null && message.enumType.length) for (var i = 0; i < message.enumType.length; ++i) - $root.google.protobuf.EnumDescriptorProto.encode(message.enumType[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + $root.google.protobuf.EnumDescriptorProto.encode(message.enumType[i], writer.uint32(/* id 4, wireType 2 =*/34).fork(), q + 1).ldelim(); if (message.extensionRange != null && message.extensionRange.length) for (var i = 0; i < message.extensionRange.length; ++i) - $root.google.protobuf.DescriptorProto.ExtensionRange.encode(message.extensionRange[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + $root.google.protobuf.DescriptorProto.ExtensionRange.encode(message.extensionRange[i], writer.uint32(/* id 5, wireType 2 =*/42).fork(), q + 1).ldelim(); if (message.extension != null && message.extension.length) for (var i = 0; i < message.extension.length; ++i) - $root.google.protobuf.FieldDescriptorProto.encode(message.extension[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + $root.google.protobuf.FieldDescriptorProto.encode(message.extension[i], writer.uint32(/* id 6, wireType 2 =*/50).fork(), q + 1).ldelim(); if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.MessageOptions.encode(message.options, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + $root.google.protobuf.MessageOptions.encode(message.options, writer.uint32(/* id 7, wireType 2 =*/58).fork(), q + 1).ldelim(); if (message.oneofDecl != null && message.oneofDecl.length) for (var i = 0; i < message.oneofDecl.length; ++i) - $root.google.protobuf.OneofDescriptorProto.encode(message.oneofDecl[i], writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + $root.google.protobuf.OneofDescriptorProto.encode(message.oneofDecl[i], writer.uint32(/* id 8, wireType 2 =*/66).fork(), q + 1).ldelim(); if (message.reservedRange != null && message.reservedRange.length) for (var i = 0; i < message.reservedRange.length; ++i) - $root.google.protobuf.DescriptorProto.ReservedRange.encode(message.reservedRange[i], writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + $root.google.protobuf.DescriptorProto.ReservedRange.encode(message.reservedRange[i], writer.uint32(/* id 9, wireType 2 =*/74).fork(), q + 1).ldelim(); if (message.reservedName != null && message.reservedName.length) for (var i = 0; i < message.reservedName.length; ++i) writer.uint32(/* id 10, wireType 2 =*/82).string(message.reservedName[i]); @@ -85720,7 +88378,7 @@ * @returns {$protobuf.Writer} Writer */ DescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -85846,10 +88504,10 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) if (!$util.isString(message.name)) return "name: string expected"; - if (message.field != null && message.hasOwnProperty("field")) { + if (message.field != null && Object.hasOwnProperty.call(message, "field")) { if (!Array.isArray(message.field)) return "field: array expected"; for (var i = 0; i < message.field.length; ++i) { @@ -85858,7 +88516,7 @@ return "field." + error; } } - if (message.extension != null && message.hasOwnProperty("extension")) { + if (message.extension != null && Object.hasOwnProperty.call(message, "extension")) { if (!Array.isArray(message.extension)) return "extension: array expected"; for (var i = 0; i < message.extension.length; ++i) { @@ -85867,7 +88525,7 @@ return "extension." + error; } } - if (message.nestedType != null && message.hasOwnProperty("nestedType")) { + if (message.nestedType != null && Object.hasOwnProperty.call(message, "nestedType")) { if (!Array.isArray(message.nestedType)) return "nestedType: array expected"; for (var i = 0; i < message.nestedType.length; ++i) { @@ -85876,7 +88534,7 @@ return "nestedType." + error; } } - if (message.enumType != null && message.hasOwnProperty("enumType")) { + if (message.enumType != null && Object.hasOwnProperty.call(message, "enumType")) { if (!Array.isArray(message.enumType)) return "enumType: array expected"; for (var i = 0; i < message.enumType.length; ++i) { @@ -85885,7 +88543,7 @@ return "enumType." + error; } } - if (message.extensionRange != null && message.hasOwnProperty("extensionRange")) { + if (message.extensionRange != null && Object.hasOwnProperty.call(message, "extensionRange")) { if (!Array.isArray(message.extensionRange)) return "extensionRange: array expected"; for (var i = 0; i < message.extensionRange.length; ++i) { @@ -85894,7 +88552,7 @@ return "extensionRange." + error; } } - if (message.oneofDecl != null && message.hasOwnProperty("oneofDecl")) { + if (message.oneofDecl != null && Object.hasOwnProperty.call(message, "oneofDecl")) { if (!Array.isArray(message.oneofDecl)) return "oneofDecl: array expected"; for (var i = 0; i < message.oneofDecl.length; ++i) { @@ -85903,12 +88561,12 @@ return "oneofDecl." + error; } } - if (message.options != null && message.hasOwnProperty("options")) { + if (message.options != null && Object.hasOwnProperty.call(message, "options")) { var error = $root.google.protobuf.MessageOptions.verify(message.options, long + 1); if (error) return "options." + error; } - if (message.reservedRange != null && message.hasOwnProperty("reservedRange")) { + if (message.reservedRange != null && Object.hasOwnProperty.call(message, "reservedRange")) { if (!Array.isArray(message.reservedRange)) return "reservedRange: array expected"; for (var i = 0; i < message.reservedRange.length; ++i) { @@ -85917,14 +88575,14 @@ return "reservedRange." + error; } } - if (message.reservedName != null && message.hasOwnProperty("reservedName")) { + if (message.reservedName != null && Object.hasOwnProperty.call(message, "reservedName")) { if (!Array.isArray(message.reservedName)) return "reservedName: array expected"; for (var i = 0; i < message.reservedName.length; ++i) if (!$util.isString(message.reservedName[i])) return "reservedName: string[] expected"; } - if (message.visibility != null && message.hasOwnProperty("visibility")) + if (message.visibility != null && Object.hasOwnProperty.call(message, "visibility")) switch (message.visibility) { default: return "visibility: enum value expected"; @@ -85947,6 +88605,8 @@ DescriptorProto.fromObject = function fromObject(object, long) { if (object instanceof $root.google.protobuf.DescriptorProto) return object; + if (!$util.isObject(object)) + throw TypeError(".google.protobuf.DescriptorProto: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -85959,7 +88619,7 @@ throw TypeError(".google.protobuf.DescriptorProto.field: array expected"); message.field = []; for (var i = 0; i < object.field.length; ++i) { - if (typeof object.field[i] !== "object") + if (!$util.isObject(object.field[i])) throw TypeError(".google.protobuf.DescriptorProto.field: object expected"); message.field[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.field[i], long + 1); } @@ -85969,7 +88629,7 @@ throw TypeError(".google.protobuf.DescriptorProto.extension: array expected"); message.extension = []; for (var i = 0; i < object.extension.length; ++i) { - if (typeof object.extension[i] !== "object") + if (!$util.isObject(object.extension[i])) throw TypeError(".google.protobuf.DescriptorProto.extension: object expected"); message.extension[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.extension[i], long + 1); } @@ -85979,7 +88639,7 @@ throw TypeError(".google.protobuf.DescriptorProto.nestedType: array expected"); message.nestedType = []; for (var i = 0; i < object.nestedType.length; ++i) { - if (typeof object.nestedType[i] !== "object") + if (!$util.isObject(object.nestedType[i])) throw TypeError(".google.protobuf.DescriptorProto.nestedType: object expected"); message.nestedType[i] = $root.google.protobuf.DescriptorProto.fromObject(object.nestedType[i], long + 1); } @@ -85989,7 +88649,7 @@ throw TypeError(".google.protobuf.DescriptorProto.enumType: array expected"); message.enumType = []; for (var i = 0; i < object.enumType.length; ++i) { - if (typeof object.enumType[i] !== "object") + if (!$util.isObject(object.enumType[i])) throw TypeError(".google.protobuf.DescriptorProto.enumType: object expected"); message.enumType[i] = $root.google.protobuf.EnumDescriptorProto.fromObject(object.enumType[i], long + 1); } @@ -85999,7 +88659,7 @@ throw TypeError(".google.protobuf.DescriptorProto.extensionRange: array expected"); message.extensionRange = []; for (var i = 0; i < object.extensionRange.length; ++i) { - if (typeof object.extensionRange[i] !== "object") + if (!$util.isObject(object.extensionRange[i])) throw TypeError(".google.protobuf.DescriptorProto.extensionRange: object expected"); message.extensionRange[i] = $root.google.protobuf.DescriptorProto.ExtensionRange.fromObject(object.extensionRange[i], long + 1); } @@ -86009,13 +88669,13 @@ throw TypeError(".google.protobuf.DescriptorProto.oneofDecl: array expected"); message.oneofDecl = []; for (var i = 0; i < object.oneofDecl.length; ++i) { - if (typeof object.oneofDecl[i] !== "object") + if (!$util.isObject(object.oneofDecl[i])) throw TypeError(".google.protobuf.DescriptorProto.oneofDecl: object expected"); message.oneofDecl[i] = $root.google.protobuf.OneofDescriptorProto.fromObject(object.oneofDecl[i], long + 1); } } if (object.options != null) { - if (typeof object.options !== "object") + if (!$util.isObject(object.options)) throw TypeError(".google.protobuf.DescriptorProto.options: object expected"); message.options = $root.google.protobuf.MessageOptions.fromObject(object.options, long + 1); } @@ -86024,7 +88684,7 @@ throw TypeError(".google.protobuf.DescriptorProto.reservedRange: array expected"); message.reservedRange = []; for (var i = 0; i < object.reservedRange.length; ++i) { - if (typeof object.reservedRange[i] !== "object") + if (!$util.isObject(object.reservedRange[i])) throw TypeError(".google.protobuf.DescriptorProto.reservedRange: object expected"); message.reservedRange[i] = $root.google.protobuf.DescriptorProto.ReservedRange.fromObject(object.reservedRange[i], long + 1); } @@ -86068,9 +88728,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DescriptorProto.toObject = function toObject(message, options) { + DescriptorProto.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) { object.field = []; @@ -86087,51 +88751,51 @@ object.options = null; object.visibility = options.enums === String ? "VISIBILITY_UNSET" : 0; } - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) object.name = message.name; if (message.field && message.field.length) { object.field = []; for (var j = 0; j < message.field.length; ++j) - object.field[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.field[j], options); + object.field[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.field[j], options, q + 1); } if (message.nestedType && message.nestedType.length) { object.nestedType = []; for (var j = 0; j < message.nestedType.length; ++j) - object.nestedType[j] = $root.google.protobuf.DescriptorProto.toObject(message.nestedType[j], options); + object.nestedType[j] = $root.google.protobuf.DescriptorProto.toObject(message.nestedType[j], options, q + 1); } if (message.enumType && message.enumType.length) { object.enumType = []; for (var j = 0; j < message.enumType.length; ++j) - object.enumType[j] = $root.google.protobuf.EnumDescriptorProto.toObject(message.enumType[j], options); + object.enumType[j] = $root.google.protobuf.EnumDescriptorProto.toObject(message.enumType[j], options, q + 1); } if (message.extensionRange && message.extensionRange.length) { object.extensionRange = []; for (var j = 0; j < message.extensionRange.length; ++j) - object.extensionRange[j] = $root.google.protobuf.DescriptorProto.ExtensionRange.toObject(message.extensionRange[j], options); + object.extensionRange[j] = $root.google.protobuf.DescriptorProto.ExtensionRange.toObject(message.extensionRange[j], options, q + 1); } if (message.extension && message.extension.length) { object.extension = []; for (var j = 0; j < message.extension.length; ++j) - object.extension[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.extension[j], options); + object.extension[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.extension[j], options, q + 1); } - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.MessageOptions.toObject(message.options, options); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + object.options = $root.google.protobuf.MessageOptions.toObject(message.options, options, q + 1); if (message.oneofDecl && message.oneofDecl.length) { object.oneofDecl = []; for (var j = 0; j < message.oneofDecl.length; ++j) - object.oneofDecl[j] = $root.google.protobuf.OneofDescriptorProto.toObject(message.oneofDecl[j], options); + object.oneofDecl[j] = $root.google.protobuf.OneofDescriptorProto.toObject(message.oneofDecl[j], options, q + 1); } if (message.reservedRange && message.reservedRange.length) { object.reservedRange = []; for (var j = 0; j < message.reservedRange.length; ++j) - object.reservedRange[j] = $root.google.protobuf.DescriptorProto.ReservedRange.toObject(message.reservedRange[j], options); + object.reservedRange[j] = $root.google.protobuf.DescriptorProto.ReservedRange.toObject(message.reservedRange[j], options, q + 1); } if (message.reservedName && message.reservedName.length) { object.reservedName = []; for (var j = 0; j < message.reservedName.length; ++j) object.reservedName[j] = message.reservedName[j]; } - if (message.visibility != null && message.hasOwnProperty("visibility")) + if (message.visibility != null && Object.hasOwnProperty.call(message, "visibility")) object.visibility = options.enums === String ? $root.google.protobuf.SymbolVisibility[message.visibility] === undefined ? message.visibility : $root.google.protobuf.SymbolVisibility[message.visibility] : message.visibility; return object; }; @@ -86233,15 +88897,19 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ExtensionRange.encode = function encode(message, writer) { + ExtensionRange.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.start != null && Object.hasOwnProperty.call(message, "start")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.start); if (message.end != null && Object.hasOwnProperty.call(message, "end")) writer.uint32(/* id 2, wireType 0 =*/16).int32(message.end); if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.ExtensionRangeOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + $root.google.protobuf.ExtensionRangeOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork(), q + 1).ldelim(); return writer; }; @@ -86255,7 +88923,7 @@ * @returns {$protobuf.Writer} Writer */ ExtensionRange.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -86333,13 +89001,13 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.start != null && message.hasOwnProperty("start")) + if (message.start != null && Object.hasOwnProperty.call(message, "start")) if (!$util.isInteger(message.start)) return "start: integer expected"; - if (message.end != null && message.hasOwnProperty("end")) + if (message.end != null && Object.hasOwnProperty.call(message, "end")) if (!$util.isInteger(message.end)) return "end: integer expected"; - if (message.options != null && message.hasOwnProperty("options")) { + if (message.options != null && Object.hasOwnProperty.call(message, "options")) { var error = $root.google.protobuf.ExtensionRangeOptions.verify(message.options, long + 1); if (error) return "options." + error; @@ -86358,6 +89026,8 @@ ExtensionRange.fromObject = function fromObject(object, long) { if (object instanceof $root.google.protobuf.DescriptorProto.ExtensionRange) return object; + if (!$util.isObject(object)) + throw TypeError(".google.protobuf.DescriptorProto.ExtensionRange: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -86368,7 +89038,7 @@ if (object.end != null) message.end = object.end | 0; if (object.options != null) { - if (typeof object.options !== "object") + if (!$util.isObject(object.options)) throw TypeError(".google.protobuf.DescriptorProto.ExtensionRange.options: object expected"); message.options = $root.google.protobuf.ExtensionRangeOptions.fromObject(object.options, long + 1); } @@ -86384,21 +89054,25 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ExtensionRange.toObject = function toObject(message, options) { + ExtensionRange.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.start = 0; object.end = 0; object.options = null; } - if (message.start != null && message.hasOwnProperty("start")) + if (message.start != null && Object.hasOwnProperty.call(message, "start")) object.start = message.start; - if (message.end != null && message.hasOwnProperty("end")) + if (message.end != null && Object.hasOwnProperty.call(message, "end")) object.end = message.end; - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.ExtensionRangeOptions.toObject(message.options, options); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + object.options = $root.google.protobuf.ExtensionRangeOptions.toObject(message.options, options, q + 1); return object; }; @@ -86493,9 +89167,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ReservedRange.encode = function encode(message, writer) { + ReservedRange.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.start != null && Object.hasOwnProperty.call(message, "start")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.start); if (message.end != null && Object.hasOwnProperty.call(message, "end")) @@ -86513,7 +89191,7 @@ * @returns {$protobuf.Writer} Writer */ ReservedRange.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -86587,10 +89265,10 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.start != null && message.hasOwnProperty("start")) + if (message.start != null && Object.hasOwnProperty.call(message, "start")) if (!$util.isInteger(message.start)) return "start: integer expected"; - if (message.end != null && message.hasOwnProperty("end")) + if (message.end != null && Object.hasOwnProperty.call(message, "end")) if (!$util.isInteger(message.end)) return "end: integer expected"; return null; @@ -86607,6 +89285,8 @@ ReservedRange.fromObject = function fromObject(object, long) { if (object instanceof $root.google.protobuf.DescriptorProto.ReservedRange) return object; + if (!$util.isObject(object)) + throw TypeError(".google.protobuf.DescriptorProto.ReservedRange: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -86628,17 +89308,21 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ReservedRange.toObject = function toObject(message, options) { + ReservedRange.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.start = 0; object.end = 0; } - if (message.start != null && message.hasOwnProperty("start")) + if (message.start != null && Object.hasOwnProperty.call(message, "start")) object.start = message.start; - if (message.end != null && message.hasOwnProperty("end")) + if (message.end != null && Object.hasOwnProperty.call(message, "end")) object.end = message.end; return object; }; @@ -86757,19 +89441,23 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ExtensionRangeOptions.encode = function encode(message, writer) { + ExtensionRangeOptions.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.declaration != null && message.declaration.length) for (var i = 0; i < message.declaration.length; ++i) - $root.google.protobuf.ExtensionRangeOptions.Declaration.encode(message.declaration[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + $root.google.protobuf.ExtensionRangeOptions.Declaration.encode(message.declaration[i], writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); if (message.verification != null && Object.hasOwnProperty.call(message, "verification")) writer.uint32(/* id 3, wireType 0 =*/24).int32(message.verification); if (message.features != null && Object.hasOwnProperty.call(message, "features")) - $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 50, wireType 2 =*/402).fork()).ldelim(); + $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 50, wireType 2 =*/402).fork(), q + 1).ldelim(); if (message.uninterpretedOption != null && message.uninterpretedOption.length) for (var i = 0; i < message.uninterpretedOption.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork(), q + 1).ldelim(); return writer; }; @@ -86783,7 +89471,7 @@ * @returns {$protobuf.Writer} Writer */ ExtensionRangeOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -86869,7 +89557,7 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (message.uninterpretedOption != null && Object.hasOwnProperty.call(message, "uninterpretedOption")) { if (!Array.isArray(message.uninterpretedOption)) return "uninterpretedOption: array expected"; for (var i = 0; i < message.uninterpretedOption.length; ++i) { @@ -86878,7 +89566,7 @@ return "uninterpretedOption." + error; } } - if (message.declaration != null && message.hasOwnProperty("declaration")) { + if (message.declaration != null && Object.hasOwnProperty.call(message, "declaration")) { if (!Array.isArray(message.declaration)) return "declaration: array expected"; for (var i = 0; i < message.declaration.length; ++i) { @@ -86887,12 +89575,12 @@ return "declaration." + error; } } - if (message.features != null && message.hasOwnProperty("features")) { + if (message.features != null && Object.hasOwnProperty.call(message, "features")) { var error = $root.google.protobuf.FeatureSet.verify(message.features, long + 1); if (error) return "features." + error; } - if (message.verification != null && message.hasOwnProperty("verification")) + if (message.verification != null && Object.hasOwnProperty.call(message, "verification")) switch (message.verification) { default: return "verification: enum value expected"; @@ -86914,6 +89602,8 @@ ExtensionRangeOptions.fromObject = function fromObject(object, long) { if (object instanceof $root.google.protobuf.ExtensionRangeOptions) return object; + if (!$util.isObject(object)) + throw TypeError(".google.protobuf.ExtensionRangeOptions: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -86924,7 +89614,7 @@ throw TypeError(".google.protobuf.ExtensionRangeOptions.uninterpretedOption: array expected"); message.uninterpretedOption = []; for (var i = 0; i < object.uninterpretedOption.length; ++i) { - if (typeof object.uninterpretedOption[i] !== "object") + if (!$util.isObject(object.uninterpretedOption[i])) throw TypeError(".google.protobuf.ExtensionRangeOptions.uninterpretedOption: object expected"); message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i], long + 1); } @@ -86934,13 +89624,13 @@ throw TypeError(".google.protobuf.ExtensionRangeOptions.declaration: array expected"); message.declaration = []; for (var i = 0; i < object.declaration.length; ++i) { - if (typeof object.declaration[i] !== "object") + if (!$util.isObject(object.declaration[i])) throw TypeError(".google.protobuf.ExtensionRangeOptions.declaration: object expected"); message.declaration[i] = $root.google.protobuf.ExtensionRangeOptions.Declaration.fromObject(object.declaration[i], long + 1); } } if (object.features != null) { - if (typeof object.features !== "object") + if (!$util.isObject(object.features)) throw TypeError(".google.protobuf.ExtensionRangeOptions.features: object expected"); message.features = $root.google.protobuf.FeatureSet.fromObject(object.features, long + 1); } @@ -86972,9 +89662,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ExtensionRangeOptions.toObject = function toObject(message, options) { + ExtensionRangeOptions.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) { object.declaration = []; @@ -86987,16 +89681,16 @@ if (message.declaration && message.declaration.length) { object.declaration = []; for (var j = 0; j < message.declaration.length; ++j) - object.declaration[j] = $root.google.protobuf.ExtensionRangeOptions.Declaration.toObject(message.declaration[j], options); + object.declaration[j] = $root.google.protobuf.ExtensionRangeOptions.Declaration.toObject(message.declaration[j], options, q + 1); } - if (message.verification != null && message.hasOwnProperty("verification")) + if (message.verification != null && Object.hasOwnProperty.call(message, "verification")) object.verification = options.enums === String ? $root.google.protobuf.ExtensionRangeOptions.VerificationState[message.verification] === undefined ? message.verification : $root.google.protobuf.ExtensionRangeOptions.VerificationState[message.verification] : message.verification; - if (message.features != null && message.hasOwnProperty("features")) - object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); + if (message.features != null && Object.hasOwnProperty.call(message, "features")) + object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options, q + 1); if (message.uninterpretedOption && message.uninterpretedOption.length) { object.uninterpretedOption = []; for (var j = 0; j < message.uninterpretedOption.length; ++j) - object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options, q + 1); } return object; }; @@ -87116,9 +89810,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Declaration.encode = function encode(message, writer) { + Declaration.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.number != null && Object.hasOwnProperty.call(message, "number")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.number); if (message.fullName != null && Object.hasOwnProperty.call(message, "fullName")) @@ -87142,7 +89840,7 @@ * @returns {$protobuf.Writer} Writer */ Declaration.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -87228,19 +89926,19 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.number != null && message.hasOwnProperty("number")) + if (message.number != null && Object.hasOwnProperty.call(message, "number")) if (!$util.isInteger(message.number)) return "number: integer expected"; - if (message.fullName != null && message.hasOwnProperty("fullName")) + if (message.fullName != null && Object.hasOwnProperty.call(message, "fullName")) if (!$util.isString(message.fullName)) return "fullName: string expected"; - if (message.type != null && message.hasOwnProperty("type")) + if (message.type != null && Object.hasOwnProperty.call(message, "type")) if (!$util.isString(message.type)) return "type: string expected"; - if (message.reserved != null && message.hasOwnProperty("reserved")) + if (message.reserved != null && Object.hasOwnProperty.call(message, "reserved")) if (typeof message.reserved !== "boolean") return "reserved: boolean expected"; - if (message.repeated != null && message.hasOwnProperty("repeated")) + if (message.repeated != null && Object.hasOwnProperty.call(message, "repeated")) if (typeof message.repeated !== "boolean") return "repeated: boolean expected"; return null; @@ -87257,6 +89955,8 @@ Declaration.fromObject = function fromObject(object, long) { if (object instanceof $root.google.protobuf.ExtensionRangeOptions.Declaration) return object; + if (!$util.isObject(object)) + throw TypeError(".google.protobuf.ExtensionRangeOptions.Declaration: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -87284,9 +89984,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Declaration.toObject = function toObject(message, options) { + Declaration.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.number = 0; @@ -87295,15 +89999,15 @@ object.reserved = false; object.repeated = false; } - if (message.number != null && message.hasOwnProperty("number")) + if (message.number != null && Object.hasOwnProperty.call(message, "number")) object.number = message.number; - if (message.fullName != null && message.hasOwnProperty("fullName")) + if (message.fullName != null && Object.hasOwnProperty.call(message, "fullName")) object.fullName = message.fullName; - if (message.type != null && message.hasOwnProperty("type")) + if (message.type != null && Object.hasOwnProperty.call(message, "type")) object.type = message.type; - if (message.reserved != null && message.hasOwnProperty("reserved")) + if (message.reserved != null && Object.hasOwnProperty.call(message, "reserved")) object.reserved = message.reserved; - if (message.repeated != null && message.hasOwnProperty("repeated")) + if (message.repeated != null && Object.hasOwnProperty.call(message, "repeated")) object.repeated = message.repeated; return object; }; @@ -87497,9 +90201,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FieldDescriptorProto.encode = function encode(message, writer) { + FieldDescriptorProto.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); if (message.extendee != null && Object.hasOwnProperty.call(message, "extendee")) @@ -87515,7 +90223,7 @@ if (message.defaultValue != null && Object.hasOwnProperty.call(message, "defaultValue")) writer.uint32(/* id 7, wireType 2 =*/58).string(message.defaultValue); if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.FieldOptions.encode(message.options, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + $root.google.protobuf.FieldOptions.encode(message.options, writer.uint32(/* id 8, wireType 2 =*/66).fork(), q + 1).ldelim(); if (message.oneofIndex != null && Object.hasOwnProperty.call(message, "oneofIndex")) writer.uint32(/* id 9, wireType 0 =*/72).int32(message.oneofIndex); if (message.jsonName != null && Object.hasOwnProperty.call(message, "jsonName")) @@ -87535,7 +90243,7 @@ * @returns {$protobuf.Writer} Writer */ FieldDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -87645,13 +90353,13 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) if (!$util.isString(message.name)) return "name: string expected"; - if (message.number != null && message.hasOwnProperty("number")) + if (message.number != null && Object.hasOwnProperty.call(message, "number")) if (!$util.isInteger(message.number)) return "number: integer expected"; - if (message.label != null && message.hasOwnProperty("label")) + if (message.label != null && Object.hasOwnProperty.call(message, "label")) switch (message.label) { default: return "label: enum value expected"; @@ -87660,7 +90368,7 @@ case 2: break; } - if (message.type != null && message.hasOwnProperty("type")) + if (message.type != null && Object.hasOwnProperty.call(message, "type")) switch (message.type) { default: return "type: enum value expected"; @@ -87684,27 +90392,27 @@ case 18: break; } - if (message.typeName != null && message.hasOwnProperty("typeName")) + if (message.typeName != null && Object.hasOwnProperty.call(message, "typeName")) if (!$util.isString(message.typeName)) return "typeName: string expected"; - if (message.extendee != null && message.hasOwnProperty("extendee")) + if (message.extendee != null && Object.hasOwnProperty.call(message, "extendee")) if (!$util.isString(message.extendee)) return "extendee: string expected"; - if (message.defaultValue != null && message.hasOwnProperty("defaultValue")) + if (message.defaultValue != null && Object.hasOwnProperty.call(message, "defaultValue")) if (!$util.isString(message.defaultValue)) return "defaultValue: string expected"; - if (message.oneofIndex != null && message.hasOwnProperty("oneofIndex")) + if (message.oneofIndex != null && Object.hasOwnProperty.call(message, "oneofIndex")) if (!$util.isInteger(message.oneofIndex)) return "oneofIndex: integer expected"; - if (message.jsonName != null && message.hasOwnProperty("jsonName")) + if (message.jsonName != null && Object.hasOwnProperty.call(message, "jsonName")) if (!$util.isString(message.jsonName)) return "jsonName: string expected"; - if (message.options != null && message.hasOwnProperty("options")) { + if (message.options != null && Object.hasOwnProperty.call(message, "options")) { var error = $root.google.protobuf.FieldOptions.verify(message.options, long + 1); if (error) return "options." + error; } - if (message.proto3Optional != null && message.hasOwnProperty("proto3Optional")) + if (message.proto3Optional != null && Object.hasOwnProperty.call(message, "proto3Optional")) if (typeof message.proto3Optional !== "boolean") return "proto3Optional: boolean expected"; return null; @@ -87721,6 +90429,8 @@ FieldDescriptorProto.fromObject = function fromObject(object, long) { if (object instanceof $root.google.protobuf.FieldDescriptorProto) return object; + if (!$util.isObject(object)) + throw TypeError(".google.protobuf.FieldDescriptorProto: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -87841,7 +90551,7 @@ if (object.jsonName != null) message.jsonName = String(object.jsonName); if (object.options != null) { - if (typeof object.options !== "object") + if (!$util.isObject(object.options)) throw TypeError(".google.protobuf.FieldDescriptorProto.options: object expected"); message.options = $root.google.protobuf.FieldOptions.fromObject(object.options, long + 1); } @@ -87859,9 +90569,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - FieldDescriptorProto.toObject = function toObject(message, options) { + FieldDescriptorProto.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.name = ""; @@ -87876,27 +90590,27 @@ object.jsonName = ""; object.proto3Optional = false; } - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) object.name = message.name; - if (message.extendee != null && message.hasOwnProperty("extendee")) + if (message.extendee != null && Object.hasOwnProperty.call(message, "extendee")) object.extendee = message.extendee; - if (message.number != null && message.hasOwnProperty("number")) + if (message.number != null && Object.hasOwnProperty.call(message, "number")) object.number = message.number; - if (message.label != null && message.hasOwnProperty("label")) + if (message.label != null && Object.hasOwnProperty.call(message, "label")) object.label = options.enums === String ? $root.google.protobuf.FieldDescriptorProto.Label[message.label] === undefined ? message.label : $root.google.protobuf.FieldDescriptorProto.Label[message.label] : message.label; - if (message.type != null && message.hasOwnProperty("type")) + if (message.type != null && Object.hasOwnProperty.call(message, "type")) object.type = options.enums === String ? $root.google.protobuf.FieldDescriptorProto.Type[message.type] === undefined ? message.type : $root.google.protobuf.FieldDescriptorProto.Type[message.type] : message.type; - if (message.typeName != null && message.hasOwnProperty("typeName")) + if (message.typeName != null && Object.hasOwnProperty.call(message, "typeName")) object.typeName = message.typeName; - if (message.defaultValue != null && message.hasOwnProperty("defaultValue")) + if (message.defaultValue != null && Object.hasOwnProperty.call(message, "defaultValue")) object.defaultValue = message.defaultValue; - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.FieldOptions.toObject(message.options, options); - if (message.oneofIndex != null && message.hasOwnProperty("oneofIndex")) + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + object.options = $root.google.protobuf.FieldOptions.toObject(message.options, options, q + 1); + if (message.oneofIndex != null && Object.hasOwnProperty.call(message, "oneofIndex")) object.oneofIndex = message.oneofIndex; - if (message.jsonName != null && message.hasOwnProperty("jsonName")) + if (message.jsonName != null && Object.hasOwnProperty.call(message, "jsonName")) object.jsonName = message.jsonName; - if (message.proto3Optional != null && message.hasOwnProperty("proto3Optional")) + if (message.proto3Optional != null && Object.hasOwnProperty.call(message, "proto3Optional")) object.proto3Optional = message.proto3Optional; return object; }; @@ -88054,13 +90768,17 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - OneofDescriptorProto.encode = function encode(message, writer) { + OneofDescriptorProto.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.OneofOptions.encode(message.options, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + $root.google.protobuf.OneofOptions.encode(message.options, writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); return writer; }; @@ -88074,7 +90792,7 @@ * @returns {$protobuf.Writer} Writer */ OneofDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -88148,10 +90866,10 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) if (!$util.isString(message.name)) return "name: string expected"; - if (message.options != null && message.hasOwnProperty("options")) { + if (message.options != null && Object.hasOwnProperty.call(message, "options")) { var error = $root.google.protobuf.OneofOptions.verify(message.options, long + 1); if (error) return "options." + error; @@ -88170,6 +90888,8 @@ OneofDescriptorProto.fromObject = function fromObject(object, long) { if (object instanceof $root.google.protobuf.OneofDescriptorProto) return object; + if (!$util.isObject(object)) + throw TypeError(".google.protobuf.OneofDescriptorProto: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -88178,7 +90898,7 @@ if (object.name != null) message.name = String(object.name); if (object.options != null) { - if (typeof object.options !== "object") + if (!$util.isObject(object.options)) throw TypeError(".google.protobuf.OneofDescriptorProto.options: object expected"); message.options = $root.google.protobuf.OneofOptions.fromObject(object.options, long + 1); } @@ -88194,18 +90914,22 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - OneofDescriptorProto.toObject = function toObject(message, options) { + OneofDescriptorProto.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.name = ""; object.options = null; } - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) object.name = message.name; - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.OneofOptions.toObject(message.options, options); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + object.options = $root.google.protobuf.OneofOptions.toObject(message.options, options, q + 1); return object; }; @@ -88339,19 +91063,23 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - EnumDescriptorProto.encode = function encode(message, writer) { + EnumDescriptorProto.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); if (message.value != null && message.value.length) for (var i = 0; i < message.value.length; ++i) - $root.google.protobuf.EnumValueDescriptorProto.encode(message.value[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + $root.google.protobuf.EnumValueDescriptorProto.encode(message.value[i], writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.EnumOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + $root.google.protobuf.EnumOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork(), q + 1).ldelim(); if (message.reservedRange != null && message.reservedRange.length) for (var i = 0; i < message.reservedRange.length; ++i) - $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.encode(message.reservedRange[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.encode(message.reservedRange[i], writer.uint32(/* id 4, wireType 2 =*/34).fork(), q + 1).ldelim(); if (message.reservedName != null && message.reservedName.length) for (var i = 0; i < message.reservedName.length; ++i) writer.uint32(/* id 5, wireType 2 =*/42).string(message.reservedName[i]); @@ -88370,7 +91098,7 @@ * @returns {$protobuf.Writer} Writer */ EnumDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -88466,10 +91194,10 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) if (!$util.isString(message.name)) return "name: string expected"; - if (message.value != null && message.hasOwnProperty("value")) { + if (message.value != null && Object.hasOwnProperty.call(message, "value")) { if (!Array.isArray(message.value)) return "value: array expected"; for (var i = 0; i < message.value.length; ++i) { @@ -88478,12 +91206,12 @@ return "value." + error; } } - if (message.options != null && message.hasOwnProperty("options")) { + if (message.options != null && Object.hasOwnProperty.call(message, "options")) { var error = $root.google.protobuf.EnumOptions.verify(message.options, long + 1); if (error) return "options." + error; } - if (message.reservedRange != null && message.hasOwnProperty("reservedRange")) { + if (message.reservedRange != null && Object.hasOwnProperty.call(message, "reservedRange")) { if (!Array.isArray(message.reservedRange)) return "reservedRange: array expected"; for (var i = 0; i < message.reservedRange.length; ++i) { @@ -88492,14 +91220,14 @@ return "reservedRange." + error; } } - if (message.reservedName != null && message.hasOwnProperty("reservedName")) { + if (message.reservedName != null && Object.hasOwnProperty.call(message, "reservedName")) { if (!Array.isArray(message.reservedName)) return "reservedName: array expected"; for (var i = 0; i < message.reservedName.length; ++i) if (!$util.isString(message.reservedName[i])) return "reservedName: string[] expected"; } - if (message.visibility != null && message.hasOwnProperty("visibility")) + if (message.visibility != null && Object.hasOwnProperty.call(message, "visibility")) switch (message.visibility) { default: return "visibility: enum value expected"; @@ -88522,6 +91250,8 @@ EnumDescriptorProto.fromObject = function fromObject(object, long) { if (object instanceof $root.google.protobuf.EnumDescriptorProto) return object; + if (!$util.isObject(object)) + throw TypeError(".google.protobuf.EnumDescriptorProto: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -88534,13 +91264,13 @@ throw TypeError(".google.protobuf.EnumDescriptorProto.value: array expected"); message.value = []; for (var i = 0; i < object.value.length; ++i) { - if (typeof object.value[i] !== "object") + if (!$util.isObject(object.value[i])) throw TypeError(".google.protobuf.EnumDescriptorProto.value: object expected"); message.value[i] = $root.google.protobuf.EnumValueDescriptorProto.fromObject(object.value[i], long + 1); } } if (object.options != null) { - if (typeof object.options !== "object") + if (!$util.isObject(object.options)) throw TypeError(".google.protobuf.EnumDescriptorProto.options: object expected"); message.options = $root.google.protobuf.EnumOptions.fromObject(object.options, long + 1); } @@ -88549,7 +91279,7 @@ throw TypeError(".google.protobuf.EnumDescriptorProto.reservedRange: array expected"); message.reservedRange = []; for (var i = 0; i < object.reservedRange.length; ++i) { - if (typeof object.reservedRange[i] !== "object") + if (!$util.isObject(object.reservedRange[i])) throw TypeError(".google.protobuf.EnumDescriptorProto.reservedRange: object expected"); message.reservedRange[i] = $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.fromObject(object.reservedRange[i], long + 1); } @@ -88593,9 +91323,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - EnumDescriptorProto.toObject = function toObject(message, options) { + EnumDescriptorProto.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) { object.value = []; @@ -88607,26 +91341,26 @@ object.options = null; object.visibility = options.enums === String ? "VISIBILITY_UNSET" : 0; } - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) object.name = message.name; if (message.value && message.value.length) { object.value = []; for (var j = 0; j < message.value.length; ++j) - object.value[j] = $root.google.protobuf.EnumValueDescriptorProto.toObject(message.value[j], options); + object.value[j] = $root.google.protobuf.EnumValueDescriptorProto.toObject(message.value[j], options, q + 1); } - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.EnumOptions.toObject(message.options, options); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + object.options = $root.google.protobuf.EnumOptions.toObject(message.options, options, q + 1); if (message.reservedRange && message.reservedRange.length) { object.reservedRange = []; for (var j = 0; j < message.reservedRange.length; ++j) - object.reservedRange[j] = $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.toObject(message.reservedRange[j], options); + object.reservedRange[j] = $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.toObject(message.reservedRange[j], options, q + 1); } if (message.reservedName && message.reservedName.length) { object.reservedName = []; for (var j = 0; j < message.reservedName.length; ++j) object.reservedName[j] = message.reservedName[j]; } - if (message.visibility != null && message.hasOwnProperty("visibility")) + if (message.visibility != null && Object.hasOwnProperty.call(message, "visibility")) object.visibility = options.enums === String ? $root.google.protobuf.SymbolVisibility[message.visibility] === undefined ? message.visibility : $root.google.protobuf.SymbolVisibility[message.visibility] : message.visibility; return object; }; @@ -88719,9 +91453,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - EnumReservedRange.encode = function encode(message, writer) { + EnumReservedRange.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.start != null && Object.hasOwnProperty.call(message, "start")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.start); if (message.end != null && Object.hasOwnProperty.call(message, "end")) @@ -88739,7 +91477,7 @@ * @returns {$protobuf.Writer} Writer */ EnumReservedRange.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -88813,10 +91551,10 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.start != null && message.hasOwnProperty("start")) + if (message.start != null && Object.hasOwnProperty.call(message, "start")) if (!$util.isInteger(message.start)) return "start: integer expected"; - if (message.end != null && message.hasOwnProperty("end")) + if (message.end != null && Object.hasOwnProperty.call(message, "end")) if (!$util.isInteger(message.end)) return "end: integer expected"; return null; @@ -88833,6 +91571,8 @@ EnumReservedRange.fromObject = function fromObject(object, long) { if (object instanceof $root.google.protobuf.EnumDescriptorProto.EnumReservedRange) return object; + if (!$util.isObject(object)) + throw TypeError(".google.protobuf.EnumDescriptorProto.EnumReservedRange: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -88854,17 +91594,21 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - EnumReservedRange.toObject = function toObject(message, options) { + EnumReservedRange.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.start = 0; object.end = 0; } - if (message.start != null && message.hasOwnProperty("start")) + if (message.start != null && Object.hasOwnProperty.call(message, "start")) object.start = message.start; - if (message.end != null && message.hasOwnProperty("end")) + if (message.end != null && Object.hasOwnProperty.call(message, "end")) object.end = message.end; return object; }; @@ -88972,15 +91716,19 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - EnumValueDescriptorProto.encode = function encode(message, writer) { + EnumValueDescriptorProto.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); if (message.number != null && Object.hasOwnProperty.call(message, "number")) writer.uint32(/* id 2, wireType 0 =*/16).int32(message.number); if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.EnumValueOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + $root.google.protobuf.EnumValueOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork(), q + 1).ldelim(); return writer; }; @@ -88994,7 +91742,7 @@ * @returns {$protobuf.Writer} Writer */ EnumValueDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -89072,13 +91820,13 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) if (!$util.isString(message.name)) return "name: string expected"; - if (message.number != null && message.hasOwnProperty("number")) + if (message.number != null && Object.hasOwnProperty.call(message, "number")) if (!$util.isInteger(message.number)) return "number: integer expected"; - if (message.options != null && message.hasOwnProperty("options")) { + if (message.options != null && Object.hasOwnProperty.call(message, "options")) { var error = $root.google.protobuf.EnumValueOptions.verify(message.options, long + 1); if (error) return "options." + error; @@ -89097,6 +91845,8 @@ EnumValueDescriptorProto.fromObject = function fromObject(object, long) { if (object instanceof $root.google.protobuf.EnumValueDescriptorProto) return object; + if (!$util.isObject(object)) + throw TypeError(".google.protobuf.EnumValueDescriptorProto: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -89107,7 +91857,7 @@ if (object.number != null) message.number = object.number | 0; if (object.options != null) { - if (typeof object.options !== "object") + if (!$util.isObject(object.options)) throw TypeError(".google.protobuf.EnumValueDescriptorProto.options: object expected"); message.options = $root.google.protobuf.EnumValueOptions.fromObject(object.options, long + 1); } @@ -89123,21 +91873,25 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - EnumValueDescriptorProto.toObject = function toObject(message, options) { + EnumValueDescriptorProto.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.name = ""; object.number = 0; object.options = null; } - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) object.name = message.name; - if (message.number != null && message.hasOwnProperty("number")) + if (message.number != null && Object.hasOwnProperty.call(message, "number")) object.number = message.number; - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.EnumValueOptions.toObject(message.options, options); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + object.options = $root.google.protobuf.EnumValueOptions.toObject(message.options, options, q + 1); return object; }; @@ -89242,16 +91996,20 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ServiceDescriptorProto.encode = function encode(message, writer) { + ServiceDescriptorProto.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); if (message.method != null && message.method.length) for (var i = 0; i < message.method.length; ++i) - $root.google.protobuf.MethodDescriptorProto.encode(message.method[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + $root.google.protobuf.MethodDescriptorProto.encode(message.method[i], writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.ServiceOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + $root.google.protobuf.ServiceOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork(), q + 1).ldelim(); return writer; }; @@ -89265,7 +92023,7 @@ * @returns {$protobuf.Writer} Writer */ ServiceDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -89345,10 +92103,10 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) if (!$util.isString(message.name)) return "name: string expected"; - if (message.method != null && message.hasOwnProperty("method")) { + if (message.method != null && Object.hasOwnProperty.call(message, "method")) { if (!Array.isArray(message.method)) return "method: array expected"; for (var i = 0; i < message.method.length; ++i) { @@ -89357,7 +92115,7 @@ return "method." + error; } } - if (message.options != null && message.hasOwnProperty("options")) { + if (message.options != null && Object.hasOwnProperty.call(message, "options")) { var error = $root.google.protobuf.ServiceOptions.verify(message.options, long + 1); if (error) return "options." + error; @@ -89376,6 +92134,8 @@ ServiceDescriptorProto.fromObject = function fromObject(object, long) { if (object instanceof $root.google.protobuf.ServiceDescriptorProto) return object; + if (!$util.isObject(object)) + throw TypeError(".google.protobuf.ServiceDescriptorProto: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -89388,13 +92148,13 @@ throw TypeError(".google.protobuf.ServiceDescriptorProto.method: array expected"); message.method = []; for (var i = 0; i < object.method.length; ++i) { - if (typeof object.method[i] !== "object") + if (!$util.isObject(object.method[i])) throw TypeError(".google.protobuf.ServiceDescriptorProto.method: object expected"); message.method[i] = $root.google.protobuf.MethodDescriptorProto.fromObject(object.method[i], long + 1); } } if (object.options != null) { - if (typeof object.options !== "object") + if (!$util.isObject(object.options)) throw TypeError(".google.protobuf.ServiceDescriptorProto.options: object expected"); message.options = $root.google.protobuf.ServiceOptions.fromObject(object.options, long + 1); } @@ -89410,9 +92170,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ServiceDescriptorProto.toObject = function toObject(message, options) { + ServiceDescriptorProto.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.method = []; @@ -89420,15 +92184,15 @@ object.name = ""; object.options = null; } - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) object.name = message.name; if (message.method && message.method.length) { object.method = []; for (var j = 0; j < message.method.length; ++j) - object.method[j] = $root.google.protobuf.MethodDescriptorProto.toObject(message.method[j], options); + object.method[j] = $root.google.protobuf.MethodDescriptorProto.toObject(message.method[j], options, q + 1); } - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.ServiceOptions.toObject(message.options, options); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + object.options = $root.google.protobuf.ServiceOptions.toObject(message.options, options, q + 1); return object; }; @@ -89559,9 +92323,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MethodDescriptorProto.encode = function encode(message, writer) { + MethodDescriptorProto.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); if (message.inputType != null && Object.hasOwnProperty.call(message, "inputType")) @@ -89569,7 +92337,7 @@ if (message.outputType != null && Object.hasOwnProperty.call(message, "outputType")) writer.uint32(/* id 3, wireType 2 =*/26).string(message.outputType); if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.MethodOptions.encode(message.options, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + $root.google.protobuf.MethodOptions.encode(message.options, writer.uint32(/* id 4, wireType 2 =*/34).fork(), q + 1).ldelim(); if (message.clientStreaming != null && Object.hasOwnProperty.call(message, "clientStreaming")) writer.uint32(/* id 5, wireType 0 =*/40).bool(message.clientStreaming); if (message.serverStreaming != null && Object.hasOwnProperty.call(message, "serverStreaming")) @@ -89587,7 +92355,7 @@ * @returns {$protobuf.Writer} Writer */ MethodDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -89677,24 +92445,24 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) if (!$util.isString(message.name)) return "name: string expected"; - if (message.inputType != null && message.hasOwnProperty("inputType")) + if (message.inputType != null && Object.hasOwnProperty.call(message, "inputType")) if (!$util.isString(message.inputType)) return "inputType: string expected"; - if (message.outputType != null && message.hasOwnProperty("outputType")) + if (message.outputType != null && Object.hasOwnProperty.call(message, "outputType")) if (!$util.isString(message.outputType)) return "outputType: string expected"; - if (message.options != null && message.hasOwnProperty("options")) { + if (message.options != null && Object.hasOwnProperty.call(message, "options")) { var error = $root.google.protobuf.MethodOptions.verify(message.options, long + 1); if (error) return "options." + error; } - if (message.clientStreaming != null && message.hasOwnProperty("clientStreaming")) + if (message.clientStreaming != null && Object.hasOwnProperty.call(message, "clientStreaming")) if (typeof message.clientStreaming !== "boolean") return "clientStreaming: boolean expected"; - if (message.serverStreaming != null && message.hasOwnProperty("serverStreaming")) + if (message.serverStreaming != null && Object.hasOwnProperty.call(message, "serverStreaming")) if (typeof message.serverStreaming !== "boolean") return "serverStreaming: boolean expected"; return null; @@ -89711,6 +92479,8 @@ MethodDescriptorProto.fromObject = function fromObject(object, long) { if (object instanceof $root.google.protobuf.MethodDescriptorProto) return object; + if (!$util.isObject(object)) + throw TypeError(".google.protobuf.MethodDescriptorProto: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -89723,7 +92493,7 @@ if (object.outputType != null) message.outputType = String(object.outputType); if (object.options != null) { - if (typeof object.options !== "object") + if (!$util.isObject(object.options)) throw TypeError(".google.protobuf.MethodDescriptorProto.options: object expected"); message.options = $root.google.protobuf.MethodOptions.fromObject(object.options, long + 1); } @@ -89743,9 +92513,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - MethodDescriptorProto.toObject = function toObject(message, options) { + MethodDescriptorProto.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.name = ""; @@ -89755,17 +92529,17 @@ object.clientStreaming = false; object.serverStreaming = false; } - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) object.name = message.name; - if (message.inputType != null && message.hasOwnProperty("inputType")) + if (message.inputType != null && Object.hasOwnProperty.call(message, "inputType")) object.inputType = message.inputType; - if (message.outputType != null && message.hasOwnProperty("outputType")) + if (message.outputType != null && Object.hasOwnProperty.call(message, "outputType")) object.outputType = message.outputType; - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.MethodOptions.toObject(message.options, options); - if (message.clientStreaming != null && message.hasOwnProperty("clientStreaming")) + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + object.options = $root.google.protobuf.MethodOptions.toObject(message.options, options, q + 1); + if (message.clientStreaming != null && Object.hasOwnProperty.call(message, "clientStreaming")) object.clientStreaming = message.clientStreaming; - if (message.serverStreaming != null && message.hasOwnProperty("serverStreaming")) + if (message.serverStreaming != null && Object.hasOwnProperty.call(message, "serverStreaming")) object.serverStreaming = message.serverStreaming; return object; }; @@ -90043,9 +92817,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FileOptions.encode = function encode(message, writer) { + FileOptions.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.javaPackage != null && Object.hasOwnProperty.call(message, "javaPackage")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.javaPackage); if (message.javaOuterClassname != null && Object.hasOwnProperty.call(message, "javaOuterClassname")) @@ -90085,13 +92863,13 @@ if (message.rubyPackage != null && Object.hasOwnProperty.call(message, "rubyPackage")) writer.uint32(/* id 45, wireType 2 =*/362).string(message.rubyPackage); if (message.features != null && Object.hasOwnProperty.call(message, "features")) - $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 50, wireType 2 =*/402).fork()).ldelim(); + $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 50, wireType 2 =*/402).fork(), q + 1).ldelim(); if (message.uninterpretedOption != null && message.uninterpretedOption.length) for (var i = 0; i < message.uninterpretedOption.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork(), q + 1).ldelim(); if (message[".google.api.resourceDefinition"] != null && message[".google.api.resourceDefinition"].length) for (var i = 0; i < message[".google.api.resourceDefinition"].length; ++i) - $root.google.api.ResourceDescriptor.encode(message[".google.api.resourceDefinition"][i], writer.uint32(/* id 1053, wireType 2 =*/8426).fork()).ldelim(); + $root.google.api.ResourceDescriptor.encode(message[".google.api.resourceDefinition"][i], writer.uint32(/* id 1053, wireType 2 =*/8426).fork(), q + 1).ldelim(); return writer; }; @@ -90105,7 +92883,7 @@ * @returns {$protobuf.Writer} Writer */ FileOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -90263,22 +93041,22 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.javaPackage != null && message.hasOwnProperty("javaPackage")) + if (message.javaPackage != null && Object.hasOwnProperty.call(message, "javaPackage")) if (!$util.isString(message.javaPackage)) return "javaPackage: string expected"; - if (message.javaOuterClassname != null && message.hasOwnProperty("javaOuterClassname")) + if (message.javaOuterClassname != null && Object.hasOwnProperty.call(message, "javaOuterClassname")) if (!$util.isString(message.javaOuterClassname)) return "javaOuterClassname: string expected"; - if (message.javaMultipleFiles != null && message.hasOwnProperty("javaMultipleFiles")) + if (message.javaMultipleFiles != null && Object.hasOwnProperty.call(message, "javaMultipleFiles")) if (typeof message.javaMultipleFiles !== "boolean") return "javaMultipleFiles: boolean expected"; - if (message.javaGenerateEqualsAndHash != null && message.hasOwnProperty("javaGenerateEqualsAndHash")) + if (message.javaGenerateEqualsAndHash != null && Object.hasOwnProperty.call(message, "javaGenerateEqualsAndHash")) if (typeof message.javaGenerateEqualsAndHash !== "boolean") return "javaGenerateEqualsAndHash: boolean expected"; - if (message.javaStringCheckUtf8 != null && message.hasOwnProperty("javaStringCheckUtf8")) + if (message.javaStringCheckUtf8 != null && Object.hasOwnProperty.call(message, "javaStringCheckUtf8")) if (typeof message.javaStringCheckUtf8 !== "boolean") return "javaStringCheckUtf8: boolean expected"; - if (message.optimizeFor != null && message.hasOwnProperty("optimizeFor")) + if (message.optimizeFor != null && Object.hasOwnProperty.call(message, "optimizeFor")) switch (message.optimizeFor) { default: return "optimizeFor: enum value expected"; @@ -90287,51 +93065,51 @@ case 3: break; } - if (message.goPackage != null && message.hasOwnProperty("goPackage")) + if (message.goPackage != null && Object.hasOwnProperty.call(message, "goPackage")) if (!$util.isString(message.goPackage)) return "goPackage: string expected"; - if (message.ccGenericServices != null && message.hasOwnProperty("ccGenericServices")) + if (message.ccGenericServices != null && Object.hasOwnProperty.call(message, "ccGenericServices")) if (typeof message.ccGenericServices !== "boolean") return "ccGenericServices: boolean expected"; - if (message.javaGenericServices != null && message.hasOwnProperty("javaGenericServices")) + if (message.javaGenericServices != null && Object.hasOwnProperty.call(message, "javaGenericServices")) if (typeof message.javaGenericServices !== "boolean") return "javaGenericServices: boolean expected"; - if (message.pyGenericServices != null && message.hasOwnProperty("pyGenericServices")) + if (message.pyGenericServices != null && Object.hasOwnProperty.call(message, "pyGenericServices")) if (typeof message.pyGenericServices !== "boolean") return "pyGenericServices: boolean expected"; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) if (typeof message.deprecated !== "boolean") return "deprecated: boolean expected"; - if (message.ccEnableArenas != null && message.hasOwnProperty("ccEnableArenas")) + if (message.ccEnableArenas != null && Object.hasOwnProperty.call(message, "ccEnableArenas")) if (typeof message.ccEnableArenas !== "boolean") return "ccEnableArenas: boolean expected"; - if (message.objcClassPrefix != null && message.hasOwnProperty("objcClassPrefix")) + if (message.objcClassPrefix != null && Object.hasOwnProperty.call(message, "objcClassPrefix")) if (!$util.isString(message.objcClassPrefix)) return "objcClassPrefix: string expected"; - if (message.csharpNamespace != null && message.hasOwnProperty("csharpNamespace")) + if (message.csharpNamespace != null && Object.hasOwnProperty.call(message, "csharpNamespace")) if (!$util.isString(message.csharpNamespace)) return "csharpNamespace: string expected"; - if (message.swiftPrefix != null && message.hasOwnProperty("swiftPrefix")) + if (message.swiftPrefix != null && Object.hasOwnProperty.call(message, "swiftPrefix")) if (!$util.isString(message.swiftPrefix)) return "swiftPrefix: string expected"; - if (message.phpClassPrefix != null && message.hasOwnProperty("phpClassPrefix")) + if (message.phpClassPrefix != null && Object.hasOwnProperty.call(message, "phpClassPrefix")) if (!$util.isString(message.phpClassPrefix)) return "phpClassPrefix: string expected"; - if (message.phpNamespace != null && message.hasOwnProperty("phpNamespace")) + if (message.phpNamespace != null && Object.hasOwnProperty.call(message, "phpNamespace")) if (!$util.isString(message.phpNamespace)) return "phpNamespace: string expected"; - if (message.phpMetadataNamespace != null && message.hasOwnProperty("phpMetadataNamespace")) + if (message.phpMetadataNamespace != null && Object.hasOwnProperty.call(message, "phpMetadataNamespace")) if (!$util.isString(message.phpMetadataNamespace)) return "phpMetadataNamespace: string expected"; - if (message.rubyPackage != null && message.hasOwnProperty("rubyPackage")) + if (message.rubyPackage != null && Object.hasOwnProperty.call(message, "rubyPackage")) if (!$util.isString(message.rubyPackage)) return "rubyPackage: string expected"; - if (message.features != null && message.hasOwnProperty("features")) { + if (message.features != null && Object.hasOwnProperty.call(message, "features")) { var error = $root.google.protobuf.FeatureSet.verify(message.features, long + 1); if (error) return "features." + error; } - if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (message.uninterpretedOption != null && Object.hasOwnProperty.call(message, "uninterpretedOption")) { if (!Array.isArray(message.uninterpretedOption)) return "uninterpretedOption: array expected"; for (var i = 0; i < message.uninterpretedOption.length; ++i) { @@ -90340,7 +93118,7 @@ return "uninterpretedOption." + error; } } - if (message[".google.api.resourceDefinition"] != null && message.hasOwnProperty(".google.api.resourceDefinition")) { + if (message[".google.api.resourceDefinition"] != null && Object.hasOwnProperty.call(message, ".google.api.resourceDefinition")) { if (!Array.isArray(message[".google.api.resourceDefinition"])) return ".google.api.resourceDefinition: array expected"; for (var i = 0; i < message[".google.api.resourceDefinition"].length; ++i) { @@ -90363,6 +93141,8 @@ FileOptions.fromObject = function fromObject(object, long) { if (object instanceof $root.google.protobuf.FileOptions) return object; + if (!$util.isObject(object)) + throw TypeError(".google.protobuf.FileOptions: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -90425,7 +93205,7 @@ if (object.rubyPackage != null) message.rubyPackage = String(object.rubyPackage); if (object.features != null) { - if (typeof object.features !== "object") + if (!$util.isObject(object.features)) throw TypeError(".google.protobuf.FileOptions.features: object expected"); message.features = $root.google.protobuf.FeatureSet.fromObject(object.features, long + 1); } @@ -90434,7 +93214,7 @@ throw TypeError(".google.protobuf.FileOptions.uninterpretedOption: array expected"); message.uninterpretedOption = []; for (var i = 0; i < object.uninterpretedOption.length; ++i) { - if (typeof object.uninterpretedOption[i] !== "object") + if (!$util.isObject(object.uninterpretedOption[i])) throw TypeError(".google.protobuf.FileOptions.uninterpretedOption: object expected"); message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i], long + 1); } @@ -90444,7 +93224,7 @@ throw TypeError(".google.protobuf.FileOptions..google.api.resourceDefinition: array expected"); message[".google.api.resourceDefinition"] = []; for (var i = 0; i < object[".google.api.resourceDefinition"].length; ++i) { - if (typeof object[".google.api.resourceDefinition"][i] !== "object") + if (!$util.isObject(object[".google.api.resourceDefinition"][i])) throw TypeError(".google.protobuf.FileOptions..google.api.resourceDefinition: object expected"); message[".google.api.resourceDefinition"][i] = $root.google.api.ResourceDescriptor.fromObject(object[".google.api.resourceDefinition"][i], long + 1); } @@ -90461,9 +93241,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - FileOptions.toObject = function toObject(message, options) { + FileOptions.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) { object.uninterpretedOption = []; @@ -90491,55 +93275,55 @@ object.rubyPackage = ""; object.features = null; } - if (message.javaPackage != null && message.hasOwnProperty("javaPackage")) + if (message.javaPackage != null && Object.hasOwnProperty.call(message, "javaPackage")) object.javaPackage = message.javaPackage; - if (message.javaOuterClassname != null && message.hasOwnProperty("javaOuterClassname")) + if (message.javaOuterClassname != null && Object.hasOwnProperty.call(message, "javaOuterClassname")) object.javaOuterClassname = message.javaOuterClassname; - if (message.optimizeFor != null && message.hasOwnProperty("optimizeFor")) + if (message.optimizeFor != null && Object.hasOwnProperty.call(message, "optimizeFor")) object.optimizeFor = options.enums === String ? $root.google.protobuf.FileOptions.OptimizeMode[message.optimizeFor] === undefined ? message.optimizeFor : $root.google.protobuf.FileOptions.OptimizeMode[message.optimizeFor] : message.optimizeFor; - if (message.javaMultipleFiles != null && message.hasOwnProperty("javaMultipleFiles")) + if (message.javaMultipleFiles != null && Object.hasOwnProperty.call(message, "javaMultipleFiles")) object.javaMultipleFiles = message.javaMultipleFiles; - if (message.goPackage != null && message.hasOwnProperty("goPackage")) + if (message.goPackage != null && Object.hasOwnProperty.call(message, "goPackage")) object.goPackage = message.goPackage; - if (message.ccGenericServices != null && message.hasOwnProperty("ccGenericServices")) + if (message.ccGenericServices != null && Object.hasOwnProperty.call(message, "ccGenericServices")) object.ccGenericServices = message.ccGenericServices; - if (message.javaGenericServices != null && message.hasOwnProperty("javaGenericServices")) + if (message.javaGenericServices != null && Object.hasOwnProperty.call(message, "javaGenericServices")) object.javaGenericServices = message.javaGenericServices; - if (message.pyGenericServices != null && message.hasOwnProperty("pyGenericServices")) + if (message.pyGenericServices != null && Object.hasOwnProperty.call(message, "pyGenericServices")) object.pyGenericServices = message.pyGenericServices; - if (message.javaGenerateEqualsAndHash != null && message.hasOwnProperty("javaGenerateEqualsAndHash")) + if (message.javaGenerateEqualsAndHash != null && Object.hasOwnProperty.call(message, "javaGenerateEqualsAndHash")) object.javaGenerateEqualsAndHash = message.javaGenerateEqualsAndHash; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) object.deprecated = message.deprecated; - if (message.javaStringCheckUtf8 != null && message.hasOwnProperty("javaStringCheckUtf8")) + if (message.javaStringCheckUtf8 != null && Object.hasOwnProperty.call(message, "javaStringCheckUtf8")) object.javaStringCheckUtf8 = message.javaStringCheckUtf8; - if (message.ccEnableArenas != null && message.hasOwnProperty("ccEnableArenas")) + if (message.ccEnableArenas != null && Object.hasOwnProperty.call(message, "ccEnableArenas")) object.ccEnableArenas = message.ccEnableArenas; - if (message.objcClassPrefix != null && message.hasOwnProperty("objcClassPrefix")) + if (message.objcClassPrefix != null && Object.hasOwnProperty.call(message, "objcClassPrefix")) object.objcClassPrefix = message.objcClassPrefix; - if (message.csharpNamespace != null && message.hasOwnProperty("csharpNamespace")) + if (message.csharpNamespace != null && Object.hasOwnProperty.call(message, "csharpNamespace")) object.csharpNamespace = message.csharpNamespace; - if (message.swiftPrefix != null && message.hasOwnProperty("swiftPrefix")) + if (message.swiftPrefix != null && Object.hasOwnProperty.call(message, "swiftPrefix")) object.swiftPrefix = message.swiftPrefix; - if (message.phpClassPrefix != null && message.hasOwnProperty("phpClassPrefix")) + if (message.phpClassPrefix != null && Object.hasOwnProperty.call(message, "phpClassPrefix")) object.phpClassPrefix = message.phpClassPrefix; - if (message.phpNamespace != null && message.hasOwnProperty("phpNamespace")) + if (message.phpNamespace != null && Object.hasOwnProperty.call(message, "phpNamespace")) object.phpNamespace = message.phpNamespace; - if (message.phpMetadataNamespace != null && message.hasOwnProperty("phpMetadataNamespace")) + if (message.phpMetadataNamespace != null && Object.hasOwnProperty.call(message, "phpMetadataNamespace")) object.phpMetadataNamespace = message.phpMetadataNamespace; - if (message.rubyPackage != null && message.hasOwnProperty("rubyPackage")) + if (message.rubyPackage != null && Object.hasOwnProperty.call(message, "rubyPackage")) object.rubyPackage = message.rubyPackage; - if (message.features != null && message.hasOwnProperty("features")) - object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); + if (message.features != null && Object.hasOwnProperty.call(message, "features")) + object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options, q + 1); if (message.uninterpretedOption && message.uninterpretedOption.length) { object.uninterpretedOption = []; for (var j = 0; j < message.uninterpretedOption.length; ++j) - object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options, q + 1); } if (message[".google.api.resourceDefinition"] && message[".google.api.resourceDefinition"].length) { object[".google.api.resourceDefinition"] = []; for (var j = 0; j < message[".google.api.resourceDefinition"].length; ++j) - object[".google.api.resourceDefinition"][j] = $root.google.api.ResourceDescriptor.toObject(message[".google.api.resourceDefinition"][j], options); + object[".google.api.resourceDefinition"][j] = $root.google.api.ResourceDescriptor.toObject(message[".google.api.resourceDefinition"][j], options, q + 1); } return object; }; @@ -90706,9 +93490,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MessageOptions.encode = function encode(message, writer) { + MessageOptions.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.messageSetWireFormat != null && Object.hasOwnProperty.call(message, "messageSetWireFormat")) writer.uint32(/* id 1, wireType 0 =*/8).bool(message.messageSetWireFormat); if (message.noStandardDescriptorAccessor != null && Object.hasOwnProperty.call(message, "noStandardDescriptorAccessor")) @@ -90720,12 +93508,12 @@ if (message.deprecatedLegacyJsonFieldConflicts != null && Object.hasOwnProperty.call(message, "deprecatedLegacyJsonFieldConflicts")) writer.uint32(/* id 11, wireType 0 =*/88).bool(message.deprecatedLegacyJsonFieldConflicts); if (message.features != null && Object.hasOwnProperty.call(message, "features")) - $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); + $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 12, wireType 2 =*/98).fork(), q + 1).ldelim(); if (message.uninterpretedOption != null && message.uninterpretedOption.length) for (var i = 0; i < message.uninterpretedOption.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork(), q + 1).ldelim(); if (message[".google.api.resource"] != null && Object.hasOwnProperty.call(message, ".google.api.resource")) - $root.google.api.ResourceDescriptor.encode(message[".google.api.resource"], writer.uint32(/* id 1053, wireType 2 =*/8426).fork()).ldelim(); + $root.google.api.ResourceDescriptor.encode(message[".google.api.resource"], writer.uint32(/* id 1053, wireType 2 =*/8426).fork(), q + 1).ldelim(); return writer; }; @@ -90739,7 +93527,7 @@ * @returns {$protobuf.Writer} Writer */ MessageOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -90839,27 +93627,27 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.messageSetWireFormat != null && message.hasOwnProperty("messageSetWireFormat")) + if (message.messageSetWireFormat != null && Object.hasOwnProperty.call(message, "messageSetWireFormat")) if (typeof message.messageSetWireFormat !== "boolean") return "messageSetWireFormat: boolean expected"; - if (message.noStandardDescriptorAccessor != null && message.hasOwnProperty("noStandardDescriptorAccessor")) + if (message.noStandardDescriptorAccessor != null && Object.hasOwnProperty.call(message, "noStandardDescriptorAccessor")) if (typeof message.noStandardDescriptorAccessor !== "boolean") return "noStandardDescriptorAccessor: boolean expected"; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) if (typeof message.deprecated !== "boolean") return "deprecated: boolean expected"; - if (message.mapEntry != null && message.hasOwnProperty("mapEntry")) + if (message.mapEntry != null && Object.hasOwnProperty.call(message, "mapEntry")) if (typeof message.mapEntry !== "boolean") return "mapEntry: boolean expected"; - if (message.deprecatedLegacyJsonFieldConflicts != null && message.hasOwnProperty("deprecatedLegacyJsonFieldConflicts")) + if (message.deprecatedLegacyJsonFieldConflicts != null && Object.hasOwnProperty.call(message, "deprecatedLegacyJsonFieldConflicts")) if (typeof message.deprecatedLegacyJsonFieldConflicts !== "boolean") return "deprecatedLegacyJsonFieldConflicts: boolean expected"; - if (message.features != null && message.hasOwnProperty("features")) { + if (message.features != null && Object.hasOwnProperty.call(message, "features")) { var error = $root.google.protobuf.FeatureSet.verify(message.features, long + 1); if (error) return "features." + error; } - if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (message.uninterpretedOption != null && Object.hasOwnProperty.call(message, "uninterpretedOption")) { if (!Array.isArray(message.uninterpretedOption)) return "uninterpretedOption: array expected"; for (var i = 0; i < message.uninterpretedOption.length; ++i) { @@ -90868,7 +93656,7 @@ return "uninterpretedOption." + error; } } - if (message[".google.api.resource"] != null && message.hasOwnProperty(".google.api.resource")) { + if (message[".google.api.resource"] != null && Object.hasOwnProperty.call(message, ".google.api.resource")) { var error = $root.google.api.ResourceDescriptor.verify(message[".google.api.resource"], long + 1); if (error) return ".google.api.resource." + error; @@ -90887,6 +93675,8 @@ MessageOptions.fromObject = function fromObject(object, long) { if (object instanceof $root.google.protobuf.MessageOptions) return object; + if (!$util.isObject(object)) + throw TypeError(".google.protobuf.MessageOptions: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -90903,7 +93693,7 @@ if (object.deprecatedLegacyJsonFieldConflicts != null) message.deprecatedLegacyJsonFieldConflicts = Boolean(object.deprecatedLegacyJsonFieldConflicts); if (object.features != null) { - if (typeof object.features !== "object") + if (!$util.isObject(object.features)) throw TypeError(".google.protobuf.MessageOptions.features: object expected"); message.features = $root.google.protobuf.FeatureSet.fromObject(object.features, long + 1); } @@ -90912,13 +93702,13 @@ throw TypeError(".google.protobuf.MessageOptions.uninterpretedOption: array expected"); message.uninterpretedOption = []; for (var i = 0; i < object.uninterpretedOption.length; ++i) { - if (typeof object.uninterpretedOption[i] !== "object") + if (!$util.isObject(object.uninterpretedOption[i])) throw TypeError(".google.protobuf.MessageOptions.uninterpretedOption: object expected"); message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i], long + 1); } } if (object[".google.api.resource"] != null) { - if (typeof object[".google.api.resource"] !== "object") + if (!$util.isObject(object[".google.api.resource"])) throw TypeError(".google.protobuf.MessageOptions..google.api.resource: object expected"); message[".google.api.resource"] = $root.google.api.ResourceDescriptor.fromObject(object[".google.api.resource"], long + 1); } @@ -90934,9 +93724,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - MessageOptions.toObject = function toObject(message, options) { + MessageOptions.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.uninterpretedOption = []; @@ -90949,25 +93743,25 @@ object.features = null; object[".google.api.resource"] = null; } - if (message.messageSetWireFormat != null && message.hasOwnProperty("messageSetWireFormat")) + if (message.messageSetWireFormat != null && Object.hasOwnProperty.call(message, "messageSetWireFormat")) object.messageSetWireFormat = message.messageSetWireFormat; - if (message.noStandardDescriptorAccessor != null && message.hasOwnProperty("noStandardDescriptorAccessor")) + if (message.noStandardDescriptorAccessor != null && Object.hasOwnProperty.call(message, "noStandardDescriptorAccessor")) object.noStandardDescriptorAccessor = message.noStandardDescriptorAccessor; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) object.deprecated = message.deprecated; - if (message.mapEntry != null && message.hasOwnProperty("mapEntry")) + if (message.mapEntry != null && Object.hasOwnProperty.call(message, "mapEntry")) object.mapEntry = message.mapEntry; - if (message.deprecatedLegacyJsonFieldConflicts != null && message.hasOwnProperty("deprecatedLegacyJsonFieldConflicts")) + if (message.deprecatedLegacyJsonFieldConflicts != null && Object.hasOwnProperty.call(message, "deprecatedLegacyJsonFieldConflicts")) object.deprecatedLegacyJsonFieldConflicts = message.deprecatedLegacyJsonFieldConflicts; - if (message.features != null && message.hasOwnProperty("features")) - object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); + if (message.features != null && Object.hasOwnProperty.call(message, "features")) + object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options, q + 1); if (message.uninterpretedOption && message.uninterpretedOption.length) { object.uninterpretedOption = []; for (var j = 0; j < message.uninterpretedOption.length; ++j) - object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options, q + 1); } - if (message[".google.api.resource"] != null && message.hasOwnProperty(".google.api.resource")) - object[".google.api.resource"] = $root.google.api.ResourceDescriptor.toObject(message[".google.api.resource"], options); + if (message[".google.api.resource"] != null && Object.hasOwnProperty.call(message, ".google.api.resource")) + object[".google.api.resource"] = $root.google.api.ResourceDescriptor.toObject(message[".google.api.resource"], options, q + 1); return object; }; @@ -91192,9 +93986,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FieldOptions.encode = function encode(message, writer) { + FieldOptions.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.ctype != null && Object.hasOwnProperty.call(message, "ctype")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.ctype); if (message.packed != null && Object.hasOwnProperty.call(message, "packed")) @@ -91218,19 +94016,19 @@ writer.uint32(/* id 19, wireType 0 =*/152).int32(message.targets[i]); if (message.editionDefaults != null && message.editionDefaults.length) for (var i = 0; i < message.editionDefaults.length; ++i) - $root.google.protobuf.FieldOptions.EditionDefault.encode(message.editionDefaults[i], writer.uint32(/* id 20, wireType 2 =*/162).fork()).ldelim(); + $root.google.protobuf.FieldOptions.EditionDefault.encode(message.editionDefaults[i], writer.uint32(/* id 20, wireType 2 =*/162).fork(), q + 1).ldelim(); if (message.features != null && Object.hasOwnProperty.call(message, "features")) - $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 21, wireType 2 =*/170).fork()).ldelim(); + $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 21, wireType 2 =*/170).fork(), q + 1).ldelim(); if (message.featureSupport != null && Object.hasOwnProperty.call(message, "featureSupport")) - $root.google.protobuf.FieldOptions.FeatureSupport.encode(message.featureSupport, writer.uint32(/* id 22, wireType 2 =*/178).fork()).ldelim(); + $root.google.protobuf.FieldOptions.FeatureSupport.encode(message.featureSupport, writer.uint32(/* id 22, wireType 2 =*/178).fork(), q + 1).ldelim(); if (message.uninterpretedOption != null && message.uninterpretedOption.length) for (var i = 0; i < message.uninterpretedOption.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork(), q + 1).ldelim(); if (message[".google.api.fieldBehavior"] != null && message[".google.api.fieldBehavior"].length) for (var i = 0; i < message[".google.api.fieldBehavior"].length; ++i) writer.uint32(/* id 1052, wireType 0 =*/8416).int32(message[".google.api.fieldBehavior"][i]); if (message[".google.api.resourceReference"] != null && Object.hasOwnProperty.call(message, ".google.api.resourceReference")) - $root.google.api.ResourceReference.encode(message[".google.api.resourceReference"], writer.uint32(/* id 1055, wireType 2 =*/8442).fork()).ldelim(); + $root.google.api.ResourceReference.encode(message[".google.api.resourceReference"], writer.uint32(/* id 1055, wireType 2 =*/8442).fork(), q + 1).ldelim(); return writer; }; @@ -91244,7 +94042,7 @@ * @returns {$protobuf.Writer} Writer */ FieldOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -91392,7 +94190,7 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.ctype != null && message.hasOwnProperty("ctype")) + if (message.ctype != null && Object.hasOwnProperty.call(message, "ctype")) switch (message.ctype) { default: return "ctype: enum value expected"; @@ -91401,10 +94199,10 @@ case 2: break; } - if (message.packed != null && message.hasOwnProperty("packed")) + if (message.packed != null && Object.hasOwnProperty.call(message, "packed")) if (typeof message.packed !== "boolean") return "packed: boolean expected"; - if (message.jstype != null && message.hasOwnProperty("jstype")) + if (message.jstype != null && Object.hasOwnProperty.call(message, "jstype")) switch (message.jstype) { default: return "jstype: enum value expected"; @@ -91413,22 +94211,22 @@ case 2: break; } - if (message.lazy != null && message.hasOwnProperty("lazy")) + if (message.lazy != null && Object.hasOwnProperty.call(message, "lazy")) if (typeof message.lazy !== "boolean") return "lazy: boolean expected"; - if (message.unverifiedLazy != null && message.hasOwnProperty("unverifiedLazy")) + if (message.unverifiedLazy != null && Object.hasOwnProperty.call(message, "unverifiedLazy")) if (typeof message.unverifiedLazy !== "boolean") return "unverifiedLazy: boolean expected"; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) if (typeof message.deprecated !== "boolean") return "deprecated: boolean expected"; - if (message.weak != null && message.hasOwnProperty("weak")) + if (message.weak != null && Object.hasOwnProperty.call(message, "weak")) if (typeof message.weak !== "boolean") return "weak: boolean expected"; - if (message.debugRedact != null && message.hasOwnProperty("debugRedact")) + if (message.debugRedact != null && Object.hasOwnProperty.call(message, "debugRedact")) if (typeof message.debugRedact !== "boolean") return "debugRedact: boolean expected"; - if (message.retention != null && message.hasOwnProperty("retention")) + if (message.retention != null && Object.hasOwnProperty.call(message, "retention")) switch (message.retention) { default: return "retention: enum value expected"; @@ -91437,7 +94235,7 @@ case 2: break; } - if (message.targets != null && message.hasOwnProperty("targets")) { + if (message.targets != null && Object.hasOwnProperty.call(message, "targets")) { if (!Array.isArray(message.targets)) return "targets: array expected"; for (var i = 0; i < message.targets.length; ++i) @@ -91457,7 +94255,7 @@ break; } } - if (message.editionDefaults != null && message.hasOwnProperty("editionDefaults")) { + if (message.editionDefaults != null && Object.hasOwnProperty.call(message, "editionDefaults")) { if (!Array.isArray(message.editionDefaults)) return "editionDefaults: array expected"; for (var i = 0; i < message.editionDefaults.length; ++i) { @@ -91466,17 +94264,17 @@ return "editionDefaults." + error; } } - if (message.features != null && message.hasOwnProperty("features")) { + if (message.features != null && Object.hasOwnProperty.call(message, "features")) { var error = $root.google.protobuf.FeatureSet.verify(message.features, long + 1); if (error) return "features." + error; } - if (message.featureSupport != null && message.hasOwnProperty("featureSupport")) { + if (message.featureSupport != null && Object.hasOwnProperty.call(message, "featureSupport")) { var error = $root.google.protobuf.FieldOptions.FeatureSupport.verify(message.featureSupport, long + 1); if (error) return "featureSupport." + error; } - if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (message.uninterpretedOption != null && Object.hasOwnProperty.call(message, "uninterpretedOption")) { if (!Array.isArray(message.uninterpretedOption)) return "uninterpretedOption: array expected"; for (var i = 0; i < message.uninterpretedOption.length; ++i) { @@ -91485,7 +94283,7 @@ return "uninterpretedOption." + error; } } - if (message[".google.api.fieldBehavior"] != null && message.hasOwnProperty(".google.api.fieldBehavior")) { + if (message[".google.api.fieldBehavior"] != null && Object.hasOwnProperty.call(message, ".google.api.fieldBehavior")) { if (!Array.isArray(message[".google.api.fieldBehavior"])) return ".google.api.fieldBehavior: array expected"; for (var i = 0; i < message[".google.api.fieldBehavior"].length; ++i) @@ -91504,7 +94302,7 @@ break; } } - if (message[".google.api.resourceReference"] != null && message.hasOwnProperty(".google.api.resourceReference")) { + if (message[".google.api.resourceReference"] != null && Object.hasOwnProperty.call(message, ".google.api.resourceReference")) { var error = $root.google.api.ResourceReference.verify(message[".google.api.resourceReference"], long + 1); if (error) return ".google.api.resourceReference." + error; @@ -91523,6 +94321,8 @@ FieldOptions.fromObject = function fromObject(object, long) { if (object instanceof $root.google.protobuf.FieldOptions) return object; + if (!$util.isObject(object)) + throw TypeError(".google.protobuf.FieldOptions: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -91658,18 +94458,18 @@ throw TypeError(".google.protobuf.FieldOptions.editionDefaults: array expected"); message.editionDefaults = []; for (var i = 0; i < object.editionDefaults.length; ++i) { - if (typeof object.editionDefaults[i] !== "object") + if (!$util.isObject(object.editionDefaults[i])) throw TypeError(".google.protobuf.FieldOptions.editionDefaults: object expected"); message.editionDefaults[i] = $root.google.protobuf.FieldOptions.EditionDefault.fromObject(object.editionDefaults[i], long + 1); } } if (object.features != null) { - if (typeof object.features !== "object") + if (!$util.isObject(object.features)) throw TypeError(".google.protobuf.FieldOptions.features: object expected"); message.features = $root.google.protobuf.FeatureSet.fromObject(object.features, long + 1); } if (object.featureSupport != null) { - if (typeof object.featureSupport !== "object") + if (!$util.isObject(object.featureSupport)) throw TypeError(".google.protobuf.FieldOptions.featureSupport: object expected"); message.featureSupport = $root.google.protobuf.FieldOptions.FeatureSupport.fromObject(object.featureSupport, long + 1); } @@ -91678,7 +94478,7 @@ throw TypeError(".google.protobuf.FieldOptions.uninterpretedOption: array expected"); message.uninterpretedOption = []; for (var i = 0; i < object.uninterpretedOption.length; ++i) { - if (typeof object.uninterpretedOption[i] !== "object") + if (!$util.isObject(object.uninterpretedOption[i])) throw TypeError(".google.protobuf.FieldOptions.uninterpretedOption: object expected"); message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i], long + 1); } @@ -91733,7 +94533,7 @@ } } if (object[".google.api.resourceReference"] != null) { - if (typeof object[".google.api.resourceReference"] !== "object") + if (!$util.isObject(object[".google.api.resourceReference"])) throw TypeError(".google.protobuf.FieldOptions..google.api.resourceReference: object expected"); message[".google.api.resourceReference"] = $root.google.api.ResourceReference.fromObject(object[".google.api.resourceReference"], long + 1); } @@ -91749,9 +94549,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - FieldOptions.toObject = function toObject(message, options) { + FieldOptions.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) { object.targets = []; @@ -91773,23 +94577,23 @@ object.featureSupport = null; object[".google.api.resourceReference"] = null; } - if (message.ctype != null && message.hasOwnProperty("ctype")) + if (message.ctype != null && Object.hasOwnProperty.call(message, "ctype")) object.ctype = options.enums === String ? $root.google.protobuf.FieldOptions.CType[message.ctype] === undefined ? message.ctype : $root.google.protobuf.FieldOptions.CType[message.ctype] : message.ctype; - if (message.packed != null && message.hasOwnProperty("packed")) + if (message.packed != null && Object.hasOwnProperty.call(message, "packed")) object.packed = message.packed; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) object.deprecated = message.deprecated; - if (message.lazy != null && message.hasOwnProperty("lazy")) + if (message.lazy != null && Object.hasOwnProperty.call(message, "lazy")) object.lazy = message.lazy; - if (message.jstype != null && message.hasOwnProperty("jstype")) + if (message.jstype != null && Object.hasOwnProperty.call(message, "jstype")) object.jstype = options.enums === String ? $root.google.protobuf.FieldOptions.JSType[message.jstype] === undefined ? message.jstype : $root.google.protobuf.FieldOptions.JSType[message.jstype] : message.jstype; - if (message.weak != null && message.hasOwnProperty("weak")) + if (message.weak != null && Object.hasOwnProperty.call(message, "weak")) object.weak = message.weak; - if (message.unverifiedLazy != null && message.hasOwnProperty("unverifiedLazy")) + if (message.unverifiedLazy != null && Object.hasOwnProperty.call(message, "unverifiedLazy")) object.unverifiedLazy = message.unverifiedLazy; - if (message.debugRedact != null && message.hasOwnProperty("debugRedact")) + if (message.debugRedact != null && Object.hasOwnProperty.call(message, "debugRedact")) object.debugRedact = message.debugRedact; - if (message.retention != null && message.hasOwnProperty("retention")) + if (message.retention != null && Object.hasOwnProperty.call(message, "retention")) object.retention = options.enums === String ? $root.google.protobuf.FieldOptions.OptionRetention[message.retention] === undefined ? message.retention : $root.google.protobuf.FieldOptions.OptionRetention[message.retention] : message.retention; if (message.targets && message.targets.length) { object.targets = []; @@ -91799,24 +94603,24 @@ if (message.editionDefaults && message.editionDefaults.length) { object.editionDefaults = []; for (var j = 0; j < message.editionDefaults.length; ++j) - object.editionDefaults[j] = $root.google.protobuf.FieldOptions.EditionDefault.toObject(message.editionDefaults[j], options); + object.editionDefaults[j] = $root.google.protobuf.FieldOptions.EditionDefault.toObject(message.editionDefaults[j], options, q + 1); } - if (message.features != null && message.hasOwnProperty("features")) - object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); - if (message.featureSupport != null && message.hasOwnProperty("featureSupport")) - object.featureSupport = $root.google.protobuf.FieldOptions.FeatureSupport.toObject(message.featureSupport, options); + if (message.features != null && Object.hasOwnProperty.call(message, "features")) + object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options, q + 1); + if (message.featureSupport != null && Object.hasOwnProperty.call(message, "featureSupport")) + object.featureSupport = $root.google.protobuf.FieldOptions.FeatureSupport.toObject(message.featureSupport, options, q + 1); if (message.uninterpretedOption && message.uninterpretedOption.length) { object.uninterpretedOption = []; for (var j = 0; j < message.uninterpretedOption.length; ++j) - object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options, q + 1); } if (message[".google.api.fieldBehavior"] && message[".google.api.fieldBehavior"].length) { object[".google.api.fieldBehavior"] = []; for (var j = 0; j < message[".google.api.fieldBehavior"].length; ++j) object[".google.api.fieldBehavior"][j] = options.enums === String ? $root.google.api.FieldBehavior[message[".google.api.fieldBehavior"][j]] === undefined ? message[".google.api.fieldBehavior"][j] : $root.google.api.FieldBehavior[message[".google.api.fieldBehavior"][j]] : message[".google.api.fieldBehavior"][j]; } - if (message[".google.api.resourceReference"] != null && message.hasOwnProperty(".google.api.resourceReference")) - object[".google.api.resourceReference"] = $root.google.api.ResourceReference.toObject(message[".google.api.resourceReference"], options); + if (message[".google.api.resourceReference"] != null && Object.hasOwnProperty.call(message, ".google.api.resourceReference")) + object[".google.api.resourceReference"] = $root.google.api.ResourceReference.toObject(message[".google.api.resourceReference"], options, q + 1); return object; }; @@ -91986,9 +94790,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - EditionDefault.encode = function encode(message, writer) { + EditionDefault.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.value != null && Object.hasOwnProperty.call(message, "value")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.value); if (message.edition != null && Object.hasOwnProperty.call(message, "edition")) @@ -92006,7 +94814,7 @@ * @returns {$protobuf.Writer} Writer */ EditionDefault.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -92080,7 +94888,7 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.edition != null && message.hasOwnProperty("edition")) + if (message.edition != null && Object.hasOwnProperty.call(message, "edition")) switch (message.edition) { default: return "edition: enum value expected"; @@ -92098,7 +94906,7 @@ case 2147483647: break; } - if (message.value != null && message.hasOwnProperty("value")) + if (message.value != null && Object.hasOwnProperty.call(message, "value")) if (!$util.isString(message.value)) return "value: string expected"; return null; @@ -92115,6 +94923,8 @@ EditionDefault.fromObject = function fromObject(object, long) { if (object instanceof $root.google.protobuf.FieldOptions.EditionDefault) return object; + if (!$util.isObject(object)) + throw TypeError(".google.protobuf.FieldOptions.EditionDefault: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -92190,17 +95000,21 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - EditionDefault.toObject = function toObject(message, options) { + EditionDefault.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.value = ""; object.edition = options.enums === String ? "EDITION_UNKNOWN" : 0; } - if (message.value != null && message.hasOwnProperty("value")) + if (message.value != null && Object.hasOwnProperty.call(message, "value")) object.value = message.value; - if (message.edition != null && message.hasOwnProperty("edition")) + if (message.edition != null && Object.hasOwnProperty.call(message, "edition")) object.edition = options.enums === String ? $root.google.protobuf.Edition[message.edition] === undefined ? message.edition : $root.google.protobuf.Edition[message.edition] : message.edition; return object; }; @@ -92314,9 +95128,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FeatureSupport.encode = function encode(message, writer) { + FeatureSupport.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.editionIntroduced != null && Object.hasOwnProperty.call(message, "editionIntroduced")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.editionIntroduced); if (message.editionDeprecated != null && Object.hasOwnProperty.call(message, "editionDeprecated")) @@ -92338,7 +95156,7 @@ * @returns {$protobuf.Writer} Writer */ FeatureSupport.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -92420,7 +95238,7 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.editionIntroduced != null && message.hasOwnProperty("editionIntroduced")) + if (message.editionIntroduced != null && Object.hasOwnProperty.call(message, "editionIntroduced")) switch (message.editionIntroduced) { default: return "editionIntroduced: enum value expected"; @@ -92438,7 +95256,7 @@ case 2147483647: break; } - if (message.editionDeprecated != null && message.hasOwnProperty("editionDeprecated")) + if (message.editionDeprecated != null && Object.hasOwnProperty.call(message, "editionDeprecated")) switch (message.editionDeprecated) { default: return "editionDeprecated: enum value expected"; @@ -92456,10 +95274,10 @@ case 2147483647: break; } - if (message.deprecationWarning != null && message.hasOwnProperty("deprecationWarning")) + if (message.deprecationWarning != null && Object.hasOwnProperty.call(message, "deprecationWarning")) if (!$util.isString(message.deprecationWarning)) return "deprecationWarning: string expected"; - if (message.editionRemoved != null && message.hasOwnProperty("editionRemoved")) + if (message.editionRemoved != null && Object.hasOwnProperty.call(message, "editionRemoved")) switch (message.editionRemoved) { default: return "editionRemoved: enum value expected"; @@ -92491,6 +95309,8 @@ FeatureSupport.fromObject = function fromObject(object, long) { if (object instanceof $root.google.protobuf.FieldOptions.FeatureSupport) return object; + if (!$util.isObject(object)) + throw TypeError(".google.protobuf.FieldOptions.FeatureSupport: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -92678,9 +95498,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - FeatureSupport.toObject = function toObject(message, options) { + FeatureSupport.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.editionIntroduced = options.enums === String ? "EDITION_UNKNOWN" : 0; @@ -92688,13 +95512,13 @@ object.deprecationWarning = ""; object.editionRemoved = options.enums === String ? "EDITION_UNKNOWN" : 0; } - if (message.editionIntroduced != null && message.hasOwnProperty("editionIntroduced")) + if (message.editionIntroduced != null && Object.hasOwnProperty.call(message, "editionIntroduced")) object.editionIntroduced = options.enums === String ? $root.google.protobuf.Edition[message.editionIntroduced] === undefined ? message.editionIntroduced : $root.google.protobuf.Edition[message.editionIntroduced] : message.editionIntroduced; - if (message.editionDeprecated != null && message.hasOwnProperty("editionDeprecated")) + if (message.editionDeprecated != null && Object.hasOwnProperty.call(message, "editionDeprecated")) object.editionDeprecated = options.enums === String ? $root.google.protobuf.Edition[message.editionDeprecated] === undefined ? message.editionDeprecated : $root.google.protobuf.Edition[message.editionDeprecated] : message.editionDeprecated; - if (message.deprecationWarning != null && message.hasOwnProperty("deprecationWarning")) + if (message.deprecationWarning != null && Object.hasOwnProperty.call(message, "deprecationWarning")) object.deprecationWarning = message.deprecationWarning; - if (message.editionRemoved != null && message.hasOwnProperty("editionRemoved")) + if (message.editionRemoved != null && Object.hasOwnProperty.call(message, "editionRemoved")) object.editionRemoved = options.enums === String ? $root.google.protobuf.Edition[message.editionRemoved] === undefined ? message.editionRemoved : $root.google.protobuf.Edition[message.editionRemoved] : message.editionRemoved; return object; }; @@ -92794,14 +95618,18 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - OneofOptions.encode = function encode(message, writer) { + OneofOptions.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.features != null && Object.hasOwnProperty.call(message, "features")) - $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); if (message.uninterpretedOption != null && message.uninterpretedOption.length) for (var i = 0; i < message.uninterpretedOption.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork(), q + 1).ldelim(); return writer; }; @@ -92815,7 +95643,7 @@ * @returns {$protobuf.Writer} Writer */ OneofOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -92891,12 +95719,12 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.features != null && message.hasOwnProperty("features")) { + if (message.features != null && Object.hasOwnProperty.call(message, "features")) { var error = $root.google.protobuf.FeatureSet.verify(message.features, long + 1); if (error) return "features." + error; } - if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (message.uninterpretedOption != null && Object.hasOwnProperty.call(message, "uninterpretedOption")) { if (!Array.isArray(message.uninterpretedOption)) return "uninterpretedOption: array expected"; for (var i = 0; i < message.uninterpretedOption.length; ++i) { @@ -92919,13 +95747,15 @@ OneofOptions.fromObject = function fromObject(object, long) { if (object instanceof $root.google.protobuf.OneofOptions) return object; + if (!$util.isObject(object)) + throw TypeError(".google.protobuf.OneofOptions: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) throw Error("maximum nesting depth exceeded"); var message = new $root.google.protobuf.OneofOptions(); if (object.features != null) { - if (typeof object.features !== "object") + if (!$util.isObject(object.features)) throw TypeError(".google.protobuf.OneofOptions.features: object expected"); message.features = $root.google.protobuf.FeatureSet.fromObject(object.features, long + 1); } @@ -92934,7 +95764,7 @@ throw TypeError(".google.protobuf.OneofOptions.uninterpretedOption: array expected"); message.uninterpretedOption = []; for (var i = 0; i < object.uninterpretedOption.length; ++i) { - if (typeof object.uninterpretedOption[i] !== "object") + if (!$util.isObject(object.uninterpretedOption[i])) throw TypeError(".google.protobuf.OneofOptions.uninterpretedOption: object expected"); message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i], long + 1); } @@ -92951,20 +95781,24 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - OneofOptions.toObject = function toObject(message, options) { + OneofOptions.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.uninterpretedOption = []; if (options.defaults) object.features = null; - if (message.features != null && message.hasOwnProperty("features")) - object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); + if (message.features != null && Object.hasOwnProperty.call(message, "features")) + object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options, q + 1); if (message.uninterpretedOption && message.uninterpretedOption.length) { object.uninterpretedOption = []; for (var j = 0; j < message.uninterpretedOption.length; ++j) - object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options, q + 1); } return object; }; @@ -93088,9 +95922,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - EnumOptions.encode = function encode(message, writer) { + EnumOptions.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.allowAlias != null && Object.hasOwnProperty.call(message, "allowAlias")) writer.uint32(/* id 2, wireType 0 =*/16).bool(message.allowAlias); if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) @@ -93098,10 +95936,10 @@ if (message.deprecatedLegacyJsonFieldConflicts != null && Object.hasOwnProperty.call(message, "deprecatedLegacyJsonFieldConflicts")) writer.uint32(/* id 6, wireType 0 =*/48).bool(message.deprecatedLegacyJsonFieldConflicts); if (message.features != null && Object.hasOwnProperty.call(message, "features")) - $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 7, wireType 2 =*/58).fork(), q + 1).ldelim(); if (message.uninterpretedOption != null && message.uninterpretedOption.length) for (var i = 0; i < message.uninterpretedOption.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork(), q + 1).ldelim(); return writer; }; @@ -93115,7 +95953,7 @@ * @returns {$protobuf.Writer} Writer */ EnumOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -93203,21 +96041,21 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.allowAlias != null && message.hasOwnProperty("allowAlias")) + if (message.allowAlias != null && Object.hasOwnProperty.call(message, "allowAlias")) if (typeof message.allowAlias !== "boolean") return "allowAlias: boolean expected"; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) if (typeof message.deprecated !== "boolean") return "deprecated: boolean expected"; - if (message.deprecatedLegacyJsonFieldConflicts != null && message.hasOwnProperty("deprecatedLegacyJsonFieldConflicts")) + if (message.deprecatedLegacyJsonFieldConflicts != null && Object.hasOwnProperty.call(message, "deprecatedLegacyJsonFieldConflicts")) if (typeof message.deprecatedLegacyJsonFieldConflicts !== "boolean") return "deprecatedLegacyJsonFieldConflicts: boolean expected"; - if (message.features != null && message.hasOwnProperty("features")) { + if (message.features != null && Object.hasOwnProperty.call(message, "features")) { var error = $root.google.protobuf.FeatureSet.verify(message.features, long + 1); if (error) return "features." + error; } - if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (message.uninterpretedOption != null && Object.hasOwnProperty.call(message, "uninterpretedOption")) { if (!Array.isArray(message.uninterpretedOption)) return "uninterpretedOption: array expected"; for (var i = 0; i < message.uninterpretedOption.length; ++i) { @@ -93240,6 +96078,8 @@ EnumOptions.fromObject = function fromObject(object, long) { if (object instanceof $root.google.protobuf.EnumOptions) return object; + if (!$util.isObject(object)) + throw TypeError(".google.protobuf.EnumOptions: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -93252,7 +96092,7 @@ if (object.deprecatedLegacyJsonFieldConflicts != null) message.deprecatedLegacyJsonFieldConflicts = Boolean(object.deprecatedLegacyJsonFieldConflicts); if (object.features != null) { - if (typeof object.features !== "object") + if (!$util.isObject(object.features)) throw TypeError(".google.protobuf.EnumOptions.features: object expected"); message.features = $root.google.protobuf.FeatureSet.fromObject(object.features, long + 1); } @@ -93261,7 +96101,7 @@ throw TypeError(".google.protobuf.EnumOptions.uninterpretedOption: array expected"); message.uninterpretedOption = []; for (var i = 0; i < object.uninterpretedOption.length; ++i) { - if (typeof object.uninterpretedOption[i] !== "object") + if (!$util.isObject(object.uninterpretedOption[i])) throw TypeError(".google.protobuf.EnumOptions.uninterpretedOption: object expected"); message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i], long + 1); } @@ -93278,9 +96118,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - EnumOptions.toObject = function toObject(message, options) { + EnumOptions.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.uninterpretedOption = []; @@ -93290,18 +96134,18 @@ object.deprecatedLegacyJsonFieldConflicts = false; object.features = null; } - if (message.allowAlias != null && message.hasOwnProperty("allowAlias")) + if (message.allowAlias != null && Object.hasOwnProperty.call(message, "allowAlias")) object.allowAlias = message.allowAlias; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) object.deprecated = message.deprecated; - if (message.deprecatedLegacyJsonFieldConflicts != null && message.hasOwnProperty("deprecatedLegacyJsonFieldConflicts")) + if (message.deprecatedLegacyJsonFieldConflicts != null && Object.hasOwnProperty.call(message, "deprecatedLegacyJsonFieldConflicts")) object.deprecatedLegacyJsonFieldConflicts = message.deprecatedLegacyJsonFieldConflicts; - if (message.features != null && message.hasOwnProperty("features")) - object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); + if (message.features != null && Object.hasOwnProperty.call(message, "features")) + object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options, q + 1); if (message.uninterpretedOption && message.uninterpretedOption.length) { object.uninterpretedOption = []; for (var j = 0; j < message.uninterpretedOption.length; ++j) - object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options, q + 1); } return object; }; @@ -93425,20 +96269,24 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - EnumValueOptions.encode = function encode(message, writer) { + EnumValueOptions.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) writer.uint32(/* id 1, wireType 0 =*/8).bool(message.deprecated); if (message.features != null && Object.hasOwnProperty.call(message, "features")) - $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); if (message.debugRedact != null && Object.hasOwnProperty.call(message, "debugRedact")) writer.uint32(/* id 3, wireType 0 =*/24).bool(message.debugRedact); if (message.featureSupport != null && Object.hasOwnProperty.call(message, "featureSupport")) - $root.google.protobuf.FieldOptions.FeatureSupport.encode(message.featureSupport, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + $root.google.protobuf.FieldOptions.FeatureSupport.encode(message.featureSupport, writer.uint32(/* id 4, wireType 2 =*/34).fork(), q + 1).ldelim(); if (message.uninterpretedOption != null && message.uninterpretedOption.length) for (var i = 0; i < message.uninterpretedOption.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork(), q + 1).ldelim(); return writer; }; @@ -93452,7 +96300,7 @@ * @returns {$protobuf.Writer} Writer */ EnumValueOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -93540,23 +96388,23 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) if (typeof message.deprecated !== "boolean") return "deprecated: boolean expected"; - if (message.features != null && message.hasOwnProperty("features")) { + if (message.features != null && Object.hasOwnProperty.call(message, "features")) { var error = $root.google.protobuf.FeatureSet.verify(message.features, long + 1); if (error) return "features." + error; } - if (message.debugRedact != null && message.hasOwnProperty("debugRedact")) + if (message.debugRedact != null && Object.hasOwnProperty.call(message, "debugRedact")) if (typeof message.debugRedact !== "boolean") return "debugRedact: boolean expected"; - if (message.featureSupport != null && message.hasOwnProperty("featureSupport")) { + if (message.featureSupport != null && Object.hasOwnProperty.call(message, "featureSupport")) { var error = $root.google.protobuf.FieldOptions.FeatureSupport.verify(message.featureSupport, long + 1); if (error) return "featureSupport." + error; } - if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (message.uninterpretedOption != null && Object.hasOwnProperty.call(message, "uninterpretedOption")) { if (!Array.isArray(message.uninterpretedOption)) return "uninterpretedOption: array expected"; for (var i = 0; i < message.uninterpretedOption.length; ++i) { @@ -93579,6 +96427,8 @@ EnumValueOptions.fromObject = function fromObject(object, long) { if (object instanceof $root.google.protobuf.EnumValueOptions) return object; + if (!$util.isObject(object)) + throw TypeError(".google.protobuf.EnumValueOptions: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -93587,14 +96437,14 @@ if (object.deprecated != null) message.deprecated = Boolean(object.deprecated); if (object.features != null) { - if (typeof object.features !== "object") + if (!$util.isObject(object.features)) throw TypeError(".google.protobuf.EnumValueOptions.features: object expected"); message.features = $root.google.protobuf.FeatureSet.fromObject(object.features, long + 1); } if (object.debugRedact != null) message.debugRedact = Boolean(object.debugRedact); if (object.featureSupport != null) { - if (typeof object.featureSupport !== "object") + if (!$util.isObject(object.featureSupport)) throw TypeError(".google.protobuf.EnumValueOptions.featureSupport: object expected"); message.featureSupport = $root.google.protobuf.FieldOptions.FeatureSupport.fromObject(object.featureSupport, long + 1); } @@ -93603,7 +96453,7 @@ throw TypeError(".google.protobuf.EnumValueOptions.uninterpretedOption: array expected"); message.uninterpretedOption = []; for (var i = 0; i < object.uninterpretedOption.length; ++i) { - if (typeof object.uninterpretedOption[i] !== "object") + if (!$util.isObject(object.uninterpretedOption[i])) throw TypeError(".google.protobuf.EnumValueOptions.uninterpretedOption: object expected"); message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i], long + 1); } @@ -93620,9 +96470,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - EnumValueOptions.toObject = function toObject(message, options) { + EnumValueOptions.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.uninterpretedOption = []; @@ -93632,18 +96486,18 @@ object.debugRedact = false; object.featureSupport = null; } - if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) object.deprecated = message.deprecated; - if (message.features != null && message.hasOwnProperty("features")) - object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); - if (message.debugRedact != null && message.hasOwnProperty("debugRedact")) + if (message.features != null && Object.hasOwnProperty.call(message, "features")) + object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options, q + 1); + if (message.debugRedact != null && Object.hasOwnProperty.call(message, "debugRedact")) object.debugRedact = message.debugRedact; - if (message.featureSupport != null && message.hasOwnProperty("featureSupport")) - object.featureSupport = $root.google.protobuf.FieldOptions.FeatureSupport.toObject(message.featureSupport, options); + if (message.featureSupport != null && Object.hasOwnProperty.call(message, "featureSupport")) + object.featureSupport = $root.google.protobuf.FieldOptions.FeatureSupport.toObject(message.featureSupport, options, q + 1); if (message.uninterpretedOption && message.uninterpretedOption.length) { object.uninterpretedOption = []; for (var j = 0; j < message.uninterpretedOption.length; ++j) - object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options, q + 1); } return object; }; @@ -93776,16 +96630,20 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ServiceOptions.encode = function encode(message, writer) { + ServiceOptions.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) writer.uint32(/* id 33, wireType 0 =*/264).bool(message.deprecated); if (message.features != null && Object.hasOwnProperty.call(message, "features")) - $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 34, wireType 2 =*/274).fork()).ldelim(); + $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 34, wireType 2 =*/274).fork(), q + 1).ldelim(); if (message.uninterpretedOption != null && message.uninterpretedOption.length) for (var i = 0; i < message.uninterpretedOption.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork(), q + 1).ldelim(); if (message[".google.api.defaultHost"] != null && Object.hasOwnProperty.call(message, ".google.api.defaultHost")) writer.uint32(/* id 1049, wireType 2 =*/8394).string(message[".google.api.defaultHost"]); if (message[".google.api.oauthScopes"] != null && Object.hasOwnProperty.call(message, ".google.api.oauthScopes")) @@ -93805,7 +96663,7 @@ * @returns {$protobuf.Writer} Writer */ ServiceOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -93897,15 +96755,15 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.features != null && message.hasOwnProperty("features")) { + if (message.features != null && Object.hasOwnProperty.call(message, "features")) { var error = $root.google.protobuf.FeatureSet.verify(message.features, long + 1); if (error) return "features." + error; } - if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) if (typeof message.deprecated !== "boolean") return "deprecated: boolean expected"; - if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (message.uninterpretedOption != null && Object.hasOwnProperty.call(message, "uninterpretedOption")) { if (!Array.isArray(message.uninterpretedOption)) return "uninterpretedOption: array expected"; for (var i = 0; i < message.uninterpretedOption.length; ++i) { @@ -93914,13 +96772,13 @@ return "uninterpretedOption." + error; } } - if (message[".google.api.defaultHost"] != null && message.hasOwnProperty(".google.api.defaultHost")) + if (message[".google.api.defaultHost"] != null && Object.hasOwnProperty.call(message, ".google.api.defaultHost")) if (!$util.isString(message[".google.api.defaultHost"])) return ".google.api.defaultHost: string expected"; - if (message[".google.api.oauthScopes"] != null && message.hasOwnProperty(".google.api.oauthScopes")) + if (message[".google.api.oauthScopes"] != null && Object.hasOwnProperty.call(message, ".google.api.oauthScopes")) if (!$util.isString(message[".google.api.oauthScopes"])) return ".google.api.oauthScopes: string expected"; - if (message[".google.api.apiVersion"] != null && message.hasOwnProperty(".google.api.apiVersion")) + if (message[".google.api.apiVersion"] != null && Object.hasOwnProperty.call(message, ".google.api.apiVersion")) if (!$util.isString(message[".google.api.apiVersion"])) return ".google.api.apiVersion: string expected"; return null; @@ -93937,13 +96795,15 @@ ServiceOptions.fromObject = function fromObject(object, long) { if (object instanceof $root.google.protobuf.ServiceOptions) return object; + if (!$util.isObject(object)) + throw TypeError(".google.protobuf.ServiceOptions: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) throw Error("maximum nesting depth exceeded"); var message = new $root.google.protobuf.ServiceOptions(); if (object.features != null) { - if (typeof object.features !== "object") + if (!$util.isObject(object.features)) throw TypeError(".google.protobuf.ServiceOptions.features: object expected"); message.features = $root.google.protobuf.FeatureSet.fromObject(object.features, long + 1); } @@ -93954,7 +96814,7 @@ throw TypeError(".google.protobuf.ServiceOptions.uninterpretedOption: array expected"); message.uninterpretedOption = []; for (var i = 0; i < object.uninterpretedOption.length; ++i) { - if (typeof object.uninterpretedOption[i] !== "object") + if (!$util.isObject(object.uninterpretedOption[i])) throw TypeError(".google.protobuf.ServiceOptions.uninterpretedOption: object expected"); message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i], long + 1); } @@ -93977,9 +96837,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ServiceOptions.toObject = function toObject(message, options) { + ServiceOptions.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.uninterpretedOption = []; @@ -93990,20 +96854,20 @@ object[".google.api.oauthScopes"] = ""; object[".google.api.apiVersion"] = ""; } - if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) object.deprecated = message.deprecated; - if (message.features != null && message.hasOwnProperty("features")) - object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); + if (message.features != null && Object.hasOwnProperty.call(message, "features")) + object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options, q + 1); if (message.uninterpretedOption && message.uninterpretedOption.length) { object.uninterpretedOption = []; for (var j = 0; j < message.uninterpretedOption.length; ++j) - object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options, q + 1); } - if (message[".google.api.defaultHost"] != null && message.hasOwnProperty(".google.api.defaultHost")) + if (message[".google.api.defaultHost"] != null && Object.hasOwnProperty.call(message, ".google.api.defaultHost")) object[".google.api.defaultHost"] = message[".google.api.defaultHost"]; - if (message[".google.api.oauthScopes"] != null && message.hasOwnProperty(".google.api.oauthScopes")) + if (message[".google.api.oauthScopes"] != null && Object.hasOwnProperty.call(message, ".google.api.oauthScopes")) object[".google.api.oauthScopes"] = message[".google.api.oauthScopes"]; - if (message[".google.api.apiVersion"] != null && message.hasOwnProperty(".google.api.apiVersion")) + if (message[".google.api.apiVersion"] != null && Object.hasOwnProperty.call(message, ".google.api.apiVersion")) object[".google.api.apiVersion"] = message[".google.api.apiVersion"]; return object; }; @@ -94155,27 +97019,31 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MethodOptions.encode = function encode(message, writer) { + MethodOptions.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) writer.uint32(/* id 33, wireType 0 =*/264).bool(message.deprecated); if (message.idempotencyLevel != null && Object.hasOwnProperty.call(message, "idempotencyLevel")) writer.uint32(/* id 34, wireType 0 =*/272).int32(message.idempotencyLevel); if (message.features != null && Object.hasOwnProperty.call(message, "features")) - $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 35, wireType 2 =*/282).fork()).ldelim(); + $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 35, wireType 2 =*/282).fork(), q + 1).ldelim(); if (message.uninterpretedOption != null && message.uninterpretedOption.length) for (var i = 0; i < message.uninterpretedOption.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork(), q + 1).ldelim(); if (message[".google.longrunning.operationInfo"] != null && Object.hasOwnProperty.call(message, ".google.longrunning.operationInfo")) - $root.google.longrunning.OperationInfo.encode(message[".google.longrunning.operationInfo"], writer.uint32(/* id 1049, wireType 2 =*/8394).fork()).ldelim(); + $root.google.longrunning.OperationInfo.encode(message[".google.longrunning.operationInfo"], writer.uint32(/* id 1049, wireType 2 =*/8394).fork(), q + 1).ldelim(); if (message[".google.api.methodSignature"] != null && message[".google.api.methodSignature"].length) for (var i = 0; i < message[".google.api.methodSignature"].length; ++i) writer.uint32(/* id 1051, wireType 2 =*/8410).string(message[".google.api.methodSignature"][i]); if (message[".google.api.http"] != null && Object.hasOwnProperty.call(message, ".google.api.http")) - $root.google.api.HttpRule.encode(message[".google.api.http"], writer.uint32(/* id 72295728, wireType 2 =*/578365826).fork()).ldelim(); + $root.google.api.HttpRule.encode(message[".google.api.http"], writer.uint32(/* id 72295728, wireType 2 =*/578365826).fork(), q + 1).ldelim(); if (message[".google.api.routing"] != null && Object.hasOwnProperty.call(message, ".google.api.routing")) - $root.google.api.RoutingRule.encode(message[".google.api.routing"], writer.uint32(/* id 72295729, wireType 2 =*/578365834).fork()).ldelim(); + $root.google.api.RoutingRule.encode(message[".google.api.routing"], writer.uint32(/* id 72295729, wireType 2 =*/578365834).fork(), q + 1).ldelim(); return writer; }; @@ -94189,7 +97057,7 @@ * @returns {$protobuf.Writer} Writer */ MethodOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -94291,10 +97159,10 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) if (typeof message.deprecated !== "boolean") return "deprecated: boolean expected"; - if (message.idempotencyLevel != null && message.hasOwnProperty("idempotencyLevel")) + if (message.idempotencyLevel != null && Object.hasOwnProperty.call(message, "idempotencyLevel")) switch (message.idempotencyLevel) { default: return "idempotencyLevel: enum value expected"; @@ -94303,12 +97171,12 @@ case 2: break; } - if (message.features != null && message.hasOwnProperty("features")) { + if (message.features != null && Object.hasOwnProperty.call(message, "features")) { var error = $root.google.protobuf.FeatureSet.verify(message.features, long + 1); if (error) return "features." + error; } - if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (message.uninterpretedOption != null && Object.hasOwnProperty.call(message, "uninterpretedOption")) { if (!Array.isArray(message.uninterpretedOption)) return "uninterpretedOption: array expected"; for (var i = 0; i < message.uninterpretedOption.length; ++i) { @@ -94317,24 +97185,24 @@ return "uninterpretedOption." + error; } } - if (message[".google.api.http"] != null && message.hasOwnProperty(".google.api.http")) { + if (message[".google.api.http"] != null && Object.hasOwnProperty.call(message, ".google.api.http")) { var error = $root.google.api.HttpRule.verify(message[".google.api.http"], long + 1); if (error) return ".google.api.http." + error; } - if (message[".google.api.methodSignature"] != null && message.hasOwnProperty(".google.api.methodSignature")) { + if (message[".google.api.methodSignature"] != null && Object.hasOwnProperty.call(message, ".google.api.methodSignature")) { if (!Array.isArray(message[".google.api.methodSignature"])) return ".google.api.methodSignature: array expected"; for (var i = 0; i < message[".google.api.methodSignature"].length; ++i) if (!$util.isString(message[".google.api.methodSignature"][i])) return ".google.api.methodSignature: string[] expected"; } - if (message[".google.api.routing"] != null && message.hasOwnProperty(".google.api.routing")) { + if (message[".google.api.routing"] != null && Object.hasOwnProperty.call(message, ".google.api.routing")) { var error = $root.google.api.RoutingRule.verify(message[".google.api.routing"], long + 1); if (error) return ".google.api.routing." + error; } - if (message[".google.longrunning.operationInfo"] != null && message.hasOwnProperty(".google.longrunning.operationInfo")) { + if (message[".google.longrunning.operationInfo"] != null && Object.hasOwnProperty.call(message, ".google.longrunning.operationInfo")) { var error = $root.google.longrunning.OperationInfo.verify(message[".google.longrunning.operationInfo"], long + 1); if (error) return ".google.longrunning.operationInfo." + error; @@ -94353,6 +97221,8 @@ MethodOptions.fromObject = function fromObject(object, long) { if (object instanceof $root.google.protobuf.MethodOptions) return object; + if (!$util.isObject(object)) + throw TypeError(".google.protobuf.MethodOptions: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -94381,7 +97251,7 @@ break; } if (object.features != null) { - if (typeof object.features !== "object") + if (!$util.isObject(object.features)) throw TypeError(".google.protobuf.MethodOptions.features: object expected"); message.features = $root.google.protobuf.FeatureSet.fromObject(object.features, long + 1); } @@ -94390,13 +97260,13 @@ throw TypeError(".google.protobuf.MethodOptions.uninterpretedOption: array expected"); message.uninterpretedOption = []; for (var i = 0; i < object.uninterpretedOption.length; ++i) { - if (typeof object.uninterpretedOption[i] !== "object") + if (!$util.isObject(object.uninterpretedOption[i])) throw TypeError(".google.protobuf.MethodOptions.uninterpretedOption: object expected"); message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i], long + 1); } } if (object[".google.api.http"] != null) { - if (typeof object[".google.api.http"] !== "object") + if (!$util.isObject(object[".google.api.http"])) throw TypeError(".google.protobuf.MethodOptions..google.api.http: object expected"); message[".google.api.http"] = $root.google.api.HttpRule.fromObject(object[".google.api.http"], long + 1); } @@ -94408,12 +97278,12 @@ message[".google.api.methodSignature"][i] = String(object[".google.api.methodSignature"][i]); } if (object[".google.api.routing"] != null) { - if (typeof object[".google.api.routing"] !== "object") + if (!$util.isObject(object[".google.api.routing"])) throw TypeError(".google.protobuf.MethodOptions..google.api.routing: object expected"); message[".google.api.routing"] = $root.google.api.RoutingRule.fromObject(object[".google.api.routing"], long + 1); } if (object[".google.longrunning.operationInfo"] != null) { - if (typeof object[".google.longrunning.operationInfo"] !== "object") + if (!$util.isObject(object[".google.longrunning.operationInfo"])) throw TypeError(".google.protobuf.MethodOptions..google.longrunning.operationInfo: object expected"); message[".google.longrunning.operationInfo"] = $root.google.longrunning.OperationInfo.fromObject(object[".google.longrunning.operationInfo"], long + 1); } @@ -94429,9 +97299,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - MethodOptions.toObject = function toObject(message, options) { + MethodOptions.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) { object.uninterpretedOption = []; @@ -94445,28 +97319,28 @@ object[".google.api.http"] = null; object[".google.api.routing"] = null; } - if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) object.deprecated = message.deprecated; - if (message.idempotencyLevel != null && message.hasOwnProperty("idempotencyLevel")) + if (message.idempotencyLevel != null && Object.hasOwnProperty.call(message, "idempotencyLevel")) object.idempotencyLevel = options.enums === String ? $root.google.protobuf.MethodOptions.IdempotencyLevel[message.idempotencyLevel] === undefined ? message.idempotencyLevel : $root.google.protobuf.MethodOptions.IdempotencyLevel[message.idempotencyLevel] : message.idempotencyLevel; - if (message.features != null && message.hasOwnProperty("features")) - object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); + if (message.features != null && Object.hasOwnProperty.call(message, "features")) + object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options, q + 1); if (message.uninterpretedOption && message.uninterpretedOption.length) { object.uninterpretedOption = []; for (var j = 0; j < message.uninterpretedOption.length; ++j) - object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options, q + 1); } - if (message[".google.longrunning.operationInfo"] != null && message.hasOwnProperty(".google.longrunning.operationInfo")) - object[".google.longrunning.operationInfo"] = $root.google.longrunning.OperationInfo.toObject(message[".google.longrunning.operationInfo"], options); + if (message[".google.longrunning.operationInfo"] != null && Object.hasOwnProperty.call(message, ".google.longrunning.operationInfo")) + object[".google.longrunning.operationInfo"] = $root.google.longrunning.OperationInfo.toObject(message[".google.longrunning.operationInfo"], options, q + 1); if (message[".google.api.methodSignature"] && message[".google.api.methodSignature"].length) { object[".google.api.methodSignature"] = []; for (var j = 0; j < message[".google.api.methodSignature"].length; ++j) object[".google.api.methodSignature"][j] = message[".google.api.methodSignature"][j]; } - if (message[".google.api.http"] != null && message.hasOwnProperty(".google.api.http")) - object[".google.api.http"] = $root.google.api.HttpRule.toObject(message[".google.api.http"], options); - if (message[".google.api.routing"] != null && message.hasOwnProperty(".google.api.routing")) - object[".google.api.routing"] = $root.google.api.RoutingRule.toObject(message[".google.api.routing"], options); + if (message[".google.api.http"] != null && Object.hasOwnProperty.call(message, ".google.api.http")) + object[".google.api.http"] = $root.google.api.HttpRule.toObject(message[".google.api.http"], options, q + 1); + if (message[".google.api.routing"] != null && Object.hasOwnProperty.call(message, ".google.api.routing")) + object[".google.api.routing"] = $root.google.api.RoutingRule.toObject(message[".google.api.routing"], options, q + 1); return object; }; @@ -94623,12 +97497,16 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UninterpretedOption.encode = function encode(message, writer) { + UninterpretedOption.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.name != null && message.name.length) for (var i = 0; i < message.name.length; ++i) - $root.google.protobuf.UninterpretedOption.NamePart.encode(message.name[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + $root.google.protobuf.UninterpretedOption.NamePart.encode(message.name[i], writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); if (message.identifierValue != null && Object.hasOwnProperty.call(message, "identifierValue")) writer.uint32(/* id 3, wireType 2 =*/26).string(message.identifierValue); if (message.positiveIntValue != null && Object.hasOwnProperty.call(message, "positiveIntValue")) @@ -94654,7 +97532,7 @@ * @returns {$protobuf.Writer} Writer */ UninterpretedOption.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -94750,7 +97628,7 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.name != null && message.hasOwnProperty("name")) { + if (message.name != null && Object.hasOwnProperty.call(message, "name")) { if (!Array.isArray(message.name)) return "name: array expected"; for (var i = 0; i < message.name.length; ++i) { @@ -94759,22 +97637,22 @@ return "name." + error; } } - if (message.identifierValue != null && message.hasOwnProperty("identifierValue")) + if (message.identifierValue != null && Object.hasOwnProperty.call(message, "identifierValue")) if (!$util.isString(message.identifierValue)) return "identifierValue: string expected"; - if (message.positiveIntValue != null && message.hasOwnProperty("positiveIntValue")) + if (message.positiveIntValue != null && Object.hasOwnProperty.call(message, "positiveIntValue")) if (!$util.isInteger(message.positiveIntValue) && !(message.positiveIntValue && $util.isInteger(message.positiveIntValue.low) && $util.isInteger(message.positiveIntValue.high))) return "positiveIntValue: integer|Long expected"; - if (message.negativeIntValue != null && message.hasOwnProperty("negativeIntValue")) + if (message.negativeIntValue != null && Object.hasOwnProperty.call(message, "negativeIntValue")) if (!$util.isInteger(message.negativeIntValue) && !(message.negativeIntValue && $util.isInteger(message.negativeIntValue.low) && $util.isInteger(message.negativeIntValue.high))) return "negativeIntValue: integer|Long expected"; - if (message.doubleValue != null && message.hasOwnProperty("doubleValue")) + if (message.doubleValue != null && Object.hasOwnProperty.call(message, "doubleValue")) if (typeof message.doubleValue !== "number") return "doubleValue: number expected"; - if (message.stringValue != null && message.hasOwnProperty("stringValue")) + if (message.stringValue != null && Object.hasOwnProperty.call(message, "stringValue")) if (!(message.stringValue && typeof message.stringValue.length === "number" || $util.isString(message.stringValue))) return "stringValue: buffer expected"; - if (message.aggregateValue != null && message.hasOwnProperty("aggregateValue")) + if (message.aggregateValue != null && Object.hasOwnProperty.call(message, "aggregateValue")) if (!$util.isString(message.aggregateValue)) return "aggregateValue: string expected"; return null; @@ -94791,6 +97669,8 @@ UninterpretedOption.fromObject = function fromObject(object, long) { if (object instanceof $root.google.protobuf.UninterpretedOption) return object; + if (!$util.isObject(object)) + throw TypeError(".google.protobuf.UninterpretedOption: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -94801,7 +97681,7 @@ throw TypeError(".google.protobuf.UninterpretedOption.name: array expected"); message.name = []; for (var i = 0; i < object.name.length; ++i) { - if (typeof object.name[i] !== "object") + if (!$util.isObject(object.name[i])) throw TypeError(".google.protobuf.UninterpretedOption.name: object expected"); message.name[i] = $root.google.protobuf.UninterpretedOption.NamePart.fromObject(object.name[i], long + 1); } @@ -94810,7 +97690,7 @@ message.identifierValue = String(object.identifierValue); if (object.positiveIntValue != null) if ($util.Long) - (message.positiveIntValue = $util.Long.fromValue(object.positiveIntValue)).unsigned = true; + message.positiveIntValue = $util.Long.fromValue(object.positiveIntValue, true); else if (typeof object.positiveIntValue === "string") message.positiveIntValue = parseInt(object.positiveIntValue, 10); else if (typeof object.positiveIntValue === "number") @@ -94819,7 +97699,7 @@ message.positiveIntValue = new $util.LongBits(object.positiveIntValue.low >>> 0, object.positiveIntValue.high >>> 0).toNumber(true); if (object.negativeIntValue != null) if ($util.Long) - (message.negativeIntValue = $util.Long.fromValue(object.negativeIntValue)).unsigned = false; + message.negativeIntValue = $util.Long.fromValue(object.negativeIntValue, false); else if (typeof object.negativeIntValue === "string") message.negativeIntValue = parseInt(object.negativeIntValue, 10); else if (typeof object.negativeIntValue === "number") @@ -94847,9 +97727,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - UninterpretedOption.toObject = function toObject(message, options) { + UninterpretedOption.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.name = []; @@ -94857,14 +97741,14 @@ object.identifierValue = ""; if ($util.Long) { var long = new $util.Long(0, 0, true); - object.positiveIntValue = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.positiveIntValue = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : typeof BigInt !== "undefined" && options.longs === BigInt ? long.toBigInt() : long; } else - object.positiveIntValue = options.longs === String ? "0" : 0; + object.positiveIntValue = options.longs === String ? "0" : typeof BigInt !== "undefined" && options.longs === BigInt ? BigInt("0") : 0; if ($util.Long) { var long = new $util.Long(0, 0, false); - object.negativeIntValue = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.negativeIntValue = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : typeof BigInt !== "undefined" && options.longs === BigInt ? long.toBigInt() : long; } else - object.negativeIntValue = options.longs === String ? "0" : 0; + object.negativeIntValue = options.longs === String ? "0" : typeof BigInt !== "undefined" && options.longs === BigInt ? BigInt("0") : 0; object.doubleValue = 0; if (options.bytes === String) object.stringValue = ""; @@ -94878,25 +97762,29 @@ if (message.name && message.name.length) { object.name = []; for (var j = 0; j < message.name.length; ++j) - object.name[j] = $root.google.protobuf.UninterpretedOption.NamePart.toObject(message.name[j], options); + object.name[j] = $root.google.protobuf.UninterpretedOption.NamePart.toObject(message.name[j], options, q + 1); } - if (message.identifierValue != null && message.hasOwnProperty("identifierValue")) + if (message.identifierValue != null && Object.hasOwnProperty.call(message, "identifierValue")) object.identifierValue = message.identifierValue; - if (message.positiveIntValue != null && message.hasOwnProperty("positiveIntValue")) - if (typeof message.positiveIntValue === "number") + if (message.positiveIntValue != null && Object.hasOwnProperty.call(message, "positiveIntValue")) + if (typeof BigInt !== "undefined" && options.longs === BigInt) + object.positiveIntValue = typeof message.positiveIntValue === "number" ? BigInt(message.positiveIntValue) : $util.Long.fromBits(message.positiveIntValue.low >>> 0, message.positiveIntValue.high >>> 0, true).toBigInt(); + else if (typeof message.positiveIntValue === "number") object.positiveIntValue = options.longs === String ? String(message.positiveIntValue) : message.positiveIntValue; else object.positiveIntValue = options.longs === String ? $util.Long.prototype.toString.call(message.positiveIntValue) : options.longs === Number ? new $util.LongBits(message.positiveIntValue.low >>> 0, message.positiveIntValue.high >>> 0).toNumber(true) : message.positiveIntValue; - if (message.negativeIntValue != null && message.hasOwnProperty("negativeIntValue")) - if (typeof message.negativeIntValue === "number") + if (message.negativeIntValue != null && Object.hasOwnProperty.call(message, "negativeIntValue")) + if (typeof BigInt !== "undefined" && options.longs === BigInt) + object.negativeIntValue = typeof message.negativeIntValue === "number" ? BigInt(message.negativeIntValue) : $util.Long.fromBits(message.negativeIntValue.low >>> 0, message.negativeIntValue.high >>> 0, false).toBigInt(); + else if (typeof message.negativeIntValue === "number") object.negativeIntValue = options.longs === String ? String(message.negativeIntValue) : message.negativeIntValue; else object.negativeIntValue = options.longs === String ? $util.Long.prototype.toString.call(message.negativeIntValue) : options.longs === Number ? new $util.LongBits(message.negativeIntValue.low >>> 0, message.negativeIntValue.high >>> 0).toNumber() : message.negativeIntValue; - if (message.doubleValue != null && message.hasOwnProperty("doubleValue")) + if (message.doubleValue != null && Object.hasOwnProperty.call(message, "doubleValue")) object.doubleValue = options.json && !isFinite(message.doubleValue) ? String(message.doubleValue) : message.doubleValue; - if (message.stringValue != null && message.hasOwnProperty("stringValue")) + if (message.stringValue != null && Object.hasOwnProperty.call(message, "stringValue")) object.stringValue = options.bytes === String ? $util.base64.encode(message.stringValue, 0, message.stringValue.length) : options.bytes === Array ? Array.prototype.slice.call(message.stringValue) : message.stringValue; - if (message.aggregateValue != null && message.hasOwnProperty("aggregateValue")) + if (message.aggregateValue != null && Object.hasOwnProperty.call(message, "aggregateValue")) object.aggregateValue = message.aggregateValue; return object; }; @@ -94989,9 +97877,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - NamePart.encode = function encode(message, writer) { + NamePart.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); writer.uint32(/* id 1, wireType 2 =*/10).string(message.namePart); writer.uint32(/* id 2, wireType 0 =*/16).bool(message.isExtension); return writer; @@ -95007,7 +97899,7 @@ * @returns {$protobuf.Writer} Writer */ NamePart.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -95047,9 +97939,9 @@ break; } } - if (!message.hasOwnProperty("namePart")) + if (!Object.hasOwnProperty.call(message, "namePart")) throw $util.ProtocolError("missing required 'namePart'", { instance: message }); - if (!message.hasOwnProperty("isExtension")) + if (!Object.hasOwnProperty.call(message, "isExtension")) throw $util.ProtocolError("missing required 'isExtension'", { instance: message }); return message; }; @@ -95103,6 +97995,8 @@ NamePart.fromObject = function fromObject(object, long) { if (object instanceof $root.google.protobuf.UninterpretedOption.NamePart) return object; + if (!$util.isObject(object)) + throw TypeError(".google.protobuf.UninterpretedOption.NamePart: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -95124,17 +98018,21 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - NamePart.toObject = function toObject(message, options) { + NamePart.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.namePart = ""; object.isExtension = false; } - if (message.namePart != null && message.hasOwnProperty("namePart")) + if (message.namePart != null && Object.hasOwnProperty.call(message, "namePart")) object.namePart = message.namePart; - if (message.isExtension != null && message.hasOwnProperty("isExtension")) + if (message.isExtension != null && Object.hasOwnProperty.call(message, "isExtension")) object.isExtension = message.isExtension; return object; }; @@ -95287,9 +98185,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FeatureSet.encode = function encode(message, writer) { + FeatureSet.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.fieldPresence != null && Object.hasOwnProperty.call(message, "fieldPresence")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.fieldPresence); if (message.enumType != null && Object.hasOwnProperty.call(message, "enumType")) @@ -95319,7 +98221,7 @@ * @returns {$protobuf.Writer} Writer */ FeatureSet.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -95417,7 +98319,7 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.fieldPresence != null && message.hasOwnProperty("fieldPresence")) + if (message.fieldPresence != null && Object.hasOwnProperty.call(message, "fieldPresence")) switch (message.fieldPresence) { default: return "fieldPresence: enum value expected"; @@ -95427,7 +98329,7 @@ case 3: break; } - if (message.enumType != null && message.hasOwnProperty("enumType")) + if (message.enumType != null && Object.hasOwnProperty.call(message, "enumType")) switch (message.enumType) { default: return "enumType: enum value expected"; @@ -95436,7 +98338,7 @@ case 2: break; } - if (message.repeatedFieldEncoding != null && message.hasOwnProperty("repeatedFieldEncoding")) + if (message.repeatedFieldEncoding != null && Object.hasOwnProperty.call(message, "repeatedFieldEncoding")) switch (message.repeatedFieldEncoding) { default: return "repeatedFieldEncoding: enum value expected"; @@ -95445,7 +98347,7 @@ case 2: break; } - if (message.utf8Validation != null && message.hasOwnProperty("utf8Validation")) + if (message.utf8Validation != null && Object.hasOwnProperty.call(message, "utf8Validation")) switch (message.utf8Validation) { default: return "utf8Validation: enum value expected"; @@ -95454,7 +98356,7 @@ case 3: break; } - if (message.messageEncoding != null && message.hasOwnProperty("messageEncoding")) + if (message.messageEncoding != null && Object.hasOwnProperty.call(message, "messageEncoding")) switch (message.messageEncoding) { default: return "messageEncoding: enum value expected"; @@ -95463,7 +98365,7 @@ case 2: break; } - if (message.jsonFormat != null && message.hasOwnProperty("jsonFormat")) + if (message.jsonFormat != null && Object.hasOwnProperty.call(message, "jsonFormat")) switch (message.jsonFormat) { default: return "jsonFormat: enum value expected"; @@ -95472,7 +98374,7 @@ case 2: break; } - if (message.enforceNamingStyle != null && message.hasOwnProperty("enforceNamingStyle")) + if (message.enforceNamingStyle != null && Object.hasOwnProperty.call(message, "enforceNamingStyle")) switch (message.enforceNamingStyle) { default: return "enforceNamingStyle: enum value expected"; @@ -95481,7 +98383,7 @@ case 2: break; } - if (message.defaultSymbolVisibility != null && message.hasOwnProperty("defaultSymbolVisibility")) + if (message.defaultSymbolVisibility != null && Object.hasOwnProperty.call(message, "defaultSymbolVisibility")) switch (message.defaultSymbolVisibility) { default: return "defaultSymbolVisibility: enum value expected"; @@ -95506,6 +98408,8 @@ FeatureSet.fromObject = function fromObject(object, long) { if (object instanceof $root.google.protobuf.FeatureSet) return object; + if (!$util.isObject(object)) + throw TypeError(".google.protobuf.FeatureSet: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -95695,9 +98599,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - FeatureSet.toObject = function toObject(message, options) { + FeatureSet.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.fieldPresence = options.enums === String ? "FIELD_PRESENCE_UNKNOWN" : 0; @@ -95709,21 +98617,21 @@ object.enforceNamingStyle = options.enums === String ? "ENFORCE_NAMING_STYLE_UNKNOWN" : 0; object.defaultSymbolVisibility = options.enums === String ? "DEFAULT_SYMBOL_VISIBILITY_UNKNOWN" : 0; } - if (message.fieldPresence != null && message.hasOwnProperty("fieldPresence")) + if (message.fieldPresence != null && Object.hasOwnProperty.call(message, "fieldPresence")) object.fieldPresence = options.enums === String ? $root.google.protobuf.FeatureSet.FieldPresence[message.fieldPresence] === undefined ? message.fieldPresence : $root.google.protobuf.FeatureSet.FieldPresence[message.fieldPresence] : message.fieldPresence; - if (message.enumType != null && message.hasOwnProperty("enumType")) + if (message.enumType != null && Object.hasOwnProperty.call(message, "enumType")) object.enumType = options.enums === String ? $root.google.protobuf.FeatureSet.EnumType[message.enumType] === undefined ? message.enumType : $root.google.protobuf.FeatureSet.EnumType[message.enumType] : message.enumType; - if (message.repeatedFieldEncoding != null && message.hasOwnProperty("repeatedFieldEncoding")) + if (message.repeatedFieldEncoding != null && Object.hasOwnProperty.call(message, "repeatedFieldEncoding")) object.repeatedFieldEncoding = options.enums === String ? $root.google.protobuf.FeatureSet.RepeatedFieldEncoding[message.repeatedFieldEncoding] === undefined ? message.repeatedFieldEncoding : $root.google.protobuf.FeatureSet.RepeatedFieldEncoding[message.repeatedFieldEncoding] : message.repeatedFieldEncoding; - if (message.utf8Validation != null && message.hasOwnProperty("utf8Validation")) + if (message.utf8Validation != null && Object.hasOwnProperty.call(message, "utf8Validation")) object.utf8Validation = options.enums === String ? $root.google.protobuf.FeatureSet.Utf8Validation[message.utf8Validation] === undefined ? message.utf8Validation : $root.google.protobuf.FeatureSet.Utf8Validation[message.utf8Validation] : message.utf8Validation; - if (message.messageEncoding != null && message.hasOwnProperty("messageEncoding")) + if (message.messageEncoding != null && Object.hasOwnProperty.call(message, "messageEncoding")) object.messageEncoding = options.enums === String ? $root.google.protobuf.FeatureSet.MessageEncoding[message.messageEncoding] === undefined ? message.messageEncoding : $root.google.protobuf.FeatureSet.MessageEncoding[message.messageEncoding] : message.messageEncoding; - if (message.jsonFormat != null && message.hasOwnProperty("jsonFormat")) + if (message.jsonFormat != null && Object.hasOwnProperty.call(message, "jsonFormat")) object.jsonFormat = options.enums === String ? $root.google.protobuf.FeatureSet.JsonFormat[message.jsonFormat] === undefined ? message.jsonFormat : $root.google.protobuf.FeatureSet.JsonFormat[message.jsonFormat] : message.jsonFormat; - if (message.enforceNamingStyle != null && message.hasOwnProperty("enforceNamingStyle")) + if (message.enforceNamingStyle != null && Object.hasOwnProperty.call(message, "enforceNamingStyle")) object.enforceNamingStyle = options.enums === String ? $root.google.protobuf.FeatureSet.EnforceNamingStyle[message.enforceNamingStyle] === undefined ? message.enforceNamingStyle : $root.google.protobuf.FeatureSet.EnforceNamingStyle[message.enforceNamingStyle] : message.enforceNamingStyle; - if (message.defaultSymbolVisibility != null && message.hasOwnProperty("defaultSymbolVisibility")) + if (message.defaultSymbolVisibility != null && Object.hasOwnProperty.call(message, "defaultSymbolVisibility")) object.defaultSymbolVisibility = options.enums === String ? $root.google.protobuf.FeatureSet.VisibilityFeature.DefaultSymbolVisibility[message.defaultSymbolVisibility] === undefined ? message.defaultSymbolVisibility : $root.google.protobuf.FeatureSet.VisibilityFeature.DefaultSymbolVisibility[message.defaultSymbolVisibility] : message.defaultSymbolVisibility; return object; }; @@ -95912,9 +98820,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - VisibilityFeature.encode = function encode(message, writer) { + VisibilityFeature.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); return writer; }; @@ -95928,7 +98840,7 @@ * @returns {$protobuf.Writer} Writer */ VisibilityFeature.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -96008,10 +98920,6 @@ VisibilityFeature.fromObject = function fromObject(object, long) { if (object instanceof $root.google.protobuf.FeatureSet.VisibilityFeature) return object; - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - throw Error("maximum nesting depth exceeded"); return new $root.google.protobuf.FeatureSet.VisibilityFeature(); }; @@ -96152,12 +99060,16 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FeatureSetDefaults.encode = function encode(message, writer) { + FeatureSetDefaults.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.defaults != null && message.defaults.length) for (var i = 0; i < message.defaults.length; ++i) - $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.encode(message.defaults[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.encode(message.defaults[i], writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); if (message.minimumEdition != null && Object.hasOwnProperty.call(message, "minimumEdition")) writer.uint32(/* id 4, wireType 0 =*/32).int32(message.minimumEdition); if (message.maximumEdition != null && Object.hasOwnProperty.call(message, "maximumEdition")) @@ -96175,7 +99087,7 @@ * @returns {$protobuf.Writer} Writer */ FeatureSetDefaults.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -96255,7 +99167,7 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.defaults != null && message.hasOwnProperty("defaults")) { + if (message.defaults != null && Object.hasOwnProperty.call(message, "defaults")) { if (!Array.isArray(message.defaults)) return "defaults: array expected"; for (var i = 0; i < message.defaults.length; ++i) { @@ -96264,7 +99176,7 @@ return "defaults." + error; } } - if (message.minimumEdition != null && message.hasOwnProperty("minimumEdition")) + if (message.minimumEdition != null && Object.hasOwnProperty.call(message, "minimumEdition")) switch (message.minimumEdition) { default: return "minimumEdition: enum value expected"; @@ -96282,7 +99194,7 @@ case 2147483647: break; } - if (message.maximumEdition != null && message.hasOwnProperty("maximumEdition")) + if (message.maximumEdition != null && Object.hasOwnProperty.call(message, "maximumEdition")) switch (message.maximumEdition) { default: return "maximumEdition: enum value expected"; @@ -96314,6 +99226,8 @@ FeatureSetDefaults.fromObject = function fromObject(object, long) { if (object instanceof $root.google.protobuf.FeatureSetDefaults) return object; + if (!$util.isObject(object)) + throw TypeError(".google.protobuf.FeatureSetDefaults: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -96324,7 +99238,7 @@ throw TypeError(".google.protobuf.FeatureSetDefaults.defaults: array expected"); message.defaults = []; for (var i = 0; i < object.defaults.length; ++i) { - if (typeof object.defaults[i] !== "object") + if (!$util.isObject(object.defaults[i])) throw TypeError(".google.protobuf.FeatureSetDefaults.defaults: object expected"); message.defaults[i] = $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.fromObject(object.defaults[i], long + 1); } @@ -96453,9 +99367,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - FeatureSetDefaults.toObject = function toObject(message, options) { + FeatureSetDefaults.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.defaults = []; @@ -96466,11 +99384,11 @@ if (message.defaults && message.defaults.length) { object.defaults = []; for (var j = 0; j < message.defaults.length; ++j) - object.defaults[j] = $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.toObject(message.defaults[j], options); + object.defaults[j] = $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.toObject(message.defaults[j], options, q + 1); } - if (message.minimumEdition != null && message.hasOwnProperty("minimumEdition")) + if (message.minimumEdition != null && Object.hasOwnProperty.call(message, "minimumEdition")) object.minimumEdition = options.enums === String ? $root.google.protobuf.Edition[message.minimumEdition] === undefined ? message.minimumEdition : $root.google.protobuf.Edition[message.minimumEdition] : message.minimumEdition; - if (message.maximumEdition != null && message.hasOwnProperty("maximumEdition")) + if (message.maximumEdition != null && Object.hasOwnProperty.call(message, "maximumEdition")) object.maximumEdition = options.enums === String ? $root.google.protobuf.Edition[message.maximumEdition] === undefined ? message.maximumEdition : $root.google.protobuf.Edition[message.maximumEdition] : message.maximumEdition; return object; }; @@ -96572,15 +99490,19 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FeatureSetEditionDefault.encode = function encode(message, writer) { + FeatureSetEditionDefault.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.edition != null && Object.hasOwnProperty.call(message, "edition")) writer.uint32(/* id 3, wireType 0 =*/24).int32(message.edition); if (message.overridableFeatures != null && Object.hasOwnProperty.call(message, "overridableFeatures")) - $root.google.protobuf.FeatureSet.encode(message.overridableFeatures, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + $root.google.protobuf.FeatureSet.encode(message.overridableFeatures, writer.uint32(/* id 4, wireType 2 =*/34).fork(), q + 1).ldelim(); if (message.fixedFeatures != null && Object.hasOwnProperty.call(message, "fixedFeatures")) - $root.google.protobuf.FeatureSet.encode(message.fixedFeatures, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + $root.google.protobuf.FeatureSet.encode(message.fixedFeatures, writer.uint32(/* id 5, wireType 2 =*/42).fork(), q + 1).ldelim(); return writer; }; @@ -96594,7 +99516,7 @@ * @returns {$protobuf.Writer} Writer */ FeatureSetEditionDefault.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -96672,7 +99594,7 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.edition != null && message.hasOwnProperty("edition")) + if (message.edition != null && Object.hasOwnProperty.call(message, "edition")) switch (message.edition) { default: return "edition: enum value expected"; @@ -96690,12 +99612,12 @@ case 2147483647: break; } - if (message.overridableFeatures != null && message.hasOwnProperty("overridableFeatures")) { + if (message.overridableFeatures != null && Object.hasOwnProperty.call(message, "overridableFeatures")) { var error = $root.google.protobuf.FeatureSet.verify(message.overridableFeatures, long + 1); if (error) return "overridableFeatures." + error; } - if (message.fixedFeatures != null && message.hasOwnProperty("fixedFeatures")) { + if (message.fixedFeatures != null && Object.hasOwnProperty.call(message, "fixedFeatures")) { var error = $root.google.protobuf.FeatureSet.verify(message.fixedFeatures, long + 1); if (error) return "fixedFeatures." + error; @@ -96714,6 +99636,8 @@ FeatureSetEditionDefault.fromObject = function fromObject(object, long) { if (object instanceof $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault) return object; + if (!$util.isObject(object)) + throw TypeError(".google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -96776,12 +99700,12 @@ break; } if (object.overridableFeatures != null) { - if (typeof object.overridableFeatures !== "object") + if (!$util.isObject(object.overridableFeatures)) throw TypeError(".google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.overridableFeatures: object expected"); message.overridableFeatures = $root.google.protobuf.FeatureSet.fromObject(object.overridableFeatures, long + 1); } if (object.fixedFeatures != null) { - if (typeof object.fixedFeatures !== "object") + if (!$util.isObject(object.fixedFeatures)) throw TypeError(".google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.fixedFeatures: object expected"); message.fixedFeatures = $root.google.protobuf.FeatureSet.fromObject(object.fixedFeatures, long + 1); } @@ -96797,21 +99721,25 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - FeatureSetEditionDefault.toObject = function toObject(message, options) { + FeatureSetEditionDefault.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.edition = options.enums === String ? "EDITION_UNKNOWN" : 0; object.overridableFeatures = null; object.fixedFeatures = null; } - if (message.edition != null && message.hasOwnProperty("edition")) + if (message.edition != null && Object.hasOwnProperty.call(message, "edition")) object.edition = options.enums === String ? $root.google.protobuf.Edition[message.edition] === undefined ? message.edition : $root.google.protobuf.Edition[message.edition] : message.edition; - if (message.overridableFeatures != null && message.hasOwnProperty("overridableFeatures")) - object.overridableFeatures = $root.google.protobuf.FeatureSet.toObject(message.overridableFeatures, options); - if (message.fixedFeatures != null && message.hasOwnProperty("fixedFeatures")) - object.fixedFeatures = $root.google.protobuf.FeatureSet.toObject(message.fixedFeatures, options); + if (message.overridableFeatures != null && Object.hasOwnProperty.call(message, "overridableFeatures")) + object.overridableFeatures = $root.google.protobuf.FeatureSet.toObject(message.overridableFeatures, options, q + 1); + if (message.fixedFeatures != null && Object.hasOwnProperty.call(message, "fixedFeatures")) + object.fixedFeatures = $root.google.protobuf.FeatureSet.toObject(message.fixedFeatures, options, q + 1); return object; }; @@ -96901,12 +99829,16 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SourceCodeInfo.encode = function encode(message, writer) { + SourceCodeInfo.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.location != null && message.location.length) for (var i = 0; i < message.location.length; ++i) - $root.google.protobuf.SourceCodeInfo.Location.encode(message.location[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + $root.google.protobuf.SourceCodeInfo.Location.encode(message.location[i], writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); return writer; }; @@ -96920,7 +99852,7 @@ * @returns {$protobuf.Writer} Writer */ SourceCodeInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -96992,7 +99924,7 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.location != null && message.hasOwnProperty("location")) { + if (message.location != null && Object.hasOwnProperty.call(message, "location")) { if (!Array.isArray(message.location)) return "location: array expected"; for (var i = 0; i < message.location.length; ++i) { @@ -97015,6 +99947,8 @@ SourceCodeInfo.fromObject = function fromObject(object, long) { if (object instanceof $root.google.protobuf.SourceCodeInfo) return object; + if (!$util.isObject(object)) + throw TypeError(".google.protobuf.SourceCodeInfo: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -97025,7 +99959,7 @@ throw TypeError(".google.protobuf.SourceCodeInfo.location: array expected"); message.location = []; for (var i = 0; i < object.location.length; ++i) { - if (typeof object.location[i] !== "object") + if (!$util.isObject(object.location[i])) throw TypeError(".google.protobuf.SourceCodeInfo.location: object expected"); message.location[i] = $root.google.protobuf.SourceCodeInfo.Location.fromObject(object.location[i], long + 1); } @@ -97042,16 +99976,20 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - SourceCodeInfo.toObject = function toObject(message, options) { + SourceCodeInfo.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.location = []; if (message.location && message.location.length) { object.location = []; for (var j = 0; j < message.location.length; ++j) - object.location[j] = $root.google.protobuf.SourceCodeInfo.Location.toObject(message.location[j], options); + object.location[j] = $root.google.protobuf.SourceCodeInfo.Location.toObject(message.location[j], options, q + 1); } return object; }; @@ -97174,9 +100112,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Location.encode = function encode(message, writer) { + Location.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.path != null && message.path.length) { writer.uint32(/* id 1, wireType 2 =*/10).fork(); for (var i = 0; i < message.path.length; ++i) @@ -97209,7 +100151,7 @@ * @returns {$protobuf.Writer} Writer */ Location.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -97311,27 +100253,27 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.path != null && message.hasOwnProperty("path")) { + if (message.path != null && Object.hasOwnProperty.call(message, "path")) { if (!Array.isArray(message.path)) return "path: array expected"; for (var i = 0; i < message.path.length; ++i) if (!$util.isInteger(message.path[i])) return "path: integer[] expected"; } - if (message.span != null && message.hasOwnProperty("span")) { + if (message.span != null && Object.hasOwnProperty.call(message, "span")) { if (!Array.isArray(message.span)) return "span: array expected"; for (var i = 0; i < message.span.length; ++i) if (!$util.isInteger(message.span[i])) return "span: integer[] expected"; } - if (message.leadingComments != null && message.hasOwnProperty("leadingComments")) + if (message.leadingComments != null && Object.hasOwnProperty.call(message, "leadingComments")) if (!$util.isString(message.leadingComments)) return "leadingComments: string expected"; - if (message.trailingComments != null && message.hasOwnProperty("trailingComments")) + if (message.trailingComments != null && Object.hasOwnProperty.call(message, "trailingComments")) if (!$util.isString(message.trailingComments)) return "trailingComments: string expected"; - if (message.leadingDetachedComments != null && message.hasOwnProperty("leadingDetachedComments")) { + if (message.leadingDetachedComments != null && Object.hasOwnProperty.call(message, "leadingDetachedComments")) { if (!Array.isArray(message.leadingDetachedComments)) return "leadingDetachedComments: array expected"; for (var i = 0; i < message.leadingDetachedComments.length; ++i) @@ -97352,6 +100294,8 @@ Location.fromObject = function fromObject(object, long) { if (object instanceof $root.google.protobuf.SourceCodeInfo.Location) return object; + if (!$util.isObject(object)) + throw TypeError(".google.protobuf.SourceCodeInfo.Location: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -97394,9 +100338,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Location.toObject = function toObject(message, options) { + Location.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) { object.path = []; @@ -97417,9 +100365,9 @@ for (var j = 0; j < message.span.length; ++j) object.span[j] = message.span[j]; } - if (message.leadingComments != null && message.hasOwnProperty("leadingComments")) + if (message.leadingComments != null && Object.hasOwnProperty.call(message, "leadingComments")) object.leadingComments = message.leadingComments; - if (message.trailingComments != null && message.hasOwnProperty("trailingComments")) + if (message.trailingComments != null && Object.hasOwnProperty.call(message, "trailingComments")) object.trailingComments = message.trailingComments; if (message.leadingDetachedComments && message.leadingDetachedComments.length) { object.leadingDetachedComments = []; @@ -97515,12 +100463,16 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GeneratedCodeInfo.encode = function encode(message, writer) { + GeneratedCodeInfo.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.annotation != null && message.annotation.length) for (var i = 0; i < message.annotation.length; ++i) - $root.google.protobuf.GeneratedCodeInfo.Annotation.encode(message.annotation[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + $root.google.protobuf.GeneratedCodeInfo.Annotation.encode(message.annotation[i], writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); return writer; }; @@ -97534,7 +100486,7 @@ * @returns {$protobuf.Writer} Writer */ GeneratedCodeInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -97606,7 +100558,7 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.annotation != null && message.hasOwnProperty("annotation")) { + if (message.annotation != null && Object.hasOwnProperty.call(message, "annotation")) { if (!Array.isArray(message.annotation)) return "annotation: array expected"; for (var i = 0; i < message.annotation.length; ++i) { @@ -97629,6 +100581,8 @@ GeneratedCodeInfo.fromObject = function fromObject(object, long) { if (object instanceof $root.google.protobuf.GeneratedCodeInfo) return object; + if (!$util.isObject(object)) + throw TypeError(".google.protobuf.GeneratedCodeInfo: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -97639,7 +100593,7 @@ throw TypeError(".google.protobuf.GeneratedCodeInfo.annotation: array expected"); message.annotation = []; for (var i = 0; i < object.annotation.length; ++i) { - if (typeof object.annotation[i] !== "object") + if (!$util.isObject(object.annotation[i])) throw TypeError(".google.protobuf.GeneratedCodeInfo.annotation: object expected"); message.annotation[i] = $root.google.protobuf.GeneratedCodeInfo.Annotation.fromObject(object.annotation[i], long + 1); } @@ -97656,16 +100610,20 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GeneratedCodeInfo.toObject = function toObject(message, options) { + GeneratedCodeInfo.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.annotation = []; if (message.annotation && message.annotation.length) { object.annotation = []; for (var j = 0; j < message.annotation.length; ++j) - object.annotation[j] = $root.google.protobuf.GeneratedCodeInfo.Annotation.toObject(message.annotation[j], options); + object.annotation[j] = $root.google.protobuf.GeneratedCodeInfo.Annotation.toObject(message.annotation[j], options, q + 1); } return object; }; @@ -97786,9 +100744,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Annotation.encode = function encode(message, writer) { + Annotation.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.path != null && message.path.length) { writer.uint32(/* id 1, wireType 2 =*/10).fork(); for (var i = 0; i < message.path.length; ++i) @@ -97816,7 +100778,7 @@ * @returns {$protobuf.Writer} Writer */ Annotation.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -97909,23 +100871,23 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.path != null && message.hasOwnProperty("path")) { + if (message.path != null && Object.hasOwnProperty.call(message, "path")) { if (!Array.isArray(message.path)) return "path: array expected"; for (var i = 0; i < message.path.length; ++i) if (!$util.isInteger(message.path[i])) return "path: integer[] expected"; } - if (message.sourceFile != null && message.hasOwnProperty("sourceFile")) + if (message.sourceFile != null && Object.hasOwnProperty.call(message, "sourceFile")) if (!$util.isString(message.sourceFile)) return "sourceFile: string expected"; - if (message.begin != null && message.hasOwnProperty("begin")) + if (message.begin != null && Object.hasOwnProperty.call(message, "begin")) if (!$util.isInteger(message.begin)) return "begin: integer expected"; - if (message.end != null && message.hasOwnProperty("end")) + if (message.end != null && Object.hasOwnProperty.call(message, "end")) if (!$util.isInteger(message.end)) return "end: integer expected"; - if (message.semantic != null && message.hasOwnProperty("semantic")) + if (message.semantic != null && Object.hasOwnProperty.call(message, "semantic")) switch (message.semantic) { default: return "semantic: enum value expected"; @@ -97948,6 +100910,8 @@ Annotation.fromObject = function fromObject(object, long) { if (object instanceof $root.google.protobuf.GeneratedCodeInfo.Annotation) return object; + if (!$util.isObject(object)) + throw TypeError(".google.protobuf.GeneratedCodeInfo.Annotation: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -97998,9 +100962,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Annotation.toObject = function toObject(message, options) { + Annotation.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.path = []; @@ -98015,13 +100983,13 @@ for (var j = 0; j < message.path.length; ++j) object.path[j] = message.path[j]; } - if (message.sourceFile != null && message.hasOwnProperty("sourceFile")) + if (message.sourceFile != null && Object.hasOwnProperty.call(message, "sourceFile")) object.sourceFile = message.sourceFile; - if (message.begin != null && message.hasOwnProperty("begin")) + if (message.begin != null && Object.hasOwnProperty.call(message, "begin")) object.begin = message.begin; - if (message.end != null && message.hasOwnProperty("end")) + if (message.end != null && Object.hasOwnProperty.call(message, "end")) object.end = message.end; - if (message.semantic != null && message.hasOwnProperty("semantic")) + if (message.semantic != null && Object.hasOwnProperty.call(message, "semantic")) object.semantic = options.enums === String ? $root.google.protobuf.GeneratedCodeInfo.Annotation.Semantic[message.semantic] === undefined ? message.semantic : $root.google.protobuf.GeneratedCodeInfo.Annotation.Semantic[message.semantic] : message.semantic; return object; }; @@ -98152,9 +101120,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Duration.encode = function encode(message, writer) { + Duration.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.seconds != null && Object.hasOwnProperty.call(message, "seconds")) writer.uint32(/* id 1, wireType 0 =*/8).int64(message.seconds); if (message.nanos != null && Object.hasOwnProperty.call(message, "nanos")) @@ -98172,7 +101144,7 @@ * @returns {$protobuf.Writer} Writer */ Duration.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -98246,10 +101218,10 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.seconds != null && message.hasOwnProperty("seconds")) + if (message.seconds != null && Object.hasOwnProperty.call(message, "seconds")) if (!$util.isInteger(message.seconds) && !(message.seconds && $util.isInteger(message.seconds.low) && $util.isInteger(message.seconds.high))) return "seconds: integer|Long expected"; - if (message.nanos != null && message.hasOwnProperty("nanos")) + if (message.nanos != null && Object.hasOwnProperty.call(message, "nanos")) if (!$util.isInteger(message.nanos)) return "nanos: integer expected"; return null; @@ -98266,6 +101238,8 @@ Duration.fromObject = function fromObject(object, long) { if (object instanceof $root.google.protobuf.Duration) return object; + if (!$util.isObject(object)) + throw TypeError(".google.protobuf.Duration: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -98273,7 +101247,7 @@ var message = new $root.google.protobuf.Duration(); if (object.seconds != null) if ($util.Long) - (message.seconds = $util.Long.fromValue(object.seconds)).unsigned = false; + message.seconds = $util.Long.fromValue(object.seconds, false); else if (typeof object.seconds === "string") message.seconds = parseInt(object.seconds, 10); else if (typeof object.seconds === "number") @@ -98294,24 +101268,30 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Duration.toObject = function toObject(message, options) { + Duration.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) { if ($util.Long) { var long = new $util.Long(0, 0, false); - object.seconds = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.seconds = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : typeof BigInt !== "undefined" && options.longs === BigInt ? long.toBigInt() : long; } else - object.seconds = options.longs === String ? "0" : 0; + object.seconds = options.longs === String ? "0" : typeof BigInt !== "undefined" && options.longs === BigInt ? BigInt("0") : 0; object.nanos = 0; } - if (message.seconds != null && message.hasOwnProperty("seconds")) - if (typeof message.seconds === "number") + if (message.seconds != null && Object.hasOwnProperty.call(message, "seconds")) + if (typeof BigInt !== "undefined" && options.longs === BigInt) + object.seconds = typeof message.seconds === "number" ? BigInt(message.seconds) : $util.Long.fromBits(message.seconds.low >>> 0, message.seconds.high >>> 0, false).toBigInt(); + else if (typeof message.seconds === "number") object.seconds = options.longs === String ? String(message.seconds) : message.seconds; else object.seconds = options.longs === String ? $util.Long.prototype.toString.call(message.seconds) : options.longs === Number ? new $util.LongBits(message.seconds.low >>> 0, message.seconds.high >>> 0).toNumber() : message.seconds; - if (message.nanos != null && message.hasOwnProperty("nanos")) + if (message.nanos != null && Object.hasOwnProperty.call(message, "nanos")) object.nanos = message.nanos; return object; }; @@ -98407,9 +101387,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Timestamp.encode = function encode(message, writer) { + Timestamp.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.seconds != null && Object.hasOwnProperty.call(message, "seconds")) writer.uint32(/* id 1, wireType 0 =*/8).int64(message.seconds); if (message.nanos != null && Object.hasOwnProperty.call(message, "nanos")) @@ -98427,7 +101411,7 @@ * @returns {$protobuf.Writer} Writer */ Timestamp.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -98501,10 +101485,10 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.seconds != null && message.hasOwnProperty("seconds")) + if (message.seconds != null && Object.hasOwnProperty.call(message, "seconds")) if (!$util.isInteger(message.seconds) && !(message.seconds && $util.isInteger(message.seconds.low) && $util.isInteger(message.seconds.high))) return "seconds: integer|Long expected"; - if (message.nanos != null && message.hasOwnProperty("nanos")) + if (message.nanos != null && Object.hasOwnProperty.call(message, "nanos")) if (!$util.isInteger(message.nanos)) return "nanos: integer expected"; return null; @@ -98521,6 +101505,8 @@ Timestamp.fromObject = function fromObject(object, long) { if (object instanceof $root.google.protobuf.Timestamp) return object; + if (!$util.isObject(object)) + throw TypeError(".google.protobuf.Timestamp: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -98528,7 +101514,7 @@ var message = new $root.google.protobuf.Timestamp(); if (object.seconds != null) if ($util.Long) - (message.seconds = $util.Long.fromValue(object.seconds)).unsigned = false; + message.seconds = $util.Long.fromValue(object.seconds, false); else if (typeof object.seconds === "string") message.seconds = parseInt(object.seconds, 10); else if (typeof object.seconds === "number") @@ -98549,24 +101535,30 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Timestamp.toObject = function toObject(message, options) { + Timestamp.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) { if ($util.Long) { var long = new $util.Long(0, 0, false); - object.seconds = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.seconds = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : typeof BigInt !== "undefined" && options.longs === BigInt ? long.toBigInt() : long; } else - object.seconds = options.longs === String ? "0" : 0; + object.seconds = options.longs === String ? "0" : typeof BigInt !== "undefined" && options.longs === BigInt ? BigInt("0") : 0; object.nanos = 0; } - if (message.seconds != null && message.hasOwnProperty("seconds")) - if (typeof message.seconds === "number") + if (message.seconds != null && Object.hasOwnProperty.call(message, "seconds")) + if (typeof BigInt !== "undefined" && options.longs === BigInt) + object.seconds = typeof message.seconds === "number" ? BigInt(message.seconds) : $util.Long.fromBits(message.seconds.low >>> 0, message.seconds.high >>> 0, false).toBigInt(); + else if (typeof message.seconds === "number") object.seconds = options.longs === String ? String(message.seconds) : message.seconds; else object.seconds = options.longs === String ? $util.Long.prototype.toString.call(message.seconds) : options.longs === Number ? new $util.LongBits(message.seconds.low >>> 0, message.seconds.high >>> 0).toNumber() : message.seconds; - if (message.nanos != null && message.hasOwnProperty("nanos")) + if (message.nanos != null && Object.hasOwnProperty.call(message, "nanos")) object.nanos = message.nanos; return object; }; @@ -98654,9 +101646,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FieldMask.encode = function encode(message, writer) { + FieldMask.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.paths != null && message.paths.length) for (var i = 0; i < message.paths.length; ++i) writer.uint32(/* id 1, wireType 2 =*/10).string(message.paths[i]); @@ -98673,7 +101669,7 @@ * @returns {$protobuf.Writer} Writer */ FieldMask.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -98745,7 +101741,7 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.paths != null && message.hasOwnProperty("paths")) { + if (message.paths != null && Object.hasOwnProperty.call(message, "paths")) { if (!Array.isArray(message.paths)) return "paths: array expected"; for (var i = 0; i < message.paths.length; ++i) @@ -98766,6 +101762,8 @@ FieldMask.fromObject = function fromObject(object, long) { if (object instanceof $root.google.protobuf.FieldMask) return object; + if (!$util.isObject(object)) + throw TypeError(".google.protobuf.FieldMask: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -98790,9 +101788,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - FieldMask.toObject = function toObject(message, options) { + FieldMask.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.paths = []; @@ -98895,9 +101897,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Any.encode = function encode(message, writer) { + Any.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.type_url != null && Object.hasOwnProperty.call(message, "type_url")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.type_url); if (message.value != null && Object.hasOwnProperty.call(message, "value")) @@ -98915,7 +101921,7 @@ * @returns {$protobuf.Writer} Writer */ Any.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -98989,10 +101995,10 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.type_url != null && message.hasOwnProperty("type_url")) + if (message.type_url != null && Object.hasOwnProperty.call(message, "type_url")) if (!$util.isString(message.type_url)) return "type_url: string expected"; - if (message.value != null && message.hasOwnProperty("value")) + if (message.value != null && Object.hasOwnProperty.call(message, "value")) if (!(message.value && typeof message.value.length === "number" || $util.isString(message.value))) return "value: buffer expected"; return null; @@ -99009,6 +102015,8 @@ Any.fromObject = function fromObject(object, long) { if (object instanceof $root.google.protobuf.Any) return object; + if (!$util.isObject(object)) + throw TypeError(".google.protobuf.Any: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -99033,9 +102041,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Any.toObject = function toObject(message, options) { + Any.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.type_url = ""; @@ -99047,9 +102059,9 @@ object.value = $util.newBuffer(object.value); } } - if (message.type_url != null && message.hasOwnProperty("type_url")) + if (message.type_url != null && Object.hasOwnProperty.call(message, "type_url")) object.type_url = message.type_url; - if (message.value != null && message.hasOwnProperty("value")) + if (message.value != null && Object.hasOwnProperty.call(message, "value")) object.value = options.bytes === String ? $util.base64.encode(message.value, 0, message.value.length) : options.bytes === Array ? Array.prototype.slice.call(message.value) : message.value; return object; }; @@ -99127,9 +102139,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Empty.encode = function encode(message, writer) { + Empty.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); return writer; }; @@ -99143,7 +102159,7 @@ * @returns {$protobuf.Writer} Writer */ Empty.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -99223,10 +102239,6 @@ Empty.fromObject = function fromObject(object, long) { if (object instanceof $root.google.protobuf.Empty) return object; - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - throw Error("maximum nesting depth exceeded"); return new $root.google.protobuf.Empty(); }; @@ -99325,9 +102337,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DoubleValue.encode = function encode(message, writer) { + DoubleValue.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.value != null && Object.hasOwnProperty.call(message, "value")) writer.uint32(/* id 1, wireType 1 =*/9).double(message.value); return writer; @@ -99343,7 +102359,7 @@ * @returns {$protobuf.Writer} Writer */ DoubleValue.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -99413,7 +102429,7 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.value != null && message.hasOwnProperty("value")) + if (message.value != null && Object.hasOwnProperty.call(message, "value")) if (typeof message.value !== "number") return "value: number expected"; return null; @@ -99430,6 +102446,8 @@ DoubleValue.fromObject = function fromObject(object, long) { if (object instanceof $root.google.protobuf.DoubleValue) return object; + if (!$util.isObject(object)) + throw TypeError(".google.protobuf.DoubleValue: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -99449,13 +102467,17 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DoubleValue.toObject = function toObject(message, options) { + DoubleValue.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) object.value = 0; - if (message.value != null && message.hasOwnProperty("value")) + if (message.value != null && Object.hasOwnProperty.call(message, "value")) object.value = options.json && !isFinite(message.value) ? String(message.value) : message.value; return object; }; @@ -99542,9 +102564,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FloatValue.encode = function encode(message, writer) { + FloatValue.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.value != null && Object.hasOwnProperty.call(message, "value")) writer.uint32(/* id 1, wireType 5 =*/13).float(message.value); return writer; @@ -99560,7 +102586,7 @@ * @returns {$protobuf.Writer} Writer */ FloatValue.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -99630,7 +102656,7 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.value != null && message.hasOwnProperty("value")) + if (message.value != null && Object.hasOwnProperty.call(message, "value")) if (typeof message.value !== "number") return "value: number expected"; return null; @@ -99647,6 +102673,8 @@ FloatValue.fromObject = function fromObject(object, long) { if (object instanceof $root.google.protobuf.FloatValue) return object; + if (!$util.isObject(object)) + throw TypeError(".google.protobuf.FloatValue: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -99666,13 +102694,17 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - FloatValue.toObject = function toObject(message, options) { + FloatValue.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) object.value = 0; - if (message.value != null && message.hasOwnProperty("value")) + if (message.value != null && Object.hasOwnProperty.call(message, "value")) object.value = options.json && !isFinite(message.value) ? String(message.value) : message.value; return object; }; @@ -99759,9 +102791,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Int64Value.encode = function encode(message, writer) { + Int64Value.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.value != null && Object.hasOwnProperty.call(message, "value")) writer.uint32(/* id 1, wireType 0 =*/8).int64(message.value); return writer; @@ -99777,7 +102813,7 @@ * @returns {$protobuf.Writer} Writer */ Int64Value.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -99847,7 +102883,7 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.value != null && message.hasOwnProperty("value")) + if (message.value != null && Object.hasOwnProperty.call(message, "value")) if (!$util.isInteger(message.value) && !(message.value && $util.isInteger(message.value.low) && $util.isInteger(message.value.high))) return "value: integer|Long expected"; return null; @@ -99864,6 +102900,8 @@ Int64Value.fromObject = function fromObject(object, long) { if (object instanceof $root.google.protobuf.Int64Value) return object; + if (!$util.isObject(object)) + throw TypeError(".google.protobuf.Int64Value: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -99871,7 +102909,7 @@ var message = new $root.google.protobuf.Int64Value(); if (object.value != null) if ($util.Long) - (message.value = $util.Long.fromValue(object.value)).unsigned = false; + message.value = $util.Long.fromValue(object.value, false); else if (typeof object.value === "string") message.value = parseInt(object.value, 10); else if (typeof object.value === "number") @@ -99890,18 +102928,24 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Int64Value.toObject = function toObject(message, options) { + Int64Value.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) if ($util.Long) { var long = new $util.Long(0, 0, false); - object.value = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.value = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : typeof BigInt !== "undefined" && options.longs === BigInt ? long.toBigInt() : long; } else - object.value = options.longs === String ? "0" : 0; - if (message.value != null && message.hasOwnProperty("value")) - if (typeof message.value === "number") + object.value = options.longs === String ? "0" : typeof BigInt !== "undefined" && options.longs === BigInt ? BigInt("0") : 0; + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + if (typeof BigInt !== "undefined" && options.longs === BigInt) + object.value = typeof message.value === "number" ? BigInt(message.value) : $util.Long.fromBits(message.value.low >>> 0, message.value.high >>> 0, false).toBigInt(); + else if (typeof message.value === "number") object.value = options.longs === String ? String(message.value) : message.value; else object.value = options.longs === String ? $util.Long.prototype.toString.call(message.value) : options.longs === Number ? new $util.LongBits(message.value.low >>> 0, message.value.high >>> 0).toNumber() : message.value; @@ -99990,9 +103034,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UInt64Value.encode = function encode(message, writer) { + UInt64Value.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.value != null && Object.hasOwnProperty.call(message, "value")) writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.value); return writer; @@ -100008,7 +103056,7 @@ * @returns {$protobuf.Writer} Writer */ UInt64Value.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -100078,7 +103126,7 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.value != null && message.hasOwnProperty("value")) + if (message.value != null && Object.hasOwnProperty.call(message, "value")) if (!$util.isInteger(message.value) && !(message.value && $util.isInteger(message.value.low) && $util.isInteger(message.value.high))) return "value: integer|Long expected"; return null; @@ -100095,6 +103143,8 @@ UInt64Value.fromObject = function fromObject(object, long) { if (object instanceof $root.google.protobuf.UInt64Value) return object; + if (!$util.isObject(object)) + throw TypeError(".google.protobuf.UInt64Value: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -100102,7 +103152,7 @@ var message = new $root.google.protobuf.UInt64Value(); if (object.value != null) if ($util.Long) - (message.value = $util.Long.fromValue(object.value)).unsigned = true; + message.value = $util.Long.fromValue(object.value, true); else if (typeof object.value === "string") message.value = parseInt(object.value, 10); else if (typeof object.value === "number") @@ -100121,18 +103171,24 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - UInt64Value.toObject = function toObject(message, options) { + UInt64Value.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) if ($util.Long) { var long = new $util.Long(0, 0, true); - object.value = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.value = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : typeof BigInt !== "undefined" && options.longs === BigInt ? long.toBigInt() : long; } else - object.value = options.longs === String ? "0" : 0; - if (message.value != null && message.hasOwnProperty("value")) - if (typeof message.value === "number") + object.value = options.longs === String ? "0" : typeof BigInt !== "undefined" && options.longs === BigInt ? BigInt("0") : 0; + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + if (typeof BigInt !== "undefined" && options.longs === BigInt) + object.value = typeof message.value === "number" ? BigInt(message.value) : $util.Long.fromBits(message.value.low >>> 0, message.value.high >>> 0, true).toBigInt(); + else if (typeof message.value === "number") object.value = options.longs === String ? String(message.value) : message.value; else object.value = options.longs === String ? $util.Long.prototype.toString.call(message.value) : options.longs === Number ? new $util.LongBits(message.value.low >>> 0, message.value.high >>> 0).toNumber(true) : message.value; @@ -100221,9 +103277,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Int32Value.encode = function encode(message, writer) { + Int32Value.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.value != null && Object.hasOwnProperty.call(message, "value")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.value); return writer; @@ -100239,7 +103299,7 @@ * @returns {$protobuf.Writer} Writer */ Int32Value.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -100309,7 +103369,7 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.value != null && message.hasOwnProperty("value")) + if (message.value != null && Object.hasOwnProperty.call(message, "value")) if (!$util.isInteger(message.value)) return "value: integer expected"; return null; @@ -100326,6 +103386,8 @@ Int32Value.fromObject = function fromObject(object, long) { if (object instanceof $root.google.protobuf.Int32Value) return object; + if (!$util.isObject(object)) + throw TypeError(".google.protobuf.Int32Value: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -100345,13 +103407,17 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Int32Value.toObject = function toObject(message, options) { + Int32Value.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) object.value = 0; - if (message.value != null && message.hasOwnProperty("value")) + if (message.value != null && Object.hasOwnProperty.call(message, "value")) object.value = message.value; return object; }; @@ -100438,9 +103504,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UInt32Value.encode = function encode(message, writer) { + UInt32Value.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.value != null && Object.hasOwnProperty.call(message, "value")) writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.value); return writer; @@ -100456,7 +103526,7 @@ * @returns {$protobuf.Writer} Writer */ UInt32Value.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -100526,7 +103596,7 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.value != null && message.hasOwnProperty("value")) + if (message.value != null && Object.hasOwnProperty.call(message, "value")) if (!$util.isInteger(message.value)) return "value: integer expected"; return null; @@ -100543,6 +103613,8 @@ UInt32Value.fromObject = function fromObject(object, long) { if (object instanceof $root.google.protobuf.UInt32Value) return object; + if (!$util.isObject(object)) + throw TypeError(".google.protobuf.UInt32Value: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -100562,13 +103634,17 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - UInt32Value.toObject = function toObject(message, options) { + UInt32Value.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) object.value = 0; - if (message.value != null && message.hasOwnProperty("value")) + if (message.value != null && Object.hasOwnProperty.call(message, "value")) object.value = message.value; return object; }; @@ -100655,9 +103731,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - BoolValue.encode = function encode(message, writer) { + BoolValue.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.value != null && Object.hasOwnProperty.call(message, "value")) writer.uint32(/* id 1, wireType 0 =*/8).bool(message.value); return writer; @@ -100673,7 +103753,7 @@ * @returns {$protobuf.Writer} Writer */ BoolValue.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -100743,7 +103823,7 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.value != null && message.hasOwnProperty("value")) + if (message.value != null && Object.hasOwnProperty.call(message, "value")) if (typeof message.value !== "boolean") return "value: boolean expected"; return null; @@ -100760,6 +103840,8 @@ BoolValue.fromObject = function fromObject(object, long) { if (object instanceof $root.google.protobuf.BoolValue) return object; + if (!$util.isObject(object)) + throw TypeError(".google.protobuf.BoolValue: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -100779,13 +103861,17 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - BoolValue.toObject = function toObject(message, options) { + BoolValue.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) object.value = false; - if (message.value != null && message.hasOwnProperty("value")) + if (message.value != null && Object.hasOwnProperty.call(message, "value")) object.value = message.value; return object; }; @@ -100872,9 +103958,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - StringValue.encode = function encode(message, writer) { + StringValue.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.value != null && Object.hasOwnProperty.call(message, "value")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.value); return writer; @@ -100890,7 +103980,7 @@ * @returns {$protobuf.Writer} Writer */ StringValue.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -100960,7 +104050,7 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.value != null && message.hasOwnProperty("value")) + if (message.value != null && Object.hasOwnProperty.call(message, "value")) if (!$util.isString(message.value)) return "value: string expected"; return null; @@ -100977,6 +104067,8 @@ StringValue.fromObject = function fromObject(object, long) { if (object instanceof $root.google.protobuf.StringValue) return object; + if (!$util.isObject(object)) + throw TypeError(".google.protobuf.StringValue: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -100996,13 +104088,17 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - StringValue.toObject = function toObject(message, options) { + StringValue.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) object.value = ""; - if (message.value != null && message.hasOwnProperty("value")) + if (message.value != null && Object.hasOwnProperty.call(message, "value")) object.value = message.value; return object; }; @@ -101089,9 +104185,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - BytesValue.encode = function encode(message, writer) { + BytesValue.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.value != null && Object.hasOwnProperty.call(message, "value")) writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.value); return writer; @@ -101107,7 +104207,7 @@ * @returns {$protobuf.Writer} Writer */ BytesValue.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -101177,7 +104277,7 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.value != null && message.hasOwnProperty("value")) + if (message.value != null && Object.hasOwnProperty.call(message, "value")) if (!(message.value && typeof message.value.length === "number" || $util.isString(message.value))) return "value: buffer expected"; return null; @@ -101194,6 +104294,8 @@ BytesValue.fromObject = function fromObject(object, long) { if (object instanceof $root.google.protobuf.BytesValue) return object; + if (!$util.isObject(object)) + throw TypeError(".google.protobuf.BytesValue: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -101216,9 +104318,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - BytesValue.toObject = function toObject(message, options) { + BytesValue.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) if (options.bytes === String) @@ -101228,7 +104334,7 @@ if (options.bytes !== Array) object.value = $util.newBuffer(object.value); } - if (message.value != null && message.hasOwnProperty("value")) + if (message.value != null && Object.hasOwnProperty.call(message, "value")) object.value = options.bytes === String ? $util.base64.encode(message.value, 0, message.value.length) : options.bytes === Array ? Array.prototype.slice.call(message.value) : message.value; return object; }; @@ -101335,7 +104441,7 @@ * @variation 1 */ Object.defineProperty(IAMPolicy.prototype.setIamPolicy = function setIamPolicy(request, callback) { - return this.rpcCall(setIamPolicy, $root.google.iam.v1.SetIamPolicyRequest, $root.google.iam.v1.Policy, request, callback); + return $protobuf.rpc.Service.prototype.rpcCall.call(this, setIamPolicy, $root.google.iam.v1.SetIamPolicyRequest, $root.google.iam.v1.Policy, request, callback); }, "name", { value: "SetIamPolicy" }); /** @@ -101368,7 +104474,7 @@ * @variation 1 */ Object.defineProperty(IAMPolicy.prototype.getIamPolicy = function getIamPolicy(request, callback) { - return this.rpcCall(getIamPolicy, $root.google.iam.v1.GetIamPolicyRequest, $root.google.iam.v1.Policy, request, callback); + return $protobuf.rpc.Service.prototype.rpcCall.call(this, getIamPolicy, $root.google.iam.v1.GetIamPolicyRequest, $root.google.iam.v1.Policy, request, callback); }, "name", { value: "GetIamPolicy" }); /** @@ -101401,7 +104507,7 @@ * @variation 1 */ Object.defineProperty(IAMPolicy.prototype.testIamPermissions = function testIamPermissions(request, callback) { - return this.rpcCall(testIamPermissions, $root.google.iam.v1.TestIamPermissionsRequest, $root.google.iam.v1.TestIamPermissionsResponse, request, callback); + return $protobuf.rpc.Service.prototype.rpcCall.call(this, testIamPermissions, $root.google.iam.v1.TestIamPermissionsRequest, $root.google.iam.v1.TestIamPermissionsResponse, request, callback); }, "name", { value: "TestIamPermissions" }); /** @@ -101488,15 +104594,19 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SetIamPolicyRequest.encode = function encode(message, writer) { + SetIamPolicyRequest.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.resource != null && Object.hasOwnProperty.call(message, "resource")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.resource); if (message.policy != null && Object.hasOwnProperty.call(message, "policy")) - $root.google.iam.v1.Policy.encode(message.policy, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + $root.google.iam.v1.Policy.encode(message.policy, writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) - $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 3, wireType 2 =*/26).fork(), q + 1).ldelim(); return writer; }; @@ -101510,7 +104620,7 @@ * @returns {$protobuf.Writer} Writer */ SetIamPolicyRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -101588,15 +104698,15 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.resource != null && message.hasOwnProperty("resource")) + if (message.resource != null && Object.hasOwnProperty.call(message, "resource")) if (!$util.isString(message.resource)) return "resource: string expected"; - if (message.policy != null && message.hasOwnProperty("policy")) { + if (message.policy != null && Object.hasOwnProperty.call(message, "policy")) { var error = $root.google.iam.v1.Policy.verify(message.policy, long + 1); if (error) return "policy." + error; } - if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) { var error = $root.google.protobuf.FieldMask.verify(message.updateMask, long + 1); if (error) return "updateMask." + error; @@ -101615,6 +104725,8 @@ SetIamPolicyRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.google.iam.v1.SetIamPolicyRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".google.iam.v1.SetIamPolicyRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -101623,12 +104735,12 @@ if (object.resource != null) message.resource = String(object.resource); if (object.policy != null) { - if (typeof object.policy !== "object") + if (!$util.isObject(object.policy)) throw TypeError(".google.iam.v1.SetIamPolicyRequest.policy: object expected"); message.policy = $root.google.iam.v1.Policy.fromObject(object.policy, long + 1); } if (object.updateMask != null) { - if (typeof object.updateMask !== "object") + if (!$util.isObject(object.updateMask)) throw TypeError(".google.iam.v1.SetIamPolicyRequest.updateMask: object expected"); message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask, long + 1); } @@ -101644,21 +104756,25 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - SetIamPolicyRequest.toObject = function toObject(message, options) { + SetIamPolicyRequest.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.resource = ""; object.policy = null; object.updateMask = null; } - if (message.resource != null && message.hasOwnProperty("resource")) + if (message.resource != null && Object.hasOwnProperty.call(message, "resource")) object.resource = message.resource; - if (message.policy != null && message.hasOwnProperty("policy")) - object.policy = $root.google.iam.v1.Policy.toObject(message.policy, options); - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + if (message.policy != null && Object.hasOwnProperty.call(message, "policy")) + object.policy = $root.google.iam.v1.Policy.toObject(message.policy, options, q + 1); + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options, q + 1); return object; }; @@ -101753,13 +104869,17 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetIamPolicyRequest.encode = function encode(message, writer) { + GetIamPolicyRequest.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.resource != null && Object.hasOwnProperty.call(message, "resource")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.resource); if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.iam.v1.GetPolicyOptions.encode(message.options, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + $root.google.iam.v1.GetPolicyOptions.encode(message.options, writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); return writer; }; @@ -101773,7 +104893,7 @@ * @returns {$protobuf.Writer} Writer */ GetIamPolicyRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -101847,10 +104967,10 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.resource != null && message.hasOwnProperty("resource")) + if (message.resource != null && Object.hasOwnProperty.call(message, "resource")) if (!$util.isString(message.resource)) return "resource: string expected"; - if (message.options != null && message.hasOwnProperty("options")) { + if (message.options != null && Object.hasOwnProperty.call(message, "options")) { var error = $root.google.iam.v1.GetPolicyOptions.verify(message.options, long + 1); if (error) return "options." + error; @@ -101869,6 +104989,8 @@ GetIamPolicyRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.google.iam.v1.GetIamPolicyRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".google.iam.v1.GetIamPolicyRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -101877,7 +104999,7 @@ if (object.resource != null) message.resource = String(object.resource); if (object.options != null) { - if (typeof object.options !== "object") + if (!$util.isObject(object.options)) throw TypeError(".google.iam.v1.GetIamPolicyRequest.options: object expected"); message.options = $root.google.iam.v1.GetPolicyOptions.fromObject(object.options, long + 1); } @@ -101893,18 +105015,22 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetIamPolicyRequest.toObject = function toObject(message, options) { + GetIamPolicyRequest.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.resource = ""; object.options = null; } - if (message.resource != null && message.hasOwnProperty("resource")) + if (message.resource != null && Object.hasOwnProperty.call(message, "resource")) object.resource = message.resource; - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.iam.v1.GetPolicyOptions.toObject(message.options, options); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + object.options = $root.google.iam.v1.GetPolicyOptions.toObject(message.options, options, q + 1); return object; }; @@ -102000,9 +105126,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - TestIamPermissionsRequest.encode = function encode(message, writer) { + TestIamPermissionsRequest.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.resource != null && Object.hasOwnProperty.call(message, "resource")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.resource); if (message.permissions != null && message.permissions.length) @@ -102021,7 +105151,7 @@ * @returns {$protobuf.Writer} Writer */ TestIamPermissionsRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -102097,10 +105227,10 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.resource != null && message.hasOwnProperty("resource")) + if (message.resource != null && Object.hasOwnProperty.call(message, "resource")) if (!$util.isString(message.resource)) return "resource: string expected"; - if (message.permissions != null && message.hasOwnProperty("permissions")) { + if (message.permissions != null && Object.hasOwnProperty.call(message, "permissions")) { if (!Array.isArray(message.permissions)) return "permissions: array expected"; for (var i = 0; i < message.permissions.length; ++i) @@ -102121,6 +105251,8 @@ TestIamPermissionsRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.google.iam.v1.TestIamPermissionsRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".google.iam.v1.TestIamPermissionsRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -102147,15 +105279,19 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - TestIamPermissionsRequest.toObject = function toObject(message, options) { + TestIamPermissionsRequest.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.permissions = []; if (options.defaults) object.resource = ""; - if (message.resource != null && message.hasOwnProperty("resource")) + if (message.resource != null && Object.hasOwnProperty.call(message, "resource")) object.resource = message.resource; if (message.permissions && message.permissions.length) { object.permissions = []; @@ -102248,9 +105384,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - TestIamPermissionsResponse.encode = function encode(message, writer) { + TestIamPermissionsResponse.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.permissions != null && message.permissions.length) for (var i = 0; i < message.permissions.length; ++i) writer.uint32(/* id 1, wireType 2 =*/10).string(message.permissions[i]); @@ -102267,7 +105407,7 @@ * @returns {$protobuf.Writer} Writer */ TestIamPermissionsResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -102339,7 +105479,7 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.permissions != null && message.hasOwnProperty("permissions")) { + if (message.permissions != null && Object.hasOwnProperty.call(message, "permissions")) { if (!Array.isArray(message.permissions)) return "permissions: array expected"; for (var i = 0; i < message.permissions.length; ++i) @@ -102360,6 +105500,8 @@ TestIamPermissionsResponse.fromObject = function fromObject(object, long) { if (object instanceof $root.google.iam.v1.TestIamPermissionsResponse) return object; + if (!$util.isObject(object)) + throw TypeError(".google.iam.v1.TestIamPermissionsResponse: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -102384,9 +105526,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - TestIamPermissionsResponse.toObject = function toObject(message, options) { + TestIamPermissionsResponse.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.permissions = []; @@ -102480,9 +105626,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetPolicyOptions.encode = function encode(message, writer) { + GetPolicyOptions.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.requestedPolicyVersion != null && Object.hasOwnProperty.call(message, "requestedPolicyVersion")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.requestedPolicyVersion); return writer; @@ -102498,7 +105648,7 @@ * @returns {$protobuf.Writer} Writer */ GetPolicyOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -102568,7 +105718,7 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.requestedPolicyVersion != null && message.hasOwnProperty("requestedPolicyVersion")) + if (message.requestedPolicyVersion != null && Object.hasOwnProperty.call(message, "requestedPolicyVersion")) if (!$util.isInteger(message.requestedPolicyVersion)) return "requestedPolicyVersion: integer expected"; return null; @@ -102585,6 +105735,8 @@ GetPolicyOptions.fromObject = function fromObject(object, long) { if (object instanceof $root.google.iam.v1.GetPolicyOptions) return object; + if (!$util.isObject(object)) + throw TypeError(".google.iam.v1.GetPolicyOptions: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -102604,13 +105756,17 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetPolicyOptions.toObject = function toObject(message, options) { + GetPolicyOptions.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) object.requestedPolicyVersion = 0; - if (message.requestedPolicyVersion != null && message.hasOwnProperty("requestedPolicyVersion")) + if (message.requestedPolicyVersion != null && Object.hasOwnProperty.call(message, "requestedPolicyVersion")) object.requestedPolicyVersion = message.requestedPolicyVersion; return object; }; @@ -102726,19 +105882,23 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Policy.encode = function encode(message, writer) { + Policy.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.version != null && Object.hasOwnProperty.call(message, "version")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.version); if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.etag); if (message.bindings != null && message.bindings.length) for (var i = 0; i < message.bindings.length; ++i) - $root.google.iam.v1.Binding.encode(message.bindings[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + $root.google.iam.v1.Binding.encode(message.bindings[i], writer.uint32(/* id 4, wireType 2 =*/34).fork(), q + 1).ldelim(); if (message.auditConfigs != null && message.auditConfigs.length) for (var i = 0; i < message.auditConfigs.length; ++i) - $root.google.iam.v1.AuditConfig.encode(message.auditConfigs[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + $root.google.iam.v1.AuditConfig.encode(message.auditConfigs[i], writer.uint32(/* id 6, wireType 2 =*/50).fork(), q + 1).ldelim(); return writer; }; @@ -102752,7 +105912,7 @@ * @returns {$protobuf.Writer} Writer */ Policy.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -102838,10 +105998,10 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.version != null && message.hasOwnProperty("version")) + if (message.version != null && Object.hasOwnProperty.call(message, "version")) if (!$util.isInteger(message.version)) return "version: integer expected"; - if (message.bindings != null && message.hasOwnProperty("bindings")) { + if (message.bindings != null && Object.hasOwnProperty.call(message, "bindings")) { if (!Array.isArray(message.bindings)) return "bindings: array expected"; for (var i = 0; i < message.bindings.length; ++i) { @@ -102850,7 +106010,7 @@ return "bindings." + error; } } - if (message.auditConfigs != null && message.hasOwnProperty("auditConfigs")) { + if (message.auditConfigs != null && Object.hasOwnProperty.call(message, "auditConfigs")) { if (!Array.isArray(message.auditConfigs)) return "auditConfigs: array expected"; for (var i = 0; i < message.auditConfigs.length; ++i) { @@ -102859,7 +106019,7 @@ return "auditConfigs." + error; } } - if (message.etag != null && message.hasOwnProperty("etag")) + if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) if (!(message.etag && typeof message.etag.length === "number" || $util.isString(message.etag))) return "etag: buffer expected"; return null; @@ -102876,6 +106036,8 @@ Policy.fromObject = function fromObject(object, long) { if (object instanceof $root.google.iam.v1.Policy) return object; + if (!$util.isObject(object)) + throw TypeError(".google.iam.v1.Policy: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -102888,7 +106050,7 @@ throw TypeError(".google.iam.v1.Policy.bindings: array expected"); message.bindings = []; for (var i = 0; i < object.bindings.length; ++i) { - if (typeof object.bindings[i] !== "object") + if (!$util.isObject(object.bindings[i])) throw TypeError(".google.iam.v1.Policy.bindings: object expected"); message.bindings[i] = $root.google.iam.v1.Binding.fromObject(object.bindings[i], long + 1); } @@ -102898,7 +106060,7 @@ throw TypeError(".google.iam.v1.Policy.auditConfigs: array expected"); message.auditConfigs = []; for (var i = 0; i < object.auditConfigs.length; ++i) { - if (typeof object.auditConfigs[i] !== "object") + if (!$util.isObject(object.auditConfigs[i])) throw TypeError(".google.iam.v1.Policy.auditConfigs: object expected"); message.auditConfigs[i] = $root.google.iam.v1.AuditConfig.fromObject(object.auditConfigs[i], long + 1); } @@ -102920,9 +106082,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Policy.toObject = function toObject(message, options) { + Policy.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) { object.bindings = []; @@ -102938,19 +106104,19 @@ object.etag = $util.newBuffer(object.etag); } } - if (message.version != null && message.hasOwnProperty("version")) + if (message.version != null && Object.hasOwnProperty.call(message, "version")) object.version = message.version; - if (message.etag != null && message.hasOwnProperty("etag")) + if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) object.etag = options.bytes === String ? $util.base64.encode(message.etag, 0, message.etag.length) : options.bytes === Array ? Array.prototype.slice.call(message.etag) : message.etag; if (message.bindings && message.bindings.length) { object.bindings = []; for (var j = 0; j < message.bindings.length; ++j) - object.bindings[j] = $root.google.iam.v1.Binding.toObject(message.bindings[j], options); + object.bindings[j] = $root.google.iam.v1.Binding.toObject(message.bindings[j], options, q + 1); } if (message.auditConfigs && message.auditConfigs.length) { object.auditConfigs = []; for (var j = 0; j < message.auditConfigs.length; ++j) - object.auditConfigs[j] = $root.google.iam.v1.AuditConfig.toObject(message.auditConfigs[j], options); + object.auditConfigs[j] = $root.google.iam.v1.AuditConfig.toObject(message.auditConfigs[j], options, q + 1); } return object; }; @@ -103056,16 +106222,20 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Binding.encode = function encode(message, writer) { + Binding.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.role != null && Object.hasOwnProperty.call(message, "role")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.role); if (message.members != null && message.members.length) for (var i = 0; i < message.members.length; ++i) writer.uint32(/* id 2, wireType 2 =*/18).string(message.members[i]); if (message.condition != null && Object.hasOwnProperty.call(message, "condition")) - $root.google.type.Expr.encode(message.condition, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + $root.google.type.Expr.encode(message.condition, writer.uint32(/* id 3, wireType 2 =*/26).fork(), q + 1).ldelim(); return writer; }; @@ -103079,7 +106249,7 @@ * @returns {$protobuf.Writer} Writer */ Binding.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -103159,17 +106329,17 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.role != null && message.hasOwnProperty("role")) + if (message.role != null && Object.hasOwnProperty.call(message, "role")) if (!$util.isString(message.role)) return "role: string expected"; - if (message.members != null && message.hasOwnProperty("members")) { + if (message.members != null && Object.hasOwnProperty.call(message, "members")) { if (!Array.isArray(message.members)) return "members: array expected"; for (var i = 0; i < message.members.length; ++i) if (!$util.isString(message.members[i])) return "members: string[] expected"; } - if (message.condition != null && message.hasOwnProperty("condition")) { + if (message.condition != null && Object.hasOwnProperty.call(message, "condition")) { var error = $root.google.type.Expr.verify(message.condition, long + 1); if (error) return "condition." + error; @@ -103188,6 +106358,8 @@ Binding.fromObject = function fromObject(object, long) { if (object instanceof $root.google.iam.v1.Binding) return object; + if (!$util.isObject(object)) + throw TypeError(".google.iam.v1.Binding: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -103203,7 +106375,7 @@ message.members[i] = String(object.members[i]); } if (object.condition != null) { - if (typeof object.condition !== "object") + if (!$util.isObject(object.condition)) throw TypeError(".google.iam.v1.Binding.condition: object expected"); message.condition = $root.google.type.Expr.fromObject(object.condition, long + 1); } @@ -103219,9 +106391,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Binding.toObject = function toObject(message, options) { + Binding.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.members = []; @@ -103229,15 +106405,15 @@ object.role = ""; object.condition = null; } - if (message.role != null && message.hasOwnProperty("role")) + if (message.role != null && Object.hasOwnProperty.call(message, "role")) object.role = message.role; if (message.members && message.members.length) { object.members = []; for (var j = 0; j < message.members.length; ++j) object.members[j] = message.members[j]; } - if (message.condition != null && message.hasOwnProperty("condition")) - object.condition = $root.google.type.Expr.toObject(message.condition, options); + if (message.condition != null && Object.hasOwnProperty.call(message, "condition")) + object.condition = $root.google.type.Expr.toObject(message.condition, options, q + 1); return object; }; @@ -103333,14 +106509,18 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AuditConfig.encode = function encode(message, writer) { + AuditConfig.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.service != null && Object.hasOwnProperty.call(message, "service")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.service); if (message.auditLogConfigs != null && message.auditLogConfigs.length) for (var i = 0; i < message.auditLogConfigs.length; ++i) - $root.google.iam.v1.AuditLogConfig.encode(message.auditLogConfigs[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + $root.google.iam.v1.AuditLogConfig.encode(message.auditLogConfigs[i], writer.uint32(/* id 3, wireType 2 =*/26).fork(), q + 1).ldelim(); return writer; }; @@ -103354,7 +106534,7 @@ * @returns {$protobuf.Writer} Writer */ AuditConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -103430,10 +106610,10 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.service != null && message.hasOwnProperty("service")) + if (message.service != null && Object.hasOwnProperty.call(message, "service")) if (!$util.isString(message.service)) return "service: string expected"; - if (message.auditLogConfigs != null && message.hasOwnProperty("auditLogConfigs")) { + if (message.auditLogConfigs != null && Object.hasOwnProperty.call(message, "auditLogConfigs")) { if (!Array.isArray(message.auditLogConfigs)) return "auditLogConfigs: array expected"; for (var i = 0; i < message.auditLogConfigs.length; ++i) { @@ -103456,6 +106636,8 @@ AuditConfig.fromObject = function fromObject(object, long) { if (object instanceof $root.google.iam.v1.AuditConfig) return object; + if (!$util.isObject(object)) + throw TypeError(".google.iam.v1.AuditConfig: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -103468,7 +106650,7 @@ throw TypeError(".google.iam.v1.AuditConfig.auditLogConfigs: array expected"); message.auditLogConfigs = []; for (var i = 0; i < object.auditLogConfigs.length; ++i) { - if (typeof object.auditLogConfigs[i] !== "object") + if (!$util.isObject(object.auditLogConfigs[i])) throw TypeError(".google.iam.v1.AuditConfig.auditLogConfigs: object expected"); message.auditLogConfigs[i] = $root.google.iam.v1.AuditLogConfig.fromObject(object.auditLogConfigs[i], long + 1); } @@ -103485,20 +106667,24 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - AuditConfig.toObject = function toObject(message, options) { + AuditConfig.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.auditLogConfigs = []; if (options.defaults) object.service = ""; - if (message.service != null && message.hasOwnProperty("service")) + if (message.service != null && Object.hasOwnProperty.call(message, "service")) object.service = message.service; if (message.auditLogConfigs && message.auditLogConfigs.length) { object.auditLogConfigs = []; for (var j = 0; j < message.auditLogConfigs.length; ++j) - object.auditLogConfigs[j] = $root.google.iam.v1.AuditLogConfig.toObject(message.auditLogConfigs[j], options); + object.auditLogConfigs[j] = $root.google.iam.v1.AuditLogConfig.toObject(message.auditLogConfigs[j], options, q + 1); } return object; }; @@ -103595,9 +106781,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AuditLogConfig.encode = function encode(message, writer) { + AuditLogConfig.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.logType != null && Object.hasOwnProperty.call(message, "logType")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.logType); if (message.exemptedMembers != null && message.exemptedMembers.length) @@ -103616,7 +106806,7 @@ * @returns {$protobuf.Writer} Writer */ AuditLogConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -103692,7 +106882,7 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.logType != null && message.hasOwnProperty("logType")) + if (message.logType != null && Object.hasOwnProperty.call(message, "logType")) switch (message.logType) { default: return "logType: enum value expected"; @@ -103702,7 +106892,7 @@ case 3: break; } - if (message.exemptedMembers != null && message.hasOwnProperty("exemptedMembers")) { + if (message.exemptedMembers != null && Object.hasOwnProperty.call(message, "exemptedMembers")) { if (!Array.isArray(message.exemptedMembers)) return "exemptedMembers: array expected"; for (var i = 0; i < message.exemptedMembers.length; ++i) @@ -103723,6 +106913,8 @@ AuditLogConfig.fromObject = function fromObject(object, long) { if (object instanceof $root.google.iam.v1.AuditLogConfig) return object; + if (!$util.isObject(object)) + throw TypeError(".google.iam.v1.AuditLogConfig: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -103771,15 +106963,19 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - AuditLogConfig.toObject = function toObject(message, options) { + AuditLogConfig.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.exemptedMembers = []; if (options.defaults) object.logType = options.enums === String ? "LOG_TYPE_UNSPECIFIED" : 0; - if (message.logType != null && message.hasOwnProperty("logType")) + if (message.logType != null && Object.hasOwnProperty.call(message, "logType")) object.logType = options.enums === String ? $root.google.iam.v1.AuditLogConfig.LogType[message.logType] === undefined ? message.logType : $root.google.iam.v1.AuditLogConfig.LogType[message.logType] : message.logType; if (message.exemptedMembers && message.exemptedMembers.length) { object.exemptedMembers = []; @@ -103900,15 +107096,19 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - PolicyDelta.encode = function encode(message, writer) { + PolicyDelta.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.bindingDeltas != null && message.bindingDeltas.length) for (var i = 0; i < message.bindingDeltas.length; ++i) - $root.google.iam.v1.BindingDelta.encode(message.bindingDeltas[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + $root.google.iam.v1.BindingDelta.encode(message.bindingDeltas[i], writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); if (message.auditConfigDeltas != null && message.auditConfigDeltas.length) for (var i = 0; i < message.auditConfigDeltas.length; ++i) - $root.google.iam.v1.AuditConfigDelta.encode(message.auditConfigDeltas[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + $root.google.iam.v1.AuditConfigDelta.encode(message.auditConfigDeltas[i], writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); return writer; }; @@ -103922,7 +107122,7 @@ * @returns {$protobuf.Writer} Writer */ PolicyDelta.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -104000,7 +107200,7 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.bindingDeltas != null && message.hasOwnProperty("bindingDeltas")) { + if (message.bindingDeltas != null && Object.hasOwnProperty.call(message, "bindingDeltas")) { if (!Array.isArray(message.bindingDeltas)) return "bindingDeltas: array expected"; for (var i = 0; i < message.bindingDeltas.length; ++i) { @@ -104009,7 +107209,7 @@ return "bindingDeltas." + error; } } - if (message.auditConfigDeltas != null && message.hasOwnProperty("auditConfigDeltas")) { + if (message.auditConfigDeltas != null && Object.hasOwnProperty.call(message, "auditConfigDeltas")) { if (!Array.isArray(message.auditConfigDeltas)) return "auditConfigDeltas: array expected"; for (var i = 0; i < message.auditConfigDeltas.length; ++i) { @@ -104032,6 +107232,8 @@ PolicyDelta.fromObject = function fromObject(object, long) { if (object instanceof $root.google.iam.v1.PolicyDelta) return object; + if (!$util.isObject(object)) + throw TypeError(".google.iam.v1.PolicyDelta: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -104042,7 +107244,7 @@ throw TypeError(".google.iam.v1.PolicyDelta.bindingDeltas: array expected"); message.bindingDeltas = []; for (var i = 0; i < object.bindingDeltas.length; ++i) { - if (typeof object.bindingDeltas[i] !== "object") + if (!$util.isObject(object.bindingDeltas[i])) throw TypeError(".google.iam.v1.PolicyDelta.bindingDeltas: object expected"); message.bindingDeltas[i] = $root.google.iam.v1.BindingDelta.fromObject(object.bindingDeltas[i], long + 1); } @@ -104052,7 +107254,7 @@ throw TypeError(".google.iam.v1.PolicyDelta.auditConfigDeltas: array expected"); message.auditConfigDeltas = []; for (var i = 0; i < object.auditConfigDeltas.length; ++i) { - if (typeof object.auditConfigDeltas[i] !== "object") + if (!$util.isObject(object.auditConfigDeltas[i])) throw TypeError(".google.iam.v1.PolicyDelta.auditConfigDeltas: object expected"); message.auditConfigDeltas[i] = $root.google.iam.v1.AuditConfigDelta.fromObject(object.auditConfigDeltas[i], long + 1); } @@ -104069,9 +107271,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - PolicyDelta.toObject = function toObject(message, options) { + PolicyDelta.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) { object.bindingDeltas = []; @@ -104080,12 +107286,12 @@ if (message.bindingDeltas && message.bindingDeltas.length) { object.bindingDeltas = []; for (var j = 0; j < message.bindingDeltas.length; ++j) - object.bindingDeltas[j] = $root.google.iam.v1.BindingDelta.toObject(message.bindingDeltas[j], options); + object.bindingDeltas[j] = $root.google.iam.v1.BindingDelta.toObject(message.bindingDeltas[j], options, q + 1); } if (message.auditConfigDeltas && message.auditConfigDeltas.length) { object.auditConfigDeltas = []; for (var j = 0; j < message.auditConfigDeltas.length; ++j) - object.auditConfigDeltas[j] = $root.google.iam.v1.AuditConfigDelta.toObject(message.auditConfigDeltas[j], options); + object.auditConfigDeltas[j] = $root.google.iam.v1.AuditConfigDelta.toObject(message.auditConfigDeltas[j], options, q + 1); } return object; }; @@ -104199,9 +107405,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - BindingDelta.encode = function encode(message, writer) { + BindingDelta.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.action != null && Object.hasOwnProperty.call(message, "action")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.action); if (message.role != null && Object.hasOwnProperty.call(message, "role")) @@ -104209,7 +107419,7 @@ if (message.member != null && Object.hasOwnProperty.call(message, "member")) writer.uint32(/* id 3, wireType 2 =*/26).string(message.member); if (message.condition != null && Object.hasOwnProperty.call(message, "condition")) - $root.google.type.Expr.encode(message.condition, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + $root.google.type.Expr.encode(message.condition, writer.uint32(/* id 4, wireType 2 =*/34).fork(), q + 1).ldelim(); return writer; }; @@ -104223,7 +107433,7 @@ * @returns {$protobuf.Writer} Writer */ BindingDelta.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -104305,7 +107515,7 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.action != null && message.hasOwnProperty("action")) + if (message.action != null && Object.hasOwnProperty.call(message, "action")) switch (message.action) { default: return "action: enum value expected"; @@ -104314,13 +107524,13 @@ case 2: break; } - if (message.role != null && message.hasOwnProperty("role")) + if (message.role != null && Object.hasOwnProperty.call(message, "role")) if (!$util.isString(message.role)) return "role: string expected"; - if (message.member != null && message.hasOwnProperty("member")) + if (message.member != null && Object.hasOwnProperty.call(message, "member")) if (!$util.isString(message.member)) return "member: string expected"; - if (message.condition != null && message.hasOwnProperty("condition")) { + if (message.condition != null && Object.hasOwnProperty.call(message, "condition")) { var error = $root.google.type.Expr.verify(message.condition, long + 1); if (error) return "condition." + error; @@ -104339,6 +107549,8 @@ BindingDelta.fromObject = function fromObject(object, long) { if (object instanceof $root.google.iam.v1.BindingDelta) return object; + if (!$util.isObject(object)) + throw TypeError(".google.iam.v1.BindingDelta: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -104369,7 +107581,7 @@ if (object.member != null) message.member = String(object.member); if (object.condition != null) { - if (typeof object.condition !== "object") + if (!$util.isObject(object.condition)) throw TypeError(".google.iam.v1.BindingDelta.condition: object expected"); message.condition = $root.google.type.Expr.fromObject(object.condition, long + 1); } @@ -104385,9 +107597,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - BindingDelta.toObject = function toObject(message, options) { + BindingDelta.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.action = options.enums === String ? "ACTION_UNSPECIFIED" : 0; @@ -104395,14 +107611,14 @@ object.member = ""; object.condition = null; } - if (message.action != null && message.hasOwnProperty("action")) + if (message.action != null && Object.hasOwnProperty.call(message, "action")) object.action = options.enums === String ? $root.google.iam.v1.BindingDelta.Action[message.action] === undefined ? message.action : $root.google.iam.v1.BindingDelta.Action[message.action] : message.action; - if (message.role != null && message.hasOwnProperty("role")) + if (message.role != null && Object.hasOwnProperty.call(message, "role")) object.role = message.role; - if (message.member != null && message.hasOwnProperty("member")) + if (message.member != null && Object.hasOwnProperty.call(message, "member")) object.member = message.member; - if (message.condition != null && message.hasOwnProperty("condition")) - object.condition = $root.google.type.Expr.toObject(message.condition, options); + if (message.condition != null && Object.hasOwnProperty.call(message, "condition")) + object.condition = $root.google.type.Expr.toObject(message.condition, options, q + 1); return object; }; @@ -104531,9 +107747,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AuditConfigDelta.encode = function encode(message, writer) { + AuditConfigDelta.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.action != null && Object.hasOwnProperty.call(message, "action")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.action); if (message.service != null && Object.hasOwnProperty.call(message, "service")) @@ -104555,7 +107775,7 @@ * @returns {$protobuf.Writer} Writer */ AuditConfigDelta.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -104637,7 +107857,7 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.action != null && message.hasOwnProperty("action")) + if (message.action != null && Object.hasOwnProperty.call(message, "action")) switch (message.action) { default: return "action: enum value expected"; @@ -104646,13 +107866,13 @@ case 2: break; } - if (message.service != null && message.hasOwnProperty("service")) + if (message.service != null && Object.hasOwnProperty.call(message, "service")) if (!$util.isString(message.service)) return "service: string expected"; - if (message.exemptedMember != null && message.hasOwnProperty("exemptedMember")) + if (message.exemptedMember != null && Object.hasOwnProperty.call(message, "exemptedMember")) if (!$util.isString(message.exemptedMember)) return "exemptedMember: string expected"; - if (message.logType != null && message.hasOwnProperty("logType")) + if (message.logType != null && Object.hasOwnProperty.call(message, "logType")) if (!$util.isString(message.logType)) return "logType: string expected"; return null; @@ -104669,6 +107889,8 @@ AuditConfigDelta.fromObject = function fromObject(object, long) { if (object instanceof $root.google.iam.v1.AuditConfigDelta) return object; + if (!$util.isObject(object)) + throw TypeError(".google.iam.v1.AuditConfigDelta: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -104712,9 +107934,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - AuditConfigDelta.toObject = function toObject(message, options) { + AuditConfigDelta.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.action = options.enums === String ? "ACTION_UNSPECIFIED" : 0; @@ -104722,13 +107948,13 @@ object.exemptedMember = ""; object.logType = ""; } - if (message.action != null && message.hasOwnProperty("action")) + if (message.action != null && Object.hasOwnProperty.call(message, "action")) object.action = options.enums === String ? $root.google.iam.v1.AuditConfigDelta.Action[message.action] === undefined ? message.action : $root.google.iam.v1.AuditConfigDelta.Action[message.action] : message.action; - if (message.service != null && message.hasOwnProperty("service")) + if (message.service != null && Object.hasOwnProperty.call(message, "service")) object.service = message.service; - if (message.exemptedMember != null && message.hasOwnProperty("exemptedMember")) + if (message.exemptedMember != null && Object.hasOwnProperty.call(message, "exemptedMember")) object.exemptedMember = message.exemptedMember; - if (message.logType != null && message.hasOwnProperty("logType")) + if (message.logType != null && Object.hasOwnProperty.call(message, "logType")) object.logType = message.logType; return object; }; @@ -104873,9 +108099,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Expr.encode = function encode(message, writer) { + Expr.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.expression != null && Object.hasOwnProperty.call(message, "expression")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.expression); if (message.title != null && Object.hasOwnProperty.call(message, "title")) @@ -104897,7 +108127,7 @@ * @returns {$protobuf.Writer} Writer */ Expr.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -104979,16 +108209,16 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.expression != null && message.hasOwnProperty("expression")) + if (message.expression != null && Object.hasOwnProperty.call(message, "expression")) if (!$util.isString(message.expression)) return "expression: string expected"; - if (message.title != null && message.hasOwnProperty("title")) + if (message.title != null && Object.hasOwnProperty.call(message, "title")) if (!$util.isString(message.title)) return "title: string expected"; - if (message.description != null && message.hasOwnProperty("description")) + if (message.description != null && Object.hasOwnProperty.call(message, "description")) if (!$util.isString(message.description)) return "description: string expected"; - if (message.location != null && message.hasOwnProperty("location")) + if (message.location != null && Object.hasOwnProperty.call(message, "location")) if (!$util.isString(message.location)) return "location: string expected"; return null; @@ -105005,6 +108235,8 @@ Expr.fromObject = function fromObject(object, long) { if (object instanceof $root.google.type.Expr) return object; + if (!$util.isObject(object)) + throw TypeError(".google.type.Expr: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -105030,9 +108262,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Expr.toObject = function toObject(message, options) { + Expr.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.expression = ""; @@ -105040,13 +108276,13 @@ object.description = ""; object.location = ""; } - if (message.expression != null && message.hasOwnProperty("expression")) + if (message.expression != null && Object.hasOwnProperty.call(message, "expression")) object.expression = message.expression; - if (message.title != null && message.hasOwnProperty("title")) + if (message.title != null && Object.hasOwnProperty.call(message, "title")) object.title = message.title; - if (message.description != null && message.hasOwnProperty("description")) + if (message.description != null && Object.hasOwnProperty.call(message, "description")) object.description = message.description; - if (message.location != null && message.hasOwnProperty("location")) + if (message.location != null && Object.hasOwnProperty.call(message, "location")) object.location = message.location; return object; }; @@ -105151,9 +108387,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Date.encode = function encode(message, writer) { + Date.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.year != null && Object.hasOwnProperty.call(message, "year")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.year); if (message.month != null && Object.hasOwnProperty.call(message, "month")) @@ -105173,7 +108413,7 @@ * @returns {$protobuf.Writer} Writer */ Date.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -105251,13 +108491,13 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.year != null && message.hasOwnProperty("year")) + if (message.year != null && Object.hasOwnProperty.call(message, "year")) if (!$util.isInteger(message.year)) return "year: integer expected"; - if (message.month != null && message.hasOwnProperty("month")) + if (message.month != null && Object.hasOwnProperty.call(message, "month")) if (!$util.isInteger(message.month)) return "month: integer expected"; - if (message.day != null && message.hasOwnProperty("day")) + if (message.day != null && Object.hasOwnProperty.call(message, "day")) if (!$util.isInteger(message.day)) return "day: integer expected"; return null; @@ -105274,6 +108514,8 @@ Date.fromObject = function fromObject(object, long) { if (object instanceof $root.google.type.Date) return object; + if (!$util.isObject(object)) + throw TypeError(".google.type.Date: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -105297,20 +108539,24 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Date.toObject = function toObject(message, options) { + Date.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.year = 0; object.month = 0; object.day = 0; } - if (message.year != null && message.hasOwnProperty("year")) + if (message.year != null && Object.hasOwnProperty.call(message, "year")) object.year = message.year; - if (message.month != null && message.hasOwnProperty("month")) + if (message.month != null && Object.hasOwnProperty.call(message, "month")) object.month = message.month; - if (message.day != null && message.hasOwnProperty("day")) + if (message.day != null && Object.hasOwnProperty.call(message, "day")) object.day = message.day; return object; }; @@ -105408,7 +108654,7 @@ * @variation 1 */ Object.defineProperty(Operations.prototype.listOperations = function listOperations(request, callback) { - return this.rpcCall(listOperations, $root.google.longrunning.ListOperationsRequest, $root.google.longrunning.ListOperationsResponse, request, callback); + return $protobuf.rpc.Service.prototype.rpcCall.call(this, listOperations, $root.google.longrunning.ListOperationsRequest, $root.google.longrunning.ListOperationsResponse, request, callback); }, "name", { value: "ListOperations" }); /** @@ -105441,7 +108687,7 @@ * @variation 1 */ Object.defineProperty(Operations.prototype.getOperation = function getOperation(request, callback) { - return this.rpcCall(getOperation, $root.google.longrunning.GetOperationRequest, $root.google.longrunning.Operation, request, callback); + return $protobuf.rpc.Service.prototype.rpcCall.call(this, getOperation, $root.google.longrunning.GetOperationRequest, $root.google.longrunning.Operation, request, callback); }, "name", { value: "GetOperation" }); /** @@ -105474,7 +108720,7 @@ * @variation 1 */ Object.defineProperty(Operations.prototype.deleteOperation = function deleteOperation(request, callback) { - return this.rpcCall(deleteOperation, $root.google.longrunning.DeleteOperationRequest, $root.google.protobuf.Empty, request, callback); + return $protobuf.rpc.Service.prototype.rpcCall.call(this, deleteOperation, $root.google.longrunning.DeleteOperationRequest, $root.google.protobuf.Empty, request, callback); }, "name", { value: "DeleteOperation" }); /** @@ -105507,7 +108753,7 @@ * @variation 1 */ Object.defineProperty(Operations.prototype.cancelOperation = function cancelOperation(request, callback) { - return this.rpcCall(cancelOperation, $root.google.longrunning.CancelOperationRequest, $root.google.protobuf.Empty, request, callback); + return $protobuf.rpc.Service.prototype.rpcCall.call(this, cancelOperation, $root.google.longrunning.CancelOperationRequest, $root.google.protobuf.Empty, request, callback); }, "name", { value: "CancelOperation" }); /** @@ -105540,7 +108786,7 @@ * @variation 1 */ Object.defineProperty(Operations.prototype.waitOperation = function waitOperation(request, callback) { - return this.rpcCall(waitOperation, $root.google.longrunning.WaitOperationRequest, $root.google.longrunning.Operation, request, callback); + return $protobuf.rpc.Service.prototype.rpcCall.call(this, waitOperation, $root.google.longrunning.WaitOperationRequest, $root.google.longrunning.Operation, request, callback); }, "name", { value: "WaitOperation" }); /** @@ -105659,19 +108905,23 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Operation.encode = function encode(message, writer) { + Operation.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata")) - $root.google.protobuf.Any.encode(message.metadata, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + $root.google.protobuf.Any.encode(message.metadata, writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); if (message.done != null && Object.hasOwnProperty.call(message, "done")) writer.uint32(/* id 3, wireType 0 =*/24).bool(message.done); if (message.error != null && Object.hasOwnProperty.call(message, "error")) - $root.google.rpc.Status.encode(message.error, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + $root.google.rpc.Status.encode(message.error, writer.uint32(/* id 4, wireType 2 =*/34).fork(), q + 1).ldelim(); if (message.response != null && Object.hasOwnProperty.call(message, "response")) - $root.google.protobuf.Any.encode(message.response, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + $root.google.protobuf.Any.encode(message.response, writer.uint32(/* id 5, wireType 2 =*/42).fork(), q + 1).ldelim(); return writer; }; @@ -105685,7 +108935,7 @@ * @returns {$protobuf.Writer} Writer */ Operation.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -105772,18 +109022,18 @@ if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; var properties = {}; - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) if (!$util.isString(message.name)) return "name: string expected"; - if (message.metadata != null && message.hasOwnProperty("metadata")) { + if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata")) { var error = $root.google.protobuf.Any.verify(message.metadata, long + 1); if (error) return "metadata." + error; } - if (message.done != null && message.hasOwnProperty("done")) + if (message.done != null && Object.hasOwnProperty.call(message, "done")) if (typeof message.done !== "boolean") return "done: boolean expected"; - if (message.error != null && message.hasOwnProperty("error")) { + if (message.error != null && Object.hasOwnProperty.call(message, "error")) { properties.result = 1; { var error = $root.google.rpc.Status.verify(message.error, long + 1); @@ -105791,7 +109041,7 @@ return "error." + error; } } - if (message.response != null && message.hasOwnProperty("response")) { + if (message.response != null && Object.hasOwnProperty.call(message, "response")) { if (properties.result === 1) return "result: multiple values"; properties.result = 1; @@ -105815,6 +109065,8 @@ Operation.fromObject = function fromObject(object, long) { if (object instanceof $root.google.longrunning.Operation) return object; + if (!$util.isObject(object)) + throw TypeError(".google.longrunning.Operation: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -105823,19 +109075,19 @@ if (object.name != null) message.name = String(object.name); if (object.metadata != null) { - if (typeof object.metadata !== "object") + if (!$util.isObject(object.metadata)) throw TypeError(".google.longrunning.Operation.metadata: object expected"); message.metadata = $root.google.protobuf.Any.fromObject(object.metadata, long + 1); } if (object.done != null) message.done = Boolean(object.done); if (object.error != null) { - if (typeof object.error !== "object") + if (!$util.isObject(object.error)) throw TypeError(".google.longrunning.Operation.error: object expected"); message.error = $root.google.rpc.Status.fromObject(object.error, long + 1); } if (object.response != null) { - if (typeof object.response !== "object") + if (!$util.isObject(object.response)) throw TypeError(".google.longrunning.Operation.response: object expected"); message.response = $root.google.protobuf.Any.fromObject(object.response, long + 1); } @@ -105851,28 +109103,32 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Operation.toObject = function toObject(message, options) { + Operation.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.name = ""; object.metadata = null; object.done = false; } - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) object.name = message.name; - if (message.metadata != null && message.hasOwnProperty("metadata")) - object.metadata = $root.google.protobuf.Any.toObject(message.metadata, options); - if (message.done != null && message.hasOwnProperty("done")) + if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata")) + object.metadata = $root.google.protobuf.Any.toObject(message.metadata, options, q + 1); + if (message.done != null && Object.hasOwnProperty.call(message, "done")) object.done = message.done; - if (message.error != null && message.hasOwnProperty("error")) { - object.error = $root.google.rpc.Status.toObject(message.error, options); + if (message.error != null && Object.hasOwnProperty.call(message, "error")) { + object.error = $root.google.rpc.Status.toObject(message.error, options, q + 1); if (options.oneofs) object.result = "error"; } - if (message.response != null && message.hasOwnProperty("response")) { - object.response = $root.google.protobuf.Any.toObject(message.response, options); + if (message.response != null && Object.hasOwnProperty.call(message, "response")) { + object.response = $root.google.protobuf.Any.toObject(message.response, options, q + 1); if (options.oneofs) object.result = "response"; } @@ -105961,9 +109217,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetOperationRequest.encode = function encode(message, writer) { + GetOperationRequest.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); return writer; @@ -105979,7 +109239,7 @@ * @returns {$protobuf.Writer} Writer */ GetOperationRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -106049,7 +109309,7 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) if (!$util.isString(message.name)) return "name: string expected"; return null; @@ -106066,6 +109326,8 @@ GetOperationRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.google.longrunning.GetOperationRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".google.longrunning.GetOperationRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -106085,13 +109347,17 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetOperationRequest.toObject = function toObject(message, options) { + GetOperationRequest.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) object.name = message.name; return object; }; @@ -106205,9 +109471,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListOperationsRequest.encode = function encode(message, writer) { + ListOperationsRequest.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.filter); if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) @@ -106229,7 +109499,7 @@ * @returns {$protobuf.Writer} Writer */ ListOperationsRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -106311,16 +109581,16 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) if (!$util.isString(message.name)) return "name: string expected"; - if (message.filter != null && message.hasOwnProperty("filter")) + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) if (!$util.isString(message.filter)) return "filter: string expected"; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) if (!$util.isInteger(message.pageSize)) return "pageSize: integer expected"; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) if (!$util.isString(message.pageToken)) return "pageToken: string expected"; return null; @@ -106337,6 +109607,8 @@ ListOperationsRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.google.longrunning.ListOperationsRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".google.longrunning.ListOperationsRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -106362,9 +109634,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListOperationsRequest.toObject = function toObject(message, options) { + ListOperationsRequest.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.filter = ""; @@ -106372,13 +109648,13 @@ object.pageToken = ""; object.name = ""; } - if (message.filter != null && message.hasOwnProperty("filter")) + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) object.filter = message.filter; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) object.pageSize = message.pageSize; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) object.pageToken = message.pageToken; - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) object.name = message.name; return object; }; @@ -106475,12 +109751,16 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListOperationsResponse.encode = function encode(message, writer) { + ListOperationsResponse.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.operations != null && message.operations.length) for (var i = 0; i < message.operations.length; ++i) - $root.google.longrunning.Operation.encode(message.operations[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + $root.google.longrunning.Operation.encode(message.operations[i], writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); return writer; @@ -106496,7 +109776,7 @@ * @returns {$protobuf.Writer} Writer */ ListOperationsResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -106572,7 +109852,7 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.operations != null && message.hasOwnProperty("operations")) { + if (message.operations != null && Object.hasOwnProperty.call(message, "operations")) { if (!Array.isArray(message.operations)) return "operations: array expected"; for (var i = 0; i < message.operations.length; ++i) { @@ -106581,7 +109861,7 @@ return "operations." + error; } } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) if (!$util.isString(message.nextPageToken)) return "nextPageToken: string expected"; return null; @@ -106598,6 +109878,8 @@ ListOperationsResponse.fromObject = function fromObject(object, long) { if (object instanceof $root.google.longrunning.ListOperationsResponse) return object; + if (!$util.isObject(object)) + throw TypeError(".google.longrunning.ListOperationsResponse: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -106608,7 +109890,7 @@ throw TypeError(".google.longrunning.ListOperationsResponse.operations: array expected"); message.operations = []; for (var i = 0; i < object.operations.length; ++i) { - if (typeof object.operations[i] !== "object") + if (!$util.isObject(object.operations[i])) throw TypeError(".google.longrunning.ListOperationsResponse.operations: object expected"); message.operations[i] = $root.google.longrunning.Operation.fromObject(object.operations[i], long + 1); } @@ -106627,9 +109909,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListOperationsResponse.toObject = function toObject(message, options) { + ListOperationsResponse.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.operations = []; @@ -106638,9 +109924,9 @@ if (message.operations && message.operations.length) { object.operations = []; for (var j = 0; j < message.operations.length; ++j) - object.operations[j] = $root.google.longrunning.Operation.toObject(message.operations[j], options); + object.operations[j] = $root.google.longrunning.Operation.toObject(message.operations[j], options, q + 1); } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) object.nextPageToken = message.nextPageToken; return object; }; @@ -106727,9 +110013,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CancelOperationRequest.encode = function encode(message, writer) { + CancelOperationRequest.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); return writer; @@ -106745,7 +110035,7 @@ * @returns {$protobuf.Writer} Writer */ CancelOperationRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -106815,7 +110105,7 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) if (!$util.isString(message.name)) return "name: string expected"; return null; @@ -106832,6 +110122,8 @@ CancelOperationRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.google.longrunning.CancelOperationRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".google.longrunning.CancelOperationRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -106851,13 +110143,17 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CancelOperationRequest.toObject = function toObject(message, options) { + CancelOperationRequest.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) object.name = message.name; return object; }; @@ -106944,9 +110240,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteOperationRequest.encode = function encode(message, writer) { + DeleteOperationRequest.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); return writer; @@ -106962,7 +110262,7 @@ * @returns {$protobuf.Writer} Writer */ DeleteOperationRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -107032,7 +110332,7 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) if (!$util.isString(message.name)) return "name: string expected"; return null; @@ -107049,6 +110349,8 @@ DeleteOperationRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.google.longrunning.DeleteOperationRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".google.longrunning.DeleteOperationRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -107068,13 +110370,17 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DeleteOperationRequest.toObject = function toObject(message, options) { + DeleteOperationRequest.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) object.name = message.name; return object; }; @@ -107170,13 +110476,17 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - WaitOperationRequest.encode = function encode(message, writer) { + WaitOperationRequest.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); if (message.timeout != null && Object.hasOwnProperty.call(message, "timeout")) - $root.google.protobuf.Duration.encode(message.timeout, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + $root.google.protobuf.Duration.encode(message.timeout, writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); return writer; }; @@ -107190,7 +110500,7 @@ * @returns {$protobuf.Writer} Writer */ WaitOperationRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -107264,10 +110574,10 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) if (!$util.isString(message.name)) return "name: string expected"; - if (message.timeout != null && message.hasOwnProperty("timeout")) { + if (message.timeout != null && Object.hasOwnProperty.call(message, "timeout")) { var error = $root.google.protobuf.Duration.verify(message.timeout, long + 1); if (error) return "timeout." + error; @@ -107286,6 +110596,8 @@ WaitOperationRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.google.longrunning.WaitOperationRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".google.longrunning.WaitOperationRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -107294,7 +110606,7 @@ if (object.name != null) message.name = String(object.name); if (object.timeout != null) { - if (typeof object.timeout !== "object") + if (!$util.isObject(object.timeout)) throw TypeError(".google.longrunning.WaitOperationRequest.timeout: object expected"); message.timeout = $root.google.protobuf.Duration.fromObject(object.timeout, long + 1); } @@ -107310,18 +110622,22 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - WaitOperationRequest.toObject = function toObject(message, options) { + WaitOperationRequest.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.name = ""; object.timeout = null; } - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) object.name = message.name; - if (message.timeout != null && message.hasOwnProperty("timeout")) - object.timeout = $root.google.protobuf.Duration.toObject(message.timeout, options); + if (message.timeout != null && Object.hasOwnProperty.call(message, "timeout")) + object.timeout = $root.google.protobuf.Duration.toObject(message.timeout, options, q + 1); return object; }; @@ -107416,9 +110732,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - OperationInfo.encode = function encode(message, writer) { + OperationInfo.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.responseType != null && Object.hasOwnProperty.call(message, "responseType")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.responseType); if (message.metadataType != null && Object.hasOwnProperty.call(message, "metadataType")) @@ -107436,7 +110756,7 @@ * @returns {$protobuf.Writer} Writer */ OperationInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -107510,10 +110830,10 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.responseType != null && message.hasOwnProperty("responseType")) + if (message.responseType != null && Object.hasOwnProperty.call(message, "responseType")) if (!$util.isString(message.responseType)) return "responseType: string expected"; - if (message.metadataType != null && message.hasOwnProperty("metadataType")) + if (message.metadataType != null && Object.hasOwnProperty.call(message, "metadataType")) if (!$util.isString(message.metadataType)) return "metadataType: string expected"; return null; @@ -107530,6 +110850,8 @@ OperationInfo.fromObject = function fromObject(object, long) { if (object instanceof $root.google.longrunning.OperationInfo) return object; + if (!$util.isObject(object)) + throw TypeError(".google.longrunning.OperationInfo: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -107551,17 +110873,21 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - OperationInfo.toObject = function toObject(message, options) { + OperationInfo.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.responseType = ""; object.metadataType = ""; } - if (message.responseType != null && message.hasOwnProperty("responseType")) + if (message.responseType != null && Object.hasOwnProperty.call(message, "responseType")) object.responseType = message.responseType; - if (message.metadataType != null && message.hasOwnProperty("metadataType")) + if (message.metadataType != null && Object.hasOwnProperty.call(message, "metadataType")) object.metadataType = message.metadataType; return object; }; @@ -107679,16 +111005,20 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Status.encode = function encode(message, writer) { + Status.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.code != null && Object.hasOwnProperty.call(message, "code")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.code); if (message.message != null && Object.hasOwnProperty.call(message, "message")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.message); if (message.details != null && message.details.length) for (var i = 0; i < message.details.length; ++i) - $root.google.protobuf.Any.encode(message.details[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + $root.google.protobuf.Any.encode(message.details[i], writer.uint32(/* id 3, wireType 2 =*/26).fork(), q + 1).ldelim(); return writer; }; @@ -107702,7 +111032,7 @@ * @returns {$protobuf.Writer} Writer */ Status.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -107782,13 +111112,13 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.code != null && message.hasOwnProperty("code")) + if (message.code != null && Object.hasOwnProperty.call(message, "code")) if (!$util.isInteger(message.code)) return "code: integer expected"; - if (message.message != null && message.hasOwnProperty("message")) + if (message.message != null && Object.hasOwnProperty.call(message, "message")) if (!$util.isString(message.message)) return "message: string expected"; - if (message.details != null && message.hasOwnProperty("details")) { + if (message.details != null && Object.hasOwnProperty.call(message, "details")) { if (!Array.isArray(message.details)) return "details: array expected"; for (var i = 0; i < message.details.length; ++i) { @@ -107811,6 +111141,8 @@ Status.fromObject = function fromObject(object, long) { if (object instanceof $root.google.rpc.Status) return object; + if (!$util.isObject(object)) + throw TypeError(".google.rpc.Status: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -107825,7 +111157,7 @@ throw TypeError(".google.rpc.Status.details: array expected"); message.details = []; for (var i = 0; i < object.details.length; ++i) { - if (typeof object.details[i] !== "object") + if (!$util.isObject(object.details[i])) throw TypeError(".google.rpc.Status.details: object expected"); message.details[i] = $root.google.protobuf.Any.fromObject(object.details[i], long + 1); } @@ -107842,9 +111174,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Status.toObject = function toObject(message, options) { + Status.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.details = []; @@ -107852,14 +111188,14 @@ object.code = 0; object.message = ""; } - if (message.code != null && message.hasOwnProperty("code")) + if (message.code != null && Object.hasOwnProperty.call(message, "code")) object.code = message.code; - if (message.message != null && message.hasOwnProperty("message")) + if (message.message != null && Object.hasOwnProperty.call(message, "message")) object.message = message.message; if (message.details && message.details.length) { object.details = []; for (var j = 0; j < message.details.length; ++j) - object.details[j] = $root.google.protobuf.Any.toObject(message.details[j], options); + object.details[j] = $root.google.protobuf.Any.toObject(message.details[j], options, q + 1); } return object; }; From d01121ebdb1022fe3602b1a1d513d5ba40ea95ba Mon Sep 17 00:00:00 2001 From: Brent Shaffer Date: Thu, 30 Jul 2026 15:37:58 +0000 Subject: [PATCH 20/24] suggestions from gemini review --- ci/run_conditional_tests.sh | 17 ++++++++++++----- core/packages/gcp-metadata/src/index.ts | 4 ++-- .../nodejs-googleapis-common/src/discovery.ts | 4 ++-- 3 files changed, 16 insertions(+), 9 deletions(-) diff --git a/ci/run_conditional_tests.sh b/ci/run_conditional_tests.sh index f1f46a893b56..7357202c55c9 100755 --- a/ci/run_conditional_tests.sh +++ b/ci/run_conditional_tests.sh @@ -217,11 +217,18 @@ done if [[ "${DRY_RUN_SHARDS}" == "true" ]]; then count=${#test_dirs[@]} if [[ $count -gt 15 ]]; then - echo "shard_matrix=[0, 1, 2, 3, 4]" >> $GITHUB_OUTPUT - echo "shard_total=5" >> $GITHUB_OUTPUT + matrix="[0, 1, 2, 3, 4]" + total="5" else - echo "shard_matrix=[0]" >> $GITHUB_OUTPUT - echo "shard_total=1" >> $GITHUB_OUTPUT + matrix="[0]" + total="1" + fi + if [[ -n "${GITHUB_OUTPUT}" ]]; then + echo "shard_matrix=${matrix}" >> "${GITHUB_OUTPUT}" + echo "shard_total=${total}" >> "${GITHUB_OUTPUT}" + else + echo "shard_matrix=${matrix}" + echo "shard_total=${total}" fi exit 0 fi @@ -231,7 +238,7 @@ for i in "${!test_dirs[@]}"; do d="${test_dirs[$i]}" if [[ -n "${SHARD_TOTAL}" && -n "${SHARD_INDEX}" ]]; then - if (( i % SHARD_TOTAL != SHARD_INDEX )); then + if (( SHARD_TOTAL > 0 && i % SHARD_TOTAL != SHARD_INDEX )); then continue fi fi diff --git a/core/packages/gcp-metadata/src/index.ts b/core/packages/gcp-metadata/src/index.ts index d438a4c8b6a7..d8a6c8c43a8d 100644 --- a/core/packages/gcp-metadata/src/index.ts +++ b/core/packages/gcp-metadata/src/index.ts @@ -391,9 +391,9 @@ export async function isAvailable() { const codes = errObj instanceof Error && errObj.name === 'AggregateError' ? (errObj as any).errors.map((error: any) => - error.code ? error.code.toString() : 'UNKNOWN', + error?.code ? error.code.toString() : 'UNKNOWN', ) - : [errObj.code ? errObj.code.toString() : 'UNKNOWN']; + : [errObj?.code ? errObj.code.toString() : 'UNKNOWN']; const isExpected = codes.every((code: string) => [ diff --git a/core/packages/nodejs-googleapis-common/src/discovery.ts b/core/packages/nodejs-googleapis-common/src/discovery.ts index cb9114e05cdb..2a665dba0291 100644 --- a/core/packages/nodejs-googleapis-common/src/discovery.ts +++ b/core/packages/nodejs-googleapis-common/src/discovery.ts @@ -137,8 +137,8 @@ export class Discovery { if (typeof apiDiscoveryUrl === 'string') { let isUrl = false; try { - new URL(apiDiscoveryUrl); - isUrl = true; + const parsed = new URL(apiDiscoveryUrl); + isUrl = parsed.protocol === 'http:' || parsed.protocol === 'https:'; } catch (e) { // Not a valid URL } From b4d53f10eb1f83d48e38c44e3a8961073855dc90 Mon Sep 17 00:00:00 2001 From: Brent Shaffer Date: Thu, 30 Jul 2026 16:11:16 +0000 Subject: [PATCH 21/24] address another round of gemini code review --- ci/run_conditional_tests.sh | 8 ++++---- .../test/metrics-collector/gcp-metrics-handler.ts | 6 ++++-- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/ci/run_conditional_tests.sh b/ci/run_conditional_tests.sh index 7357202c55c9..3a5a732d0c14 100755 --- a/ci/run_conditional_tests.sh +++ b/ci/run_conditional_tests.sh @@ -32,7 +32,7 @@ test_script="${PROJECT_ROOT}/ci/run_single_test.sh" if [ -z "${GIT_DIFF_ARG}" ]; then - if [ ${BUILD_TYPE} == "presubmit" ]; then + if [ "${BUILD_TYPE}" == "presubmit" ]; then # For presubmit build, we want to know the difference from the # common commit in origin/main. GIT_DIFF_ARG="origin/main..." @@ -40,7 +40,7 @@ if [ -z "${GIT_DIFF_ARG}" ]; then # Then fetch enough history for finding the common commit. git fetch origin main --deepen=300 - elif [ ${BUILD_TYPE} == "continuous" ]; then + elif [ "${BUILD_TYPE}" == "continuous" ]; then # For continuous build, we want to know the difference in the last # commit. This assumes we use squash commit when merging PRs. GIT_DIFF_ARG="HEAD~.." @@ -244,10 +244,10 @@ for i in "${!test_dirs[@]}"; do fi echo "running test in ${d}" - pushd ${d} >/dev/null + pushd "${d}" >/dev/null # Temporarily allow failure. set +e - ${test_script} + "${test_script}" ret=$? set -e if [ ${ret} -ne 0 ]; then diff --git a/handwritten/bigtable/test/metrics-collector/gcp-metrics-handler.ts b/handwritten/bigtable/test/metrics-collector/gcp-metrics-handler.ts index cd5a0cc0158b..4e4b90b03581 100644 --- a/handwritten/bigtable/test/metrics-collector/gcp-metrics-handler.ts +++ b/handwritten/bigtable/test/metrics-collector/gcp-metrics-handler.ts @@ -151,8 +151,10 @@ describe('Bigtable/GCPMetricsHandler', () => { const sdkMetrics = require('@opentelemetry/sdk-metrics'); class FastPeriodicExportingMetricReader extends sdkMetrics.PeriodicExportingMetricReader { constructor(options: any) { - options.exportIntervalMillis = 1000; - super(options); + super({ + ...options, + exportIntervalMillis: 1000, + }); } } const stubs = { From 4063b52d2ecbcd56d3e386555d1e1bf6dfdda3d6 Mon Sep 17 00:00:00 2001 From: Brent Shaffer Date: Thu, 30 Jul 2026 16:41:35 +0000 Subject: [PATCH 22/24] chore: pin actions/github-script to v8 SHA --- .github/workflows/presubmit.yaml | 2 +- .github/workflows/windows-presubmit.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/presubmit.yaml b/.github/workflows/presubmit.yaml index 2c87f7666c3c..eaa6b3308aea 100644 --- a/.github/workflows/presubmit.yaml +++ b/.github/workflows/presubmit.yaml @@ -81,7 +81,7 @@ jobs: node-version: [22, 24, 26] steps: - name: Check shard status - uses: actions/github-script@v6 + uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 with: script: | const { data: { jobs } } = await github.rest.actions.listJobsForWorkflowRun({ diff --git a/.github/workflows/windows-presubmit.yaml b/.github/workflows/windows-presubmit.yaml index d6178f027af7..16266ad352e6 100644 --- a/.github/workflows/windows-presubmit.yaml +++ b/.github/workflows/windows-presubmit.yaml @@ -67,7 +67,7 @@ jobs: node-version: [22, 24, 26] steps: - name: Check shard status - uses: actions/github-script@v6 + uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 with: script: | const { data: { jobs } } = await github.rest.actions.listJobsForWorkflowRun({ From 04f1fb0f2e56c3807bcc6d94990dd77052c99ea2 Mon Sep 17 00:00:00 2001 From: Brent Shaffer Date: Fri, 31 Jul 2026 16:13:05 +0000 Subject: [PATCH 23/24] add --strict to run_conditional_tests.sh --- .github/workflows/presubmit.yaml | 4 +- .github/workflows/windows-presubmit.yaml | 4 +- ci/run_conditional_tests.sh | 55 +++++++++++++++++------- 3 files changed, 43 insertions(+), 20 deletions(-) diff --git a/.github/workflows/presubmit.yaml b/.github/workflows/presubmit.yaml index eaa6b3308aea..af3426315c2f 100644 --- a/.github/workflows/presubmit.yaml +++ b/.github/workflows/presubmit.yaml @@ -22,7 +22,7 @@ jobs: export BUILD_TYPE=presubmit export TEST_TYPE=units export GIT_DIFF_ARG=HEAD^1 - bash ci/run_conditional_tests.sh + bash ci/run_conditional_tests.sh --strict units: needs: setup name: units (Node ${{ matrix.node-version }}, Shard ${{ matrix.shard-index }}) @@ -45,7 +45,7 @@ jobs: with: version: ^10.0.0 - run: node --version - - run: ci/run_conditional_tests.sh + - run: ci/run_conditional_tests.sh --strict name: Run unit tests env: BUILD_TYPE: presubmit diff --git a/.github/workflows/windows-presubmit.yaml b/.github/workflows/windows-presubmit.yaml index 16266ad352e6..489764b905c6 100644 --- a/.github/workflows/windows-presubmit.yaml +++ b/.github/workflows/windows-presubmit.yaml @@ -22,7 +22,7 @@ jobs: export BUILD_TYPE=presubmit export TEST_TYPE=units export GIT_DIFF_ARG=HEAD^1 - bash ci/run_conditional_tests.sh + bash ci/run_conditional_tests.sh --strict units: needs: setup name: units (Node ${{ matrix.node-version }}, Shard ${{ matrix.shard-index }}) @@ -45,7 +45,7 @@ jobs: with: version: ^10.0.0 - run: node --version - - run: bash ci/run_conditional_tests.sh + - run: bash ci/run_conditional_tests.sh --strict name: Run windows unit tests shell: bash env: diff --git a/ci/run_conditional_tests.sh b/ci/run_conditional_tests.sh index 3a5a732d0c14..abdb7b56e901 100755 --- a/ci/run_conditional_tests.sh +++ b/ci/run_conditional_tests.sh @@ -31,26 +31,49 @@ fi test_script="${PROJECT_ROOT}/ci/run_single_test.sh" -if [ -z "${GIT_DIFF_ARG}" ]; then - if [ "${BUILD_TYPE}" == "presubmit" ]; then - # For presubmit build, we want to know the difference from the - # common commit in origin/main. - GIT_DIFF_ARG="origin/main..." +for arg in "$@"; do + case "${arg}" in + --strict) + STRICT=true + ;; + esac +done + +if [[ "${STRICT}" == "true" || "${STRICT}" == "1" ]]; then + if [ -z "${GIT_DIFF_ARG}" ]; then + echo "Error: STRICT mode requires GIT_DIFF_ARG to be set." >&2 + exit 1 + fi + set +e + git diff --quiet ${GIT_DIFF_ARG} + diff_status=$? + set -e + if [[ ${diff_status} -ne 0 && ${diff_status} -ne 1 ]]; then + echo "Error: STRICT mode git diff ${GIT_DIFF_ARG} failed with exit code ${diff_status}." >&2 + exit 1 + fi +else + if [ -z "${GIT_DIFF_ARG}" ]; then + if [ "${BUILD_TYPE}" == "presubmit" ]; then + # For presubmit build, we want to know the difference from the + # common commit in origin/main. + GIT_DIFF_ARG="origin/main..." - # Then fetch enough history for finding the common commit. - git fetch origin main --deepen=300 + # Then fetch enough history for finding the common commit. + git fetch origin main --deepen=300 - elif [ "${BUILD_TYPE}" == "continuous" ]; then - # For continuous build, we want to know the difference in the last - # commit. This assumes we use squash commit when merging PRs. - GIT_DIFF_ARG="HEAD~.." + elif [ "${BUILD_TYPE}" == "continuous" ]; then + # For continuous build, we want to know the difference in the last + # commit. This assumes we use squash commit when merging PRs. + GIT_DIFF_ARG="HEAD~.." - # Then fetch one last commit for getting the diff. - git fetch origin main --deepen=1 + # Then fetch one last commit for getting the diff. + git fetch origin main --deepen=1 - else - # Run everything. - GIT_DIFF_ARG="" + else + # Run everything. + GIT_DIFF_ARG="" + fi fi fi From f57850f05f8396693f03d51cbc502aeed5b13824 Mon Sep 17 00:00:00 2001 From: Brent Shaffer Date: Thu, 30 Jul 2026 22:38:33 +0000 Subject: [PATCH 24/24] increase pack-n-play timeout --- core/dev-packages/pack-n-play/test/test.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/dev-packages/pack-n-play/test/test.ts b/core/dev-packages/pack-n-play/test/test.ts index f916e9f7b589..6693b874af44 100644 --- a/core/dev-packages/pack-n-play/test/test.ts +++ b/core/dev-packages/pack-n-play/test/test.ts @@ -19,7 +19,7 @@ import {describe, it} from 'mocha'; describe('pack-n-play', () => { it('should run tests', async function () { - this.timeout(120000); // 2 minutes + this.timeout(300000); // 5 minutes if (process.platform === 'win32') { this.skip(); }